:root {
    --bg: #0b1220;
    --panel: #111a2e;
    --panel-2: #16213a;
    --panel-3: #1d2a4a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: rgba(148, 163, 184, 0.18);
    --accent: #22c55e;
    --accent-2: #38bdf8;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --shadow: 0 18px 40px rgba(0,0,0,.25);
    --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: linear-gradient(180deg, #081120 0%, #0b1220 100%); color: var(--text); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100dvh; }
.center-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card, .screen-card, .modal-card { width: min(100%, 420px); background: rgba(17, 26, 46, .95); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); padding: 22px; }
.login-logo { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, #22c55e, #38bdf8); display: grid; place-items: center; font-weight: 800; color: #06121f; margin-bottom: 14px; }
.h1 { font-size: 1.5rem; margin: 0 0 6px; }
.p-muted { color: var(--muted); margin: 0 0 18px; }
.form-group { display: grid; gap: 8px; margin-bottom: 14px; }
.label { font-size: .92rem; color: #cbd5e1; }
.input, .select, .textarea { width: 100%; padding: 14px 15px; border-radius: 14px; background: rgba(15, 23, 42, .8); color: var(--text); border: 1px solid rgba(148, 163, 184, .18); outline: none; }
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(56, 189, 248, .55); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
.btn { border: 0; border-radius: 14px; padding: 13px 16px; font-weight: 700; }
.btn-primary { background: linear-gradient(135deg, #22c55e, #16a34a); color: #071014; }
.btn-secondary { background: rgba(30, 41, 59, .85); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.btn-inline { padding: 10px 12px; border-radius: 12px; font-size: .92rem; }
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.muted { color: var(--muted); }
.error, .success, .info { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: .95rem; }
.error { background: rgba(239, 68, 68, .12); color: #fecaca; border: 1px solid rgba(239,68,68,.28); }
.success { background: rgba(34, 197, 94, .12); color: #bbf7d0; border: 1px solid rgba(34,197,94,.28); }
.info { background: rgba(56, 189, 248, .12); color: #bae6fd; border: 1px solid rgba(56,189,248,.28); }
.layout { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); background: rgba(8, 17, 32, .88); border-bottom: 1px solid var(--border); padding: max(env(safe-area-inset-top), 10px) 16px 12px; }
.app-title { font-size: 1.05rem; font-weight: 800; margin: 0; }
.app-subtitle { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.main { flex: 1; padding: 16px; padding-bottom: 92px; width: min(100%, 820px); margin: 0 auto; }
.hero { background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(34, 197, 94, .12)); border: 1px solid var(--border); border-radius: 24px; padding: 18px; margin-bottom: 16px; }
.hero h2 { margin: 0 0 6px; font-size: 1.2rem; }
.hero p { margin: 0; color: #d1d5db; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.quick-card, .card { background: rgba(17, 26, 46, .92); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.quick-card { padding: 16px; min-height: 108px; display: grid; gap: 6px; align-content: space-between; }
.quick-card strong { font-size: 1rem; }
.quick-card span { color: var(--muted); font-size: .88rem; }
.card { padding: 16px; margin-bottom: 14px; }
.section-title { margin: 0 0 10px; font-size: 1rem; }
.search-bar { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 14px; }
.list { display: grid; gap: 12px; }
.item-card { background: rgba(20, 30, 52, .92); border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.item-title { font-weight: 800; margin: 0; }
.item-sub { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(56, 189, 248, .14); color: #bae6fd; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill.high { background: rgba(245,158,11,.14); color: #fde68a; }
.pill.critical { background: rgba(239,68,68,.14); color: #fecaca; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: .87rem; }
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(env(safe-area-inset-bottom), 10px); z-index: 20; width: min(calc(100% - 20px), 820px); padding: 10px; background: rgba(9, 16, 29, .94); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; box-shadow: var(--shadow); }
.nav-btn { display: grid; gap: 4px; justify-items: center; padding: 11px 6px; border-radius: 14px; border: 0; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 700; }
.nav-btn.active { background: rgba(56, 189, 248, .14); color: #e0f2fe; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: rgba(17,26,46,.92); border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.stat-card strong { display: block; font-size: 1.4rem; margin-top: 8px; }
.segmented { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.segmented button { background: rgba(30, 41, 59, .82); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 10px 12px; }
.segmented button.active { background: rgba(34,197,94,.14); color: #bbf7d0; border-color: rgba(34,197,94,.3); }
.empty { text-align: center; padding: 28px 14px; color: var(--muted); }
.loading { display: grid; place-items: center; min-height: 160px; color: var(--muted); }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.drawer { position: fixed; inset: 0; background: rgba(2,6,23,.7); display: none; align-items: flex-end; justify-content: center; padding: 16px; z-index: 30; }
.drawer.show { display: flex; }
.modal-card { width: min(100%, 560px); max-height: 88dvh; overflow: auto; }
.kv { display: grid; gap: 8px; }
.kv-item { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid rgba(148,163,184,.12); }
.kv-item:last-child { border-bottom: 0; }
.kv-item span { color: var(--muted); font-size: .84rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.link-btn { background: transparent; border: 0; color: #7dd3fc; padding: 0; font-weight: 700; }
@media (min-width: 768px) {
    .login-card { width: min(100%, 460px); }
    .main { padding: 22px 18px 104px; }
    .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
