:root {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --border: #263248;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #131c31 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #60a5fa; }

.container { max-width: 1080px; margin: 0 auto; padding: 1.25rem 1rem 2.5rem; }

.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between;
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text);
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.nav-links a {
  color: var(--muted); padding: 0.4rem 0.7rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }

h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin: 0.5rem 0 1.25rem; }
h2, h3 { margin-top: 0; font-weight: 600; letter-spacing: -0.01em; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kpi-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: linear-gradient(135deg, var(--surface) 0%, #162033 100%);
}
.kpi-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59, 130, 246, 0.14); color: var(--primary); flex-shrink: 0;
}
.kpi-label { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 1.85rem; font-weight: 700; line-height: 1.1; margin-top: 0.2rem; }
.empty-state {
  text-align: center; padding: 2rem 1rem; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty-state svg { opacity: 0.65; margin-bottom: 0.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 9px; border: 0;
  background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; font-size: 0.9rem;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(0.98); }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: #334155; }
.btn-success { background: var(--success); color: #022c22; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #dc2626; }

label { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 0.6rem 0.75rem; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); margin-top: 0.3rem; margin-bottom: 0.85rem;
  font-size: 0.95rem; transition: border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }

.badge {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  background: var(--surface-2); color: var(--text);
}
.badge-valid, .badge-completed, .badge-resolved { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.badge-warning, .badge-in_progress, .badge-medium { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }
.badge-failed, .badge-critical, .badge-high, .badge-open { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }

.flash { padding: 0.75rem 1rem; border-radius: 9px; margin-bottom: 1rem; font-size: 0.92rem; }
.flash-success { background: rgba(16, 185, 129, 0.16); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.3); }
.flash-warning { background: rgba(245, 158, 11, 0.16); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.3); }
.flash-error { background: rgba(239, 68, 68, 0.16); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.3); }

.progress-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); transition: width 0.25s ease; }

details.card summary { cursor: pointer; list-style: none; display: inline-flex; }
details.card summary::-webkit-details-marker { display: none; }
details.card[open] summary { margin-bottom: 1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
th, td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); }
