@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,700;1,700&display=swap');

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

:root {
    --primary: #00d4d4;
    --light:   #e0fbfb;
    --card:    #b8e8f0;
    --heading: #003366;
    --teal:    #278693;
    --white:   #ffffff;
    --pill:    999px;
    --low:     #52c97a;
    --mid:     #f0b429;
    --high:    #e55353;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f0fafa;
    min-height: 100vh;
}

/* ── HEADER ── */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    background: linear-gradient(to right, #fff 0%, #d0f8f8 20%, var(--primary) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,180,180,0.1);
}

.logo-image { height: 55px; width: auto; }

nav {
    background: var(--white);
    border-radius: var(--pill);
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    padding: 6px 10px;
}

.nav-links { list-style: none; display: flex; gap: 4px; }

.nav-links a {
    display: block;
    text-decoration: none;
    color: var(--teal);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 9px 20px;
    border-radius: var(--pill);
    transition: background 0.2s;
    white-space: nowrap;
    cursor: pointer;
}

.nav-links a:hover  { background: var(--light); }
.nav-links a.active { background: var(--card); }

.user-actions { display: flex; gap: 10px; }

.icon-btn {
    width: 48px; height: 48px;
    background: var(--card);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s;
}
.icon-btn:hover { background: var(--light); }
.icon-btn i { font-size: 1.2rem; color: var(--teal); }

/* ── PAGES ── */
.page        { display: none; padding: 40px 56px; }
.page.active { display: block; }

/* ── SHARED CARD ── */
.card {
    background: var(--white);
    border-radius: 20px;
    padding: 24px 28px;
    cursor: default;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0,180,180,0.08);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,180,180,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.card-icon {
    width: 48px; height: 48px;
    background: var(--card);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.card-icon i { font-size: 1.3rem; color: var(--teal); }

.card-label { font-weight: 700; font-size: 1rem; color: var(--heading); }
.card-sub   { font-size: 0.8rem; color: var(--teal); opacity: 0.85; margin-top: 2px; }

.badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--card);
    color: var(--teal);
    padding: 4px 12px;
    border-radius: var(--pill);
    white-space: nowrap;
}
.badge.good { background: #d4f7e0; color: #1a7a40; }
.badge.warn { background: #fdecc8; color: #a06000; }

/* ── CHART ── */
.chart-wrap {
    position: relative;
    width: 100%;
    height: 220px;
}

/* ── DASHBOARD ── */
.dash-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

.tagline h1 {
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--teal);
}

.tagline .highlight {
    font-weight: 700;
    font-style: italic;
    color: var(--heading);
}

.tagline-stats {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border-radius: var(--pill);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--teal);
    box-shadow: 0 2px 8px rgba(0,180,180,0.1);
}

.pulse { color: var(--primary); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 18px;
}

.span2 { grid-column: 1 / span 2; }

/* ── CROWD METER ── */
.crowd-meter { display: flex; flex-direction: column; gap: 6px; }

.meter-bar {
    height: 10px;
    background: #e0f0f4;
    border-radius: var(--pill);
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0%;
    border-radius: var(--pill);
    transition: width 1s ease, background 1s ease;
    background: var(--low);
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--teal);
    opacity: 0.7;
}

.crowd-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading);
}

.crowd-value.large { font-size: 2.4rem; }

.advisory-text {
    font-size: 0.88rem;
    color: var(--teal);
    line-height: 1.6;
    background: var(--light);
    border-radius: 12px;
    padding: 12px 16px;
}

/* ── CROWD STATUS PAGE ── */
.crowd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 18px;
}

.range-display {
    display: flex;
    gap: 12px;
}

.range-item {
    flex: 1;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.range-item.low  { background: #d4f7e0; }
.range-item.mid  { background: #fdecc8; }
.range-item.high { background: #fde0e0; }

.range-label { font-size: 0.72rem; font-weight: 700; color: var(--heading); opacity: 0.7; }
.range-val   { font-size: 1.2rem; font-weight: 700; color: var(--heading); }

/* ── TERMINAL PAGE ── */
.terminal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 18px;
}
