:root {
    --bg: #08111f;
    --panel: rgba(11, 22, 39, 0.78);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #e8eef7;
    --muted: #8ea0bb;
    --accent: #29c4ff;
    --accent-2: #ff8a3d;
    --success: #1ed39a;
    --danger: #ff6b6b;
    --warn: #ffcf5a;
    --hot: #ff9150;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    --font-main: "MiSans", "Alibaba PuHuiTi", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    font-family: var(--font-main);
    background:
        radial-gradient(circle at 0% 0%, rgba(41, 196, 255, 0.18), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(255, 138, 61, 0.18), transparent 30%),
        linear-gradient(160deg, #091220 0%, #07101c 42%, #0d1728 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.28;
    pointer-events: none;
}

.ambient {
    position: fixed;
    border-radius: 999px;
    filter: blur(40px);
    pointer-events: none;
    opacity: 0.55;
}

.ambient-a {
    width: 320px;
    height: 320px;
    background: rgba(41, 196, 255, 0.12);
    top: 3rem;
    left: -5rem;
}

.ambient-b {
    width: 420px;
    height: 420px;
    background: rgba(255, 138, 61, 0.12);
    right: -8rem;
    bottom: 0;
}

.glass {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.eyebrow,
.panel-kicker,
.clock-label,
.stat-label,
.column-head span,
.watch-top span,
.watch-grid span,
.watch-foot,
.login-hint,
.feature-pill,
.heat-row span,
.sentiment-grid span,
.signal-row span,
.mini-bar span,
.muted,
.dense-row-meta span,
.dense-row-head span,
.user-box small {
    color: var(--muted);
}

.login-body,
.dashboard-body {
    position: relative;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: center;
    padding: 3rem;
    position: relative;
    z-index: 1;
}

.login-brand h1,
.topbar h1 {
    margin: 0.3rem 0 0.4rem;
    font-size: clamp(2rem, 3.2vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.login-brand p {
    max-width: 42rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #c6d3e4;
}

.feature-list {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.6rem;
}

.feature-pill {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.login-card {
    padding: 2rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(12, 26, 47, 0.92), rgba(8, 16, 29, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.panel-header h2 {
    margin: 0.2rem 0 0;
    font-size: 1.08rem;
}

.login-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.6rem;
}

.login-form label {
    display: grid;
    gap: 0.45rem;
}

.login-form input {
    height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 1rem;
    outline: none;
    font-size: 1rem;
}

.login-form input:focus {
    border-color: rgba(41, 196, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(41, 196, 255, 0.12);
}

.primary-btn {
    height: 54px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #52e1ff 60%, #93f7ff);
    color: #08111f;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.flash {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.28);
    color: #ffd6d6;
}

.dashboard-body {
    height: 100vh;
    overflow: hidden;
}

.page-shell {
    position: relative;
    z-index: 1;
    padding: 0.9rem;
}

.desktop-shell {
    height: 100vh;
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 0.7rem;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border-radius: 22px;
    padding: 0.9rem 1.1rem;
    min-height: 92px;
}

.topbar p {
    margin: 0;
    font-size: 0.9rem;
}

.topbar-main {
    min-width: 0;
}

.topbar-side {
    display: flex;
    gap: 0.8rem;
    align-items: stretch;
}

.clock-box,
.user-box {
    padding: 0.7rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    min-width: 150px;
}

.clock-value {
    margin-top: 0.2rem;
    font-size: 1rem;
    font-weight: 700;
}

.user-box {
    display: grid;
    gap: 0.2rem;
}

.user-box a {
    color: #b8f2ff;
    text-decoration: none;
    font-size: 0.9rem;
}

.stats-grid,
.insight-grid {
    display: grid;
    gap: 0.7rem;
}

.compact-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-insights {
    grid-template-columns: 1.15fr 1fr 0.95fr;
}

.stat-card,
.insight-card,
.week-column {
    border-radius: 18px;
    padding: 0.85rem 0.95rem;
}

.stat-value {
    margin-top: 0.25rem;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.stat-value.warm {
    color: #ffd38d;
}

.stat-value.cool {
    color: #97e7ff;
}

.stat-sub {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.signal-list,
.heat-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.signal-row,
.heat-row {
    display: grid;
    align-items: center;
    gap: 0.55rem;
}

.signal-row {
    grid-template-columns: 72px 1fr 24px;
}

.signal-meter {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.signal-fill {
    height: 100%;
    border-radius: inherit;
}

.heat-row {
    grid-template-columns: 1fr auto;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.heat-row strong {
    display: block;
    font-size: 0.92rem;
}

.heat-meta {
    text-align: right;
    display: grid;
    gap: 0.15rem;
    font-size: 0.82rem;
}

.compact-sentiment {
    margin-top: 0.7rem;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.sentiment-head {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.85rem;
}

.sentiment-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0.45rem 0 0.6rem;
    color: #9de9ff;
}

.sentiment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.sentiment-grid div {
    padding: 0.55rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.sentiment-grid strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.95rem;
}

.alerts-strip {
    min-height: 44px;
    border-radius: 16px;
    padding: 0.5rem 0.7rem;
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
    overflow: hidden;
}

.alert-pill {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    white-space: nowrap;
}

.alert-pill span {
    color: var(--muted);
}

.dense-week-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.7rem;
    overflow: hidden;
}

.dense-column {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.7rem;
}

.column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.column-head h3 {
    margin: 0;
    font-size: 0.95rem;
}

.dense-list {
    min-height: 0;
    display: grid;
    grid-auto-rows: minmax(0, auto);
    gap: 0.38rem;
    overflow: hidden;
}

.dense-watch-row {
    padding: 0.45rem 0.52rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 0.18rem;
}

.dense-row-head,
.dense-row-prices,
.dense-row-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    min-width: 0;
}

.dense-row-head {
    font-size: 0.84rem;
}

.dense-row-head strong {
    font-size: 0.88rem;
}

.dense-row-prices,
.dense-row-meta {
    font-size: 0.75rem;
}

.dense-row-prices strong {
    font-size: 0.78rem;
}

.signal-tag {
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-style: normal;
    font-size: 0.72rem;
}

.empty-state {
    padding: 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 0.82rem;
}

.tone-danger,
.tone-danger .signal-tag {
    color: #ff9393;
}

.tone-success,
.tone-success .signal-tag {
    color: #6ef0b6;
}

.tone-buy,
.tone-buy .signal-tag {
    color: #8ee8ff;
}

.tone-hot,
.tone-hot .signal-tag {
    color: #ffc089;
}

.tone-warn,
.tone-warn .signal-tag {
    color: #ffe389;
}

.tone-neutral,
.tone-neutral .signal-tag {
    color: #c7d4e4;
}

@media (max-width: 1440px) {
    .dashboard-body {
        overflow: auto;
    }

    .desktop-shell {
        height: auto;
        min-height: 100vh;
        grid-template-rows: repeat(5, auto);
    }

    .compact-stats,
    .compact-insights,
    .dense-week-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1280px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

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

    .topbar-side {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .page-shell,
    .login-shell {
        padding: 1rem;
    }

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