/* ==========================================================================
   NoKYCPay brand layer for SHKeeper
   --------------------------------------------------------------------------
   Loaded last, after theme.<mode>.css, so it can lean on the theme tokens.
   Colour lives in the theme files; this file owns type, shape, motion and
   interaction states. Deliberately additive: it avoids display/position/width
   so the existing Bootstrap + htmx layouts keep working untouched.

   Shape rule (applied consistently, no mixed systems):
     buttons + pills  -> fully round
     cards + dialogs  -> var(--r-lg)
     inputs + selects -> var(--r-sm)
   ========================================================================== */

/* --- Typefaces ------------------------------------------------------------
   Display stays Montserrat, which SHKeeper already self-hosts and which is a
   close match for the geometric sans in the NoKYCPay wordmark. Body moves to
   Manrope: Montserrat is wide and loose, and this console is dense.          */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Manrope', 'Montserrat', system-ui, sans-serif;
  --font-mono: 'Courier Prime', ui-monospace, SFMono-Regular, monospace;

  /* One radius scale, applied consistently. The logo is built from circles,
     so the UI leans soft rather than sharp, but stops well short of the
     roundness a marketing page would use. */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 180ms;
}

/* --- Base type ------------------------------------------------------------ */

body,
dialog {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

h1, h2, h3, h4, h5, h6,
.title-text,
.card-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.title-text {
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.025em;
}

/* Figures line up column-to-column: balances, rates, block heights. */
.coin-amount-value,
.current-exchange-value,
.total-usd-value,
.dollar,
td, th,
input[type='number'] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.coin-amount-value,
.total-usd-value {
  font-family: var(--font-display);
  font-weight: 600;
}

/* --- Focus visibility -----------------------------------------------------
   The stock CSS has no :focus-visible rule anywhere, so keyboard users get
   only the UA default, which Bootstrap suppresses in several places. */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* --- Buttons -------------------------------------------------------------- */

a, button, input {
  transition: color var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.button,
.btn {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.button:active,
.btn:active {
  transform: translateY(1px);
}

/* Stock rule paints --muted-color under --inactive-text-color: 1.19:1, an
   unreadable gray-on-gray. Re-based on a recessed surface instead. */
.button:disabled,
.btn:disabled,
.button[disabled],
.btn[disabled] {
  background-color: var(--brand-surface-hi);
  color: var(--input-placeholder-color);
  border-color: var(--brand-line);
  opacity: 1;
  transform: none;
  cursor: not-allowed;
}

.btn-outline-primary__customization,
.btn-outline-secondary__customization,
.btn-outline-dark__customization,
.btn-outline-success__customization {
  border-radius: 100px;
  font-weight: 500;
  padding-inline: 18px;
}

/* --- Surfaces -------------------------------------------------------------
   Hairline borders instead of heavy shadows: on a near-black ground a shadow
   reads as nothing, an edge reads as structure. */

.card,
dialog {
  border-radius: var(--r-lg);
  border: 1px solid var(--brand-line);
  background-color: var(--brand-surface);
}

.card {
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--brand-line-strong);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
}

dialog {
  border-width: 1px;
  border-color: var(--brand-line-strong);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}

.card-icon {
  filter: drop-shadow(0 4px 12px var(--box-shadow-color));
}

/* --- Inputs --------------------------------------------------------------- */

.form-control,
.form-select,
input[type='text'],
input[type='password'],
input[type='number'] {
  border-radius: var(--r-sm);
  border: 1px solid var(--brand-line-strong);
  font-family: var(--font-body);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--brand-ring);
  outline: none;
}

.login-input {
  border-radius: var(--r-sm);
  letter-spacing: 0.08em;
}

/* --- Side navigation ------------------------------------------------------
   A 2px brand-gradient rail marks the active route. Colour alone is not the
   only signal: the label also goes to full weight and full-contrast ink. */

.nav-link {
  border-radius: var(--r-sm);
  position: relative;
}

.nav-link--active {
  font-weight: 600;
}

.nav-link--active::before {
  content: '';
  position: absolute;
  inset-block: 6px;
  inset-inline-start: -10px;
  width: 2px;
  border-radius: 2px;
  background: var(--brand-grad);
}

/* --- Tables --------------------------------------------------------------- */

table th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--inactive-text-color);
}

table td {
  font-variant-numeric: tabular-nums;
}

/* --- Brand marks ---------------------------------------------------------- */

.big-logo {
  max-width: 100%;
  height: auto;
}

.menu-logo {
  max-width: 100%;
  height: auto;
}

/* --- Motion preference ----------------------------------------------------
   Nothing here is decorative, but transitions still collapse on request. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .button:active,
  .btn:active {
    transform: none;
  }
}
