/* ============================================================
   compliance.css — CompliancePage & MyCompliancePage styles
   Covers all .comp-* classes used by:
     frontend/assets/js/pages/compliance/CompliancePage.js
     frontend/assets/js/pages/compliance/MyCompliancePage.js
   ============================================================ */

/* ── Tabs ──────────────────────────────────────────────────── */

.comp-tabs {
    display: flex;
    gap: var(--space-2);
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: var(--space-6);
}

.comp-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: var(--space-3) var(--space-4);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font: var(--text-sm) / 1 var(--font-body);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.comp-tab:hover {
    color: var(--text-primary);
}

.comp-tab--active {
    color: var(--color-teal);
    border-bottom-color: var(--color-teal);
    font-weight: 600;
}

/* ── Overview grid — 2 × 2 card layout ───────────────────── */

.comp-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-6);
}

@media (max-width: 768px) {
    .comp-overview-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Cards ────────────────────────────────────────────────── */

.comp-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.comp-card-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comp-card-sub {
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-left: var(--space-1);
}

/* ── Risk Ring ────────────────────────────────────────────── */

.comp-card--risk {
    align-items: center;
    text-align: center;
}

.comp-ring {
    display: flex;
    align-items: center;
    justify-content: center;
}

.comp-ring svg {
    overflow: visible;
}

.comp-ring-score {
    font-size: 20px;
    font-weight: 700;
    fill: var(--text-primary);
    font-family: var(--font-display);
}

.comp-ring-label {
    font-size: 11px;
    fill: var(--text-muted);
    font-family: var(--font-body);
}

.comp-ring-text {
    font-size: 22px;
    fill: var(--text-muted);
    font-family: var(--font-display);
    dominant-baseline: middle;
}

.comp-risk-label {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: var(--space-1) var(--space-3);
    border-radius: 4px;
    display: inline-block;
    margin-top: var(--space-1);
}

.comp-risk-low      { color: #22c55e; background: rgba(34,197,94,0.12); }
.comp-risk-medium   { color: #eab308; background: rgba(234,179,8,0.12); }
.comp-risk-high     { color: #f97316; background: rgba(249,115,22,0.12); }
.comp-risk-critical { color: #ef4444; background: rgba(239,68,68,0.12); }

/* ── Modules Grid ─────────────────────────────────────────── */

.comp-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
}

.comp-act-card {
    background: var(--surface-elevated);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    position: relative;
}

.comp-act-card--low      { border-left: 3px solid #22c55e; }
.comp-act-card--medium   { border-left: 3px solid #eab308; }
.comp-act-card--high     { border-left: 3px solid #f97316; }
.comp-act-card--critical { border-left: 3px solid #ef4444; }

.comp-act-band-pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 3px;
    align-self: flex-start;
    line-height: 1.4;
}

.comp-act-band-pill--low      { color: #22c55e; background: rgba(34,197,94,0.12); }
.comp-act-band-pill--medium   { color: #eab308; background: rgba(234,179,8,0.12); }
.comp-act-band-pill--high     { color: #f97316; background: rgba(249,115,22,0.12); }
.comp-act-band-pill--critical { color: #ef4444; background: rgba(239,68,68,0.12); }

.comp-act-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.comp-act-score {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.comp-act-gap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comp-act-gap span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.comp-gap-track {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.comp-gap-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.comp-gap-fill--low      { background: #22c55e; }
.comp-gap-fill--medium   { background: #eab308; }
.comp-gap-fill--high     { background: #f97316; }
.comp-gap-fill--critical { background: #ef4444; }

/* ── Calendar Preview ─────────────────────────────────────── */

.comp-calendar-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 320px;
    overflow-y: auto;
}

.comp-cal-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--surface-elevated);
    border-radius: 6px;
    border-left: 3px solid var(--surface-border-mid);
}

.comp-cal-item.comp-cal-overdue {
    border-left-color: #ef4444;
    background: rgba(239,68,68,0.06);
}

.comp-cal-item.comp-cal-today {
    border-left-color: #eab308;
    background: rgba(234,179,8,0.06);
}

.comp-cal-date {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.comp-cal-label {
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comp-cal-act {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Evidence Vault ───────────────────────────────────────── */

.comp-evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.comp-evidence-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-elevated);
    border-radius: 8px;
    padding: var(--space-4) var(--space-3);
    gap: var(--space-1);
    text-align: center;
}

.comp-stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-teal);
    font-family: var(--font-display);
    line-height: 1;
}

.comp-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
}

.comp-evidence-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ── Zero / Empty states ─────────────────────────────────── */

.comp-zero-state {
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-align: center;
    padding: var(--space-4) 0;
    margin: 0;
}

.comp-zero-modules {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-8) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-align: center;
}

.comp-zero-cta {
    margin-top: var(--space-2);
}

/* ── Module Catalog prompt ────────────────────────────────── */

.comp-catalog-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-12) var(--space-6);
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.comp-catalog-prompt-icon {
    font-size: 3rem;
    line-height: 1;
    color: var(--color-teal);
}

.comp-catalog-prompt-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.comp-catalog-prompt-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   ComplianceCalendarPage — three-view calendar redesign
   Classes: cc-*  (BEM, scoped to this page)
   ============================================================ */

/* ── Page shell ─────────────────────────────────────────────── */

.cc-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* ── Top bar ─────────────────────────────────────────────────── */

.cc-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--surface-card, #1B1840);
    border-bottom: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    flex-wrap: wrap;
}

.cc-topbar__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #EDE8DB);
    margin: 0;
    white-space: nowrap;
    flex: 0 0 auto;
}

.cc-topbar__actions {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

/* ── Segmented toggle (pill group) ──────────────────────────── */

.cc-toggle {
    display: flex;
    background: var(--surface-elevated, #252258);
    border: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 auto;
}

.cc-toggle__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: none;
    border: none;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    border-inline-end: 1px solid var(--surface-border, rgba(196,154,60,0.12));
}

.cc-toggle__btn:last-child {
    border-inline-end: none;
}

.cc-toggle__btn:hover {
    background: rgba(0, 180, 162, 0.1);
    color: var(--text-primary, #EDE8DB);
}

.cc-toggle__btn--active {
    background: var(--color-teal, #00B4A2);
    color: #ffffff;
    font-weight: 600;
}

.cc-toggle__btn--active:hover {
    background: #00c4b1;
    color: #ffffff;
}

/* ── Report button + dropdown panel ─────────────────────────── */

.cc-report-wrap {
    position: relative;
}

.cc-report-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cc-report-panel {
    display: none;
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    min-width: 360px;
    background: var(--surface-elevated, #252258);
    border: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    border-radius: 10px;
    padding: 18px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.cc-report-panel--open {
    display: block;
}

.cc-report-form__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-teal, #00B4A2);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cc-report-form__fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.cc-report-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-report-form__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cc-report-form__input {
    padding: 7px 10px;
    border: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    border-radius: 6px;
    font-size: 13px;
    background: var(--surface-card, #1B1840);
    color: var(--text-primary, #EDE8DB);
    width: 100%;
    box-sizing: border-box;
}

.cc-report-form__err  { font-size: 12px; color: var(--color-red, #dc2626); margin-top: 6px; }
.cc-report-form__info { font-size: 12px; color: var(--color-teal, #00B4A2); margin-top: 6px; }

.cc-report-form__actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

/* ── Filter bar ─────────────────────────────────────────────── */

.cc-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--surface-card, #1B1840);
    border-bottom: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    flex-wrap: wrap;
}

.cc-filter-bar__select {
    padding: 6px 10px;
    border: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    border-radius: 6px;
    font-size: 12px;
    background: var(--surface-elevated, #252258);
    color: var(--text-primary, #EDE8DB);
    min-width: 130px;
    cursor: pointer;
}

.cc-filter-bar__select:focus {
    outline: 2px solid var(--color-teal, #00B4A2);
    outline-offset: 2px;
}

.cc-filter-bar__summary {
    margin-inline-start: auto;
    font-size: 12px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
}

.cc-sum--overdue    { color: var(--color-red, #dc2626); font-weight: 600; }
.cc-sum--inprogress { color: #fb923c; font-weight: 600; }
.cc-sum--pending    { color: var(--color-gold, #C49A3C); font-weight: 600; }
.cc-sum--done       { color: var(--color-teal, #00B4A2); font-weight: 600; }
.cc-sum--none       { color: var(--muted-text, #6b7280); }

/* ── View host ──────────────────────────────────────────────── */

.cc-view-host {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ── Error state ─────────────────────────────────────────────── */

.cc-error-state {
    padding: 24px 20px;
    color: var(--color-red, #dc2626);
    font-size: 13px;
}

.cc-error-state--sm {
    padding: 8px 0;
    font-size: 12px;
}

/* ── Month navigation (shared) ──────────────────────────────── */

.cc-month-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px 10px;
}

.cc-month-nav__label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #EDE8DB);
    margin: 0;
    min-width: 160px;
    text-align: center;
}

.cc-month-nav__arrow {
    background: var(--surface-elevated, #252258);
    border: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    border-radius: 6px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.15s, color 0.15s;
}

.cc-month-nav__arrow:hover {
    background: var(--color-teal, #00B4A2);
    color: #fff;
    border-color: var(--color-teal, #00B4A2);
}

.cc-month-nav__arrow:focus-visible {
    outline: 2px solid var(--color-teal, #00B4A2);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════
   MONTH GRID VIEW
   ══════════════════════════════════════════════════════════════ */

.cc-month-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.cc-month-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.cc-month-grid-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    transition: flex 0.25s ease;
}

.cc-month-grid-wrap--shrunk {
    flex: 0 0 60%;
}

.cc-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    min-width: 0;
}

.cc-month-grid__dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted-text, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 4px 6px;
}

/* ── Month cells ─────────────────────────────────────────────── */

.cc-month-cell {
    min-height: 90px;
    padding: 6px;
    background: var(--surface-card, #1B1840);
    border: 1px solid var(--surface-border, rgba(196,154,60,0.08));
    border-radius: 6px;
    cursor: default;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: border-color 0.12s;
}

.cc-month-cell:not(.cc-month-cell--blank):hover {
    border-color: var(--surface-border-mid, rgba(196,154,60,0.22));
    cursor: pointer;
}

.cc-month-cell--blank {
    background: transparent;
    border-color: transparent;
    pointer-events: none;
}

.cc-month-cell--today {
    border: 2px solid var(--color-teal, #00B4A2) !important;
}

.cc-month-cell--overdue    { background: rgba(220, 38,  38,  0.18); }
.cc-month-cell--in_progress { background: rgba(251, 146, 60,  0.18); }
.cc-month-cell--pending    { background: rgba(196, 154, 60,  0.10); }
.cc-month-cell--completed  { background: rgba(22,  163, 74,  0.12); }

.cc-month-cell__num {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    text-align: end;
    margin-bottom: 2px;
}

.cc-month-cell__num--today {
    color: var(--color-teal, #00B4A2);
    font-weight: 800;
}

/* ── Event chips inside month cells ─────────────────────────── */

.cc-month-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary, rgba(237,232,219,0.65));
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.12s;
    max-width: 100%;
}

.cc-month-chip:hover,
.cc-month-chip:focus-visible {
    background: rgba(0,180,162,0.18);
    color: var(--text-primary, #EDE8DB);
    outline: none;
}

.cc-month-chip:focus-visible {
    outline: 2px solid var(--color-teal, #00B4A2);
    outline-offset: 1px;
}

.cc-month-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: 0 0 6px;
}

.cc-month-chip--overdue    .cc-month-chip__dot { background: var(--color-red, #dc2626); }
.cc-month-chip--in_progress .cc-month-chip__dot { background: #fb923c; }
.cc-month-chip--pending    .cc-month-chip__dot { background: var(--color-gold, #C49A3C); }
.cc-month-chip--completed  .cc-month-chip__dot { background: #22c55e; }

.cc-month-chip__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-month-overflow {
    font-size: 10px;
    color: var(--color-teal, #00B4A2);
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    align-self: flex-start;
}

.cc-month-overflow:hover,
.cc-month-overflow:focus-visible {
    background: rgba(0,180,162,0.15);
    outline: none;
}

/* ── Month day flyout pane ───────────────────────────────────── */

.cc-month-flyout-pane {
    width: 0;
    overflow: hidden;
    transition: width 0.25s ease;
    border-inline-start: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.cc-month-flyout-pane--open {
    width: 280px;
    border-inline-start-color: var(--surface-border-mid, rgba(196,154,60,0.22));
    overflow-y: auto;
    padding: 14px;
}

.cc-month-flyout-pane__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cc-month-flyout-pane__date {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #EDE8DB);
}

.cc-month-flyout-pane__close {
    background: none;
    border: none;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
}

.cc-month-flyout-pane__close:hover {
    color: var(--text-primary, #EDE8DB);
    background: rgba(255,255,255,0.06);
}

.cc-month-flyout-pane__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-month-flyout-item {
    background: var(--surface-elevated, #252258);
    border: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.cc-month-flyout-item:hover,
.cc-month-flyout-item:focus-visible {
    border-color: var(--color-teal, #00B4A2);
    background: rgba(0,180,162,0.06);
    outline: none;
}

.cc-month-flyout-item__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cc-month-flyout-item__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #EDE8DB);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-month-flyout-item__sub {
    font-size: 11px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    margin-bottom: 4px;
}

.cc-month-flyout-item__due {
    font-size: 11px;
    color: var(--muted-text, #6b7280);
}

/* ══════════════════════════════════════════════════════════════
   TIMELINE (GANTT) VIEW
   ══════════════════════════════════════════════════════════════ */

.cc-timeline-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.cc-timeline {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    margin: 0 20px 20px;
    border: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    border-radius: 8px;
}

.cc-tl-header {
    display: flex;
    border-bottom: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    background: var(--surface-elevated, #252258);
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cc-tl-header__label-col {
    width: 180px;
    min-width: 180px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted-text, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-inline-end: 1px solid var(--surface-border, rgba(196,154,60,0.12));
}

.cc-tl-header__days {
    flex: 1;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.cc-tl-header__days::-webkit-scrollbar { display: none; }

.cc-tl-day-head {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted-text, #6b7280);
    padding: 8px 2px;
    min-width: 20px;
}

.cc-tl-day-head--today {
    color: var(--color-teal, #00B4A2);
    font-weight: 800;
}

.cc-tl-body {
    flex: 1;
    overflow-y: auto;
}

.cc-tl-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted-text, #6b7280);
    font-size: 13px;
}

.cc-tl-row {
    display: flex;
    border-bottom: 1px solid var(--surface-border, rgba(196,154,60,0.08));
    min-height: 48px;
    align-items: center;
    cursor: pointer;
    transition: background 0.12s;
}

.cc-tl-row:hover,
.cc-tl-row:focus-visible {
    background: rgba(0,180,162,0.05);
    outline: none;
}

.cc-tl-row:focus-visible {
    outline: 2px solid var(--color-teal, #00B4A2);
    outline-offset: -2px;
}

.cc-tl-row__label {
    width: 180px;
    min-width: 180px;
    padding: 8px 12px;
    border-inline-end: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    overflow: hidden;
    position: sticky;
    inset-inline-start: 0;
    background: var(--surface-card, #1B1840);
    z-index: 5;
}

.cc-tl-row__label-main {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #EDE8DB);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-tl-row__label-sub {
    font-size: 10px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.cc-tl-row__track {
    flex: 1;
    position: relative;
    height: 36px;
    overflow: visible;
}

.cc-tl-today-band {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(0, 180, 162, 0.08);
    pointer-events: none;
    z-index: 0;
}

.cc-tl-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 10px;
    border-radius: 5px;
    z-index: 1;
    opacity: 0.85;
}

.cc-tl-bar--overdue    { background: var(--color-red, #dc2626); }
.cc-tl-bar--in_progress { background: #fb923c; }
.cc-tl-bar--pending    { background: var(--color-gold, #C49A3C); }
.cc-tl-bar--completed  { background: #22c55e; }

.cc-tl-milestone {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    z-index: 2;
    cursor: pointer;
}

.cc-tl-milestone--overdue    { color: var(--color-red, #dc2626); }
.cc-tl-milestone--in_progress { color: #fb923c; }
.cc-tl-milestone--pending    { color: var(--color-gold, #C49A3C); }
.cc-tl-milestone--completed  { color: #22c55e; }

/* ══════════════════════════════════════════════════════════════
   BOARD (KANBAN) VIEW
   ══════════════════════════════════════════════════════════════ */

.cc-board-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.cc-board-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 0;
}

.cc-board-sidebar {
    width: 180px;
    min-width: 160px;
    border-inline-end: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    padding: 14px 12px;
    overflow-y: auto;
    background: var(--surface-card, #1B1840);
    flex: 0 0 auto;
}

.cc-board-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px 16px 16px;
}

.cc-board__day-filter-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0,180,162,0.1);
    border: 1px solid rgba(0,180,162,0.25);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary, #EDE8DB);
    margin-bottom: 10px;
}

.cc-board__day-filter-clear {
    margin-inline-start: auto;
    background: none;
    border: none;
    color: var(--color-teal, #00B4A2);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.cc-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    align-items: start;
}

@media (max-width: 1024px) {
    .cc-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .cc-board-sidebar { display: none; }
    .cc-board { grid-template-columns: 1fr; }
}

/* ── Board columns ───────────────────────────────────────────── */

.cc-board__col {
    background: var(--surface-card, #1B1840);
    border: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-board__col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--surface-border, rgba(196,154,60,0.12));
}

.cc-board__col--overdue    .cc-board__col-header { border-top: 3px solid var(--color-red, #dc2626); }
.cc-board__col--in_progress .cc-board__col-header { border-top: 3px solid #fb923c; }
.cc-board__col--pending    .cc-board__col-header { border-top: 3px solid var(--color-gold, #C49A3C); }
.cc-board__col--completed  .cc-board__col-header { border-top: 3px solid #22c55e; }

.cc-board__col-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cc-board__col-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    padding: 0 5px;
}

.cc-board__col-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    overflow-y: auto;
    max-height: calc(100vh - 260px);
}

.cc-board__empty {
    font-size: 12px;
    color: var(--muted-text, #6b7280);
    text-align: center;
    padding: 16px 0;
}

/* ── Kanban cards ─────────────────────────────────────────────── */

.cc-card {
    background: var(--surface-elevated, #252258);
    border: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cc-card:hover,
.cc-card:focus-visible {
    border-color: var(--surface-border-mid, rgba(196,154,60,0.35));
    transform: translateY(-1px);
    outline: none;
}

.cc-card:focus-visible {
    outline: 2px solid var(--color-teal, #00B4A2);
    outline-offset: 2px;
}

.cc-card--overdue    { border-inline-start: 3px solid var(--color-red, #dc2626); }
.cc-card--in_progress { border-inline-start: 3px solid #fb923c; }
.cc-card--pending    { border-inline-start: 3px solid var(--color-gold, #C49A3C); }
.cc-card--completed  { border-inline-start: 3px solid #22c55e; }

.cc-card__countdown {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

.cc-card__countdown--overdue   { color: var(--color-red, #dc2626); }
.cc-card__countdown--critical  { color: var(--color-red, #dc2626); }
.cc-card__countdown--warning   { color: var(--color-gold, #C49A3C); }
.cc-card__countdown--ok        { color: #22c55e; }
.cc-card__countdown--done      { color: var(--muted-text, #6b7280); }

@keyframes cc-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.cc-card__countdown--blink {
    animation: cc-blink 1s ease-in-out infinite;
}

.cc-card__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #EDE8DB);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.cc-card__sub {
    font-size: 11px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    line-height: 1.3;
}

.cc-card__due {
    font-size: 11px;
    color: var(--muted-text, #6b7280);
    margin-top: 2px;
}

.cc-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    gap: 6px;
}

.cc-card__evidence-count {
    font-size: 11px;
    color: var(--muted-text, #6b7280);
}

.cc-card__link-btn {
    font-size: 11px;
    padding: 3px 8px;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ── Mini calendar (board sidebar) ─────────────────────────── */

.cc-mini-cal {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-mini-cal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cc-mini-cal__nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    cursor: pointer;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 3px;
}

.cc-mini-cal__nav-btn:hover {
    color: var(--color-teal, #00B4A2);
    background: rgba(0,180,162,0.1);
}

.cc-mini-cal__month-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary, #EDE8DB);
    text-align: center;
}

.cc-mini-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.cc-mini-cal__dow {
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--muted-text, #6b7280);
    padding: 2px 0 4px;
}

.cc-mini-cal__day {
    text-align: center;
    font-size: 10px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    padding: 3px 1px;
    border-radius: 4px;
    line-height: 1.4;
    transition: background 0.1s, color 0.1s;
}

.cc-mini-cal__day--blank {
    pointer-events: none;
}

.cc-mini-cal__day--today {
    color: var(--color-teal, #00B4A2);
    font-weight: 800;
}

.cc-mini-cal__day--has-event {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary, #EDE8DB);
}

.cc-mini-cal__day--has-event:hover,
.cc-mini-cal__day--has-event:focus-visible {
    background: rgba(0,180,162,0.15);
    color: var(--color-teal, #00B4A2);
    outline: none;
}

.cc-mini-cal__day--has-event::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--color-teal, #00B4A2);
    border-radius: 50%;
    margin: 1px auto 0;
}

.cc-mini-cal__day--selected {
    background: var(--color-teal, #00B4A2) !important;
    color: #fff !important;
}

.cc-mini-cal__day--selected::after {
    background: rgba(255,255,255,0.6);
}

/* ══════════════════════════════════════════════════════════════
   DETAIL FLYOUT (right-side slide-in panel)
   ══════════════════════════════════════════════════════════════ */

.cc-flyout {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    width: 420px;
    max-width: min(420px, 95vw);
    background: var(--surface-card, #1B1840);
    border-inline-start: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 300;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-flyout--open {
    transform: translateX(0);
}

[dir="rtl"] .cc-flyout {
    inset-inline-end: auto;
    inset-inline-start: 0;
    border-inline-start: none;
    border-inline-end: 1px solid var(--surface-border-mid, rgba(196,154,60,0.22));
    transform: translateX(-100%);
}

[dir="rtl"] .cc-flyout--open {
    transform: translateX(0);
}

.cc-flyout__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.cc-flyout__close {
    position: sticky;
    top: 0;
    align-self: flex-end;
    margin: 12px 14px 0;
    background: none;
    border: none;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    z-index: 1;
}

.cc-flyout__close:hover {
    color: var(--text-primary, #EDE8DB);
    background: rgba(255,255,255,0.06);
}

.cc-flyout__close:focus-visible {
    outline: 2px solid var(--color-teal, #00B4A2);
    outline-offset: 2px;
}

.cc-flyout__body {
    padding: 0 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cc-flyout__event-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.cc-flyout__event-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #EDE8DB);
    margin: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.cc-flyout__event-status {
    flex: 0 0 auto;
    font-size: 11px;
}

.cc-flyout__event-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    margin-bottom: 16px;
}

.cc-flyout__event-meta strong {
    color: var(--text-primary, #EDE8DB);
}

.cc-flyout__evidence-section {
    border: 1px solid var(--surface-border, rgba(196,154,60,0.12));
    border-radius: 8px;
    overflow: hidden;
}

.cc-flyout__evidence-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--surface-elevated, #252258);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #EDE8DB);
    text-align: start;
}

.cc-flyout__evidence-toggle:hover {
    background: rgba(0,180,162,0.06);
}

.cc-flyout__evidence-toggle:focus-visible {
    outline: 2px solid var(--color-teal, #00B4A2);
    outline-offset: -2px;
}

.cc-flyout__evidence-body {
    padding: 10px 14px 14px;
}

/* ── Evidence rows ───────────────────────────────────────────── */

.cc-ev-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
}

.cc-ev-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface-border, rgba(196,154,60,0.08));
    font-size: 12px;
}

.cc-ev-row:last-child {
    border-bottom: none;
}

.cc-ev-doc {
    color: var(--text-secondary, rgba(237,232,219,0.65));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-ev-date {
    color: var(--muted-text, #6b7280);
    white-space: nowrap;
    font-size: 11px;
}

.cc-ev-verified   { color: #22c55e; font-size: 11px; white-space: nowrap; }
.cc-ev-unverified { color: var(--muted-text, #6b7280); font-size: 11px; white-space: nowrap; }

.cc-ev-empty {
    font-size: 12px;
    color: var(--muted-text, #6b7280);
    padding: 6px 0;
    margin: 0;
}

.cc-ev-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cc-ev-hint {
    font-size: 11px;
    color: var(--muted-text, #6b7280);
}

/* ── Evidence chips (preserved from original) ────────────────── */

.cal-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.cal-chip--green { background: rgba(22,163,74,0.18); color: #4ade80; }
.cal-chip--blue  { background: rgba(29,78,216,0.18); color: #60a5fa; }
.cal-chip--grey  { background: rgba(107,114,128,0.18); color: #9ca3af; }

/* ── Modal helpers ───────────────────────────────────────────── */

.cc-modal-intro {
    font-size: 13px;
    color: var(--text-secondary, rgba(237,232,219,0.65));
    margin-bottom: 16px;
}

.cc-modal-field {
    margin-bottom: 14px;
}

.cc-modal-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #EDE8DB);
    margin-bottom: 5px;
}

.cc-modal-label--opt {
    font-weight: 400;
    color: var(--muted-text, #6b7280);
}

.cc-modal-loading {
    padding: 10px;
    font-size: 13px;
    color: var(--muted-text, #6b7280);
}

.cc-modal-err {
    font-size: 12px;
    color: var(--color-red, #dc2626);
    margin-top: 4px;
}

.cc-modal-err-inline {
    font-size: 13px;
    color: var(--color-red, #dc2626);
}

.cc-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ── Responsive adjustments ─────────────────────────────────── */

@media (max-width: 768px) {
    .cc-topbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    .cc-topbar__title {
        font-size: 14px;
    }
    .cc-flyout {
        width: 100%;
    }
    .cc-month-flyout-pane--open {
        width: 100%;
    }
    .cc-tl-row__label {
        width: 120px;
        min-width: 120px;
    }
    .cc-tl-header__label-col {
        width: 120px;
        min-width: 120px;
    }
    /* MR-158: cc-report-panel — bare min-width: 280px can still exceed 90vw on sub-320px
       viewports. Clamp with max-width to prevent overflow. */
    .cc-report-panel {
        min-width: 280px;
        max-width: min(360px, calc(100vw - 20px));
        inset-inline-end: auto;
        inset-inline-start: 0;
    }
    /* MR-124: cc-report-form__input font-size 13px triggers iOS auto-zoom (must be ≥16px) */
    .cc-report-form__input {
        font-size: 16px;
    }
    /* MR-125: cc-filter-bar__select font-size 12px triggers iOS auto-zoom (must be ≥16px) */
    .cc-filter-bar__select {
        font-size: 16px;
    }
    /* MR-132 (merged): cc-toggle__btn and cc-board-main — moved from 480px to canonical 375px breakpoint */
    .cc-toggle__btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    .cc-board-main {
        padding: 10px 8px;
    }
    /* MR-166: cc-month-nav__arrow — 30×30px is 14px below WCAG 2.5.5 44px minimum.
       Expand to 44×44px tap target on mobile. Visual size remains 30px via inner content. */
    .cc-month-nav__arrow {
        width: 44px;
        height: 44px;
    }
    /* MR-167: cc-flyout__close — 4px 6px padding on 16px text = ~24px height.
       Enforce 44×44px minimum tap target. */
    .cc-flyout__close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    /* MR-168: cc-mini-cal__nav-btn — 9px font with 2px 4px padding = ~13px height.
       Enforce 44px minimum touch area. */
    .cc-mini-cal__nav-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-flyout,
    .cc-month-flyout-pane,
    .cc-month-grid-wrap,
    .cc-card {
        transition: none;
    }
    .cc-card__countdown--blink {
        animation: none;
    }
}

/* ============================================================
   HROModuleCatalogPage — /compliance/catalog
   Classes: hro-cat-* (scoped to this page)
   ============================================================ */

.hro-catalog-page {
    color: var(--text-primary);
}

/* ── Wave section wrapper ───────────────────────────────────── */

.hro-cat-section {
    margin-bottom: 32px;
}

/* ── "Always Active" divider row ────────────────────────────── */

.hro-cat-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.hro-cat-divider__rule {
    flex: 1;
    height: 1px;
    background: var(--surface-border-mid);
}

.hro-cat-divider__pill {
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(196, 154, 60, 0.18);
    color: var(--color-gold, #C49A3C);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Wave section header ────────────────────────────────────── */

.hro-cat-wave-head {
    margin-bottom: 16px;
}

.hro-cat-wave-head__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hro-cat-wave-badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.hro-cat-wave-badge[data-wave="1"] { background: rgba(29, 78, 216, 0.22);  color: #93c5fd; }
.hro-cat-wave-badge[data-wave="2"] { background: rgba(124, 58, 237, 0.22); color: #c4b5fd; }
.hro-cat-wave-badge[data-wave="3"] { background: rgba(15, 118, 110, 0.22); color: #5eead4; }

.hro-cat-wave-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.hro-cat-wave-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Module card ────────────────────────────────────────────── */

.hro-cat-card {
    background: var(--surface-elevated);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.hro-cat-card:hover {
    border-color: var(--surface-border-mid);
}

.hro-cat-card--active {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.hro-cat-card--always-on {
    background: rgba(196, 154, 60, 0.07);
    border-color: rgba(196, 154, 60, 0.35);
}

.hro-cat-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.hro-cat-card__meta {
    flex: 1;
    min-width: 0;
}

.hro-cat-card__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.hro-cat-card__group {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.hro-cat-card__check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.hro-cat-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* ── Risk badge (reuses risk color variables inline — kept minimal) ── */

.hro-cat-risk-pill {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.hro-cat-risk-pill--critical { background: rgba(239, 68,  68,  0.18); color: #f87171; }
.hro-cat-risk-pill--high     { background: rgba(249, 115, 22,  0.18); color: #fb923c; }
.hro-cat-risk-pill--medium   { background: rgba(37,  99,  235, 0.18); color: #60a5fa; }
.hro-cat-risk-pill--low      { background: rgba(22,  163, 74,  0.18); color: #4ade80; }

.hro-cat-always-on-label {
    font-size: 12px;
    color: #4ade80;
    font-weight: 600;
}

/* ── Activation modal body ──────────────────────────────────── */

.hro-cat-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hro-cat-modal-intro {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.hro-cat-modal-intro strong {
    color: var(--text-primary);
}

.hro-cat-modal-setup {
    background: var(--surface-elevated);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.hro-cat-modal-setup__title {
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
}

.hro-cat-modal-setup__list {
    margin: 0;
    padding-inline-start: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hro-cat-modal-risk {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    flex-wrap: wrap;
}

.hro-cat-modal-risk--critical { background: rgba(239, 68,  68,  0.15); }
.hro-cat-modal-risk--high     { background: rgba(249, 115, 22,  0.15); }
.hro-cat-modal-risk--medium   { background: rgba(37,  99,  235, 0.15); }
.hro-cat-modal-risk--low      { background: rgba(22,  163, 74,  0.15); }

.hro-cat-modal-risk__label {
    font-size: 12px;
    font-weight: 700;
}

.hro-cat-modal-risk--critical .hro-cat-modal-risk__label { color: #f87171; }
.hro-cat-modal-risk--high     .hro-cat-modal-risk__label { color: #fb923c; }
.hro-cat-modal-risk--medium   .hro-cat-modal-risk__label { color: #60a5fa; }
.hro-cat-modal-risk--low      .hro-cat-modal-risk__label { color: #4ade80; }

.hro-cat-modal-risk__penalty {
    font-size: 12px;
    color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
    .hro-cat-card { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Light-theme overrides — colour/background/border only
   rgba(255,255,255,...) overlays are invisible on light surfaces and must
   flip to rgba(0,0,0,...) equivalents.
   ════════════════════════════════════════════════════════════════════════════ */

/* Progress track behind fill bars — was white-on-dark, now ink-on-light */
[data-theme="light"] .comp-gap-track {
    background: rgba(26, 22, 40, 0.08);
}

/* Month chip default state — was white shimmer on dark card */
[data-theme="light"] .cc-month-chip {
    background: rgba(45, 42, 110, 0.06);
    color: var(--text-secondary);
}

/* Flyout close button hover — was white shimmer, invisible on white panel */
[data-theme="light"] .cc-month-flyout-pane__close:hover,
[data-theme="light"] .cc-flyout__close:hover {
    background: rgba(45, 42, 110, 0.06);
    color: var(--text-primary);
}

/* Kanban column count badge — was white shimmer, invisible on white column */
[data-theme="light"] .cc-board__col-count {
    background: rgba(45, 42, 110, 0.08);
    color: var(--text-secondary);
}

/* Board column header — surface-card in light mode is already #FFFFFF.
   Add a subtle separator so columns are visually distinct. */
[data-theme="light"] .cc-board__col {
    background: var(--surface-card);
    border-color: var(--surface-border-mid);
}

/* ── Compliance section panels — light theme ────────────────────────────────
   ESI, MW, and generic compliance section wrappers get white-card treatment
   so they stand out from the cool-grey page background (#F0F2F5). */
[data-theme="light"] .comp-section,
[data-theme="light"] .esi-section,
[data-theme="light"] .mw-section {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-card);
}

/* ── Light-theme button & interactive-state overrides — compliance/calendar ──
   cc-toggle__btn--active: teal background is illegible on white — swap to indigo.
   cc-month-nav__arrow:hover and cc-mini-cal__nav-btn:hover: teal hover must adapt.
   cc-mini-cal__day--selected: teal selection indicator — swap to indigo.
   cc-flyout__evidence-toggle: dark surface-elevated becomes white in light mode.
   ────────────────────────────────────────────────────────────────────────────── */
[data-theme="light"] .cc-toggle__btn--active {
    background: #0D9488;
    color: #FFFFFF;
}
[data-theme="light"] .cc-toggle__btn--active:hover {
    background: #0F766E;
    color: #FFFFFF;
}

[data-theme="light"] .cc-month-nav__arrow:hover {
    background: rgba(13,148,136,0.10);
    color: #0D9488;
    border-color: rgba(13,148,136,0.20);
}
[data-theme="light"] .cc-month-nav__arrow:focus-visible {
    outline-color: #0D9488;
}

[data-theme="light"] .cc-mini-cal__nav-btn:hover {
    color: #0D9488;
    background: rgba(13,148,136,0.08);
}

[data-theme="light"] .cc-mini-cal__day--selected {
    background: #0D9488 !important;
    color: #FFFFFF !important;
}

[data-theme="light"] .cc-flyout__evidence-toggle {
    background: #F7F8FA;
    color: #111827;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
[data-theme="light"] .cc-flyout__evidence-toggle:hover {
    background: rgba(45,42,110,0.06);
}
[data-theme="light"] .cc-flyout__evidence-toggle:focus-visible {
    outline-color: #0D9488;
}


