:root {
    --bg: #0a0a0b;
    --surface: #111214;
    --surface-2: #17181c;
    --line: rgba(255,255,255,0.1);
    --text: #f5f2ea;
    --muted: rgba(245,242,234,0.68);
    --gold: #d3b07a;
    --gold-strong: #f1d5a3;
    --ink: #090909;
    --danger: #d45c5c;
    --success: #6daf88;
    --shadow: 0 30px 80px rgba(0,0,0,0.35);
    --font-display: "Times New Roman", Georgia, serif;
    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
pre { white-space: pre-wrap; word-break: break-word; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px;
    position: relative;
    z-index: 5;
}
.overlay { position: absolute; inset: 0 0 auto 0; }
.brandmark {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.04em;
}
.topnav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.lang-switch { display: flex; gap: 8px; opacity: 0.8; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    transition: transform .24s ease, background .24s ease, border-color .24s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: 0.58; cursor: wait; transform: none; }
.button.gold {
    background: linear-gradient(135deg, #c79f65, #f0d8ab);
    color: #241709;
    border-color: transparent;
}
.button.ghost { background: rgba(255,255,255,0.02); }
.button.subtle { background: transparent; }

.hero { min-height: 100vh; background:
    radial-gradient(circle at 75% 18%, rgba(211,176,122,0.18), transparent 32%),
    radial-gradient(circle at 22% 30%, rgba(255,255,255,0.08), transparent 20%),
    linear-gradient(180deg, #050506 0%, #0f1114 70%, #111214 100%);
}
.hero-plane {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 120px 5vw 60px;
    gap: 40px;
}
.hero-copy {
    max-width: 620px;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--gold);
}
.hero h1, .auth-aside h1, .cta-final h2, .detail-split h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 0.92;
    margin: 18px 0 16px;
    font-weight: 400;
}
.hero p, .detail-split p, .cta-final p, .site-footer p, .auth-aside p { color: var(--muted); line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.hero-visual {
    min-height: 70vh;
    border-radius: 36px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.visual-orbit {
    position: absolute;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(211,176,122,0.14);
    border-radius: 50%;
    top: -140px;
    right: -120px;
    animation: slow-spin 18s linear infinite;
}
.visual-grid {
    position: absolute;
    inset: auto 24px 24px 24px;
    display: grid;
    gap: 14px;
}
.visual-grid > div {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.visual-grid span { display: block; color: var(--gold); margin-bottom: 8px; }
.visual-grid strong { font-size: 1.4rem; font-weight: 500; }

.feature-band, .detail-split, .cta-final, .site-footer, .legal-page, .docs-page {
    padding: 80px 5vw;
}
.feature-band {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    background: #0d0f12;
}
.feature-band article { padding-top: 18px; border-top: 1px solid var(--line); }
.feature-band span { color: var(--gold); }
.detail-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
}
.detail-list { display: grid; gap: 20px; }
.detail-list > div { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.detail-list strong { display: block; font-size: 1.1rem; margin-bottom: 8px; }
.cta-final {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 18px;
}
.site-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    background: #090a0c;
    border-top: 1px solid var(--line);
}

.auth-shell, .app-shell {
    min-height: 100vh;
    display: grid;
}
.auth-shell { grid-template-columns: 1.05fr 0.95fr; }
.auth-aside {
    padding: 56px;
    background:
        radial-gradient(circle at 20% 20%, rgba(211,176,122,0.25), transparent 35%),
        linear-gradient(180deg, #0d0f13, #060708);
}
.auth-main {
    display: grid;
    place-items: center;
    padding: 32px;
    background: #13151a;
}
.auth-card, .panel, .stat {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.auth-card {
    width: min(460px, 100%);
    padding: 32px;
    border-radius: 28px;
}

.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 24px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { display: grid; gap: 8px; color: var(--muted); }
input, select, textarea {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: var(--text);
    padding: 0 14px;
}

.theme-app { background: #0c0d10; }
.app-shell { grid-template-columns: 280px 1fr; }
.sidebar {
    padding: 30px 24px;
    border-right: 1px solid var(--line);
    background: #090a0c;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--muted);
}
.sidebar nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.content {
    padding: 32px;
    display: grid;
    gap: 24px;
    align-content: start;
}
.content-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
}
.content-top h1 { margin: 6px 0 0; font-size: 2rem; }
.balances { display: flex; gap: 12px; flex-wrap: wrap; }
.balances > div, .stat {
    padding: 16px 20px;
    border-radius: 22px;
}
.balances span, .stat span { display: block; color: var(--muted); font-size: 0.85rem; }
.balances strong, .stat strong { font-size: 1.5rem; }
.grid-two, .stats-row, .grid-form {
    display: grid;
    gap: 24px;
}
.grid-two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stats-row { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-form { grid-template-columns: repeat(4, minmax(0,1fr)); align-items: end; }

.panel {
    border-radius: 26px;
    padding: 24px;
}
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 18px;
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.table th { color: var(--gold); font-weight: 500; }
.dense th, .dense td { padding: 10px 8px; font-size: 0.93rem; }

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid;
}
.alert.error { color: #ffd7d7; background: rgba(212,92,92,0.12); border-color: rgba(212,92,92,0.24); }
.alert.success { color: #d4ffe3; background: rgba(109,175,136,0.12); border-color: rgba(109,175,136,0.24); }

.search { max-width: 320px; }
.payment-box, .invite-box, .log-stream {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.02);
    padding: 18px;
}
.invite-box {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.08em;
}
.log-stream {
    max-height: 72vh;
    overflow: auto;
}
.log-stream pre {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85rem;
    color: #d9dddf;
}

.subtle-copy { color: var(--muted); }
.legal-page, .docs-page {
    max-width: 920px;
    margin: 0 auto;
}
.legal-page h1, .docs-page h1 { font-family: var(--font-display); font-size: 3rem; }
.docs-page section { margin-bottom: 36px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.reveal-up { animation: reveal-up 1s ease both; }
.reveal-fade { animation: reveal-fade 1.2s ease both; }

@keyframes reveal-up {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
    .hero-plane, .detail-split, .auth-shell, .app-shell, .grid-two, .stats-row, .grid-form, .feature-band, .site-footer {
        grid-template-columns: 1fr;
    }
    .topbar { position: static; padding: 18px 20px; }
    .hero-plane { padding-top: 40px; }
}

@media (max-width: 640px) {
    .content, .feature-band, .detail-split, .cta-final, .site-footer, .legal-page, .docs-page { padding-left: 20px; padding-right: 20px; }
    .sidebar { padding: 20px; }
    .panel, .auth-card { padding: 18px; border-radius: 20px; }
    .hero h1, .auth-aside h1, .cta-final h2, .detail-split h2 { font-size: 2.7rem; }
}
