@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #030916;
    --bg-top: #061329;
    --bg-bottom: #020713;
    --surface: #081529;
    --surface-soft: #0e223c;
    --field-bg: rgba(7,18,36,.92);
    --nav-bg: rgba(3,9,22,.78);
    --hover-bg: rgba(14,34,60,.82);
    --hover-bg-soft: rgba(14,34,60,.45);
    --grid-line: rgba(148,163,184,.04);
    --shine-cyan: rgba(56,189,248,.055);
    --shine-green: rgba(52,211,153,.035);
    --ink: #e2e8f0;
    --text: #dbeafe;
    --muted: #94a3b8;
    --faint: #64748b;
    --line: #1d3659;
    --mint: rgba(52,211,153,.13);
    --mint-strong: #34d399;
    --cream: rgba(251,146,60,.12);
    --black: #38bdf8;
    --accent: #38bdf8;
    --accent2: #818cf8;
    --accent3: #34d399;
    --btn-primary-text: #020617;
    --btn-primary-hover-bg: linear-gradient(135deg, #7dd3fc, #a5b4fc);
    --avatar-text: #020617;
    --success: #34d399;
    --danger: #f87171;
    --shadow: 0 1px 3px rgba(0,0,0,.32), 0 18px 44px rgba(2,6,23,.34);
    --glow: 0 0 0 1px rgba(56,189,248,.18), 0 18px 54px rgba(56,189,248,.12);
    --radius: 12px;
    --nav-h: 56px;
    --font-body: 'Inter Tight', sans-serif;
    --font-head: 'Inter Tight', sans-serif;
    --font-mono: 'Inter Tight', sans-serif;
}

html[data-theme="light"] {
    --bg: #f4f8fb;
    --bg-top: #edf8fd;
    --bg-bottom: #ffffff;
    --surface: #ffffff;
    --surface-soft: #eaf3f8;
    --field-bg: rgba(255,255,255,.94);
    --nav-bg: rgba(255,255,255,.82);
    --hover-bg: rgba(226,242,249,.9);
    --hover-bg-soft: rgba(226,242,249,.58);
    --grid-line: rgba(51,65,85,.06);
    --shine-cyan: rgba(14,165,233,.08);
    --shine-green: rgba(16,185,129,.055);
    --ink: #0f172a;
    --text: #233247;
    --muted: #64748b;
    --faint: #8a9aab;
    --line: #cfe0ea;
    --mint: rgba(16,185,129,.12);
    --cream: rgba(245,158,11,.14);
    --black: #0284c7;
    --accent: #0284c7;
    --accent2: #4f46e5;
    --accent3: #059669;
    --btn-primary-text: #ffffff;
    --btn-primary-hover-bg: linear-gradient(135deg, #0369a1, #4338ca);
    --avatar-text: #ffffff;
    --success: #059669;
    --danger: #dc2626;
    --shadow: 0 1px 3px rgba(15,23,42,.08), 0 18px 44px rgba(15,23,42,.1);
    --glow: 0 0 0 1px rgba(2,132,199,.18), 0 18px 54px rgba(2,132,199,.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition:
        background-color .32s ease,
        background .32s ease,
        border-color .32s ease,
        color .32s ease,
        box-shadow .32s ease,
        opacity .32s ease,
        filter .32s ease !important;
}
body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(56,189,248,.1), transparent 30%),
        linear-gradient(225deg, rgba(129,140,248,.08), transparent 34%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 42%, var(--bg-bottom) 100%);
    background-size: 140% 140%, 150% 150%, 100% 100%;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
    animation: bg-drift 18s ease-in-out infinite alternate;
    transition: background .32s ease, color .32s ease;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.18) 58%, transparent);
    animation: grid-drift 28s linear infinite;
}
body::after {
    content: "";
    position: fixed;
    inset: -28% -18%;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 24%, var(--shine-cyan) 38%, transparent 52%),
        linear-gradient(65deg, transparent 38%, var(--shine-green) 50%, transparent 62%);
    filter: blur(18px);
    opacity: .72;
    transform: translate3d(-8%, -4%, 0);
    animation: light-sweep 24s ease-in-out infinite alternate;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(56,189,248,.16), transparent 32%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
    opacity: 1;
    visibility: visible;
    transition: opacity .32s ease, visibility .32s ease;
}
body.page-ready .page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
body.is-loading .page-loader {
    opacity: 1;
    visibility: visible;
}
.loader-orbit {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid rgba(56,189,248,.18);
    box-shadow: var(--glow);
    display: grid;
    place-items: center;
    position: relative;
}
.loader-orbit::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent3);
    animation: loader-spin .78s linear infinite;
}
.loader-orbit span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 0 24px rgba(56,189,248,.52);
    animation: loader-pulse 1s ease-in-out infinite alternate;
}
body.page-ready .page-wrap,
body.page-ready .page-wrap-wide,
body.page-ready .auth-shell {
    animation: page-enter .42s ease both;
}

@keyframes bg-drift {
    from { background-position: 0% 0%, 100% 0%, 0 0; }
    to { background-position: 18% 10%, 82% 16%, 0 0; }
}

@keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 42px 42px, 42px 42px; }
}

@keyframes light-sweep {
    from { transform: translate3d(-10%, -5%, 0); opacity: .48; }
    to { transform: translate3d(10%, 5%, 0); opacity: .78; }
}

@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes loader-pulse {
    from { transform: scale(.82); opacity: .62; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes page-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; }
.topnav,
.page-wrap,
.page-wrap-wide,
.modal-backdrop,
footer.page-wrap {
    position: relative;
    z-index: 1;
}

.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(2,6,23,.26);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(18px, calc((100vw - 1160px) / 2 + 32px));
}

.topnav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font: 700 15px/1 var(--font-body);
    letter-spacing: .01em;
}
.topnav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.topnav-links a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13.5px;
    position: relative;
    transition: background .15s, color .15s, transform .15s;
}
.topnav-links a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .16s ease, transform .16s ease;
}
.topnav-links a:hover,
.topnav-links a.active {
    background: var(--hover-bg);
    color: var(--accent);
    transform: translateY(-1px);
}
.topnav-links a:hover::after,
.topnav-links a.active::after {
    opacity: 1;
    transform: scaleX(1);
}
.topnav-links a.active { font-weight: 600; }
.nav-ico {
    width: 17px;
    height: 17px;
    border: 1px solid rgba(56,189,248,.22);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(56,189,248,.08);
    font-size: 10px;
    font-weight: 700;
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.theme-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(2,6,23,.14);
    transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.theme-toggle:hover {
    background: var(--hover-bg);
    border-color: rgba(56,189,248,.32);
    transform: translateY(-1px);
    box-shadow: var(--glow);
}
.theme-toggle-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(56,189,248,.12);
    position: relative;
}
.theme-toggle-icon::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    top: -3px;
    right: -4px;
    border-radius: 50%;
    background: var(--surface);
    opacity: 0;
    transition: opacity .15s;
}
html[data-theme="dark"] .theme-toggle-icon::after {
    opacity: 1;
}
.credit-pill {
    background: linear-gradient(135deg, rgba(56,189,248,.12), rgba(52,211,153,.08));
    border: 1px solid rgba(56,189,248,.28);
    padding: 5px 12px;
    border-radius: 20px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.credit-pill strong { font-size: 12px; }
.credit-pill .dot { display: none; }
.avatar, .av {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: var(--avatar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.avatar { width: 32px; height: 32px; font-size: 12px; box-shadow: 0 0 0 2px rgba(56,189,248,.16); }
.av { width: 28px; height: 28px; font-size: 10px; }
.avatar img,
.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: block;
}

.page-wrap, .page-wrap-wide {
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 32px 80px;
}
.page-mid { max-width: 1160px; }
.page-narrow { max-width: 860px; }

.section-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.section-label::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent3));
    box-shadow: 0 0 16px rgba(56,189,248,.45);
}
.section-title {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 42px;
    font-weight: 400;
    line-height: 1.04;
    margin: 0 0 6px;
    text-wrap: balance;
}
.section-sub {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}
.page-head { margin-bottom: 32px; }
.page-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.card,
.panel,
.detail-hero,
.provider-card,
.booking-form,
.balance-chart,
.ledger-section,
.profile-card,
.conversation-list,
.chat-panel {
    background:
        linear-gradient(180deg, rgba(255,255,255,.025), transparent 44%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card { padding: 24px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled {
    cursor: not-allowed;
    opacity: .68;
    transform: none;
}
.btn:disabled:hover {
    transform: none;
}
.disabled-link {
    opacity: .55;
    pointer-events: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--btn-primary-text);
    box-shadow: 0 10px 24px rgba(56,189,248,.22);
}
.btn-primary:hover {
    background: var(--btn-primary-hover-bg);
    color: var(--btn-primary-text);
    box-shadow: 0 14px 34px rgba(56,189,248,.3);
}
.btn-ghost, .btn-surface { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover, .btn-surface:hover { background: var(--hover-bg); border-color: rgba(56,189,248,.28); }
.btn-success { background: rgba(52,211,153,.16); color: var(--success); border-color: rgba(52,211,153,.25); }
.btn-danger { background: rgba(248,113,113,.14); color: var(--danger); border-color: rgba(248,113,113,.25); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn.is-loading {
    color: transparent;
    pointer-events: none;
}
.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    color: var(--accent);
    animation: loader-spin .72s linear infinite;
}
.btn-primary.is-loading::after {
    color: var(--btn-primary-text);
}

.badge,
.tag,
.credit-tag,
.lc-credit {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.badge-blue,
.badge-green {
    background: var(--mint);
    color: var(--success);
    border: 1px solid rgba(52,211,153,.25);
}
.badge-orange { background: var(--cream); color: #fb923c; }
.badge-red { background: rgba(248,113,113,.14); color: var(--danger); }
.badge-purple { background: var(--surface-soft); color: var(--muted); }

.input-group { margin-bottom: 14px; }
.input-label,
label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="time"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field-bg);
    color: var(--ink);
    padding: 9px 12px;
    font-size: 13px;
    outline: 0;
    transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}
input[placeholder]:not(:placeholder-shown):invalid,
textarea[placeholder]:not(:placeholder-shown):invalid {
    border-color: rgba(248,113,113,.7);
    box-shadow: 0 0 0 3px rgba(248,113,113,.1);
}
.btn:active,
.tab-btn:active,
.category-chips a:active {
    transform: translateY(0) scale(.98);
}
input::placeholder,
textarea::placeholder { color: var(--faint); }
input[type="file"] {
    padding: 7px;
}
input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 16px;
    border: 1px solid rgba(56,189,248,.28);
    border-radius: 30px;
    background: var(--hover-bg);
    color: var(--ink);
    font: 500 13px/1 var(--font-body);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}
input[type="file"]::file-selector-button:hover {
    background: var(--surface-soft);
    border-color: rgba(56,189,248,.45);
    color: var(--accent);
}
.password-field {
    position: relative;
}
.password-field input {
    padding-right: 68px;
}
.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    min-width: 52px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--hover-bg-soft);
    color: var(--accent);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.password-toggle:hover {
    background: var(--hover-bg);
    border-color: rgba(56,189,248,.25);
    color: var(--ink);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Auth pages */
.auth-page {
    position: relative;
    z-index: 1;
    width: min(1060px, calc(100% - 40px));
    min-height: calc(100vh - 92px);
    margin: 0 auto;
    padding: 34px 0 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: color .15s ease, transform .15s ease;
}
.auth-back::before {
    content: "<";
    width: 22px;
    height: 22px;
    border: 1px solid rgba(56,189,248,.22);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--hover-bg-soft);
}
.auth-back:hover {
    color: var(--ink);
    transform: translateX(-2px);
}
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .98fr) minmax(420px, .82fr);
    width: 100%;
    height: 660px;
    min-height: 660px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,.04), transparent 42%),
        rgba(8,21,41,.84);
    border: 1px solid rgba(56,189,248,.18);
    border-radius: 18px;
    box-shadow: var(--glow);
    backdrop-filter: blur(16px);
}
html[data-theme="light"] .auth-shell {
    background:
        linear-gradient(145deg, rgba(2,132,199,.045), transparent 42%),
        rgba(255,255,255,.88);
    border-color: rgba(2,132,199,.18);
}
.auth-shell-login { min-height: 660px; }
.auth-panel {
    position: relative;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 42px;
    overflow: hidden;
}
.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(56,189,248,.18), transparent 42%),
        linear-gradient(225deg, rgba(52,211,153,.1), transparent 38%),
        linear-gradient(180deg, rgba(3,9,22,.08), rgba(3,9,22,.42));
    z-index: -1;
}
html[data-theme="light"] .auth-panel::before {
    background:
        linear-gradient(135deg, rgba(14,165,233,.12), transparent 42%),
        linear-gradient(225deg, rgba(16,185,129,.08), transparent 38%),
        linear-gradient(180deg, rgba(255,255,255,.1), rgba(226,242,249,.5));
}
.auth-panel::after {
    content: "";
    position: absolute;
    right: -74px;
    bottom: -74px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(56,189,248,.22);
    box-shadow: inset 0 0 72px rgba(56,189,248,.08);
    z-index: -1;
}
.auth-brand {
    width: fit-content;
    color: var(--accent);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .01em;
}
.auth-brand span {
    color: var(--ink);
}
.auth-title {
    max-width: 520px;
    margin: 12px 0 16px;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 700;
    line-height: 1;
    text-wrap: balance;
}
.auth-copy {
    max-width: 460px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}
.auth-stats,
.auth-perks {
    display: grid;
    gap: 10px;
}
.auth-stats {
    grid-template-columns: repeat(3, 1fr);
}
.auth-stats div,
.auth-perks div {
    background: rgba(3,9,22,.42);
    border: 1px solid rgba(56,189,248,.14);
    border-radius: 12px;
    padding: 14px;
}
html[data-theme="light"] .auth-stats div,
html[data-theme="light"] .auth-perks div {
    background: rgba(255,255,255,.62);
    border-color: rgba(2,132,199,.14);
}
.auth-stats strong {
    display: block;
    color: var(--accent);
    font-size: 24px;
    line-height: 1;
}
.auth-stats span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.auth-perks div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 13px;
}
.auth-perks span {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent3);
    box-shadow: 0 0 16px rgba(52,211,153,.48);
}
.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vw, 48px);
    background:
        linear-gradient(180deg, rgba(255,255,255,.035), transparent 46%),
        var(--surface);
    border-left: 1px solid var(--line);
}
.auth-form-head {
    margin-bottom: 24px;
}
.auth-form-head .section-title {
    font-size: 30px;
    font-weight: 700;
}
.auth-form {
    display: grid;
    gap: 2px;
}
.auth-name-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.auth-submit {
    width: 100%;
    min-height: 42px;
    margin-top: 4px;
    justify-content: center;
}
.auth-switch {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.auth-switch a {
    color: var(--accent);
    font-weight: 700;
}
.auth-switch a:hover {
    color: var(--ink);
}
.password-strength {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
}
.password-strength span {
    height: 5px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, var(--danger) 0 33%, var(--line) 33% 100%);
    overflow: hidden;
}
.password-strength[data-level="2"] span {
    background:
        linear-gradient(90deg, #f59e0b 0 66%, var(--line) 66% 100%);
}
.password-strength[data-level="3"] span {
    background: linear-gradient(90deg, var(--accent3), var(--accent));
}
.password-strength strong {
    color: var(--muted);
    font-weight: 600;
}
body.page-ready .auth-panel {
    animation: auth-panel-enter .46s cubic-bezier(.2, .8, .2, 1) both;
}
body.page-ready .auth-card {
    animation: auth-card-enter .46s .04s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes auth-panel-enter {
    from {
        opacity: 0;
        transform: translateX(-14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes auth-card-enter {
    from {
        opacity: 0;
        transform: translateX(14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-toast {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 999;
    background: var(--surface);
    border: 1px solid rgba(52,211,153,.3);
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--success);
    box-shadow: 0 4px 16px rgba(23,19,16,.1);
    font-size: 13px;
    font-weight: 500;
    transition: opacity .25s ease, transform .25s ease;
}
.flash-toast.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}
.flash-toast.error {
    border-color: #f4c7bf;
    background: #1f1118;
    color: var(--danger);
}
.field-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
}
input.has-error,
select.has-error,
textarea.has-error {
    border-color: rgba(248,113,113,.78);
    box-shadow: 0 0 0 3px rgba(248,113,113,.12);
}

.confirm-dialog {
    width: min(420px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    margin: auto;
}
.confirm-dialog::backdrop {
    background: rgba(2,6,23,.66);
    backdrop-filter: blur(8px);
}
.confirm-card {
    background:
        linear-gradient(145deg, rgba(255,255,255,.045), transparent 42%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.confirm-title {
    color: var(--ink);
    font: 700 20px/1.2 var(--font-head);
    margin-bottom: 8px;
}
.confirm-message {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 20px;
}
.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dash-grid,
.ledger-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.onboarding-card,
.profile-completion {
    background:
        linear-gradient(135deg, rgba(52,211,153,.09), transparent 42%),
        var(--surface);
    border: 1px solid rgba(52,211,153,.2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.onboarding-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 24px;
}
.onboarding-steps,
.completion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.onboarding-steps span,
.completion-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--hover-bg-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.onboarding-steps span.done,
.completion-list span.done {
    border-color: rgba(52,211,153,.24);
    background: rgba(52,211,153,.1);
    color: var(--success);
}
.onboarding-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.stat-box {
    background:
        linear-gradient(160deg, rgba(255,255,255,.035), transparent 42%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.stat-box::after {
    content: "";
    position: absolute;
    inset: auto 16px 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,.55), transparent);
    opacity: .55;
}
.stat-box.primary,
.ledger-stats .stat-box:first-child {
    background:
        linear-gradient(135deg, rgba(56,189,248,.24), rgba(129,140,248,.14) 55%, rgba(52,211,153,.08)),
        var(--surface);
    color: var(--ink);
    border-color: rgba(56,189,248,.3);
    box-shadow: var(--glow);
}
.stat-label {
    color: inherit;
    opacity: .62;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.stat-value {
    color: inherit;
    font-family: var(--font-head);
    font-size: 38px;
    font-weight: 500;
    line-height: 1;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: start;
}
.activity-panel { min-height: 390px; }
.panel-title {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 16px;
}
.activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    transition: background .16s ease, border-color .16s ease, color .16s ease, padding .16s ease;
}
.activity-row:hover,
.activity-row:focus-visible {
    background: var(--hover-bg-soft);
    border-color: rgba(56,189,248,.25);
    color: var(--ink);
    padding-left: 12px;
    padding-right: 12px;
}
.activity-row:last-child { border-bottom: 0; }
.activity-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.discover-panel {
    background:
        linear-gradient(160deg, rgba(56,189,248,.08), transparent 36%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.mini-listing {
    display: block;
    background:
        linear-gradient(135deg, rgba(255,255,255,.025), transparent 42%),
        var(--surface-soft);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    transition: background .18s ease, border-color .18s ease, box-shadow .22s ease, transform .22s ease;
}
.mini-listing::after,
.listing-card::after {
    content: "";
    position: absolute;
    top: -35%;
    bottom: -35%;
    left: -75%;
    width: 58%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(56,189,248,.16) 0%, rgba(56,189,248,.08) 35%, transparent 72%);
    filter: blur(16px);
    opacity: 0;
    transform: translateX(0) rotate(45deg);
    transition: opacity .22s ease, transform .45s ease;
}
.mini-listing:hover,
.mini-listing:focus-visible {
    background: var(--line);
    border-color: rgba(56,189,248,.34);
    box-shadow: 0 12px 26px rgba(2,6,23,.24);
    transform: translateY(-3px);
}
.mini-listing:hover::after,
.mini-listing:focus-visible::after,
.listing-card:hover::after,
.listing-card:focus-visible::after {
    opacity: 1;
    transform: translateX(260%) rotate(45deg);
}
.mini-listing .cat,
.listing-card .cat,
.dh-cat,
.trade-kicker {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mini-listing .name { color: var(--ink); font-weight: 500; font-size: 14px; margin: 2px 0; }
.mini-listing .meta { color: var(--muted); font-size: 12px; }

.market-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}
.market-actions > input[type="number"] {
    width: 130px;
}
.market-search {
    position: relative;
    flex: 1;
}
.market-search::before {
    content: "Q";
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faint);
    font-size: 12px;
}
.market-search input { padding-left: 34px; }
.market-actions select { width: 200px; }
.async-status {
    min-height: 20px;
    margin: -16px 0 16px;
    color: var(--muted);
    font-size: 12px;
}
.async-status.is-loading::before {
    content: "";
    width: 13px;
    height: 13px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 8px;
    animation: loader-spin .72s linear infinite;
}
body.has-async-busy .results-grid {
    opacity: .58;
    pointer-events: none;
}
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 22px;
}
.category-chips a {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.category-chips a:hover,
.category-chips a.active {
    background: var(--hover-bg);
    border-color: rgba(56,189,248,.32);
    color: var(--accent);
    transform: translateY(-1px);
}
.results-grid,
.skill-grid,
.my-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.listing-card,
.skill-card,
.my-skill-card {
    min-height: 210px;
    background:
        linear-gradient(150deg, rgba(255,255,255,.035), transparent 44%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .22s ease, transform .22s ease;
}
.listing-card {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(52px, 1fr) auto auto;
}
.empty-state {
    grid-column: 1 / -1;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.empty-state.compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.listing-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.listing-card > :not(.listing-card-link) {
    position: relative;
    z-index: 2;
    pointer-events: none;
}
.listing-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    pointer-events: auto;
}
.listing-actions a { pointer-events: auto; }
.listing-card::before,
.skill-card::before,
.my-skill-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,.7), rgba(52,211,153,.45), transparent);
    opacity: .45;
}
.listing-card:hover,
.listing-card:focus-visible,
.skill-card:hover,
.my-skill-card:hover {
    border-color: rgba(56,189,248,.34);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}
@media (prefers-reduced-motion: reduce) {
    body,
    body::before,
    body::after {
        animation: none;
    }

    .mini-listing,
    .listing-card,
    .mini-listing::after,
    .listing-card::after {
        transition: none;
    }

    .mini-listing:hover,
    .mini-listing:focus-visible,
    .listing-card:hover,
    .listing-card:focus-visible {
        transform: none;
    }
}
.lc-cat-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}
.token-pill {
    color: var(--accent);
    font: 700 12px/1 var(--font-mono);
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--hover-bg-soft);
    border: 1px solid rgba(56,189,248,.18);
    white-space: nowrap;
}
.listing-badges,
.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.listing-badges {
    margin: 0 0 10px;
}
.trust-strip {
    margin: -4px 0 18px;
}
.listing-provider,
.detail-provider {
    display: flex;
    align-items: center;
    gap: 9px;
}
.listing-provider {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 10px;
}
.listing-card .listing-provider {
    position: relative;
    z-index: 3;
    pointer-events: auto;
    width: fit-content;
}
.listing-provider:hover,
.detail-provider:hover {
    color: var(--accent);
}
.provider-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: var(--avatar-text);
    font: 700 10px/1 var(--font-body);
    overflow: hidden;
}
.provider-avatar.lg {
    width: 40px;
    height: 40px;
    font-size: 13px;
}
.provider-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lc-h,
.skill-card h3,
.msc-h {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.12;
    margin-bottom: 4px;
}
.listing-card:hover .lc-h,
.listing-card:focus-visible .lc-h,
.skill-card:hover h3,
.my-skill-card:hover .msc-h,
.mini-listing:hover .name,
.mini-listing:focus-visible .name {
    color: #f8fbff;
}
.admin-filter-form,
.admin-inline-form,
.admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.admin-filter-form input,
.admin-filter-form select,
.admin-inline-form input,
.admin-inline-form select {
    width: auto;
    min-width: 130px;
}
.admin-inline-form input {
    min-width: 190px;
}
.mini-listing.admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}
.mini-listing.admin-row > a {
    min-width: 0;
}
html[data-theme="light"] .listing-card:hover .lc-h,
html[data-theme="light"] .listing-card:focus-visible .lc-h {
    color: var(--ink);
}
.lc-p,
.skill-card p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
}
.trade-pref {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 2px 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(52,211,153,.18);
    border-radius: 10px;
    background: rgba(52,211,153,.07);
    color: var(--text);
    font-size: 12.5px;
}
.trade-pref span {
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.detail-pref {
    max-width: 520px;
    margin: 0 0 16px;
}
.lc-bottom,
.skill-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 12px;
}
.listing-card .lc-bottom { margin-top: 0; }
.lc-bottom strong { color: var(--muted); }
.lc-stars, .stars { color: var(--success); letter-spacing: 1px; }
.muted-star { color: var(--faint); }

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
    margin-top: 24px;
}
.detail-main { min-width: 0; }
.detail-hero {
    padding: 28px;
    background:
        linear-gradient(140deg, rgba(56,189,248,.1), transparent 38%),
        var(--surface);
}
.detail-provider {
    margin: 14px 0 18px;
    color: var(--muted);
    font-size: 13px;
}
.detail-provider strong {
    display: block;
    color: var(--ink);
}
.detail-provider div span {
    display: block;
}
.detail-provider .provider-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dh-title {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 38px;
    font-weight: 500;
    line-height: 1;
    margin: 6px 0;
}
.dh-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
}
.dh-desc {
    color: var(--text);
    font-size: 14px;
    margin-bottom: 20px;
}
.detail-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 24px 0;
}
.review-heading {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 12px;
}
.cta-card {
    background:
        linear-gradient(145deg, rgba(52,211,153,.1), transparent 38%),
        var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    position: sticky;
    top: 76px;
}
.cta-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.cta-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.cta-price,
.cta-price-lbl {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 40px;
    font-weight: 500;
    line-height: 1;
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
}
.tabs a,
.tab-btn {
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--muted);
    font-size: 13px;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.tabs a:hover,
.tab-btn:hover {
    background: var(--hover-bg);
    border-color: rgba(56,189,248,.2);
    color: var(--ink);
    transform: translateY(-1px);
}
.tabs a.active,
.tab-btn.active {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
    font-weight: 500;
}
.trade-list { display: flex; flex-direction: column; gap: 12px; }
.trade-card {
    background:
        linear-gradient(145deg, rgba(255,255,255,.03), transparent 40%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 20px;
    transition: border-color .18s ease, box-shadow .2s ease, transform .2s ease;
}
.trade-card-main { min-width: 0; }
.trade-card:hover {
    border-color: rgba(56,189,248,.28);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}
.trade-status {
    justify-self: end;
    white-space: nowrap;
}
.trade-title {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
    margin: 4px 0 3px;
}
.trade-sub,
.trade-message {
    color: var(--muted);
    font-size: 13px;
}
.trade-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.inline-form { display: inline-flex; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.modal-card {
    width: 480px;
    max-width: calc(100vw - 32px);
    background:
        linear-gradient(145deg, rgba(56,189,248,.08), transparent 38%),
        var(--surface);
    border: 1px solid rgba(56,189,248,.2);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    padding: 28px;
    position: relative;
}
.modal-card.wide { width: 520px; }
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-title {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.proposal-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.proposal-summary div {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}
.proposal-summary span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.proposal-summary strong {
    color: var(--ink);
    font-size: 13px;
}
.proposal-summary strong.ok { color: var(--success); }
.proposal-summary strong.warn { color: var(--danger); }

.ledger-stats { grid-template-columns: repeat(4, 1fr); }
.ledger-stats .stat-box:nth-child(2) { background: var(--mint); }
.ledger-stats .stat-box:nth-child(3) { background: var(--cream); }
.token-rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: -12px 0 24px;
}
.token-rules div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.token-rules strong {
    display: block;
    color: var(--ink);
    margin-bottom: 4px;
}
.token-rules span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.ledger-section { padding: 0; overflow: hidden; }
.ledger-empty {
    color: var(--faint);
    font-size: 13px;
    text-align: center;
    padding: 34px 20px;
}
.ledger-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    transition: background .15s ease;
}
.ledger-row:hover { background: var(--hover-bg-soft); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-type {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.ledger-type.positive {
    color: var(--success);
    background: var(--mint);
}
.ledger-type.negative {
    color: var(--danger);
    background: rgba(248,113,113,.14);
}
.lr-title { color: var(--ink); font-weight: 500; }
.lr-meta { color: var(--muted); font-size: 12px; }
.lr-amount { font-weight: 600; }
.lr-earn-amount { color: var(--success); }
.lr-spend-amount { color: var(--danger); }

.profile-tabs {
    max-width: 806px;
    margin-left: auto;
    margin-right: auto;
}
.profile-tabs .tab-btn {
    background: transparent;
    cursor: pointer;
}
.profile-layout { max-width: 806px; margin: 0 auto; }
.profile-card {
    padding: 28px;
    margin-bottom: 28px;
    overflow: hidden;
}
.profile-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--avatar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 0 0 4px rgba(56,189,248,.1), 0 16px 34px rgba(56,189,248,.18);
    overflow: hidden;
}
.profile-name {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 500;
    line-height: 1;
}
.profile-email { color: var(--muted); font-size: 13px; margin-top: 3px; }
.profile-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.profile-form { margin-top: 16px; }
.profile-completion {
    padding: 16px;
    margin-top: 22px;
}
.completion-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.completion-meter {
    height: 8px;
    border-radius: 999px;
    background: var(--hover-bg-soft);
    overflow: hidden;
    margin-bottom: 12px;
}
.completion-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent3), var(--accent));
}
.review-feed,
.review-list { display: flex; flex-direction: column; gap: 10px; }
.rf-item,
.review-item {
    background:
        linear-gradient(135deg, rgba(255,255,255,.025), transparent 42%),
        var(--surface-soft);
    border: 1px solid rgba(56,189,248,.12);
    border-radius: 10px;
    padding: 14px 16px;
}
.rfi-top,
.ri-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.rfi-name,
.ri-user .name { color: var(--ink); font-weight: 500; }
.rfi-date,
.rfi-skill,
.ri-user .date { color: var(--muted); font-size: 12px; }
.rfi-text,
.ri-body { color: var(--text); font-size: 13px; }

.messages-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: 560px;
    overflow: hidden;
}
.conversation-list {
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: 0;
    padding: 0;
}
.chat-panel {
    border-radius: 0 var(--radius) var(--radius) 0;
    display: flex;
    flex-direction: column;
}
.conversation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    transition: background .15s ease, color .15s ease, padding .15s ease;
}
.conversation-item:hover {
    background: var(--hover-bg);
    color: var(--ink);
    padding-left: 20px;
}
.conversation-item.active {
    background: linear-gradient(90deg, rgba(56,189,248,.16), var(--hover-bg));
    color: var(--accent);
}
.conversation-text {
    min-width: 0;
    flex: 1;
}
.conversation-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.conversation-preview {
    display: block;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.unread-badge {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--accent3);
    color: var(--btn-primary-text);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.chat-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hover-bg-soft);
}
.chat-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}
.message-bubble {
    max-width: 60%;
    margin-left: auto;
    width: fit-content;
    padding: 9px 14px;
    border-radius: 16px 16px 4px 16px;
    background: linear-gradient(135deg, var(--accent), #7dd3fc);
    color: #020617;
    font-size: 13.5px;
    box-shadow: 0 10px 24px rgba(56,189,248,.16);
}
.message-bubble.theirs {
    align-self: flex-start;
    margin-left: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,.03), transparent 42%),
        var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}
.message-bubble.mine {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.message-meta {
    display: block;
    margin-bottom: 4px;
    color: var(--faint);
    font-size: 11px;
}
.chat-compose {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}
.chat-compose input {
    flex: 1;
    border-radius: 30px;
}
.send-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: var(--ink);
    color: var(--bg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(2,6,23,.18);
    transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.send-btn:hover {
    transform: translateY(-1px);
    background: var(--accent);
    color: var(--btn-primary-text);
    box-shadow: 0 14px 30px rgba(56,189,248,.26);
}
.send-icon {
    width: 17px;
    height: 17px;
    display: block;
    background: currentColor;
    clip-path: polygon(6% 48%, 94% 6%, 62% 94%, 47% 59%);
    transform: translate(1px, -1px);
}

.sched-layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; }
.cal-card,
.time-slots-card,
.oauth-card {
    background:
        linear-gradient(145deg, rgba(255,255,255,.03), transparent 42%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

footer.page-wrap {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
    padding-top: 12px;
    border-top: 1px solid rgba(56,189,248,.16);
}

@media (max-width: 900px) {
    .topnav {
        height: auto;
        min-height: var(--nav-h);
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .topnav-links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }
    .topnav-right form { display: none; }
    .page-wrap, .page-wrap-wide { padding: 28px 16px 56px; }
    .page-head-row { align-items: flex-start; flex-direction: column; }
    .dash-grid,
    .ledger-stats,
    .token-rules,
    .results-grid,
    .skill-grid,
    .my-skills-grid,
    .dashboard-layout,
    .detail-layout,
    .messages-layout,
    .sched-layout {
        grid-template-columns: 1fr;
    }
    .onboarding-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .onboarding-actions {
        justify-content: flex-start;
    }
    .market-actions { flex-direction: column; }
    .market-actions select { width: 100%; }
    .admin-filter-form,
    .admin-inline-form,
    .admin-actions,
    .mini-listing.admin-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .admin-filter-form input,
    .admin-filter-form select,
    .admin-inline-form input,
    .admin-inline-form select {
        width: 100%;
    }
    .cta-card { position: static; }
    .conversation-list,
    .chat-panel { border-radius: var(--radius); border: 1px solid var(--line); }
    .trade-card { grid-template-columns: 1fr; }
    .trade-status { justify-self: start; order: -1; }
    .form-row { grid-template-columns: 1fr; }
    .auth-page {
        width: min(100% - 32px, 680px);
        min-height: auto;
        padding-top: 28px;
    }
    .auth-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }
    .auth-panel {
        padding: 28px;
        gap: 28px;
    }
    .auth-card {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    footer.page-wrap { flex-direction: column; gap: 6px; }
}

/* Landing page */
.landing-wrap {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--text);
}
.landing-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.landing-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .18;
    transform: translate3d(0, calc(var(--landing-scroll, 0px) * .08), 0) scale(1);
    animation: bgZoom 20s ease-in-out infinite alternate;
    transition: transform .12s linear;
}
.landing-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(56,189,248,.16), transparent 34%),
        linear-gradient(225deg, rgba(129,140,248,.12), transparent 38%),
        linear-gradient(180deg, rgba(3,9,22,.62) 0%, rgba(3,9,22,.96) 62%, #030916 100%);
    animation: overlayShift 25s ease-in-out infinite;
}
html[data-theme="light"] .landing-bg img {
    opacity: .1;
    filter: saturate(.9) contrast(.95);
}
html[data-theme="light"] .landing-bg-overlay {
    background:
        linear-gradient(135deg, rgba(14,165,233,.12), transparent 34%),
        linear-gradient(225deg, rgba(79,70,229,.08), transparent 38%),
        linear-gradient(180deg, rgba(244,248,251,.72) 0%, rgba(255,255,255,.94) 62%, #ffffff 100%);
}
html[data-theme="light"] .landing-bg-overlay::before {
    background-image:
        linear-gradient(rgba(51,65,85,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51,65,85,.05) 1px, transparent 1px);
}
.landing-bg-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148,163,184,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,163,184,.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.18) 65%, transparent);
    animation: landingGrid 30s linear infinite;
}
@keyframes bgZoom {
    from { transform: translate3d(0, calc(var(--landing-scroll, 0px) * .08), 0) scale(1); }
    to { transform: translate3d(0, calc(var(--landing-scroll, 0px) * .08), 0) scale(1.08); }
}
@keyframes overlayShift {
    0%, 100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    50% {
        opacity: .86;
        transform: translate3d(2%, -1%, 0);
    }
}
@keyframes landingGrid {
    from { background-position: 0 0, 0 0; }
    to { background-position: 42px 42px, 42px 42px; }
}
.scroll-reveal,
[data-scroll-reveal] {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition:
        opacity .62s ease,
        transform .62s cubic-bezier(.2, .8, .2, 1);
    will-change: opacity, transform;
}
.scroll-reveal.is-visible,
[data-scroll-reveal].is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.how-card.scroll-reveal:nth-child(2) { transition-delay: .08s; }
.how-card.scroll-reveal:nth-child(3) { transition-delay: .16s; }
.how-card.scroll-reveal:nth-child(4) { transition-delay: .24s; }
.lnav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px max(20px, calc((100vw - 1160px) / 2 + 32px));
    border-bottom: 1px solid rgba(56,189,248,.12);
    background: rgba(3,9,22,.42);
    backdrop-filter: blur(12px);
}
html[data-theme="light"] .lnav {
    border-bottom-color: rgba(2,132,199,.16);
    background: rgba(255,255,255,.72);
}
.lnav-logo {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .01em;
}
.lnav-logo span { color: var(--text); }
.lnav-links { display: flex; align-items: center; gap: 8px; }
.hero-section {
    position: relative;
    z-index: 5;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    align-items: center;
    gap: 44px;
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 82px 0 74px;
}
.hero-copy {
    min-width: 0;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56,189,248,.1);
    border: 1px solid rgba(56,189,248,.2);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--accent);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 22px;
    animation: fadeUp .6s ease both;
}
.hero-eyebrow .pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent3);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(1.4); }
}

.hero-title {
    font-family: var(--font-head);
    font-size: clamp(46px, 7vw, 86px);
    font-weight: 700;
    line-height: .96;
    margin-bottom: 24px;
    color: var(--ink);
    animation: fadeUp .6s .1s ease both;
}
.hero-title .hl {
    color: transparent;
    background: linear-gradient(90deg, var(--accent), #a5b4fc 54%, var(--accent3));
    -webkit-background-clip: text;
    background-clip: text;
}
.hero-title .hl2 { color: var(--success); }

.hero-sub {
    font-size: clamp(15px, 2vw, 19px);
    color: var(--muted);
    max-width: 620px;
    line-height: 1.65;
    margin-bottom: 34px;
    animation: fadeUp .6s .2s ease both;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    animation: fadeUp .6s .3s ease both;
}
.feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    animation: fadeUp .6s .4s ease both;
}
.feature-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(8,21,41,.78);
    border: 1px solid rgba(56,189,248,.16);
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--muted);
    transition: .25s;
}
html[data-theme="light"] .feature-pill {
    background: rgba(255,255,255,.84);
    border-color: rgba(2,132,199,.16);
}
.feature-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent3);
    box-shadow: 0 0 14px rgba(52,211,153,.5);
}
.feature-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.exchange-preview {
    position: relative;
    animation: fadeUp .7s .25s ease both;
}
.preview-shell {
    background:
        linear-gradient(145deg, rgba(255,255,255,.045), transparent 38%),
        rgba(8,21,41,.86);
    border: 1px solid rgba(56,189,248,.2);
    border-radius: 18px;
    box-shadow: var(--glow);
    padding: 22px;
    overflow: hidden;
}
html[data-theme="light"] .preview-shell {
    background:
        linear-gradient(145deg, rgba(2,132,199,.045), transparent 38%),
        rgba(255,255,255,.9);
    border-color: rgba(2,132,199,.18);
}
.preview-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}
.preview-title {
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
}
.preview-status {
    color: var(--success);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.swap-line {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid rgba(56,189,248,.12);
}
.swap-line:first-of-type { border-top: 0; }
.swap-person {
    background: rgba(14,34,60,.72);
    border: 1px solid rgba(56,189,248,.12);
    border-radius: 12px;
    padding: 12px;
}
html[data-theme="light"] .swap-person,
html[data-theme="light"] .ledger-chip {
    background: rgba(244,248,251,.88);
    border-color: rgba(2,132,199,.14);
}
.swap-person strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}
.swap-person span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}
.swap-arrow {
    color: var(--accent);
    font-size: 18px;
    font-weight: 700;
}
.preview-ledger {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}
.ledger-chip {
    background: rgba(3,9,22,.6);
    border: 1px solid rgba(56,189,248,.12);
    border-radius: 12px;
    padding: 12px;
}
.ledger-chip strong {
    color: var(--accent);
    display: block;
    font-size: 20px;
    line-height: 1;
}
.ledger-chip span {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.how-section {
    position: relative;
    z-index: 5;
    background:
        linear-gradient(180deg, rgba(8,21,41,.82), rgba(3,9,22,.94)),
        var(--surface);
    border-top: 1px solid rgba(56,189,248,.14);
    padding: 78px 32px;
}
html[data-theme="light"] .how-section {
    background:
        linear-gradient(180deg, rgba(255,255,255,.78), rgba(244,248,251,.96)),
        var(--surface);
    border-top-color: rgba(2,132,199,.14);
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 48px auto 0;
}
.how-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.035), transparent 42%),
        var(--bg);
    border: 1px solid rgba(56,189,248,.14);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: .3s;
}
html[data-theme="light"] .how-card {
    background:
        linear-gradient(145deg, rgba(2,132,199,.035), transparent 42%),
        var(--surface);
    border-color: rgba(2,132,199,.14);
}
.how-card:hover { border-color: rgba(56,189,248,.4); transform: translateY(-4px); box-shadow: var(--glow); }
.how-num {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 48px;
    font-weight: 700;
    color: rgba(56,189,248,.07);
    line-height: 1;
}
.how-icon {
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent3));
}
.how-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--ink); }
.how-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }
.footer-cta {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 80px 48px;
    border-top: 1px solid rgba(56,189,248,.14);
}
html[data-theme="light"] .footer-cta {
    background: var(--bg-bottom);
    border-top-color: rgba(2,132,199,.14);
}
.footer-cta h2 {
    font-family: var(--font-head);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--ink);
}
.footer-cta p { color: var(--muted); margin-bottom: 32px; font-size: 16px; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
    .lnav { padding: 16px 20px; }
    .hero-section {
        grid-template-columns: 1fr;
        padding: 58px 0 60px;
    }
    .exchange-preview { order: 2; }
    .preview-ledger { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .auth-page {
        width: min(100% - 24px, 520px);
        padding-top: 20px;
    }
    .auth-panel,
    .auth-card {
        padding: 22px;
    }
    .auth-title {
        font-size: 32px;
    }
    .auth-copy {
        font-size: 14px;
    }
    .auth-stats,
    .auth-name-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions .btn { width: 100%; }
    .swap-line { grid-template-columns: 1fr; }
    .swap-arrow { transform: rotate(90deg); justify-self: center; }
    .feature-row { display: grid; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
    .page-loader {
        display: none;
    }
    .landing-bg img,
    .landing-bg-overlay,
    .landing-bg-overlay::before,
    .hero-eyebrow .pulse {
        animation: none;
    }
    .scroll-reveal,
    [data-scroll-reveal] {
        opacity: 1;
        transform: none;
    }
}

