:root {
  --red: #ED1C24;
  --red-deep: #B9262C;
  --black: #111111;
  --white: #FFFFFF;
  --gray-50: #F8F8F8;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-900: #111827;
  --amber: #FCD34D;
  --orange: #FB923C;
  --blue: #3B82F6;
  --green: #10B981;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--gray-900); background: var(--gray-100); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--black); color: white; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar-logo { background: var(--red); padding: 24px 20px; }
.sidebar-label { font-size: 11px; letter-spacing: 1px; color: #888; padding: 20px 20px 12px; }
.nav { display: flex; flex-direction: column; padding: 0 8px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; color: #ccc; font-size: 14px; font-weight: 500; margin-bottom: 2px; border-left: 3px solid transparent; }
.nav a:hover { background: #1f1f1f; color: white; }
.nav a.active { background: #1f1f1f; color: var(--red); border-left-color: var(--red); }
.nav svg { width: 18px; height: 18px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: white; border-bottom: 1px solid var(--gray-200); padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { font-size: 20px; font-weight: 700; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.content { padding: 32px; flex: 1; }

/* Hero */
.hero { background: var(--red); color: white; border-radius: 16px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; position: relative; overflow: hidden; margin-bottom: 24px; }
.hero-label { font-size: 11px; letter-spacing: 2px; opacity: 0.8; margin-bottom: 8px; }
.hero h2 { font-size: 32px; font-weight: 800; line-height: 1.15; margin-bottom: 12px; max-width: 560px; }
.hero p { opacity: 0.9; max-width: 520px; }
.hero-cta { background: white; color: var(--red); padding: 14px 22px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.hero-cta:hover { background: #fff5f5; }
.hero-art { position: absolute; opacity: 0.15; pointer-events: none; }
.hero-art.tl { top: -20px; left: -20px; width: 180px; }
.hero-art.br { bottom: -30px; right: -30px; width: 220px; }

/* KPI cards */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: white; padding: 20px; border-radius: 12px; border: 1px solid var(--gray-200); }
.kpi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.kpi-label { font-size: 11px; letter-spacing: 1px; color: var(--gray-600); font-weight: 600; }
.kpi-icon { color: var(--red); }
.kpi-value { font-size: 28px; font-weight: 800; }

/* Two-column section */
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.card { background: white; border: 1px solid var(--gray-200); border-radius: 12px; padding: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title { font-weight: 700; font-size: 15px; }
.card-link { font-size: 13px; color: var(--red); font-weight: 600; }

/* Bar chart */
.bars { display: flex; align-items: flex-end; gap: 24px; height: 200px; padding: 0 8px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 60px; min-height: 20px; border-radius: 6px 6px 0 0; position: relative; }
.bar-count { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 13px; }
.bar-label { font-size: 11px; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.5px; }

/* Recent list */
.recent-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-200); gap: 12px; }
.recent-item:last-child { border-bottom: none; }
.recent-meta { font-size: 12px; color: var(--gray-600); }
.recent-name { font-weight: 600; font-size: 14px; margin: 2px 0; }
.recent-badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-minor { background: #FEF3C7; color: #92400E; }
.badge-moderate { background: #FED7AA; color: #9A3412; }
.badge-major { background: #FECACA; color: #991B1B; }
.badge-critical { background: #B9262C; color: white; }
.badge-submitted { background: #DBEAFE; color: #1E40AF; }
.badge-review { background: #FEF3C7; color: #92400E; }
.badge-closed { background: #D1FAE5; color: #065F46; }
.badge-draft { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; transition: background 0.15s; }
.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--red-deep); }
.btn-secondary { background: white; color: var(--gray-900); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-50); }

/* Mobile */
.mobile-only { display: none; }
.menu-btn { display: none; }
@media (max-width: 768px) {
  .sidebar { display: none; }
  .menu-btn { display: flex; }
  .content { padding: 16px; padding-bottom: 100px; }
  .topbar { padding: 14px 16px; }
  .topbar h1 { font-size: 17px; }
  .hero { padding: 24px; flex-direction: column; align-items: flex-start; }
  .hero h2 { font-size: 22px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .mobile-bottom { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--gray-200); padding: 12px 16px; z-index: 50; }
  .mobile-bottom .btn { flex: 1; justify-content: center; padding: 14px; }
  .mobile-only { display: block; }
  .desktop-only { display: none; }
}
.mobile-bottom { display: none; }
/* SVG safety net */
svg { max-width: 100%; height: auto; }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-logo svg { width: 100%; max-width: 160px; height: auto; }
.kpi-icon { width: 16px; height: 16px; }
.hero-art { width: 200px; height: 200px; }