:root {
    --bg: #07111f;
    --bg-soft: #0f1b2e;
    --panel: rgba(9, 18, 33, 0.72);
    --panel-strong: rgba(10, 20, 38, 0.92);
    --line: rgba(138, 162, 196, 0.18);
    --line-strong: rgba(138, 162, 196, 0.3);
    --text: #f4f7fb;
    --text-soft: #c7d4e5;
    --text-dim: #8ea0b9;
    --accent: #3dd9c5;
    --accent-deep: #1ca596;
    --accent-warm: #ffb066;
    --danger: #ff6b72;
    --success: #27d68a;
    --warning: #ffcf66;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Avenir Next", "Trebuchet MS", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(61, 217, 197, 0.12), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(255, 176, 102, 0.14), transparent 25%),
        linear-gradient(180deg, #07111f 0%, #091528 48%, #06101c 100%);
    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.orb-a {
    width: 22rem;
    height: 22rem;
    background: rgba(61, 217, 197, 0.16);
    top: 4rem;
    left: -5rem;
    animation: drift 16s ease-in-out infinite;
}

.orb-b {
    width: 28rem;
    height: 28rem;
    background: rgba(255, 176, 102, 0.12);
    right: -10rem;
    top: 16rem;
    animation: drift 18s ease-in-out infinite reverse;
}

.grid-noise {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 90%);
    pointer-events: none;
    z-index: 0;
}

.auth-shell,
.dashboard-shell {
    position: relative;
    z-index: 1;
}

.hidden {
    display: none !important;
}

.container {
    width: min(1320px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.glass-panel,
.glass-strip {
    background: linear-gradient(180deg, rgba(12, 23, 42, 0.9), rgba(9, 17, 31, 0.72));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.glass-panel {
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(61, 217, 197, 0.08), transparent 34%);
    pointer-events: none;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.auth-stage {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 0.95fr;
    gap: 24px;
    align-items: stretch;
}

.auth-brand-panel,
.auth-card {
    min-height: 560px;
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-mark {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    font-family: "Futura", "Trebuchet MS", sans-serif;
    font-size: 2.25rem;
    letter-spacing: 0.08em;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent), #6ef5e4);
    box-shadow: 0 18px 40px rgba(61, 217, 197, 0.28);
    margin-bottom: 1.5rem;
}

.eyebrow,
.panel-kicker,
.metric-label,
.identity-label,
.mini-label {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.auth-brand-panel h1,
.topbar h1,
.hero-copy h2 {
    font-family: "Futura", "Trebuchet MS", sans-serif;
    letter-spacing: 0.02em;
}

.auth-brand-panel h1 {
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    margin-top: 0.8rem;
    margin-bottom: 1rem;
}

.auth-copy,
.panel-subtitle,
.topbar-copy,
.hero-copy p,
.metric-meta,
.list-item p,
.signal-block p,
.roadmap-card p,
.signal-preview,
.error-strip {
    color: var(--text-soft);
    line-height: 1.6;
}

.auth-feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 2rem;
}

.mini-stat {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card h2 {
    font-size: 2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    color: var(--text-soft);
    font-size: 0.92rem;
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(138, 162, 196, 0.24);
    background: rgba(7, 14, 27, 0.75);
    color: var(--text);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

input::placeholder {
    color: #7285a1;
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(61, 217, 197, 0.72);
    background: rgba(7, 16, 30, 0.96);
    transform: translateY(-1px);
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 13px 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #50eed9);
    color: #09111e;
    box-shadow: 0 15px 28px rgba(61, 217, 197, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, #ff7276, #ff9b7f);
    color: #170d10;
}

.btn-block {
    width: 100%;
}

.text-link {
    margin-top: 18px;
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 700;
    text-align: left;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.topbar h1 {
    font-size: clamp(2rem, 3vw, 2.9rem);
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.identity-pill {
    min-width: 210px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.identity-pill strong {
    display: block;
    margin-top: 4px;
}

#alertBox {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.notice {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
}

.notice-success {
    background: rgba(39, 214, 138, 0.12);
    border-color: rgba(39, 214, 138, 0.24);
}

.notice-error {
    background: rgba(255, 107, 114, 0.12);
    border-color: rgba(255, 107, 114, 0.24);
}

.notice-info {
    background: rgba(61, 217, 197, 0.12);
    border-color: rgba(61, 217, 197, 0.24);
}

.hero-grid,
.metric-grid,
.dual-grid,
.workspace-grid,
.form-grid,
.analysis-grid,
.pulse-grid {
    display: grid;
    gap: 18px;
}

.hero-grid {
    grid-template-columns: 1.2fr 1fr;
    margin-bottom: 24px;
}

.hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px;
}

.hero-copy h2 {
    font-size: clamp(2rem, 3vw, 3.1rem);
    margin: 0.4rem 0 0.8rem;
}

.hero-actions,
.hero-tags,
.button-row,
.toggle-row,
.search-row,
.exchange-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.chip,
.status-badge,
.exchange-chip,
.toggle-pill {
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.85rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
}

.chip-live {
    background: rgba(39, 214, 138, 0.18);
    border-color: rgba(39, 214, 138, 0.28);
    color: #c3ffe0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.exchange-chip.active {
    color: #07111f;
    background: linear-gradient(135deg, var(--accent), #5ff1de);
    border-color: transparent;
}

.metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 24px;
}

.metric-card {
    min-height: 152px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-value {
    font-size: clamp(1.6rem, 2vw, 2.3rem);
}

.glass-strip {
    border-radius: 999px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.tab {
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    background: transparent;
    color: var(--text-dim);
    font-weight: 700;
}

.tab.active {
    background: rgba(61, 217, 197, 0.14);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(61, 217, 197, 0.2);
}

.tab-panel {
    display: grid;
    gap: 18px;
}

.dual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid {
    align-items: start;
}

.wide-panel {
    min-height: 100%;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 18px;
}

.section-heading h3 {
    font-size: 1.4rem;
    margin-top: 0.35rem;
}

.compact {
    margin-bottom: 14px;
}

.workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.analysis-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-card {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 112px;
}

.analysis-card span {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.analysis-card strong {
    font-size: 1.4rem;
}

.analysis-card small {
    color: var(--text-soft);
}

.signal-card {
    background: linear-gradient(135deg, rgba(61, 217, 197, 0.12), rgba(255, 176, 102, 0.09));
}

.pulse-grid,
.pill-grid,
.list-stack,
.signal-stack,
.roadmap-stack,
.stat-stack {
    display: grid;
    gap: 12px;
}

.pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pulse-card,
.list-item,
.signal-block,
.roadmap-card,
.pair-pill {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.pulse-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 102px;
}

.pulse-card strong,
.list-item strong,
.signal-block strong,
.roadmap-card strong,
.pair-pill strong,
.stat-row strong {
    font-size: 1rem;
}

.pulse-card small,
.list-item small,
.signal-block small,
.roadmap-card small,
.pair-pill small {
    color: var(--text-dim);
}

.signal-block,
.roadmap-card,
.list-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pair-pill {
    background: rgba(7, 16, 30, 0.86);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pair-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(61, 217, 197, 0.38);
}

.form-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-form {
    margin-bottom: 16px;
}

.compact-top {
    margin-top: 16px;
    margin-bottom: 16px;
}

.toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.toggle-pill input {
    width: auto;
    accent-color: var(--accent);
}

.search-row input {
    flex: 1;
}

.empty-state {
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed var(--line-strong);
    background: rgba(255, 255, 255, 0.03);
}

.error-strip {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 107, 114, 0.18);
    background: rgba(255, 107, 114, 0.08);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(138, 162, 196, 0.12);
}

th {
    color: var(--text-dim);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

tr:last-child td {
    border-bottom: none;
}

.inline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    border-radius: 999px;
    padding: 8px 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

.neutral {
    color: var(--text-soft);
}

@keyframes drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(1.8rem, -1rem, 0) scale(1.06);
    }
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .analysis-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .auth-stage,
    .hero-grid,
    .dual-grid,
    .workspace-grid,
    .form-grid.two-up,
    .form-grid.three-up {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100vw - 20px, 100%);
        padding-top: 18px;
        padding-bottom: 32px;
    }

    .glass-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .metric-grid,
    .analysis-grid,
    .pulse-grid,
    .auth-feature-list {
        grid-template-columns: 1fr;
    }

    .glass-strip {
        border-radius: 22px;
    }

    .tab {
        width: 100%;
        text-align: left;
    }

    .topbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .identity-pill {
        width: 100%;
    }

    .hero-copy h2 {
        font-size: 2rem;
    }
}
