:root {
    --bg: #0d1321;
    --panel: #151f34;
    --panel-border: #26344f;
    --text: #e8eefc;
    --muted: #99a7c2;
    --green: #3fd18b;
    --amber: #f2b84b;
    --red: #ef6b73;
    --grey: #7b869a;
    --accent: #7cc6ff;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(124, 198, 255, 0.12), transparent 30%),
        linear-gradient(160deg, #0a1020, #101a2d 55%, #0f1728);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }

.shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.topbar, .page-header, .card-header, .badge-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    font-size: 0.75rem;
    margin: 0 0 8px;
}

h1, h2, h3, p { margin-top: 0; }
.subtitle, .muted, .footer, .card-header p { color: var(--muted); }

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav a, .badge {
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
}

.nav a.active {
    background: rgba(124, 198, 255, 0.14);
    border-color: rgba(124, 198, 255, 0.4);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 18px;
}

.card, .panel, .table-wrap {
    background: rgba(21, 31, 52, 0.88);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.card, .panel { padding: 18px; }
.inventory-summary { margin-bottom: 18px; }

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 18px 0;
}

.stats div {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.stats dt { color: var(--muted); font-size: 0.82rem; margin-bottom: 4px; }
.stats dd { margin: 0; font-weight: 600; }
.card-footer { border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 14px; }
.alert-list, .report-item { margin-top: 14px; }
.alert { margin: 6px 0 0; color: #ffd7a1; }

.badge-green, .text-green { color: var(--green); }
.badge-amber, .text-amber { color: var(--amber); }
.badge-red, .text-red { color: var(--red); }
.badge-grey, .text-grey { color: var(--grey); }

.status-green { border-color: rgba(63, 209, 139, 0.28); }
.status-amber { border-color: rgba(242, 184, 75, 0.28); }
.status-red { border-color: rgba(239, 107, 115, 0.32); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
thead th { color: var(--muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.08em; }
.row-green td:first-child { color: var(--green); }
.row-amber td:first-child { color: var(--amber); }
.row-red td:first-child { color: var(--red); }

.two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.inventory-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.inventory-block {
    margin-top: 14px;
}

.tag-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.footer { margin-top: 28px; font-size: 0.9rem; }

@media (max-width: 860px) {
    .topbar, .page-header, .card-header, .badge-row { flex-direction: column; }
    .two-column, .stats { grid-template-columns: 1fr; }
}
