:root {
    --wico-blue: #08295a;
    --wico-deep: #031834;
    --wico-mid: #0d3f91;
    --wico-accent: #1665ff;
    --wico-red: #ef3340;
    --green: #21b56f;
    --amber: #f7a820;
    --bg: #f4f7fb;
    --ink: #0e1b2f;
    --muted: #65738a;
    --line: #e7edf6;
    --card: #fff;
    --shadow: 0 20px 50px rgba(15, 35, 65, .08);
    --sidebar-sticky-top: 0px;
    --sidebar-width: 242px;
    --sidebar-background-color: #031834;
}

* {
    box-sizing: border-box
}

html {
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    overflow-y: visible
}

.app {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    position: relative
}


.sidebar {
    width: var(--sidebar-width);
    background: transparent;
    color: #fff;
    position: sticky;
    top: var(--sidebar-sticky-top);
    left: auto;
    bottom: auto;
    z-index: 1000;
    padding: 116px 18px 24px;
    display: flex;
    flex-direction: column;
    flex: 0 0 var(--sidebar-width);
    align-self: flex-start;
    min-height: 100vh;
    height: auto;
    overflow: visible
}

.brand img {
    width: 174px;
    max-height: 72px;
    object-fit: contain
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0
}

.nav-menu a {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    padding: 0 16px;
    font-weight: 500
}

.nav-menu a i {
    font-size: 18px;
    width: 20px
}

.nav-menu a.active,
.nav-menu a:hover {
    background: linear-gradient(135deg, #0b62ff, #073cb9);
    box-shadow: 0 10px 25px rgba(5, 74, 199, .35)
}

.sidebar-bottom {
    margin-top: auto
}

.compare {
    font-size: 14px;
    margin-bottom: 26px
}

.compare-row {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
    color: #fff
}

.logout {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    color: #fff;
    text-decoration: none;
    background-color: var(--wico-blue);
}

.main {
    margin-left: 0;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100vh
}

.hero {
    min-height: 395px;
    background-image: linear-gradient(90deg, rgba(3, 24, 52, .84) 0%, rgba(3, 24, 52, .55) 48%, rgba(3, 24, 52, .16) 100%), url('../img/station-flag.png');
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
    padding: 32px 44px 125px
}


.hamb {
    font-size: 26px
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 18px
}

.circle-user {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0e53c7;
    display: grid;
    place-items: center;
    font-weight: 800
}

.notif {
    position: relative;
    font-size: 24px
}

.notif span {
    position: absolute;
    right: -9px;
    top: -10px;
    background: var(--wico-red);
    font-size: 11px;
    border-radius: 50%;
    height: 20px;
    width: 20px;
    display: grid;
    place-items: center
}

.hero h1 {
    font-size: 44px;
    font-weight: 800;
    margin: 6px 0
}

.hero p {
    font-size: 18px;
    opacity: .96
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(10px);
    padding: 14px 20px;
    border-radius: 10px;
    margin-top: 15px
}

.status-dot {
    width: 15px;
    height: 15px;
    background: var(--green);
    border-radius: 50%
}

.cardx {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow)
}

.kpi {
    min-height: 142px;
    padding: 19px;
    position: relative;
    overflow: hidden
}

.kpi .label {
    font-size: 13px;
    color: #25354f;
    text-transform: none;
    margin-bottom: 8px
}

.kpi .value {
    font-size: 27px;
    font-weight: 500;
    letter-spacing: -.5px
}

.kpi .delta {
    font-size: 13px;
    color: var(--green);
    margin-top: 4px
}

.kpi .icon {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #eaf1ff;
    color: #0d5cff;
    display: grid;
    place-items: center;
    font-size: 20px
}

.kpi .icon.green {
    background: #e5f8ec;
    color: var(--green)
}

.kpi .icon.red {
    background: #ffecee;
    color: var(--wico-red)
}

.spark {
    height: 32px;
    margin-top: 9px;
    background: linear-gradient(90deg, #0b62ff, #61a0ff);
    clip-path: polygon(0 70%, 12% 50%, 24% 58%, 36% 42%, 48% 65%, 60% 28%, 72% 10%, 84% 42%, 100% 22%, 100% 100%, 0 100%);
    opacity: .9
}

.spark.green {
    background: linear-gradient(90deg, #198f58, #66d59a)
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px
}

.panel {
    padding: 20px
}

.panel h3 {
    font-size: 16px;
    margin: 0 0 16px;
    font-weight: 700
}

.chart-box {
    height: 238px;
    position: relative
}

.wide {
    grid-column: span 1
}

.alert-list,
.state-list,
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.alert-item,
.state-item,
.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eef2f8;
    padding-bottom: 12px
}

.alert-item:last-child,
.state-item:last-child,
.rank-item:last-child {
    border-bottom: 0
}

.alert-icon {
    color: var(--wico-red);
    font-size: 20px
}

.small-muted {
    font-size: 12px;
    color: var(--muted)
}

.rank-num {
    color: #526079;
    width: 20px
}

.rank-money {
    margin-left: auto
}

.up {
    color: var(--green)
}

.down {
    color: var(--wico-red)
}

.insight-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
}

.insight-mini {
    display: flex;
    gap: 12px;
    padding: 13px;
    border-right: 1px solid var(--line)
}

.insight-mini:last-child {
    border-right: 0
}

.mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e8f3ff;
    color: #0b62ff;
    display: grid;
    place-items: center;
    flex-shrink: 0
}

.rec-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #f5f7fb;
    border-radius: 12px;
    padding: 12px
}

.rec-card img {
    width: 98px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover
}

.btn-station {
    background: #042a66;
    color: #fff;
    border: 0;
    border-radius: 7px;
    padding: 8px 14px
}

.mobile-preview {
    display: none
}

.mobile-top {
    display: none
}

.bottom-nav {
    display: none
}

.page-hero-small {
    background-image: linear-gradient(90deg, rgba(3, 24, 52, .88), rgba(3, 24, 52, .45)), url('../img/station-flag.png');
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    color: #fff;
    padding: 30px;
    margin-bottom: 20px
}

.table-clean td,
.table-clean th {
    padding: 15px;
    border-color: #edf1f7
}

.chat-shell {
    display: grid;
    grid-template-columns: 1.35fr .9fr;
    gap: 18px
}

.copilot-panel {
    background: linear-gradient(135deg, #041a38, #07295d);
    color: #fff;
    border-radius: 18px;
    padding: 26px;
    min-height: 600px;
    display: flex;
    flex-direction: column
}

.bot-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #fff;
    color: #0b62ff;
    display: grid;
    place-items: center;
    font-size: 30px;
    margin-bottom: 18px
}

.question-chip {
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    color: #fff;
    padding: 11px 15px;
    display: inline-flex;
    margin: 5px;
    background: rgba(255, 255, 255, .06)
}

.chat-input {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 13px;
    padding: 11px
}

.chat-input input {
    flex: 1;
    background: transparent;
    border: 0;
    color: #fff;
    outline: none
}

.chat-input input::placeholder {
    color: rgba(255, 255, 255, .65)
}

.side-stat {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px
}

.logo-box {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow)
}

.logo-box img {
    height: 50px
}

.photo-strip {
    height: 170px;
    background: url('../img/station-flag.png') center/cover;
    border-radius: 14px;
    margin-top: 12px
}

.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px
}

.sw1 {
    background: var(--wico-blue)
}

.sw2 {
    background: var(--wico-accent)
}

.sw3 {
    background: var(--wico-red)
}

@media (max-width:1280px) {
    :root {
        --sidebar-width: 220px
    }

    .kpi-grid {
        grid-template-columns: repeat(3, 1fr)
    }

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

    .content-wrap {
        padding-left: 28px;
        padding-right: 28px
    }

    .hero {
        padding-left: 32px;
        padding-right: 32px
    }

    .sidebar {
        width: var(--sidebar-width);
        flex-basis: var(--sidebar-width)
    }

    .brand {
        width: var(--sidebar-width)
    }

    .main {
        margin-left: 0;
        width: auto
    }
}

@media (max-width:991px) {

    html,
    body {
        overflow-x: hidden
    }

    .app {
        display: block
    }

    .app::before {
        display: none
    }

    .sidebar {
        display: none
    }

    .main {
        margin-left: 0;
        width: 100%;
        display: block
    }

    .mobile-top {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--wico-deep);
        color: #fff;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        z-index: 1000
    }

    .mobile-top img {
        height: 38px
    }

    .hero {
        margin-top: 64px;
        min-height: 308px;
        padding: 24px 18px 95px;
        background-position: center
    }

    .hero-top {
        display: none
    }

    .hero h1 {
        font-size: 32px
    }

    .hero p {
        font-size: 15px
    }

    .content-wrap {
        padding: 0 14px 92px;
        margin-top: -76px
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px
    }

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

    .insight-row {
        grid-template-columns: 1fr
    }

    .insight-mini {
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        height: 62px;
        background: var(--wico-deep);
        border-radius: 18px;
        z-index: 1000;
        box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
        align-items: center;
        justify-content: space-around
    }

    .bottom-nav a {
        color: #dbe8ff;
        text-decoration: none;
        font-size: 11px;
        text-align: center;
        min-width: 52px
    }

    .bottom-nav i {
        display: block;
        font-size: 20px;
        margin-bottom: 2px
    }

    .bottom-nav a.active {
        color: #fff
    }

    .chart-box {
        height: 215px
    }

    .chat-shell {
        grid-template-columns: 1fr
    }

    .copilot-panel {
        min-height: 520px
    }

    .page-hero-small {
        margin-top: 64px
    }

    .rec-card {
        align-items: flex-start
    }

    .rec-card img {
        width: 78px;
        height: 64px
    }

    .panel {
        padding: 16px
    }
}