/* --- Ticket conversation thread --------------------------------------- */
.thread {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.thread-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.05rem;
    background: var(--panel-2);
    color: var(--text);
}

.thread-client {
    border-left: 3px solid var(--teal);
    background: linear-gradient(180deg, rgba(23, 197, 197, .06), transparent 60%), var(--panel-2);
}

.thread-support {
    border-left: 3px solid var(--amber);
    background: linear-gradient(180deg, rgba(240, 179, 74, .07), transparent 60%), var(--panel-2);
}

.thread-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    color: var(--text-dim);
}

.thread-meta strong {
    color: var(--text);
    font-weight: 600;
}

.thread-body {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.6;
    color: var(--text-muted);
}

/* --- Wallet row actions ------------------------------------------------ */
.wallet-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.wallet-actions form {
    margin: 0;
}

.wallet-item {
    flex-wrap: wrap;
}

.link-btn {
    color: var(--teal, #14b8a6);
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

.link-btn:hover {
    color: var(--teal-dark, #12a5a5);
}

/* =====================================================================
   Web3 Vill - application stylesheet
   Dark theme: navy page, near-black panels, teal/coral/blue accents.
   ===================================================================== */

:root {
    /* surfaces */
    --bg:            #0d1626;
    --bg-deep:       #091120;
    --sidebar:       #0b1420;
    --panel:         #0e1a2c;
    --panel-2:       #12213a;
    --panel-3:       #16263f;
    --panel-sheen:   rgba(23, 197, 165, .10);
    --border:        #1e2f47;
    --border-strong: #2a3d5a;
    --border-soft:   #172436;

    /* text */
    --text:          #e8eef7;
    --text-muted:    #93a6bd;
    --text-dim:      #6b7d94;

    /* accents */
    --accent:        #14b8a6;
    --accent-dark:   #0f8d81;
    --accent-soft:   rgba(20, 184, 166, .12);
    --teal:          #17c5c5;
    --teal-dark:     #12a5a5;
    --blue:          #3b82f6;
    --blue-dark:     #1f66d6;
    --coral:         #f4545f;
    --coral-dark:    #e63e4e;
    --amber:         #f0b34a;
    --green:         #22c55e;

    /* status pairs (bg / fg / border) */
    --ok-bg:         rgba(34, 197, 94, .12);
    --ok-fg:         #4ade80;
    --ok-bd:         rgba(34, 197, 94, .32);
    --warn-bg:       rgba(240, 179, 74, .12);
    --warn-fg:       #fbbf24;
    --warn-bd:       rgba(240, 179, 74, .34);
    --danger-bg:     rgba(244, 84, 95, .12);
    --danger-fg:     #ff7b84;
    --danger-bd:     rgba(244, 84, 95, .34);
    --info-bg:       rgba(59, 130, 246, .12);
    --info-fg:       #7db3ff;
    --info-bd:       rgba(59, 130, 246, .34);
    --neutral-bg:    rgba(147, 166, 189, .10);
    --neutral-fg:    #b4c3d6;
    --neutral-bd:    rgba(147, 166, 189, .24);
    --accent-bg:     rgba(20, 184, 166, .14);
    --accent-fg:     #5eead4;
    --accent-bd:     rgba(20, 184, 166, .34);

    /* misc */
    --radius-sm:     6px;
    --radius:        10px;
    --radius-lg:     14px;
    --radius-pill:   999px;
    --shadow:        0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg:     0 24px 60px rgba(2, 8, 20, .55);
    --sidebar-w:     232px;
    --header-h:      62px;
    --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono:          ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --transition:    160ms ease;
    --ring:          0 0 0 3px rgba(20, 184, 166, .32);
}

/* ------------------------------------------------------------- reset ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; }

code, .mono { font-family: var(--mono); font-size: .88em; }

.text-muted { color: var(--text-muted); }
.hint { color: var(--text-dim); font-weight: 400; }
.req { color: var(--coral); }

/* ------------------------------------------------------------- layout --- */
.app { display: flex; min-height: 100vh; }

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-w);
    transition: margin-left var(--transition);
}

.app-content { flex: 1; padding: 22px 26px 30px; }

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 26px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-dim);
    font-size: 12px;
}

/* ------------------------------------------------------------ sidebar --- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--sidebar);
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform var(--transition);
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    height: var(--header-h);
    padding: 0 18px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
    color: #ffffff;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.brand span { color: var(--teal); }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0 20px;
    scrollbar-width: thin;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.nav-group { margin-bottom: 14px; }

.nav-group-label {
    display: block;
    padding: 8px 18px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    color: var(--text-dim);
    text-transform: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 18px;
    background: none;
    border: 0;
    border-left: 3px solid transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.nav-item:hover { background: rgba(255, 255, 255, .035); color: var(--text); }

.nav-item.is-active {
    background: rgba(23, 197, 197, .10);
    border-left-color: var(--teal);
    color: #ffffff;
}

.nav-icon { width: 17px; height: 17px; flex-shrink: 0; }

.nav-item .chevron {
    margin-left: auto;
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--transition);
}
.nav-item[aria-expanded="true"] .chevron { transform: rotate(225deg) translateY(-1px); }

.nav-submenu {
    display: none;
    padding: 4px 0 4px 0;
}
.nav-submenu.is-open { display: block; }

.nav-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px 7px 44px;
    font-size: 13px;
    color: var(--text-muted);
}
.nav-subitem:hover { color: var(--text); }
.nav-subitem.is-active { color: var(--teal); }
.nav-subitem .bullet {
    width: 6px;
    height: 6px;
    border: 1.4px solid currentColor;
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-form { margin: 0; }

.sidebar-collapse {
    background: none;
    border: 0;
    border-top: 1px solid var(--border-soft);
    color: var(--text-dim);
    padding: 10px;
    cursor: pointer;
}
.sidebar-collapse:hover { color: var(--teal); }

/* ------------------------------------------------------------- header --- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--header-h);
    padding: 0 26px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-soft);
}

.header-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
}
.header-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.header-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.translate { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.lang-select {
    min-width: 190px;
    padding: 7px 36px 7px 12px;
    background-color: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
}

.translate-note { font-size: 11px; color: var(--text-dim); }
.translate-note b { font-weight: 700; color: #4285f4; }
.translate-note .g2 { color: #ea4335; }
.translate-note .g3 { color: #fbbc05; }
.translate-note .g4 { color: #4285f4; }
.translate-note .g5 { color: #34a853; }
.translate-note .g6 { color: #ea4335; }

.avatar-menu { position: relative; }

.avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: #dfe6ee;
    color: #2b3a4d;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.avatar-btn:hover { background: #ffffff; }

/* ---------------------------------------------------------- dropdowns --- */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    padding: 6px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    z-index: 50;
}
.dropdown-menu.is-open { display: block; }
.dropdown-right { left: auto; right: 0; }

.shortcut-dropdown { position: relative; }
.shortcut-dropdown .dropdown-menu { min-width: 170px; }

.dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: 0;
    border-radius: 6px;
    text-align: left;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}
.dropdown-item:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.dropdown-item.danger { color: var(--coral); }

.dropdown-head {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 6px;
}
.dropdown-head strong { display: block; font-size: 13px; }
.dropdown-head small { color: var(--text-dim); font-size: 11.5px; }

.dropdown-divider { height: 1px; background: var(--border-soft); margin: 6px 4px; }

/* --------------------------------------------------------- page head --- */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.page-title { font-size: 25px; font-weight: 600; letter-spacing: .2px; }

.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .current { color: var(--text-muted); }
.breadcrumb > * + *::before { content: ""; }

/* ------------------------------------------------------------- cards --- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-soft);
}
.card-head h2 { font-size: 16px; }

.card-body { padding: 18px; }

.card-head-actions { flex-wrap: wrap; }
.stake-actions, .stake-actions-right { display: flex; gap: 10px; }

.form-card { padding: 26px 22px; }

.form-intro {
    max-width: 980px;
    margin: 0 auto 22px;
    text-align: center;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

.form-note {
    max-width: 940px;
    margin: 18px auto 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-dim);
}

/* ---------------------------------------------------------- dashboard -- */
.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 16px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12.5px;
    color: var(--text-muted);
    cursor: default;
}
.date-icon { font-size: 13px; }

.balance-card {
    position: relative;
    padding: 22px 24px 26px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(23, 197, 165, .16), rgba(16, 60, 80, .10) 45%, rgba(13, 26, 43, 1) 78%),
        var(--panel);
    overflow: hidden;
}

.balance-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .8px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.balance-value { font-size: 34px; font-weight: 700; letter-spacing: .5px; }

.balance-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 14px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.balance-caret { color: var(--teal); font-size: 9px; }

/* ---------------------------------------------------------- shortcuts -- */
.shortcut-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.shortcut-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 34px;
    padding: 8px 16px;
    border: 0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: filter var(--transition);
}
.shortcut-btn:hover { filter: brightness(1.1); }

.shortcut-teal { background: var(--teal); }
.shortcut-grey { background: #8a97a8; }
.shortcut-blue { background: var(--blue); }

.sc-icon { font-size: 13px; }
.caret { font-size: 10px; opacity: .9; }

/* --------------------------------------------------------- asset grid -- */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.asset-card {
    padding: 14px 16px 8px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), transform var(--transition);
}
.asset-card:hover { border-color: #2a4058; transform: translateY(-1px); }

.asset-head { display: flex; align-items: flex-start; gap: 12px; }

.asset-logo {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #17283f;
    color: var(--teal);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
}

.asset-meta { display: flex; flex-direction: column; min-width: 0; }
.asset-symbol { font-size: 14px; font-weight: 600; }
.asset-network { font-size: 11.5px; color: var(--text-dim); }

.asset-quote { margin-left: auto; text-align: right; }
.asset-price { display: block; font-size: 15px; font-weight: 600; }
.asset-change { font-size: 11.5px; }
.asset-change.up { color: var(--teal); }
.asset-change.down { color: var(--coral); }

.asset-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
}
.asset-holding { font-size: 12.5px; color: var(--text-dim); }

/* ---- per-asset holdings (quantity first, USD value separate) ---------- */
.asset-holdings {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
    min-width: 0;
}
.asset-qty-label {
    font-size: 10.5px;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-dim);
}
.asset-qty {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.asset-qty.is-empty { color: var(--text-dim); font-weight: 600; }
.asset-usd {
    font-size: 13px;
    font-weight: 600;
    color: var(--teal);
    font-variant-numeric: tabular-nums;
}
.asset-avail { font-size: 11px; color: var(--text-dim); }

.asset-market { display: flex; flex-direction: column; min-width: 0; }
.asset-market-price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.asset-market-label { font-size: 11px; color: var(--text-dim); }

.asset-footnote { font-size: 12px; margin: -6px 0 20px; }

.spark { width: 96px; height: 24px; }
.spark polyline { fill: none; stroke-width: 1.6; }
.spark .spark-up { stroke: var(--teal); }
.spark .spark-down { stroke: var(--coral); }

/* ------------------------------------------------------------ buttons -- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    background: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: filter var(--transition), background var(--transition);
}
.btn:hover { filter: brightness(1.08); }

.btn-teal  { background: var(--teal); }
.btn-blue  { background: var(--blue); }
.btn-coral { background: var(--coral); }
.btn-grey  { background: #8a97a8; }

.btn-ghost {
    background: #1b2a3f;
    border-color: var(--border);
    color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); background: #22344c; filter: none; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 22px; font-size: 14px; min-width: 190px; }
.btn-block { width: 100%; }

.btn.is-disabled,
.btn.is-current { pointer-events: none; }
.btn.is-disabled { opacity: .45; }
.btn.is-current { background: var(--teal); border-color: var(--teal); color: #04212a; }

.btn-copy { border-radius: 0 4px 4px 0; padding: 9px 16px; }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--blue);
    font-size: 12.5px;
    cursor: pointer;
    text-decoration: underline;
}
.link-btn:hover { color: #5aa2ff; }

/* -------------------------------------------------------------- pills -- */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    color: #04212a;
    background: #94a3b8;
}
.pill-teal  { background: var(--teal); color: #04212a; }
.pill-amber { background: var(--amber); color: #3a2600; }
.pill-coral { background: var(--coral); color: #ffffff; }
.pill-blue  { background: var(--blue); color: #ffffff; }
.pill-grey  { background: #475569; color: #e2e8f0; }

/* -------------------------------------------------------------- forms -- */
.form { max-width: 100%; }
.form-narrow { max-width: 620px; margin: 0 auto; }

.form-row { margin-bottom: 16px; }

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}

.form-row-inline {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}
.form-row-inline .form-label { margin: 9px 0 0; text-align: right; }

.form-control { min-width: 0; }

.input {
    width: 100%;
    padding: 9px 11px;
    background: #ffffff;
    color: #1a2534;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 13.5px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(23, 197, 197, .18);
}
.input::placeholder { color: #94a3b8; }
.input[readonly] { background: #eef2f7; color: #64748b; }

textarea.input { resize: vertical; min-height: 90px; }

/* Select arrow is drawn once (see the consolidated select block at the end of
   this file). Only the native-appearance kill and cursor belong here. */
.input-select { appearance: none; -webkit-appearance: none; cursor: pointer; }

.input-readonly {
    display: block;
    width: 100%;
    flex: 1;
    min-width: 0;
    padding: 9px 11px;
    background: #ffffff;
    color: #1a2534;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 13.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.input-group { position: relative; display: flex; }
.input-group .input { border-radius: 3px; }
.input-group-suffix .input,
.input-group-suffix .input-readonly {
    border-radius: 3px 0 0 3px;
    border-right: 0;
}

.input-suffix {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    background: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-left: 0;
    border-radius: 0 3px 3px 0;
    font-size: 12.5px;
    font-weight: 600;
}

.input-affix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
}
.input-group .input-affix { color: #475569; }

.field-error { display: block; margin-top: 5px; color: var(--coral); font-size: 12px; }
.field-hint { display: block; margin-top: 5px; color: var(--text-dim); font-size: 12px; }

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}
.checkbox input { margin-top: 2px; accent-color: var(--teal); }

.form-actions { display: flex; gap: 14px; margin-top: 22px; }
.form-actions .btn { flex: 1; }
.form-actions-center { justify-content: center; }
.form-actions-center .btn { flex: 0 0 auto; min-width: 130px; }

/* ------------------------------------------------------------- tables -- */
.table-block { width: 100%; }

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.table-length {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}
.table-length .input-select { width: 86px; padding: 5px 30px 5px 10px; }
.table-search { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.table-search .input-search {
    width: 190px;
    padding: 6px 10px;
    background: #ffffff;
    color: #1a2534;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 13px;
}
.table-search .input-search:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(23, 197, 197, .18);
}

.table-scroll { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 4px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table thead th {
    padding: 10px 12px;
    background: #0f1d2f;
    border-bottom: 1px solid var(--border);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
}
.data-table thead th a { display: inline-flex; align-items: center; gap: 5px; color: inherit; }
.data-table thead th a:hover { color: var(--teal); }
.sort-arrow { font-size: 10px; opacity: .65; }

.data-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-muted);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, .02); }

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }

.table-empty-row td {
    padding: 26px 12px;
    text-align: center;
    color: var(--text-dim);
    font-style: normal;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.table-info { font-size: 13px; color: var(--text-muted); }
.table-pager { display: flex; align-items: center; gap: 6px; }

.row-actions { position: relative; display: inline-block; }

/* ------------------------------------------------------------- alerts -- */
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    background: var(--panel-2);
    color: var(--text);
    font-size: 13px;
    margin-bottom: 14px;
}
.alert-success { border-left-color: var(--green); background: rgba(34, 197, 94, .08); }
.alert-danger,
.alert-error   { border-left-color: var(--coral); background: rgba(244, 84, 95, .09); }
.alert-warning { border-left-color: var(--amber); background: rgba(240, 179, 74, .08); }
.alert-info    { border-left-color: var(--blue); background: rgba(59, 130, 246, .08); }

.alert-list { margin: 6px 0 0 18px; padding: 0; }

.alert-close {
    background: none;
    border: 0;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    opacity: .6;
    cursor: pointer;
}
.alert-close:hover { opacity: 1; }

.notice {
    padding: 10px 14px;
    margin: 0 0 18px;
    border-radius: var(--radius);
    font-size: 12.5px;
    line-height: 1.6;
}
.notice-info { background: var(--info-bg); border: 1px solid var(--info-bd); color: var(--info-fg); }

/* ------------------------------------------------------------- modals -- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }

.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 9, 18, .72); }

.modal-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.modal-sm { max-width: 420px; }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.modal-head h2 { font-size: 16px; }

.modal-close {
    background: none;
    border: 0;
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 20px; }
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 20px 20px;
}
.modal-actions form { margin: 0; }

/* ------------------------------------------------------- balance banner- */
.balance-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #2b7fff, #1f66d6);
    color: #ffffff;
}
.balance-banner .balance-label { color: rgba(255, 255, 255, .8); }
.balance-banner .balance-value { font-size: 30px; }
.balance-banner-icon svg { width: 44px; height: 44px; opacity: .95; }

/* ------------------------------------------------------ profile header - */
.profile-cover {
    position: relative;
    height: 132px;
    border-radius: var(--radius) var(--radius) 0 0;
    background:
        linear-gradient(120deg, rgba(11, 60, 75, .95), rgba(16, 122, 122, .85) 45%, rgba(9, 40, 60, .95)),
        var(--panel);
    overflow: visible;
}

.profile-identity {
    position: absolute;
    left: 28px;
    bottom: -30px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    background: #e9edf2;
    border: 3px solid #f8fafc;
    border-radius: 4px;
    color: #9aa7b5;
}
.profile-avatar svg { width: 62px; height: 62px; }

.profile-names { padding-bottom: 14px; color: #ffffff; }
.profile-names strong { display: block; font-size: 19px; font-weight: 700; }
.profile-names span { font-size: 12.5px; color: rgba(255, 255, 255, .85); }

.tab-strip {
    display: flex;
    margin-top: 46px;
    background: #f1f5f9;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.tab-strip-item {
    flex: 1;
    padding: 11px 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #64748b;
}
.tab-strip-item.is-active { background: #ffffff; color: #1e293b; }

.detail-panel {
    padding: 26px 22px;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

.detail-list { margin: 0; max-width: 620px; }

.panel-title {
    margin: 0 0 6px;
    font-size: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text);
}

.panel-hint {
    margin: 0 0 20px;
    max-width: 620px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
}

.detail-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 9px 0;
}
.detail-row dt { text-align: right; font-size: 13px; font-weight: 600; color: var(--text); }
.detail-row dd {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}
.detail-icon { color: var(--text-dim); font-size: 13px; }

/* ------------------------------------------------------------- payment - */
.payment-panel { max-width: 720px; margin: 0 auto; text-align: center; }

.qr-wrap { display: flex; justify-content: center; margin-bottom: 24px; }
.qr-box {
    width: 190px;
    height: 190px;
    padding: 10px;
    background: #ffffff;
    border-radius: 4px;
    display: grid;
    place-items: center;
}
.qr-box img, .qr-box canvas, .qr-box svg { width: 100%; height: 100%; display: block; }

.payment-rows { margin: 0 0 20px; text-align: left; }
.payment-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.payment-row dt { text-align: right; font-size: 13px; font-weight: 600; }
.payment-row dd { margin: 0; min-width: 0; }
.payment-row .input-group { width: 100%; }

.payment-note {
    margin: 16px auto 8px;
    max-width: 640px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text);
    text-align: left;
}
.payment-status { font-size: 12.5px; color: var(--text-muted); }

/* -------------------------------------------------------------- wizard - */
.wizard { padding: 24px 22px 30px; }

.wizard-steps {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}
.wizard-step {
    flex: 1;
    padding: 11px 18px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--panel-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
}
.wizard-step.is-active { background: var(--info-bg); border-color: var(--info-bd); color: var(--info-fg); }
.wizard-step.is-complete { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }

.wizard-form { max-width: 760px; margin: 0 auto; }
.wizard-panel { display: none; border: 0; margin: 0; padding: 0; }
.wizard-panel.is-active { display: block; }

.wizard-title {
    margin-bottom: 24px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
}

.wizard-actions { display: flex; justify-content: flex-start; gap: 12px; margin-top: 24px; }
.wizard-actions-center { justify-content: center; }
.wizard-done { text-align: center; color: var(--text-muted); }

/* --------------------------------------------------------------- lists - */
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 130px 130px;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}
.activity-item:last-child { border-bottom: 0; }
.activity-method { color: var(--text); }
.activity-amount { text-align: right; font-weight: 600; color: var(--text); }
.activity-date { text-align: right; color: var(--text-dim); font-size: 12.5px; }

.wallet-list { list-style: none; margin: 0; padding: 0; }
.wallet-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}
.wallet-item:last-child { border-bottom: 0; }
.wallet-main { display: flex; flex-direction: column; min-width: 160px; }
.wallet-network { font-size: 12px; color: var(--text-dim); }
.wallet-address { flex: 1; min-width: 0; color: var(--text-muted); }

.empty-state { margin: 0; color: var(--text-dim); font-size: 13px; text-align: center; padding: 14px; }

.security-notice {
    max-width: 620px;
    margin: 0 auto 24px;
    padding: 12px 16px;
    border: 1px solid #245c58;
    border-left: 4px solid var(--teal);
    border-radius: 5px;
    background: #0d2a2a;
    font-size: 12.5px;
    line-height: 1.7;
    color: #bfe9e5;
}

.error-code { font-size: 62px; color: var(--teal); }
.error-text { color: var(--text-muted); }

/* ---------------------------------------------------------------- auth - */
.layout-guest {
    background:
        radial-gradient(1100px 560px at 12% -10%, rgba(23, 197, 197, .14), transparent 62%),
        radial-gradient(900px 520px at 92% 8%, rgba(43, 127, 255, .12), transparent 58%),
        var(--bg);
    min-height: 100vh;
}

.guest-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 32px 30px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-brand {
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}
.auth-brand span { color: var(--teal); }

.auth-title { margin-bottom: 6px; font-size: 21px; }
.auth-sub { margin: 0 0 22px; color: var(--text-muted); font-size: 13px; }

.auth-foot {
    margin: 18px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-foot a { color: var(--teal); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- responsive - */
@media (max-width: 1200px) {
    .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortcut-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .app-main { margin-left: 0; }

    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
    .sidebar.is-open { transform: translateX(0); }

    .header-burger { display: flex; }

    .app-content { padding: 18px 16px 26px; }
    .app-header { padding: 0 16px; }
    .app-footer { padding: 14px 16px; flex-direction: column; }

    .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-title { font-size: 22px; }

    .form-row-inline { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .form-row-inline .form-label { text-align: left; margin: 0; }

    .detail-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .detail-row dt { text-align: left; }

    .payment-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .payment-row dt { text-align: left; }

    .wizard-steps { flex-direction: column; }

    .activity-item { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
}

@media (max-width: 768px) {
    .asset-grid { grid-template-columns: minmax(0, 1fr); }
    .shortcut-bar { grid-template-columns: minmax(0, 1fr); gap: 10px; }

    .lang-select { min-width: 130px; }
    .translate-note { display: none; }

    .balance-value { font-size: 26px; }
    .balance-banner .balance-value { font-size: 24px; }

    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-search { justify-content: space-between; }
    .table-search .input-search { flex: 1; min-width: 0; }
    .table-footer { flex-direction: column; align-items: stretch; }

    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }

    .profile-cover { height: 108px; }
    .profile-avatar { width: 74px; height: 74px; }
    .profile-avatar svg { width: 50px; height: 50px; }
    .profile-identity { left: 16px; bottom: -24px; gap: 12px; }
    .tab-strip { margin-top: 38px; }

    .modal-panel { max-width: 100%; }
    .auth-card { padding: 24px 20px; }

    .wallet-item { flex-wrap: wrap; }
    .wallet-main { min-width: 0; width: 100%; }
}

@media (max-width: 480px) {
    .page-title { font-size: 20px; }
    .balance-value { font-size: 24px; }
    .qr-box { width: 150px; height: 150px; }
    .wizard { padding: 18px 14px 22px; }
    .wizard-title { font-size: 18px; }
}

/* =====================================================================
   Admin console
   Reuses the client shell (.app / .sidebar / .app-main); only adds the
   operator-specific blocks below. Responsive via the grids' auto-fit.
   ===================================================================== */
.admin-body .sidebar { border-top: 2px solid var(--accent); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.stat-card .stat-label {
    display: block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.stat-card.is-alert { border-color: rgba(251, 191, 36, .5); }
.stat-card.is-alert .stat-value { color: var(--amber); }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 14px;
}

.filter-bar .form-row { margin: 0; min-width: 150px; }

.filter-bar .form-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.audit-meta {
    font-size: 12px;
    color: var(--text-muted);
    white-space: normal;
    word-break: break-word;
    max-width: 320px;
}

.action-stack { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.timeline li:last-child { border-bottom: 0; }
.timeline .t-when { color: var(--text-muted); white-space: nowrap; }

.balance-adjust-form .form-row { margin-bottom: 10px; }

.addr-mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }

@media (max-width: 620px) {
    .stat-card .stat-value { font-size: 18px; }
    .filter-bar { gap: 8px; }
}

/* Crypto logos: image sits over the letter fallback. */
.asset-logo.has-img { position: relative; }
.asset-logo.has-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    background: #0b1420;
}
.asset-logo-sm { width: 22px; height: 22px; font-size: 8px; }

.gateway-preview { display: inline-flex; align-items: center; margin-top: 6px; }
.gateway-preview .logo-inline { width: 24px; height: 24px; border-radius: 50%; }
.payment-gateway { display: inline-flex; align-items: center; gap: 8px; }
.asset-logo-sm .logo-inline, .asset-logo-sm img { border-radius: 50%; }

/* =====================================================================
   Admin console - dedicated portal chrome
   ===================================================================== */
.sidebar-admin { border-top: 2px solid var(--accent); }
.brand-admin {
    font-style: normal;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--coral);
    border: 1px solid var(--danger-bd);
    border-radius: var(--radius-sm);
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
}

.app-header-admin { border-bottom: 1px solid var(--border); }
.admin-area-badge { display: inline-flex; align-items: center; margin-left: 10px; }
.admin-demo-note { font-size: 12px; }

.admin-auth-brand em {
    font-style: normal;
    font-size: 12px;
    color: var(--coral);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-left: 6px;
}
.auth-card-admin { border-top: 2px solid var(--accent); }

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}
.panel-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.grid-2, .admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.tabs-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--panel);
}
.tab:hover { color: var(--text); }
.tab.is-active { border-color: var(--teal); color: var(--teal); background: rgba(45, 212, 191, .08); }

.network-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.network-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    background: var(--panel-2, var(--panel));
}

.operator-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}
.operator-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.operator-head strong { display: block; }
.operator-head small { display: block; margin-bottom: 4px; }
.operator-perms { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px 14px;
    margin-bottom: 12px;
}
.operator-perms-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline-block; margin: 0; }
.button-stack-inline { display: inline-flex; gap: 6px; }
.filter-bar .input-select-sm { min-width: 140px; }
.form-inline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: end;
}

.qr-box-sm { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 6px; overflow: hidden; }
.qr-box-sm img { width: 60px; height: 60px; }

/* Inline edit panel for a receiving-address row (admin settings). */
.addr-edit-row > td { background: var(--panel-2); }
.addr-edit-row .form-row { margin-bottom: 10px; }

.audit-changes { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.audit-change { font-size: 11px; }
.audit-change b { color: var(--text-muted); font-weight: 600; }

/* --------------------------------------- admin adjustments & send rows -- */
.asset-logo-md { width: 40px; height: 40px; font-size: 12px; }
.asset-cell { display: inline-flex; align-items: center; gap: 8px; }
.asset-cell b { font-weight: 600; }
.asset-card { display: flex; align-items: center; gap: 12px; }
.asset-card .asset-meta { display: flex; flex-direction: column; }
.asset-card .asset-symbol { font-weight: 600; font-size: 14px; }
.asset-card .asset-name { font-size: 11.5px; color: var(--text-muted); }
.asset-card .asset-figures { display: flex; flex-direction: column; gap: 2px; margin-left: auto; text-align: right; }
.asset-card .asset-total { font-variant-numeric: tabular-nums; font-weight: 600; }
.asset-card .asset-sub { font-size: 11px; }
.row-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 190px; }
.row-actions .row-action { margin: 0; }
.row-actions .form-inline { display: flex; gap: 6px; align-items: center; }
.row-actions .row-note { font-size: 11px; line-height: 1.4; }
.input-xs { padding: 4px 8px; font-size: 12px; height: 30px; min-width: 0; width: 100%; }
.row-actions .btn-sm { padding: 4px 10px; font-size: 12px; }

/* ------------------------------------------- admin row detail panels -- */
/* "View details" toggles this sibling panel in place. Kept inside the
   narrow action column, so it wraps to the row width on small screens. */
.row-actions .row-details { width: 100%; }
.row-actions .detail-list { margin: 0; max-width: none; }
.row-actions .detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    border-top: 1px solid var(--border-soft);
    font-size: 11.5px;
    line-height: 1.4;
}
.row-actions .detail-list > div:first-child { border-top: 0; }
.row-actions .detail-list dt { color: var(--text-muted); white-space: nowrap; }
.row-actions .detail-list dd { margin: 0; text-align: right; word-break: break-word; }

/* ============================================ client card portfolio ==== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.bank-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 190px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: #f3f7fc;
    overflow: hidden;
    /* per-type gradient, overridden below */
    background: linear-gradient(135deg, #14304c 0%, #0d1a2b 100%);
    box-shadow: var(--shadow);
}
.bank-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .10), transparent 60%);
    pointer-events: none;
}

/* Type colours: virtual teal, physical blue, premium amber/gold. */
.card-type-virtual  { background: linear-gradient(135deg, #0f3b3b 0%, #0d1a2b 100%); }
.card-type-physical { background: linear-gradient(135deg, #14304c 0%, #0d1a2b 100%); }
.card-type-premium  { background: linear-gradient(135deg, #4a3618 0%, #1a1408 100%); }

.bank-card.is-inactive { opacity: .62; filter: grayscale(.35); }
.bank-card:not(.is-inactive):hover { transform: translateY(-2px); transition: transform .15s ease; }

.bank-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bank-card-type {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(243, 247, 252, .82);
}

.bank-card-number {
    font-size: 19px;
    letter-spacing: .14em;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

.bank-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    margin: 0;
}
.bank-card-meta dt {
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(243, 247, 252, .58);
}
.bank-card-meta dd {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 600;
    word-break: break-word;
}
.bank-card-meta > div:first-child { grid-column: 1 / -1; }

.bank-card-foot { display: flex; align-items: center; justify-content: flex-end; margin-top: auto; }
.brand-word { font-size: 20px; font-weight: 800; letter-spacing: .06em; font-style: italic; }
.brand-visa { color: #ffffff; }
.brand-mark { display: inline-flex; }
.brand-mark i { width: 24px; height: 24px; border-radius: 50%; display: block; }
.brand-mastercard i:first-child { background: #eb001b; }
.brand-mastercard i:last-child  { background: #f79e1b; margin-left: -10px; opacity: .9; }

.bank-card-note {
    margin: 0;
    font-size: 11.5px;
    color: rgba(243, 247, 252, .72);
}

@media (max-width: 520px) {
    .card-grid { grid-template-columns: 1fr; gap: 14px; }
    .bank-card { min-height: 0; padding: 16px; }
    .bank-card-number { font-size: 17px; }
    .bank-card-meta { grid-template-columns: 1fr; }
    .bank-card-meta > div:first-child { grid-column: auto; }
}


/* =====================================================================
   Admin settings (tabbed)
   Replaces the old single long scroll of forms with a tab bar, compact
   searchable tables and modal editors. Uses the same dark surface tokens
   and spacing scale as the rest of the console.
   ===================================================================== */

.settings-page { display: block; }

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 20px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.settings-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.settings-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .05);
}

.settings-tab:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.settings-tab.is-active {
    color: #04141b;
    background: linear-gradient(180deg, var(--teal), var(--teal-dark));
    box-shadow: 0 2px 10px rgba(23, 197, 165, .35);
}

.settings-tab.is-active:hover {
    color: #04141b;
    background: linear-gradient(180deg, var(--teal), var(--teal-dark));
}

/* subtle divider between tabs, hidden around the active one */
.settings-tab + .settings-tab::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 22%;
    height: 56%;
    width: 1px;
    background: var(--border-soft);
}

.settings-tab.is-active::before,
.settings-tab.is-active + .settings-tab::before,
.settings-tab:hover::before,
.settings-tab:hover + .settings-tab::before { opacity: 0; }

.settings-panel.is-hidden { display: none; }

.settings-panel .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-head-inline {
    border-bottom: 0;
    padding: 0 0 4px;
}

/* --------------------------------------------------- email enable bar -- */
/* Prominent on/off switch for outgoing email at the top of the Email tab. */
.enable-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0 20px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-dim);
    border-radius: var(--radius);
    background: var(--panel-2);
}

.enable-bar.is-on {
    border-color: var(--accent-bd);
    border-left-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-soft), var(--panel-2));
}

.enable-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    cursor: pointer;
}

.enable-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.enable-track {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    border-radius: var(--radius-pill);
    background: var(--border-strong);
    transition: background var(--transition);
}

.enable-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    transition: transform var(--transition);
}

.enable-switch input:checked + .enable-track {
    background: linear-gradient(180deg, var(--teal), var(--teal-dark));
}

.enable-switch input:checked + .enable-track .enable-knob {
    transform: translateX(20px);
}

.enable-switch input:focus-visible + .enable-track {
    box-shadow: var(--ring);
}

.enable-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.enable-text strong { font-size: 14px; color: var(--text); }
.enable-text small { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.enable-bar.is-on .enable-text small { color: var(--accent-fg); }

.panel-subtitle {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.check-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    cursor: pointer;
}

.check-row input { margin: 0; }

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.table-count {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.table-empty {
    padding: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.data-table tbody tr[hidden] { display: none; }

.addr-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.integration-value {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.is-invalid { border-color: var(--coral) !important; box-shadow: 0 0 0 3px rgba(255, 77, 94, .18); }

.alert-info {
    background: rgba(43, 127, 255, .12);
    border: 1px solid rgba(43, 127, 255, .35);
    color: #cfe1ff;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Compact tables inside the settings page keep long pages scannable. */
.settings-panel .data-table tbody td { padding: 8px 10px; }
.settings-panel .data-table thead th { padding: 9px 10px; }
.settings-panel .data-table .asset-logo-sm { width: 20px; height: 20px; }

@media (max-width: 720px) {
    .settings-tabs {
        flex-wrap: nowrap;
        gap: 2px;
        padding: 5px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .settings-tabs::-webkit-scrollbar { display: none; }
    .settings-tab { padding: 8px 13px; font-size: 12px; }
    .settings-panel .card-head { flex-direction: column; align-items: flex-start; }
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-toolbar .input-search { width: 100%; }
    .admin-grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   Financial dashboard refresh - shared component layer
   ---------------------------------------------------------------------
   A single consistent set of primitives (status badges, stat cards,
   toolbars, side drawers, confirmation dialogs, field validation,
   tooltips, toasts and the demo-mode indicator) reused across the client
   portal and the admin console. Everything is token driven so the dark
   theme stays coherent and contrast stays high.
   ===================================================================== */

/* ----------------------------------------------------- page header ----- */
.page-head {
    align-items: flex-end;
    gap: 20px;
    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-soft);
}
.page-head-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}
.page-lede { margin: 0; max-width: 62ch; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* -------------------------------------------------- status badges ------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--neutral-bd);
    border-radius: var(--radius-pill);
    background: var(--neutral-bg);
    color: var(--neutral-fg);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    text-transform: capitalize;
}
.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: .9;
}
.badge-ok      { background: var(--ok-bg);      color: var(--ok-fg);      border-color: var(--ok-bd); }
.badge-warn    { background: var(--warn-bg);    color: var(--warn-fg);    border-color: var(--warn-bd); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-fg);  border-color: var(--danger-bd); }
.badge-info    { background: var(--info-bg);    color: var(--info-fg);    border-color: var(--info-bd); }
.badge-accent  { background: var(--accent-bg);  color: var(--accent-fg);  border-color: var(--accent-bd); }
.badge-plain::before { display: none; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neutral-fg); display: inline-block; }

/* --------------------------------------------------- stat cards -------- */
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    transition: border-color var(--transition), background var(--transition);
}
a.stat-card:hover { border-color: var(--border-strong); background: var(--panel-2); }
.stat-card .stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.stat-card .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}
.stat-card .stat-foot { display: block; margin-top: 6px; font-size: 12px; color: var(--text-dim); }
.stat-card.is-alert { border-color: var(--warn-bd); background: linear-gradient(180deg, var(--warn-bg), transparent 70%), var(--panel); }
.stat-card.is-alert .stat-value { color: var(--warn-fg); }
.stat-card.is-alert .stat-label { color: var(--warn-fg); }

.stat-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%),
        var(--panel);
}
.stat-hero .stat-hero-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.stat-hero .stat-hero-value { display: block; margin: 6px 0 4px; font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-hero .stat-hero-sub { color: var(--text-dim); font-size: 12.5px; }
.stat-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Section divider heading inside a page body. */
.section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 26px 0 12px;
}
.section-title:first-of-type { margin-top: 0; }
.app-footer-meta { display: inline-flex; align-items: center; gap: 10px; }
.avatar-btn.is-admin { background: linear-gradient(135deg, var(--coral), #b3343d); color: #fff; }

/* ----------------------------------------------------- toolbars -------- */
.toolbar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
    margin-bottom: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.toolbar .toolbar-field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.toolbar .toolbar-field > span,
.toolbar .toolbar-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.toolbar .toolbar-spacer { flex: 1 1 auto; }
.toolbar .toolbar-actions { display: flex; gap: 8px; align-items: center; }

/* Toolbar collapses to full-width stacked fields on phones. */
@media (max-width: 720px) {
    .toolbar { padding: 12px; gap: 10px; }
    .toolbar .toolbar-field,
    .toolbar .search-field,
    .toolbar .input-select { min-width: 100%; width: 100%; }
    .toolbar .toolbar-actions { width: 100%; flex-wrap: wrap; }
    .toolbar .toolbar-actions .btn { flex: 1 1 auto; }
}

/* Search field with a leading glyph. */
.search-field { position: relative; display: flex; align-items: center; min-width: 220px; }
.search-field svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--text-dim); pointer-events: none; }
.search-field .input-search { padding-left: 32px; }

/* ----------------------------------------------------- side drawer ----- */
.drawer { position: fixed; inset: 0; z-index: 110; display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(4, 9, 18, .66); backdrop-filter: blur(1px); }
.drawer-panel {
    position: relative;
    width: min(480px, 100%);
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--panel-2);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: drawer-in var(--transition) ease;
}
@keyframes drawer-in { from { transform: translateX(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.drawer-head h2 { font-size: 16px; }
.drawer-head .drawer-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-dim); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--border-soft); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.drawer-list { margin: 0; display: grid; gap: 0; }
.drawer-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}
.drawer-list > div:last-child { border-bottom: 0; }
.drawer-list dt { color: var(--text-dim); white-space: nowrap; }
.drawer-list dd { margin: 0; text-align: right; color: var(--text); word-break: break-word; min-width: 0; }

.drawer-section { margin-top: 20px; }
.drawer-section-title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }

/* --------------------------------------------------- confirmation ------ */
.confirm { padding: 4px 0; }
.confirm-icon {
    width: 44px; height: 44px; border-radius: var(--radius);
    display: grid; place-items: center; margin-bottom: 14px;
    background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-bd);
}
.confirm-icon svg { width: 22px; height: 22px; }
.confirm-icon.is-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-bd); }
.confirm-title { font-size: 17px; margin-bottom: 6px; }
.confirm-text { color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.confirm-summary {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}
.confirm-summary .drawer-list > div { padding: 6px 0; border-bottom: 0; }
.confirm-consequences { margin: 14px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 12.5px; line-height: 1.7; }

/* ------------------------------------------------------ modal polish --- */
.modal-panel { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-head h2 { font-size: 16px; }
.modal-actions { border-top: 1px solid var(--border-soft); padding-top: 16px; }

/* --------------------------------------------------- field states ------ */
.field-available {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--panel-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--text-muted);
}
.field-available strong { color: var(--text); font-variant-numeric: tabular-nums; }
.input.is-invalid,
.input-select.is-invalid,
textarea.input.is-invalid { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(244, 84, 95, .18); }
.field-error { color: var(--danger-fg); }
.field-hint { color: var(--text-dim); }
.input:focus-visible,
.input-select:focus-visible,
.input-search:focus-visible { outline: 0; border-color: var(--accent); box-shadow: var(--ring); }
.input:disabled, .input-select:disabled, .input[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 18px; }
.fieldset legend { padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }

/* Fee / review summary block used before financial submits. */
.review-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-2);
    padding: 14px 16px;
    margin-bottom: 18px;
}
.review-block h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.review-block .drawer-list > div { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.review-block .review-total { font-size: 15px; font-weight: 700; color: var(--text); }

/* -------------------------------------------------- empty states ------- */
.empty-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 34px 20px;
    text-align: center;
    color: var(--text-dim);
}
.empty-state-box svg { width: 30px; height: 30px; opacity: .7; }
.empty-state-box strong { color: var(--text-muted); font-size: 14px; }
.empty-state-box p { margin: 0; font-size: 12.5px; max-width: 42ch; line-height: 1.6; }

/* ------------------------------------------------------ tooltip -------- */
.tip { position: relative; display: inline-flex; align-items: center; }
.tip > .tip-mark {
    width: 15px; height: 15px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--border-strong);
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 10px; font-weight: 700; line-height: 1; cursor: help;
}
.tip[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%; transform: translateX(-50%);
    width: max-content; max-width: 250px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: #08111f;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11.5px; font-weight: 400; line-height: 1.5; text-transform: none;
    text-align: left; white-space: normal;
    box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transition: opacity var(--transition);
    z-index: 60;
}
.tip:hover::after, .tip:focus-within::after { opacity: 1; }

/* ----------------------------------------------------- toasts ---------- */
.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 130;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--panel-2);
    color: var(--text);
    font-size: 13px;
    box-shadow: var(--shadow);
    animation: toast-in var(--transition) ease;
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast-success { border-left-color: var(--green); }
.toast-error   { border-left-color: var(--coral); }
.toast-warning { border-left-color: var(--amber); }
.toast-info    { border-left-color: var(--blue); }
.toast-close { margin-left: auto; background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 15px; line-height: 1; }

/* ------------------------------------------------ demo indicator ------- */
.mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid var(--warn-bd);
    border-radius: var(--radius-pill);
    background: var(--warn-bg);
    color: var(--warn-fg);
    font-size: 11.5px;
    font-weight: 600;
    cursor: help;
}
.mode-chip::before {
    content: "";
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(240, 179, 74, .18);
}
.admin-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 9px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: var(--radius);
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ---------------------------------------------------- side nav --------- */
.nav-item.is-active { background: var(--accent-soft); border-left-color: var(--accent); color: #ffffff; }
.nav-item.is-active .nav-icon { color: var(--accent-fg); }
.nav-count {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background: var(--warn-bg);
    border: 1px solid var(--warn-bd);
    color: var(--warn-fg);
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
}
.nav-item.has-children .nav-count { margin-left: 0; }

/* --------------------------------------------------- data tables ------- */
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--panel-2);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.data-table tbody td { padding: 12px; border-bottom: 1px solid var(--border-soft); color: var(--text-muted); }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.data-table .align-right, .data-table .num { font-variant-numeric: tabular-nums; }
.data-table .cell-primary { color: var(--text); font-weight: 600; }
.data-table .cell-stack { display: flex; flex-direction: column; gap: 2px; }
.data-table .cell-sub { font-size: 11.5px; color: var(--text-dim); }

/* Action menu (row kebab). */
.row-menu { position: relative; display: inline-flex; }
.row-menu-btn {
    display: inline-grid; place-items: center;
    width: 30px; height: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text-muted);
    cursor: pointer;
}
.row-menu-btn:hover { color: var(--text); border-color: var(--border-strong); }
.row-menu .dropdown-menu { min-width: 190px; }
.row-menu .dropdown-item[disabled] { opacity: .45; cursor: not-allowed; }

/* -------------------------------------------------- payment / QR ------- */
.qr-box { border-radius: var(--radius); box-shadow: 0 0 0 1px var(--border); }
.payment-panel { max-width: 640px; }
.copy-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.copy-row .input-readonly { min-width: 0; }

/* ------------------------------------------------------ responsive ----- */
@media (max-width: 992px) {
    .page-head { align-items: flex-start; }
    .stat-hero { grid-template-columns: minmax(0, 1fr); }
    .drawer-panel { width: min(460px, 100%); }
}
@media (max-width: 720px) {
    .toolbar { align-items: stretch; }
    .toolbar .toolbar-field, .toolbar .search-field { min-width: 100%; width: 100%; }
    .stat-card .stat-value { font-size: 20px; }
    .stat-hero .stat-hero-value { font-size: 28px; }
    .toast-stack { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
@media (max-width: 480px) {
    .drawer-panel { width: 100%; }
    .modal-panel { max-height: 92vh; }
}

/* Respect reduced-motion preferences across the design system. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------- token + user marks -- */
.token-mark {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--panel-3);
    border: 1px solid var(--border);
    font-size: 13px; font-weight: 700; letter-spacing: .02em;
    color: var(--text);
    flex-shrink: 0;
}
.token-mark.is-lg { width: 48px; height: 48px; font-size: 16px; }
.token-cell { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.token-cell .token-name { display: flex; flex-direction: column; min-width: 0; }
.token-cell .token-name b { color: var(--text); font-weight: 600; }
.token-cell .token-name small { color: var(--text-dim); font-size: 11.5px; }

.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.identity-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), #0e7490);
    color: #04212a;
    font-size: 12px; font-weight: 700;
    flex-shrink: 0;
}
.identity-avatar.is-admin { background: linear-gradient(135deg, var(--coral), #b3343d); color: #fff; }
.identity-body { display: flex; flex-direction: column; min-width: 0; }
.identity-body strong { color: var(--text); font-weight: 600; }
.identity-body small { color: var(--text-dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Segmented toggle (All assets / My holdings). */
.segmented {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}
.segmented a, .segmented button {
    padding: 6px 14px;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.segmented a.is-active, .segmented button.is-active { background: var(--accent-bg); color: var(--accent-fg); }

/* Compact metric used in drawers and hero areas. */
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric {
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--panel-2);
}
.metric span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 5px; }
.metric strong { font-size: 18px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* Inline field with an action button docked to the right. */
.input-action { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.input-action .input, .input-action .input-readonly { flex: 1; min-width: 0; }
.input-action .btn { flex-shrink: 0; }

/* =====================================================================
   FORM CONTROLS - authoritative dark theme layer
   ---------------------------------------------------------------------
   Consolidates the earlier light-theme field rules into one token-driven
   source of truth for height, padding, border, label, focus, hover,
   validation, disabled and read-only states.
   ===================================================================== */
.form-row { margin-bottom: 18px; }
.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}
.form-label .req { color: var(--coral); margin-left: 2px; }

.input,
.input-select,
textarea.input,
.input-search {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    line-height: 1.35;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input:hover,
.input-select:hover,
textarea.input:hover,
.input-search:hover { border-color: #35506f; }

/* Focus: teal ring replaces the browser default outline, on every control. */
.input:focus,
.input:focus-visible,
.input-select:focus,
.input-select:focus-visible,
textarea.input:focus,
textarea.input:focus-visible,
.input-search:focus,
.input-search:focus-visible {
    outline: 0;
    background: var(--panel-3);
    border-color: var(--accent);
    box-shadow: var(--ring);
}

.input::placeholder,
textarea.input::placeholder,
.input-search::placeholder { color: var(--text-dim); opacity: 1; }

.input:disabled,
.input-select:disabled,
textarea.input:disabled,
.input[aria-disabled="true"] {
    background: var(--panel);
    color: var(--text-dim);
    border-color: var(--border-soft);
    opacity: .75;
    cursor: not-allowed;
}

.input[readonly],
textarea.input[readonly],
.input-readonly {
    background: var(--panel);
    color: var(--text-muted);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    cursor: default;
}

textarea.input { min-height: 108px; resize: vertical; }

/* Select arrow: defined once in the consolidated block at the end of this
   file. Nothing arrow-related belongs here - a second background-image rule
   is what caused the repeated/overlapping chevrons. */
.input-select { cursor: pointer; }
/* Dropdown options: force dark surfaces so the list stays readable. */
.input-select option,
select option {
    background: var(--panel-3);
    color: var(--text);
}

/* Browser autofill: kill the white/yellow wash and keep text legible. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--panel-3) inset;
    box-shadow: 0 0 0 1000px var(--panel-3) inset;
    caret-color: var(--text);
    transition: background-color 9999s ease-out 0s;
}
input:autofill, textarea:autofill, select:autofill {
    background: var(--panel-3);
    color: var(--text);
}

/* Invalid fields: coral border + soft ring; hint/error lines agree. */
.input.is-invalid,
.input-select.is-invalid,
textarea.input.is-invalid,
.input-search.is-invalid {
    border-color: var(--danger-bd);
    box-shadow: 0 0 0 3px rgba(244, 84, 95, .16);
}
.field-error { display: block; margin-top: 6px; color: var(--danger-fg); font-size: 12px; }
.field-hint  { display: block; margin-top: 6px; color: var(--text-dim); font-size: 12px; }

/* Input groups keep a single outline instead of doubling borders. */
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group > .input { flex: 1; min-width: 0; }
.input-group-suffix .input,
.input-group-suffix .input-readonly {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: 0;
}
.input-suffix {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    background: var(--panel-3);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    border-left: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12.5px;
    font-weight: 600;
}
.input-affix {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 8px;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--accent-fg);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.input-affix:hover { background: var(--accent-soft); }

/* Checkbox + radio: teal accent, comfortable tap target. */
.checkbox { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.checkbox input[type="checkbox"],
.check-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}

/* Form actions wrap gracefully instead of clipping. */
.form-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* Legacy light-theme leaks with higher specificity: neutralise them here.
   NB: use background-color (not the `background` shorthand) so the custom
   select arrow set by .input-select is never wiped out. */
.table-search .input-search,
.table-length .input-select,
.table-toolbar .input-search,
.lang-select {
    background-color: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}
.table-search .input-search:focus,
.table-toolbar .input-search:focus,
.lang-select:focus {
    outline: 0;
    background-color: var(--panel-3);
    border-color: var(--accent);
    box-shadow: var(--ring);
}
.lang-select option { background: var(--panel-3); color: var(--text); }
.table-search .input-search::placeholder { color: var(--text-dim); opacity: 1; }

/* =====================================================================
   SELECT ARROW - single source of truth for every dropdown.
   Native arrow is removed (appearance: none) and replaced by ONE inline
   SVG chevron. Longhand background properties are used deliberately so no
   earlier `background:` shorthand can reintroduce a second arrow, and this
   block sits last in the cascade so it always wins.
   ===================================================================== */
.input-select,
.lang-select,
select.input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a6bd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 15px 15px;
    padding-right: 40px;
    cursor: pointer;
}
.input-select:focus,
.lang-select:focus,
select.input:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235eead4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
}
/* Compact variants keep the arrow but tighten the text padding. */
.table-length .input-select,
.filter-bar .input-select-sm {
    background-position: right 10px center;
    background-size: 14px 14px;
    padding-right: 30px;
}

/* =====================================================================
   ASSET CARDS - clear hierarchy: identity -> holding -> market
   ===================================================================== */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
    align-items: stretch;
}

.asset-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}
.asset-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }

/* 1 - identity strip: logo, symbol, name/network, 24h change. */
.asset-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--panel-2);
}
.asset-head > span[data-symbol] { display: inline-flex; flex-shrink: 0; }
.asset-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--panel-3);
    border: 1px solid var(--border);
    color: var(--accent-fg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    overflow: hidden;
}
.asset-logo img { width: 100%; height: 100%; object-fit: cover; }
.asset-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.asset-symbol { font-size: 14.5px; font-weight: 700; color: var(--text); }
.asset-network {
    font-size: 11.5px;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.asset-change {
    flex-shrink: 0;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.asset-change.up   { color: var(--ok-fg);     background: var(--ok-bg);     border: 1px solid var(--ok-bd); }
.asset-change.down { color: var(--danger-fg); background: var(--danger-bg); border: 1px solid var(--danger-bd); }

/* 2 - holdings strip: quantity first, USD estimate separate. */
.asset-holdings {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    min-width: 0;
}
.asset-qty-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.asset-qty {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.asset-qty.is-empty { color: var(--text-dim); font-weight: 600; }
/* The unit sits next to the number with breathing room, never glued to it. */
.asset-qty .unit {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-dim);
}
.asset-usd {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--accent-fg);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.asset-usd .text-muted { font-weight: 500; font-size: 11.5px; white-space: nowrap; }
.asset-avail { font-size: 11.5px; color: var(--text-dim); overflow-wrap: anywhere; }
.asset-avail .reserved { color: var(--warn-fg); }

/* 3 - market strip: visually separated from the holding. */
.asset-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--border-soft);
    background: var(--panel-2);
}
.asset-market { display: flex; flex-direction: column; min-width: 0; }
.asset-market-price { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.asset-market-label { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark { width: 84px; height: 26px; flex-shrink: 0; }

/* Settings/panel forms: readable measure on wide screens. */
.settings-panel .form-row,
.settings-panel .form-row-inline { max-width: 640px; }
.settings-panel .form-actions { max-width: 640px; }

/* Settings intro notes align to the form measure (not centre-floating). */
.settings-panel .card-body > .form-note,
.settings-panel .form-note {
    max-width: 640px;
    margin: 0 0 16px;
    text-align: left;
}

/* =====================================================================
   NAVIGATION - one distinct glyph per destination, consistent sizing
   ===================================================================== */
.nav-item {
    gap: 11px;
    padding: 9px 16px;
    min-height: 42px;
    font-weight: 500;
}
.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-dim);
    transition: color var(--transition);
}
.nav-item:hover .nav-icon { color: var(--text); }
.nav-item.is-active {
    background: var(--accent-soft);
    border-left-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.nav-item.is-active .nav-icon { color: var(--accent-fg); }
.nav-count { margin-left: auto; }
.nav-item.has-children .nav-count { margin-left: auto; }
.nav-subitem { padding: 8px 16px 8px 45px; min-height: 36px; }
.nav-group-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* =====================================================================
   RESPONSIVE - no clipping, no overflow, no page-level h-scroll
   ===================================================================== */
/* Long tokens/organic addresses wrap instead of forcing the layout wide. */
.app-content, .card, .card-body, .table-block { min-width: 0; }
.data-table .mono, .data-table .addr, .addr, .mono, .wallet-address, .address-value {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.identity-body small, .token-cell .token-name small { min-width: 0; }

@media (max-width: 1200px) {
    .asset-grid { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
}

@media (max-width: 900px) {
    /* Two columns at tablet width; one when the phone narrows further. */
    .asset-grid { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
}

@media (max-width: 620px) {
    .asset-grid { grid-template-columns: minmax(0, 1fr); }
    .asset-body { flex-wrap: wrap; }
    .spark { width: 100%; height: 24px; }
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 540px; }
}

@media (max-width: 520px) {
    /* Stack every field and action; keep tap targets >= 44px. */
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
    .input, .input-select, textarea.input, .input-search { min-height: 44px; font-size: 15px; }
    .asset-qty { font-size: 19px; }
    .toolbar-actions { flex-wrap: wrap; }
    .toolbar-actions .btn { flex: 1 1 auto; }
    .modal-panel, .drawer-panel { width: 100%; max-width: 100%; }
}






/* =====================================================================
   MARKETING HOMEPAGE
   =====================================================================
   Self-contained public landing page (layouts/marketing). Scoped under
   .layout-marketing / .mk-* so nothing here leaks into the signed-in app.
   Colours reuse the design-system tokens; the green accent echoes the
   reference theme without importing any external asset. */

.layout-marketing {
    background:
        radial-gradient(1200px 600px at 15% -8%, rgba(20, 184, 166, .16), transparent 60%),
        radial-gradient(1000px 560px at 92% 4%, rgba(59, 130, 246, .12), transparent 58%),
        var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}

.mk-main { display: block; }

.mk-accent { color: var(--green); }

/* ------------------------------------------------------------- buttons -- */
.mk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform var(--transition, .18s ease), background .18s ease,
                border-color .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}
.mk-btn:hover { transform: translateY(-1px); }
.mk-btn:active { transform: translateY(0); }

.mk-btn-primary {
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    color: #04201d;
    box-shadow: 0 10px 26px rgba(20, 184, 166, .28);
}
.mk-btn-primary:hover { box-shadow: 0 14px 32px rgba(20, 184, 166, .40); }

.mk-btn-ghost {
    background: rgba(255, 255, 255, .04);
    border-color: var(--border-strong);
    color: var(--text);
}
.mk-btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--teal); }

.mk-btn-block { width: 100%; }

/* ---------------------------------------------------------- navigation -- */
.mk-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 17, 32, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.mk-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.mk-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: #fff; }
.mk-brand-mark { color: var(--teal); display: inline-flex; }
.mk-brand-mark svg { width: 26px; height: 26px; }
.mk-brand-text em { color: var(--teal); font-style: normal; }

.mk-nav-links { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.mk-nav-links a {
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color .16s ease, background .16s ease;
}
.mk-nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.mk-nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.mk-nav-link { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.mk-nav-link:hover { color: var(--teal); }
.mk-nav-cta { padding: 9px 18px; }

.mk-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}
.mk-burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.mk-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mk-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mk-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mk-mobile {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--border-soft);
    background: rgba(9, 17, 32, .96);
}
.mk-mobile a { padding: 12px 4px; font-size: 15px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border-soft); }
.mk-mobile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.mk-mobile-actions a { border-bottom: none; }



/* --------------------------------------------------------------- hero -- */
.mk-hero { position: relative; overflow: hidden; }
.mk-hero-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 84px 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 40px;
    align-items: center;
}
.mk-hero-glow {
    position: absolute;
    inset: -20% 40% 40% -10%;
    background: radial-gradient(closest-side, rgba(20, 184, 166, .28), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}
.mk-hero h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -.5px;
    color: #fff;
    font-weight: 700;
}
.mk-hero-copy > p {
    margin: 20px 0 0;
    max-width: 480px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}
.mk-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.mk-hero-foot { margin: 18px 0 0; font-size: 12.5px; color: var(--text-dim); }

.mk-hero-art { position: relative; height: 380px; }
.mk-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .85; }
.mk-orb-1 {
    width: 220px; height: 220px; right: 40px; top: 10px;
    background: radial-gradient(circle at 35% 30%, rgba(34, 197, 94, .9), rgba(4, 46, 34, .1) 62%);
    animation: mkFloat 7s ease-in-out infinite;
}
.mk-orb-2 {
    width: 130px; height: 130px; left: 20px; bottom: 30px;
    background: radial-gradient(circle at 40% 35%, rgba(23, 197, 197, .85), rgba(6, 40, 60, .05) 64%);
    animation: mkFloat 9s ease-in-out infinite reverse;
}
.mk-orb-3 {
    width: 180px; height: 180px; left: 10px; top: 20px;
    background: radial-gradient(circle at 40% 35%, rgba(59, 130, 246, .7), transparent 66%);
    animation: mkFloat 8s ease-in-out infinite;
}
.mk-coin {
    position: absolute;
    display: flex; align-items: center; justify-content: center;
    width: 60px; height: 60px;
    border-radius: 50%;
    font-size: 26px; font-weight: 700; color: #04201d;
    background: linear-gradient(180deg, #ffe08a, #f0b34a);
    box-shadow: var(--shadow);
    animation: mkFloat 6s ease-in-out infinite;
}
.mk-coin-a { right: 210px; top: 40px; }
.mk-coin-b { right: 60px; bottom: 60px; animation-delay: 1.2s; }
.mk-coin-c { right: 150px; bottom: 20px; width: 48px; height: 48px; font-size: 22px; animation-delay: 2.1s; }

.mk-hero-card {
    position: absolute;
    left: 10px; top: 150px;
    display: flex; flex-direction: column; gap: 6px;
    width: 190px;
    padding: 16px 18px;
    background: rgba(18, 33, 58, .92);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(6px);
}
.mk-hero-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); }
.mk-hero-card-value { font-size: 18px; font-weight: 700; color: #fff; }
.mk-hero-card-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mk-hero-card-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); }

@keyframes mkFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-16px); }
}

/* --------------------------------------------------- capability strip --- */
.mk-strip { border-block: 1px solid var(--border-soft); background: rgba(11, 20, 32, .5); }
.mk-strip-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.mk-stat { display: flex; flex-direction: column; gap: 4px; }
.mk-stat-value { font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; color: #fff; }
.mk-stat-label { font-size: 12.5px; color: var(--text-dim); }
.mk-tone-green { color: var(--green); }
.mk-tone-teal  { color: var(--teal); }
.mk-tone-blue  { color: var(--blue); }
.mk-tone-amber { color: var(--amber); }

/* ------------------------------------------------------------ sections -- */
.mk-section { max-width: 1200px; margin: 0 auto; padding: 72px 24px; }
.mk-section-alt { max-width: none; background: rgba(9, 16, 28, .55); }
.mk-section-alt > * { max-width: 1200px; margin-inline: auto; }

.mk-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 36px;
}
.mk-section-head h2 { font-size: clamp(24px, 3.2vw, 34px); color: #fff; }
.mk-section-head p { margin: 10px 0 0; color: var(--text-muted); font-size: 15px; max-width: 520px; }
.mk-center { text-align: center; }
.mk-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }

/* ------------------------------------------------------- feature grid --- */
.mk-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.mk-feature {
    padding: 24px 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform .18s ease, border-color .18s ease;
}
.mk-feature:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.mk-feature-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-bottom: 16px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--teal);
}
.mk-feature-icon svg { width: 24px; height: 24px; }
.mk-feature h3 { font-size: 17px; color: #fff; margin-bottom: 8px; }
.mk-feature p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }


/* --------------------------------------------- product carousel --------- */
.mk-products { position: relative; }
.mk-products-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 1fr);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 14px;
    scrollbar-width: none;
}
.mk-products-track::-webkit-scrollbar { display: none; }
.mk-product {
    scroll-snap-align: start;
    display: flex; flex-direction: column; gap: 10px;
    padding: 24px 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.mk-product:hover { transform: translateY(-4px); border-color: var(--teal); background: var(--panel-2); }
.mk-product-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    color: #04201d; font-weight: 800; font-size: 18px;
}
.mk-product h3 { font-size: 16px; color: #fff; }
.mk-product p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); flex: 1; }
.mk-product-link { font-size: 13px; font-weight: 600; color: var(--teal); }

.mk-carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 2;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1;
    color: var(--text);
    background: rgba(14, 26, 44, .92);
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}
.mk-carousel-btn:hover { background: var(--panel-3); border-color: var(--teal); }
.mk-carousel-prev { left: -10px; }
.mk-carousel-next { right: -10px; }

.mk-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.mk-carousel-dots button {
    width: 8px; height: 8px; padding: 0;
    border: none; border-radius: 50%;
    background: var(--border-strong);
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}
.mk-carousel-dots button.is-active { background: var(--teal); transform: scale(1.3); }

/* --------------------------------------------------------------- steps -- */
.mk-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 40px;
}
.mk-step {
    position: relative;
    padding: 26px 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.mk-step.is-first { background: linear-gradient(180deg, var(--accent), var(--accent-dark)); border-color: transparent; }
.mk-step-n { display: block; font-size: 22px; font-weight: 800; color: var(--teal); margin-bottom: 12px; }
.mk-step.is-first .mk-step-n { color: rgba(4, 32, 29, .7); }
.mk-step h3 { font-size: 16px; color: #fff; margin-bottom: 8px; }
.mk-step.is-first h3 { color: #04201d; }
.mk-step p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.mk-step.is-first p { color: rgba(4, 32, 29, .82); }
.mk-steps-cta { margin-top: 36px; }


/* ---------------------------------------------------------- split band -- */
.mk-split {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: center;
}
.mk-split-art { position: relative; height: 340px; }
.mk-phone {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 190px; height: 330px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 26px 20px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border-strong);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}
.mk-phone-notch { width: 60px; height: 6px; border-radius: 999px; background: var(--border-strong); }
.mk-phone-line { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.mk-phone-ok {
    margin-top: auto;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: var(--ok-bg);
    color: var(--ok-fg);
    border: 1px solid var(--ok-bd);
    font-size: 13px; font-weight: 700;
}
.mk-split-copy h2 { font-size: clamp(24px, 3vw, 32px); color: #fff; margin-bottom: 24px; }
.mk-split-item { padding: 16px 0; border-top: 1px solid var(--border-soft); }
.mk-split-item h3 { font-size: 15px; color: #fff; margin-bottom: 6px; }
.mk-split-item p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.mk-split-copy > .mk-btn { margin-top: 22px; }

/* ----------------------------------------------------------------- faq -- */
.mk-faq-wrap {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 44px;
    align-items: start;
}
.mk-faq-intro h2 { font-size: clamp(24px, 3vw, 32px); color: #fff; }
.mk-faq-intro p { margin: 12px 0 0; color: var(--text-muted); font-size: 15px; }
.mk-faq-help {
    margin-top: 26px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.mk-faq-help p { margin: 0 0 14px; font-size: 14px; }
.mk-faq-list { display: flex; flex-direction: column; gap: 12px; }
.mk-faq {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.mk-faq[open] { border-color: var(--border-strong); }
.mk-faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 18px 20px;
    font-size: 15px; font-weight: 600; color: #fff;
    cursor: pointer;
    list-style: none;
}
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq-chev {
    width: 10px; height: 10px; flex: none;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.mk-faq[open] .mk-faq-chev { transform: rotate(-135deg); }
.mk-faq[open] .mk-faq-chev { border-color: var(--teal); }
.mk-faq-body { padding: 0 20px 18px; }
.mk-faq-body p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-muted); }

/* ----------------------------------------------------------- closing ---- */
.mk-cta { padding: 20px 24px 90px; }
.mk-cta-inner {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 56px 32px;
    text-align: center;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    overflow: hidden;
}
.mk-cta-glow {
    position: absolute; inset: -40% 30% 40% -10%;
    background: radial-gradient(closest-side, rgba(20, 184, 166, .3), transparent 70%);
    pointer-events: none;
}
.mk-cta h2 { position: relative; font-size: clamp(26px, 3.4vw, 36px); color: #fff; }
.mk-cta p { position: relative; margin: 14px 0 26px; color: var(--text-muted); font-size: 15px; }
.mk-cta .mk-hero-actions { position: relative; justify-content: center; margin-top: 0; }

/* ------------------------------------------------------------- footer --- */
.mk-footer { border-top: 1px solid var(--border-soft); background: var(--bg-deep); }
.mk-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 54px 24px 34px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 32px;
}
.mk-footer-logo { display: block; font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.mk-footer-brand p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); max-width: 320px; }
.mk-footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); margin-bottom: 14px; }
.mk-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.mk-footer-col a { font-size: 14px; color: var(--text-muted); }
.mk-footer-col a:hover { color: var(--teal); }
.mk-footer-note { margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.mk-news-form { display: flex; gap: 8px; }
.mk-news-input {
    flex: 1; min-width: 0;
    padding: 11px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: 13.5px;
}
.mk-news-input::placeholder { color: var(--text-dim); }
.mk-news-input:focus { outline: none; border-color: var(--teal); }
.mk-footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 30px;
    border-top: 1px solid var(--border-soft);
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    font-size: 12.5px; color: var(--text-dim);
}
.mk-footer-links { display: flex; gap: 18px; }
.mk-footer-links a:hover { color: var(--teal); }


/* ------------------------------------------------- marketing: reduced --- */
@media (prefers-reduced-motion: reduce) {
    .mk-orb, .mk-coin { animation: none; }
    .mk-btn:hover, .mk-feature:hover, .mk-product:hover { transform: none; }
}

/* ------------------------------------------------- marketing: desktop --- */
@media (max-width: 1080px) {
    .mk-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    /* Collapse the primary nav into the drawer. */
    .mk-nav-links { display: none; }
    .mk-nav-link { display: none; }
    .mk-burger { display: inline-flex; margin-left: auto; }
    .mk-nav-cta { display: none; }
    .mk-mobile.is-open { display: flex; }

    .mk-hero-inner { grid-template-columns: minmax(0, 1fr); padding: 56px 20px 40px; text-align: left; }
    .mk-hero-art { height: 280px; margin-top: 10px; }
    .mk-hero-card { left: 0; top: 96px; }

    .mk-section { padding: 56px 20px; }
    .mk-section-head { flex-direction: column; align-items: flex-start; }

    .mk-strip-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }

    .mk-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .mk-split-art { height: 260px; }

    .mk-faq-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 620px) {
    .mk-nav-inner { padding: 12px 16px; }
    .mk-feature-grid { grid-template-columns: minmax(0, 1fr); }
    .mk-steps { grid-template-columns: minmax(0, 1fr); }
    .mk-strip-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-section { padding: 48px 16px; }
    .mk-carousel-btn { display: none; }
    .mk-products-track { grid-auto-columns: 82%; }
    .mk-cta { padding: 12px 16px 64px; }
    .mk-cta-inner { padding: 40px 20px; }
    .mk-footer-inner { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 40px 18px 26px; }
    .mk-footer-bottom { flex-direction: column; align-items: flex-start; padding: 18px 18px 28px; }
    .mk-news-form { flex-direction: column; }
    .mk-news-form .mk-btn { width: 100%; }
}

