:root {
    --blue: #003399;
    --blue-light: #0050b3;
    --gold: #ffcc00;
    --bg: #f5f6f8;
    --white: #ffffff;
    --text: #1a1a2e;
    --text-sec: #4a4a6a;
    --border: #d0d5dd;
    --border-lt: #e8eaed;
    --red: #c0392b;
    --red-bg: #fdf2f2;
    --amber: #d4850a;
    --amber-bg: #fef9f0;
    --green: #1a7f37;
    --green-bg: #f0fdf4;
    --blue-bg: #f0f4ff;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'SF Mono', 'Fira Code', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 220px; background: var(--blue); color: white; padding: 1.25rem 0; flex-shrink: 0; position: fixed; height: 100vh; overflow-y: auto; }
.sidebar-logo { padding: 0 1.25rem 1.25rem; font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.75rem; }
.sidebar-nav a { display: block; padding: 0.5rem 1.25rem; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar-nav a.active { background: rgba(255,255,255,0.15); color: white; font-weight: 600; border-left: 3px solid var(--gold); }
.sidebar-section { padding: 0.75rem 1.25rem 0.25rem; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.4); }
.sidebar-user { position: absolute; bottom: 0; width: 100%; padding: 0.75rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.75rem; }
.sidebar-user .name { color: white; font-weight: 600; }
.sidebar-user .role { color: rgba(255,255,255,0.5); font-size: 0.65rem; }
.sidebar-user a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.7rem; }

/* Main */
.main { margin-left: 220px; flex: 1; min-height: 100vh; }
.topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { font-size: 1.1rem; }
.topbar .breadcrumb { font-size: 0.75rem; color: var(--text-sec); }
.topbar .breadcrumb a { color: var(--blue-light); text-decoration: none; }
.content { padding: 1.5rem; max-width: 1100px; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 0.95rem; margin-bottom: 0.375rem; }
.card p { font-size: 0.85rem; color: var(--text-sec); }

/* Status badges */
.badge { font-size: 0.65rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.badge-draft { background: var(--border-lt); color: var(--text-sec); }
.badge-collecting { background: var(--blue-bg); color: var(--blue); }
.badge-evaluating { background: var(--blue-bg); color: var(--blue); }
.badge-reviewing { background: var(--amber-bg); color: var(--amber); }
.badge-confirmed { background: var(--green-bg); color: var(--green); }
.badge-reported { background: var(--green-bg); color: var(--green); }

.badge-compliant { background: var(--green-bg); color: var(--green); }
.badge-non-compliant { background: var(--red-bg); color: var(--red); }
.badge-partial { background: var(--amber-bg); color: var(--amber); }
.badge-undetermined { background: var(--border-lt); color: var(--text-sec); }

.badge-critical { background: var(--red-bg); color: var(--red); }
.badge-high { background: var(--amber-bg); color: var(--amber); }
.badge-medium { background: var(--blue-bg); color: var(--blue); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th { background: var(--bg); padding: 0.5rem 0.75rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--text-sec); border-bottom: 1px solid var(--border); }
td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-lt); vertical-align: top; }
tr:hover { background: var(--bg); }
td a { color: var(--blue-light); text-decoration: none; }
td a:hover { text-decoration: underline; }

/* Forms */
.form-group { margin-bottom: 0.75rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.2rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 4px; font-size: 0.85rem; font-family: var(--font);
}
.form-group textarea { min-height: 60px; resize: vertical; }

/* Buttons */
.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-light); }
.btn-secondary { background: var(--white); color: var(--blue); border: 1px solid var(--blue); }
.btn-danger { background: var(--red); color: white; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.7rem; }

/* Summary grid */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.summary-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; text-align: center; }
.summary-card .num { font-size: 1.6rem; font-weight: 700; }
.summary-card .label { font-size: 0.7rem; color: var(--text-sec); }

/* Findings */
.finding-card { padding: 0.6rem 0.75rem; margin: 0.375rem 0; border-radius: 4px; font-size: 0.8rem; }
.finding-gap { background: var(--red-bg); border-left: 3px solid var(--red); }
.finding-partial { background: var(--amber-bg); border-left: 3px solid var(--amber); }
.finding-pass { background: var(--green-bg); border-left: 3px solid var(--green); }
.finding-undetermined { background: var(--border-lt); border-left: 3px solid var(--text-sec); }
.finding-card .ref { font-family: var(--mono); font-size: 0.65rem; color: var(--text-sec); }
.finding-card .remediation { font-style: italic; margin-top: 0.2rem; }

/* Flags */
.flag-card { padding: 0.5rem 0.75rem; margin: 0.375rem 0; border-radius: 0 4px 4px 0; font-size: 0.8rem; }
.flag-critical { background: var(--red-bg); border-left: 3px solid var(--red); }
.flag-high { background: var(--amber-bg); border-left: 3px solid var(--amber); }
.flag-medium { background: var(--blue-bg); border-left: 3px solid var(--blue); }

/* Radio group for answers */
.answer-group { display: flex; gap: 0.75rem; margin: 0.25rem 0; }
.answer-group label { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8rem; cursor: pointer; }

/* Source ref */
.source-ref { font-family: var(--mono); font-size: 0.65rem; color: var(--text-sec); }

/* Alert */
.alert { padding: 0.6rem 0.875rem; border-radius: 4px; font-size: 0.8rem; margin-bottom: 0.75rem; }
.alert-error { background: var(--red-bg); border-left: 3px solid var(--red); color: var(--red); }
.alert-info { background: var(--blue-bg); border-left: 3px solid var(--blue); }
.alert-success { background: var(--green-bg); border-left: 3px solid var(--green); }

/* Confirm actions inline */
.confirm-actions { display: flex; gap: 0.25rem; margin-top: 0.25rem; }
.confirm-actions form { display: inline; }

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
}
