:root {
    --navy: #111d3a;
    --navy2: #172649;
    --page: #f5f7fb;
    --text: #172033;
    --muted: #7b859b;
    --border: #e5e9f2;
    --primary: #3658d4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--page);
    color: var(--text);
}

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

.sidebar {
    width: 235px;
    background: linear-gradient(180deg, var(--navy), #0c1730);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 20px 15px;
}

.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 8px 24px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #4164e8;
    font-weight: 800;
}

.brand-title {
    font-weight: 700;
    font-size: 16px;
}

.brand-subtitle {
    opacity: .55;
    font-size: 11px;
}

.side-nav a {
    display: block;
    color: #cbd5ec;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 3px;
    font-size: 14px;
}

.side-nav a:hover,
.side-nav a.active {
    background: #2d447c;
    color: white;
}

.nav-heading {
    color: #7584a7;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 22px 12px 7px;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 25px;
    right: 25px;
    font-size: 12px;
    color: #aebbd6;
}

.sidebar-footer a {
    color: white;
}

.main-area {
    flex: 1;
    margin-left: 235px;
}

.topbar {
    height: 85px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.page-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.user-chip {
    background: #edf1ff;
    padding: 8px 13px;
    border-radius: 20px;
    font-size: 12px;
}

.content-area {
    padding: 25px 28px 50px;
}

.section-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 12px;
}

.metric-grid {
    display: grid;
    gap: 12px;
}

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

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

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

.metric-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 16px;
    min-height: 105px;
}

.metric-card span {
    display: block;
    font-size: 12px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    margin: 11px 0 7px;
}

.metric-card small {
    color: var(--muted);
    font-size: 10px;
}

.metric-card.blue { border-top: 3px solid #4c72ee; }
.metric-card.purple { border-top: 3px solid #8a60d8; }
.metric-card.orange { border-top: 3px solid #f59f45; }
.metric-card.teal { border-top: 3px solid #27a5a4; }
.metric-card.green { border-top: 3px solid #2ca36a; }
.metric-card.darkblue { border-top: 3px solid #3658d4; }
.metric-card.red { border-top: 3px solid #e05252; }
.metric-card.amber { border-top: 3px solid #e5a526; }
.metric-card.gray { border-top: 3px solid #7c8595; }

.summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.summary-card strong {
    display: block;
    font-size: 25px;
    margin-top: 5px;
}

.dashboard-columns,
.two-column,
.three-column {
    display: grid;
    gap: 18px;
}

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

.three-column {
    grid-template-columns: repeat(3, 1fr);
}

.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 18px;
}

.panel-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
}

.forecast-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.forecast-row span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

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

.warning-box {
    background: #fff4db;
    border: 1px solid #f6d17d;
    padding: 10px;
    border-radius: 8px;
    margin-top: 12px;
    color: #946500;
    font-size: 12px;
}

.pool-row {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.alert-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.ops-alert {
    background: white;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.ops-alert strong {
    display: block;
    font-size: 25px;
}

.ops-alert span {
    display: block;
    font-weight: 700;
    font-size: 12px;
}

.ops-alert small {
    font-size: 9px;
    color: var(--muted);
}

.ops-alert.danger {
    border-left: 4px solid #e05252;
}

.ops-alert.warning {
    border-left: 4px solid #e5a526;
}

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

label {
    font-size: 11px;
    font-weight: 700;
    color: #556077;
    margin-bottom: 5px;
}

.domain-box {
    min-height: 220px;
    font-family: monospace;
    font-size: 12px;
}

.ops-table {
    font-size: 12px;
}

.ops-table th {
    color: #68748b;
    font-size: 10px;
    text-transform: uppercase;
}

.status-pill {
    background: #edf1ff;
    color: #3658d4;
    border-radius: 12px;
    padding: 4px 7px;
    font-size: 9px;
    font-weight: 700;
}

.done {
    color: #248c57;
    font-weight: 700;
}

.pending {
    color: #d18b1f;
    font-weight: 700;
}

.age-critical {
    color: #d23c3c;
    font-weight: 800;
}

.big-number {
    font-size: 42px;
    font-weight: 800;
}

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

.master-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 9px 0;
    font-size: 12px;
}

.master-row small {
    color: var(--muted);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f1f4fa;
}

.login-card {
    width: 390px;
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(25, 40, 75, .12);
}

.login-logo {
    width: 50px;
    height: 50px;
    background: #3658d4;
    color: white;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 20px;
}

.login-card h2 {
    font-weight: 800;
    margin-bottom: 4px;
}

.login-card p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 22px;
}

@media(max-width: 1200px) {
    .metric-grid-5,
    .alert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 900px) {
    .sidebar {
        display: none;
    }

    .main-area {
        margin-left: 0;
    }

    .metric-grid-5,
    .metric-grid-4,
    .dashboard-columns,
    .two-column,
    .three-column,
    .form-grid,
    .alert-grid {
        grid-template-columns: 1fr;
    }
}
