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

:root {
    --bg: #070a12;
    --sidebar: #0b0f19;
    --panel: #101522;
    --panel2: #0d121e;
    --border: #202a3d;
    --text: #f5f7ff;
    --muted: #7f91b2;
    --blue: #5f8cff;
    --purple: #7857ff;
    --green: #18d58b;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
}

button,
input {
    font-family: inherit;
}

.app {
    min-height: 100vh;
    display: flex;
}


/* SIDEBAR */

.sidebar {
    width: 264px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 8px 45px;
}

.brand-logo {
    width: 47px;
    height: 47px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #627cff, #754cff);
    box-shadow: 0 0 28px rgba(101, 92, 255, .28);
    font-size: 25px;
    font-weight: 800;
}

.brand h1 {
    font-size: 20px;
    margin-bottom: 4px;
}

.brand span {
    color: #6d80a5;
    font-size: 8px;
    letter-spacing: 2px;
    font-weight: 700;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    text-decoration: none;
    color: #8190aa;
    padding: 15px 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 600;
    transition: .2s;
}

.nav-item span {
    width: 17px;
    text-align: center;
}

.nav-item:hover {
    background: #12192a;
    color: white;
}

.nav-item.active {
    color: white;
    background: linear-gradient(90deg, #192443, #11182a);
    border: 1px solid #2a3a65;
}

.sidebar-bottom {
    margin-top: auto;
}

.system-status {
    border: 1px solid #222e43;
    background: #0e1421;
    border-radius: 13px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-dot {
    width: 9px;
    height: 9px;
    background: #1bdd8d;
    border-radius: 50%;
    box-shadow: 0 0 12px #1bdd8d;
}

.system-status strong {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.system-status small {
    color: #667897;
    font-size: 10px;
}

.version {
    text-align: center;
    color: #465574;
    font-size: 10px;
    margin-top: 20px;
}


/* MAIN */

.main {
    margin-left: 264px;
    width: calc(100% - 264px);
    padding: 30px 44px 35px;
}

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

.eyebrow {
    color: #6884bb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.topbar h2 {
    font-size: 25px;
    letter-spacing: -.8px;
}

.top-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.api-status {
    border: 1px solid #174c3e;
    background: #0b211c;
    border-radius: 30px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #54e3a8;
    font-size: 10px;
}

.api-status span {
    width: 7px;
    height: 7px;
    background: #24db91;
    border-radius: 50%;
}

.user-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1b2438;
    color: #e8edff;
    font-size: 11px;
    font-weight: 800;
}


/* HERO */

.hero {
    min-height: 330px;
    border: 1px solid #283758;
    border-radius: 20px;
    background:
        radial-gradient(circle at 85% 45%, rgba(67, 100, 230, .32), transparent 28%),
        linear-gradient(115deg, #10182b, #151f3d);
    position: relative;
    overflow: hidden;
    padding: 53px;
    margin-bottom: 26px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-tag {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid #36538c;
    border-radius: 30px;
    color: #83a8ff;
    background: rgba(38, 62, 111, .28);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 27px;
}

.hero h1 {
    font-size: clamp(44px, 5vw, 66px);
    line-height: .98;
    letter-spacing: -3px;
    margin-bottom: 26px;
}

.hero h1 span {
    color: #6e9aff;
}

.hero p {
    color: #9bb0d2;
    font-size: 15px;
    line-height: 1.7;
    max-width: 650px;
}

.hero-visual {
    position: absolute;
    right: 7%;
    top: 0;
    width: 340px;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
}

.orb-one {
    width: 230px;
    height: 230px;
    right: 0;
    top: 35px;
    background: rgba(69, 104, 224, .25);
}

.orb-two {
    width: 130px;
    height: 130px;
    right: 160px;
    bottom: 25px;
    background: rgba(56, 164, 217, .2);
}

.chart-icon {
    position: absolute;
    right: 85px;
    top: 95px;
    width: 155px;
    height: 115px;
    border-left: 2px solid #5272b9;
    border-bottom: 2px solid #5272b9;
}

.chart-icon div {
    position: absolute;
    height: 3px;
    background: #70a0ff;
    transform-origin: left;
    border-radius: 5px;
}

.chart-icon div:nth-child(1) {
    width: 55px;
    left: 0;
    bottom: 30px;
    transform: rotate(-35deg);
}

.chart-icon div:nth-child(2) {
    width: 50px;
    left: 45px;
    bottom: 62px;
    transform: rotate(0deg);
}

.chart-icon div:nth-child(3) {
    width: 50px;
    left: 93px;
    bottom: 62px;
    transform: rotate(-48deg);
}


/* PANELS */

.control-panel,
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.control-panel {
    padding: 34px 30px;
    margin-bottom: 26px;
}

.section-heading,
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-heading {
    margin-bottom: 29px;
}

.section-heading h2,
.panel-heading h2 {
    font-size: 21px;
    margin-bottom: 7px;
}

.section-heading p,
.panel-heading p {
    color: var(--muted);
    font-size: 13px;
}

.ready-badge,
.live-badge,
.ai-badge,
.model-badge {
    border-radius: 30px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.ready-badge {
    color: #43e5a4;
    border: 1px solid #174c3e;
    background: #0b211c;
    padding: 9px 13px;
}

.ready-badge span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #32df98;
    margin-right: 5px;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.input-group label {
    display: block;
    color: #8395b5;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
    margin-bottom: 9px;
}

.input-wrap {
    height: 49px;
    border: 1px solid #29344a;
    background: #0a0f19;
    border-radius: 9px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 9px;
}

.input-wrap > span {
    color: #6885bc;
}

.input-wrap input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    color: white;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
}

.input-wrap small {
    color: #4e6387;
    font-size: 8px;
    font-weight: 800;
}

.generate-area {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.generate-btn {
    border: 0;
    border-radius: 10px;
    padding: 14px 20px;
    background: linear-gradient(90deg, #587cff, #774cff);
    color: white;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(91, 91, 255, .22);
    transition: .2s;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(91, 91, 255, .35);
}

.generate-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.generate-btn span {
    margin-left: 25px;
}

.enter-hint {
    color: #536584;
    font-size: 10px;
}


/* CARDS */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 26px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 22px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-top span {
    color: #7186aa;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.card-top b {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #16213b;
    color: #80a1ff;
}

.card h3 {
    margin-top: 18px;
    font-size: 27px;
}

.card small {
    color: #526583;
    display: block;
    margin-top: 7px;
    font-size: 10px;
}

.risk-healthy {
    color: #25db96 !important;
}

.risk-warning {
    color: #ffbf52 !important;
}

.risk-critical {
    color: #ff6d7a !important;
}


/* DASHBOARD GRID */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 15px;
    margin-bottom: 26px;
}

.panel {
    padding: 29px;
}

.panel-heading {
    margin-bottom: 25px;
}

.live-badge {
    background: #0a3025;
    color: #36dc99;
    padding: 9px 13px;
}

.ai-badge {
    background: #172446;
    color: #7fa0ff;
    padding: 9px 13px;
}

.metric {
    min-height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1d2637;
}

.metric:last-child {
    border-bottom: 0;
}

.metric strong {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

.metric small {
    color: #566987;
    font-size: 10px;
}

.metric > b {
    font-size: 17px;
}

.insight-text {
    color: #a8b7d1;
    line-height: 1.7;
    font-size: 13px;
    min-height: 80px;
}

.recommendation {
    margin-top: 25px;
    border: 1px solid #242f44;
    background: #0b101b;
    border-radius: 13px;
    padding: 17px;
    display: flex;
    gap: 13px;
}

.recommendation-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #0a3025;
    color: #3ce19e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recommendation span {
    color: #6680a8;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.recommendation p {
    color: #dce4f5;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.5;
}


/* CHART */

.forecast-panel {
    margin-bottom: 24px;
}

.model-badge {
    border: 1px solid #263653;
    padding: 9px 12px;
    color: #7794c8;
}

.chart-container {
    height: 350px;
    position: relative;
}

.forecast-list {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.forecast-row {
    border: 1px solid #202b3e;
    background: #0b101a;
    border-radius: 9px;
    padding: 12px;
    text-align: center;
}

.forecast-row span {
    display: block;
    color: #637696;
    font-size: 9px;
    margin-bottom: 7px;
}

.forecast-row strong {
    font-size: 12px;
}

.empty-state {
    color: #4e6385;
    font-size: 11px;
}


/* FOOTER */

footer {
    padding: 10px 0;
    color: #53627e;
    font-size: 9px;
    display: flex;
    gap: 18px;
}

footer strong {
    color: #7188b5;
}


/* RESPONSIVE */

@media (max-width: 1100px) {

    .sidebar {
        width: 210px;
    }

    .main {
        margin-left: 210px;
        width: calc(100% - 210px);
        padding: 25px;
    }

    .control-grid,
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-visual {
        opacity: .5;
    }
}

@media (max-width: 800px) {

    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 18px;
    }

    .hero {
        padding: 35px 25px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-visual {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .control-grid,
    .cards {
        grid-template-columns: 1fr;
    }

    .forecast-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar h2 {
        font-size: 18px;
    }

    .api-status {
        display: none;
    }
}
