:root {
    --bg: #fcfbfa;
    --card: #ffffff;
    --text: #2d3748;
    --muted: #718096;
    --navy: #001f3f;
    --accent: #28a745;
    --high: #e53e3e;
    --medium: #dd6b20;
    --low: #38a169;
    --count-pii: #4f46e5;
    --count-sensitive: #dd6b20;
    --count-financial: #e53e3e;
    --border: #edf2f7;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    --page-width: 95%;
    --page-min-width: 320px;
    --page-gutter: 24px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.5px;
}
.brand-logo {
    display: block;
    height: 40px;
    width: auto;
    max-height: 48px;
    object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-tagline {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0;
}
.topbar nav a {
    margin-left: 24px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    transition: color 0.2s ease;
}
.topbar nav a.active, .topbar nav a:hover { color: var(--accent); }

/* Outlook-style product tabs + icon ribbon */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f3f2f1;
    border-bottom: 1px solid #e1dfdd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.topbar {
    background: #fff;
    border-bottom: 1px solid #e1dfdd;
    padding: 10px max(2.5vw, var(--page-gutter));
}
.btn-logout { margin-left: auto; }

.product-tabbar {
    background: #f3f2f1;
    padding: 0 max(2.5vw, var(--page-gutter));
}
.product-tabs {
    display: flex;
    align-items: flex-end;
    gap: 2px;
}
.product-tab {
    margin: 0 !important;
    padding: 10px 18px 8px;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    font-size: 14px;
    color: #323130;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    position: relative;
    top: 1px;
    transition: background 0.12s, color 0.12s;
}
.product-tab:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.6);
}
.product-tab.active {
    color: var(--accent);
    background: #fff;
    border-color: #e1dfdd;
    border-bottom-color: #fff;
}

.nav-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    padding: 6px max(2.5vw, var(--page-gutter)) 8px;
    background: #fff;
    border-top: 1px solid #e1dfdd;
    min-height: 72px;
}
.ribbon-group {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    padding: 0 6px;
    border-right: 1px solid #edebe9;
}
.ribbon-group:last-child { border-right: none; }
.ribbon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: 68px;
    max-width: 88px;
    padding: 6px 8px 4px;
    border-radius: 4px;
    text-decoration: none;
    color: #323130;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ribbon-btn:hover {
    background: #f3f2f1;
    border-color: #e1dfdd;
    color: #201f1e;
}
.ribbon-btn.active {
    background: #edebe9;
    border-color: #c8c6c4;
    color: var(--accent);
}
.ribbon-btn.active .ribbon-icon { color: var(--accent); }
.ribbon-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #605e5c;
}
.ribbon-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}
.ribbon-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    hyphens: auto;
}
.ribbon-icon { position: relative; }
.product-tab { display: inline-flex; align-items: center; gap: 6px; }
.nav-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--high);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.nav-count-badge-icon {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
}

@media (max-width: 900px) {
    .nav-ribbon { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .ribbon-group { flex-shrink: 0; }
}

.empty-state-banner {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
    border-radius: 12px;
    margin: 24px 28px 0;
}

.demo-banner {
    background: #fffaf0;
    color: #c05621;
    padding: 12px 28px;
    border-bottom: 1px solid #feebc8;
    font-size: 14px;
    font-weight: 500;
}

.container {
    width: var(--page-width);
    min-width: var(--page-min-width);
    max-width: none;
    margin: 0 auto;
    padding: 32px var(--page-gutter) 64px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        min-width: 0;
        padding: 24px 16px 48px;
    }

    .topbar,
    .product-tabbar,
    .nav-ribbon {
        padding-left: 16px;
        padding-right: 16px;
    }
}
h1 { margin: 0 0 8px; font-size: 32px; font-weight: 800; color: #1a202c; letter-spacing: -0.5px; }
.subtitle { color: var(--muted); margin: 0 0 32px; font-size: 16px; }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.metric-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease;
}
.metric-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.metric-card.highlight { border-color: #c3dafe; background: #ebf4ff; }
.metric-card.accent-pii { border-top: 3px solid var(--count-pii); }
.metric-card.accent-sensitive { border-top: 3px solid var(--count-sensitive); }
.metric-card.accent-financial { border-top: 3px solid var(--count-financial); }
.metric-card .label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.metric-card .value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-card .value.small { font-size: 16px; font-weight: 600; word-break: break-word; line-height: 1.25; }
.metric-card .value.danger { color: var(--high); }
.metric-card .value.warn { color: var(--medium); }
.metric-card .value.ok { color: var(--low); }
.metric-card .value.count-pii { color: var(--count-pii); }
.metric-card .value.count-sensitive { color: var(--count-sensitive); }
.metric-card .value.count-financial { color: var(--count-financial); }
.metric-card .trend { color: var(--low); font-size: 13px; font-weight: 500; }

.count-pii { color: var(--count-pii); font-weight: 700; font-variant-numeric: tabular-nums; }
.count-sensitive { color: var(--count-sensitive); font-weight: 700; font-variant-numeric: tabular-nums; }
.count-financial { color: var(--count-financial); font-weight: 700; font-variant-numeric: tabular-nums; }

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 32px;
}
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.panel.wide { grid-column: span 1; }
.panel h2 { margin: 0 0 20px; font-size: 20px; font-weight: 700; color: #1a202c; }

.gauge {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent);
    text-align: center;
    margin: 16px 0;
}

.bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.bar-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.bar-track {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #edf2f7;
}
.seg.high { background: var(--high); }
.seg.medium { background: var(--medium); }
.seg.low { background: var(--low); }
.bar-count { font-size: 12px; color: var(--muted); text-align: right; }
.legend { margin-top: 10px; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 6px 0 14px; }
.dot.high { background: var(--high); }
.dot.medium { background: var(--medium); }
.dot.low { background: var(--low); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge.high { background: #fee2e2; color: #991b1b; }
.badge.medium { background: #ffedd5; color: #9a3412; }
.badge.low { background: #dcfce7; color: #166534; }
.badge.critical { background: #7f1d1d; color: #ffffff; }
.badge.passwordprotected { background: #ede9fe; color: #5b21b6; }
.badge.encrypted { background: #dbeafe; color: #1d4ed8; }
.badge.protected { background: #ede9fe; color: #5b21b6; }
.badge.scan-queued { background: #e0f2fe; color: #075985; }
.badge.scan-scanning { background: #ffedd5; color: #9a3412; }
.badge.scan-completed { background: #dcfce7; color: #166534; }
.badge.scan-failed { background: #fee2e2; color: #991b1b; }
.device-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.device-actions .btn-link {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}
.flash-ok { border-left: 4px solid #16a34a; }
.scan-log-timeline { list-style: none; padding: 0; margin: 0; }
.scan-log-timeline li {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.scan-log-timeline .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.scan-log-timeline .msg { margin-top: 6px; font-size: 14px; }

.mitre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.mitre-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.person-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .15s ease;
}
.person-card:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
    text-decoration: none;
}
.person-card h3 { margin: 0 0 8px; }
.person-card p { margin: 0 0 12px; color: var(--muted); }
.link-text { color: var(--accent); font-weight: 600; font-size: 14px; }

.service-list { margin: 0; padding-left: 18px; }
.service-list li { margin-bottom: 6px; }

.trend-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trend-row {
    display: grid;
    grid-template-columns: 40px 1fr 80px;
    align-items: center;
    gap: 10px;
}

.trend-label {
    color: var(--muted);
    font-size: 13px;
}

.trend-track {
    height: 12px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.trend-fill {
    display: block;
    height: 100%;
    background: #2563eb;
}

.trend-fill.alt {
    background: #9333ea;
}

.trend-value {
    text-align: right;
    color: var(--muted);
    font-size: 12px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.search-grid input,
.search-grid button {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}

.search-grid button {
    background: var(--accent);
    color: #fff;
    border: 0;
    cursor: pointer;
}

@media (max-width: 900px) {
    .panel-grid { grid-template-columns: 1fr; }
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.data-table th { background: #f9fafb; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.data-table tr:last-child td { border-bottom: 0; }
.actions { white-space: nowrap; }
.btn-sm {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
}
.btn-sm.warn { color: var(--high); border-color: #fecaca; }
.btn-primary-inline {
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
}
.btn-primary-inline:hover { filter: brightness(0.96); }
.btn-secondary-inline {
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c7d2fe;
}
.btn-secondary-inline:hover { background: #eef2ff; }
.btn-compact { padding: 8px 12px; font-size: 13px; white-space: nowrap; }

/* Agent download callout */
.agent-download-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
}
.agent-download-card__body {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: flex-start;
    justify-content: space-between;
}
.agent-download-card__copy h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}
.agent-download-card__copy p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 560px;
    line-height: 1.5;
}
.agent-download-card__meta {
    margin-top: 8px !important;
    font-size: 13px !important;
    color: #475569 !important;
}
.agent-download-card__meta code {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
}
.agent-download-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.agent-download-card__link {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e0e7ff;
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
}
.agent-download-card__link span {
    display: inline-block;
    margin-right: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
}
.agent-download-card__link a { color: var(--accent); }

/* Reseller customers page */
.reseller-customers .page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.reseller-customers .page-header h1 { margin: 0 0 6px; }
.reseller-customers .page-header .subtitle { margin: 0; max-width: 560px; }
.page-header__stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 18px;
    text-align: right;
    min-width: 110px;
}
.page-header__stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}
.page-header__stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.reseller-customers .panel-heading {
    margin-bottom: 18px;
}
.reseller-customers .panel-heading h2 {
    margin: 0 0 4px;
    font-size: 18px;
}
.reseller-customers .panel-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}
.reseller-add-customer { max-width: 820px; }
.reseller-form__grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px 20px !important;
    width: 100%;
    max-width: 760px;
}
.reseller-form .field,
.reseller-form label.field {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
    margin: 0;
    min-width: 0;
    width: 100%;
}
.reseller-form .field span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.02em;
}
.reseller-form .field input {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.reseller-form .field input:focus {
    outline: none;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.reseller-form__actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    max-width: 760px;
}
.reseller-customer-list { margin-top: 8px; }
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.reseller-table {
    border: 0;
    border-radius: 0;
    min-width: 1100px;
}
.reseller-table th {
    font-size: 11px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.reseller-table td {
    vertical-align: top;
    padding: 14px 12px;
}
.reseller-table tbody tr:hover td { background: #fafbff; }
.cell-primary { font-weight: 650; color: #1e293b; }
.cell-muted { font-size: 12px; color: #64748b; margin-top: 2px; }
.cell-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #334155;
}
.cell-stack strong { color: #64748b; font-weight: 600; margin-right: 4px; }
.status-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.status-prospect { background: #eef2ff; color: #3730a3; }
.status-active { background: #ecfdf5; color: #066e4a; }
.status-pending { background: #fff7ed; color: #9a3412; }
.status-danger { background: #fef2f2; color: #991b1b; }
.status-neutral { background: #f1f5f9; color: #475569; }
.payment-due { color: #b45309; font-weight: 700; font-variant-numeric: tabular-nums; }
.reseller-actions {
    width: 280px;
    min-width: 260px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reseller-actions .action-row { margin: 0; }
.reseller-actions .action-row .btn-secondary-inline {
    width: 100%;
    box-sizing: border-box;
}
.reseller-actions .action-block {
    margin: 0;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
}
.action-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 8px;
}
.action-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}
.action-controls select,
.action-controls input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
}
.action-controls .btn-primary-inline,
.action-controls .btn-compact {
    width: 100%;
    box-sizing: border-box;
}
.action-controls-row {
    display: grid;
    grid-template-columns: 1fr 88px;
    gap: 8px;
}
.action-empty {
    margin: 0;
    font-size: 12px;
    color: #b45309;
    line-height: 1.4;
}
.empty-state {
    text-align: center;
    padding: 36px 20px;
    color: var(--muted);
}
.empty-state strong {
    display: block;
    color: #1e293b;
    font-size: 16px;
    margin-bottom: 6px;
}
.empty-state p { margin: 0; font-size: 14px; }
@media (max-width: 720px) {
    .reseller-form__grid { grid-template-columns: 1fr !important; }
    .page-header__stat { text-align: left; }
    .reseller-actions { width: 100%; max-width: none; }
}
.flash.ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.flash.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.flash.warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.field-full { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.field-full label { font-size: 13px; color: var(--muted); }
.field-full input, .field-full select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.actions-row { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }

.service-tabs {
    display: inline-flex;
    gap: 0;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.service-tabs a {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    border-right: 1px solid var(--border);
}

.service-tabs a:last-child { border-right: none; }

.service-tabs a.active {
    background: var(--accent);
    color: #fff;
}

.service-tabs a:not(.active):hover {
    background: #f8fafc;
    color: var(--text);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    align-items: start;
}
.form-grid .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.form-grid .field-full {
    grid-column: 1 / -1;
}
.form-grid .field > label,
.form-grid .field > .field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,
.form-grid textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
}
.form-grid input[type="checkbox"],
.form-grid input[type="radio"] {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}
.form-grid textarea {
    resize: vertical;
    min-height: 96px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}
.form-grid .field-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.form-grid .field-check {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.form-grid .field-check input[type="checkbox"] {
    width: auto;
}
@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.consent-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.consent-subnav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}
.consent-subnav a.active,
.consent-subnav a:hover { color: var(--accent); }
.consent-subnav-grouped { align-items: center; }
.consent-subnav-group {
    display: inline-flex;
    align-items: center;
    gap: 8px 14px;
    padding: 2px 12px;
    border-left: 1px solid var(--border);
}
.consent-subnav-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    opacity: 0.75;
}
.consent-subnav-pills { gap: 6px; align-items: center; }
.consent-subnav-pills a {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.consent-subnav-pills a:hover { background: rgba(37, 99, 235, 0.06); }
.consent-subnav-pills a.active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--accent);
}

.consent-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.consent-form .radio-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 8px;
}
.consent-form label.radio-inline {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: auto;
    margin: 0;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}
.consent-form label.radio-inline input[type="radio"] {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
}
.consent-form .radio-stack label {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    color: var(--text);
}
.consent-form .radio-stack label input[type="radio"] {
    width: auto;
    flex: 0 0 auto;
    margin: 2px 0 0;
}
.consent-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    min-height: 80px;
}
.consent-form .field-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; display: block; }
.consent-form .checkbox-row {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: var(--text);
    width: auto;
    max-width: 100%;
}
.consent-form .checkbox-row input[type="checkbox"] {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
}
.consent-form .inline-check {
    display: inline-flex;
    width: auto;
    margin: 0 12px 8px 0;
}
.consent-form .category-check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 4px;
    align-items: flex-start;
}
.consent-form .category-check-grid .inline-check {
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: color-mix(in srgb, var(--text) 2.5%, var(--card, #fff));
    font-size: 13px;
    font-weight: 500;
}
.consent-form .form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.action-cell { white-space: nowrap; }
.consent-record-link {
    font-weight: 600;
    color: var(--accent, #2563eb);
    text-decoration: none;
}
.consent-record-link:hover { text-decoration: underline; }
.inline-link-form { display: inline-flex; gap: 4px; align-items: center; margin-left: 4px; }
.inline-link-form select { max-width: 120px; padding: 4px 6px; font-size: 12px; }
.flash-ok { background: #f0fff4; border-color: #9ae6b4; color: #276749; }
.flash-error { background: #fff5f5; border-color: #feb2b2; color: #9b2c2c; }
.muted { color: var(--muted); font-size: 13px; }

/* Consent module — self-service UI */
.consent-help-tip {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 4px;
    cursor: help;
}
.consent-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.consent-help-tip-content {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: 260px;
    padding: 10px 12px;
    background: #1a202c;
    color: #f7fafc;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 200;
    pointer-events: none;
}
.consent-help-tip:hover .consent-help-tip-content,
.consent-help-tip:focus .consent-help-tip-content { display: block; }

.consent-callout {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2c5282;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.55;
}
.consent-callout.warn { background: #fffaf0; border-color: #feebc8; color: #744210; }
.consent-callout a:not(.btn-primary-inline) { color: inherit; font-weight: 700; }
.consent-callout .btn-primary-inline {
    color: #fff;
    text-decoration: none;
    display: inline-block;
}
.consent-callout.panel { margin-bottom: 24px; }
.consent-category-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.consent-category-bar select { min-width: 280px; max-width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.consent-pill-live { background: #c6f6d5; color: #22543d; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.consent-audit-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.consent-audit-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; flex: 1; }
.consent-audit-stat-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.consent-audit-export-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.consent-audit-table-wrap { overflow-x: auto; }
.consent-audit-table { width: 100%; min-width: 1100px; font-size: 13px; }
.consent-audit-table th { white-space: nowrap; background: #f7fafc; }
.consent-audit-table td { vertical-align: top; }
.consent-audit-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.consent-audit-summary-cell { min-width: 220px; max-width: none; }
.consent-audit-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.consent-audit-badge.grant { background: #c6f6d5; color: #22543d; }
.consent-audit-badge.withdraw { background: #fed7d7; color: #742a2a; }
.consent-audit-badge.admin { background: #e2e8f0; color: #2d3748; }
.consent-audit-footnote { margin-top: 12px; font-size: 12px; }

.consent-setup-progress-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.consent-setup-progress-header h2 { margin: 0; }
.consent-badge-ok { background: #c6f6d5; color: #22543d; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.consent-badge-progress { background: #e2e8f0; color: #4a5568; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.consent-setup-applied { margin: 0 0 12px; font-size: 14px; }
.consent-checklist { list-style: none; margin: 0; padding: 0; }
.consent-checklist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.consent-checklist li:last-child { border-bottom: 0; }
.consent-checklist li.done .consent-check-icon { color: var(--low); font-weight: 700; }
.consent-checklist li.pending .consent-check-icon { color: var(--muted); }
.consent-check-body { display: flex; flex-direction: column; gap: 2px; }
.consent-check-body a { font-weight: 700; color: var(--text); text-decoration: none; }
.consent-check-body a:hover { color: var(--accent); }

.consent-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.consent-preset-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow);
}
.consent-preset-icon { font-size: 32px; line-height: 1; }
.consent-preset-card h3 { margin: 0; font-size: 18px; }
.consent-preset-tagline { margin: 0; font-size: 13px; color: var(--accent); font-weight: 600; }
.consent-preset-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.consent-pill { background: #edf2f7; color: #4a5568; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.consent-pill.muted-pill { background: transparent; border: 1px solid var(--border); }
.consent-preset-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); }
.consent-preset-details ul { margin: 8px 0; padding-left: 18px; font-size: 13px; }
.consent-preset-apply { margin-top: auto; padding-top: 8px; }

.consent-lang-options { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.consent-lang-options label { display: flex; align-items: center; gap: 6px; color: var(--text); }

.consent-library-heading { margin: 16px 0 8px; font-size: 15px; font-weight: 650; }
.consent-notice-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.consent-notice-library-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--border, #e1dfdd);
    border-radius: 6px;
    background: var(--card, #fff);
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}
.consent-notice-library-card:has(input:checked) {
    border-color: var(--accent, #217346);
    background: var(--accent-soft, #e6f2ec);
}
.consent-notice-library-card input { margin: 0 0 2px; align-self: flex-start; }
.consent-notice-library-card .name { font-weight: 650; font-size: 14px; }
.consent-notice-library-card .desc { color: var(--muted, #605e5c); line-height: 1.35; }
.consent-notice-library-card .meta { font-size: 11px; color: var(--muted, #605e5c); }

.consent-channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 16px 0 20px; }
.consent-channel-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #fafafa; }
.consent-channel-card h3 { margin: 0 0 8px; font-size: 16px; }
.consent-channel-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.consent-channel-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.consent-integrate-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 12px;
}
.consent-integrate-tab {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.consent-integrate-tab.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, #fff);
    color: var(--accent);
    font-weight: 700;
}
.consent-integrate-pane { margin-top: 8px; }
.consent-inline-help summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); }
.consent-inline-help table { font-size: 12px; margin-top: 8px; width: 100%; }

.consent-faq-item { border-bottom: 1px solid var(--border); padding: 8px 0; }
.consent-faq-item summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 8px 0; }
.consent-faq-item p { margin: 0 0 12px; font-size: 14px; color: var(--muted); line-height: 1.55; }
.consent-search-input { width: 100%; max-width: 480px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }
.consent-quick-links { line-height: 1.8; font-size: 14px; }
.consent-inline-note { margin-top: 12px; }
.consent-notice-preview-body {
    max-height: 420px;
    overflow: auto;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    line-height: 1.5;
}
.consent-notice-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}
.consent-notice-editor-pane {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.consent-notice-editor-pane label,
.consent-notice-viewer-label {
    font-size: 13px;
    font-weight: 600;
}
.consent-notice-editor-pane textarea {
    min-height: 280px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.45;
    resize: vertical;
}
.consent-notice-live-viewer {
    min-height: 280px;
    max-height: 480px;
    flex: 1;
    background: #fafafa;
}
.consent-notice-viewer-title {
    margin: 0 0 12px;
    font-size: 16px;
}
@media (max-width: 960px) {
    .consent-notice-editor { grid-template-columns: 1fr; }
}
.consent-linked-notices { margin-top: 12px; }
.consent-linked-notices table { width: 100%; }
.consent-linked-notices .inline-link-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.msg-info.panel { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.code-block { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }

.consent-test-panel { border-left: 4px solid var(--accent); }

.consent-modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.consent-modal.open { display: block; }
.consent-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.consent-modal-dialog {
    position: relative;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 4vh auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 28px 24px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}
.consent-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    border-radius: 4px;
    width: 32px;
    height: 32px;
}
.consent-modal-close:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.consent-modal-dialog h2 {
    margin: 0 0 6px;
    padding-right: 36px;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--text);
}
.consent-modal-dialog > .subtitle {
    margin: 0 0 18px;
    max-width: 52ch;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.consent-wizard-steps {
    list-style: none;
    margin: 0 0 20px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    background: color-mix(in srgb, var(--text) 3%, var(--card));
    border: 1px solid var(--border);
    border-radius: 8px;
    counter-reset: wizard-step;
}
.consent-wizard-steps li {
    counter-increment: wizard-step;
    position: relative;
    padding: 2px 0 2px 28px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--muted);
}
.consent-wizard-steps li::before {
    content: counter(wizard-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #0f6cbd;
    background: color-mix(in srgb, #0f6cbd 12%, #fff);
    border: 1px solid color-mix(in srgb, #0f6cbd 28%, #fff);
}
@media (max-width: 640px) {
    .consent-wizard-steps { grid-template-columns: 1fr; }
}

.consent-wizard-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
    max-height: 340px;
    overflow-y: auto;
    padding: 2px;
}
.consent-wizard-preset-form { margin: 0; }
.consent-wizard-preset-btn {
    width: 100%;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card, #fff);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.consent-wizard-preset-btn:hover {
    border-color: color-mix(in srgb, #0f6cbd 40%, var(--border));
    background: #f5f9fc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.consent-wizard-preset-btn:focus-visible {
    outline: 2px solid #0f6cbd;
    outline-offset: 2px;
}
.consent-wizard-preset-btn .icon {
    font-size: 22px;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f2f1;
    border: 1px solid #e1dfdd;
}
.consent-wizard-preset-btn .name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    line-height: 1.3;
}
.consent-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding-top: 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.consent-modal-actions .btn-primary-inline {
    min-height: 36px;
    padding: 8px 16px;
}
.consent-wizard-skip {
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-weight: 600;
}
.consent-wizard-skip:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--text) 28%, var(--border));
    background: color-mix(in srgb, var(--text) 4%, transparent);
}
body.consent-modal-open { overflow: hidden; }

.consent-form-builder { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 960px) { .consent-form-builder { grid-template-columns: 1fr; } }
.consent-form-card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.consent-form-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fff; }
.consent-form-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.consent-form-card a { text-decoration: none; color: inherit; display: block; }
.consent-form-card .consent-copy-btn { margin-top: 8px; }
.consent-form-builder-toolbar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.consent-form-builder-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.consent-form-builder-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .consent-form-builder-panes { grid-template-columns: 1fr; } }
.consent-form-builder-pane { border: 1px solid var(--border); border-radius: 8px; padding: 16px; background: #fafafa; min-height: 120px; }
.consent-fb-section { border: 1px dashed var(--border); border-radius: 8px; padding: 12px; margin-bottom: 12px; background: #fff; }
.consent-fb-section-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.consent-fb-section-head label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); flex: 1 1 180px; min-width: 140px; }
.consent-fb-section-head label input[type="text"] { font-weight: 400; color: inherit; width: 100%; }
.consent-fb-section-head .consent-fb-drag { align-self: center; }
.consent-fb-field { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 10px 0; border-bottom: 1px solid #eee; }
.consent-fb-field label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); flex: 1 1 140px; min-width: 120px; }
.consent-fb-field label input[type="text"],
.consent-fb-field label select,
.consent-fb-field label textarea { font-weight: 400; color: inherit; width: 100%; }
.consent-fb-field label.fb-options-wrap { flex-basis: 100%; }
.consent-fb-field label.fb-checkbox-wrap { flex-direction: row; align-items: center; flex: 0 0 auto; }
.consent-fb-drag { cursor: grab; color: var(--muted); user-select: none; padding: 4px 6px; align-self: center; }
.consent-form-builder-add-field { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.consent-form-builder-preview .principal-card {
    background: var(--card, #fff);
    border: 1px solid color-mix(in srgb, var(--text, #0f172a) 14%, transparent);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
/* Logo sizing for designer Live preview (portal CSS is not loaded on dashboard). */
.portal-brand-logo,
.consent-fb-preview-brand img,
#formBuilderPreviewLogo {
    display: block;
    height: 28px;
    width: auto;
    max-width: 140px;
    max-height: 28px;
    object-fit: contain;
    flex: 0 0 auto;
}
.consent-theme-logo-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    min-height: 36px;
}
.consent-theme-logo-preview img {
    height: 28px;
    width: auto;
    max-width: 140px;
    max-height: 28px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    background: #fff;
}
.consent-fb-preview-shell {
    --accent: #28a745;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    border-radius: 12px;
    padding: 12px;
    background: var(--bg);
    color: var(--text);
}
.consent-fb-preview-topbar {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    min-height: 44px;
    max-height: 52px;
    overflow: hidden;
    background: var(--card);
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
}
.consent-fb-preview-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--accent);
    min-width: 0;
    width: 100%;
}
.consent-fb-preview-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}
.consent-fb-preview-shell .field {
    margin-bottom: 14px;
}
.consent-fb-preview-shell .field label {
    display: block;
    font-size: 13px;
    color: color-mix(in srgb, var(--text) 55%, transparent);
    margin-bottom: 6px;
    font-weight: 600;
}
.consent-fb-preview-shell .field input,
.consent-fb-preview-shell .field select,
.consent-fb-preview-shell .field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
.consent-fb-preview-section {
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.consent-fb-preview-shell .btn-principal {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}
.consent-appearance-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.consent-appearance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.consent-appearance-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.consent-appearance-grid input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.consent-appearance-grid .field-full { grid-column: 1 / -1; }
.consent-form-builder-purpose-meta { flex: 1 1 320px; min-width: 220px; display: flex; flex-direction: column; }
.consent-fb-purpose-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin: 6px 0 2px; color: var(--muted); }
.consent-fb-purpose-label:first-child { margin-top: 0; }
.consent-fb-purpose-title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.consent-fb-purpose-desc { margin: 0; font-size: 14px; color: var(--text); line-height: 1.4; }

/* Classification score bands slider */
.class-slider-wrap {
    --class-public: #38a169;
    --class-internal: #3182ce;
    --class-private: #dd6b20;
    --class-confidential: #e53e3e;
    max-width: 920px;
}
.class-slider-help {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
}
.class-slider {
    position: relative;
    padding: 28px 10px 8px;
    user-select: none;
    touch-action: none;
}
.class-slider-track {
    position: relative;
    height: 28px;
    border-radius: 999px;
    background: #edf2f7;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}
.class-slider-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}
.class-slider-thumb {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 10px;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(45, 55, 72, 0.28);
    transform: translate(-50%, -50%);
    cursor: grab;
    z-index: 2;
}
.class-slider-thumb:hover,
.class-slider-thumb:focus-visible {
    outline: none;
    background: #4338ca;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25), 0 2px 8px rgba(45, 55, 72, 0.28);
}
.class-slider-thumb.is-dragging { cursor: grabbing; z-index: 3; }
.class-slider-tip {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 28px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #2d3748;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
}
.class-slider-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.class-level-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}
.class-level-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 12px;
    background: #fff;
    border-top: 4px solid var(--level-color, var(--accent));
}
.class-level-card[data-code="public"] { --level-color: var(--class-public); }
.class-level-card[data-code="internal"] { --level-color: var(--class-internal); }
.class-level-card[data-code="private"] { --level-color: var(--class-private); }
.class-level-card[data-code="confidential"] { --level-color: var(--class-confidential); }
.class-level-code {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.class-level-card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
}
.class-level-card input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.class-level-range {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.class-level-range span {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f7fafc;
    border: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}
.class-slider-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}
.class-slider-reset {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
@media (max-width: 800px) {
    .class-level-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .class-level-grid { grid-template-columns: 1fr; }
}

/* Data holdings — departments & users */
.holdings-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 18px 0 22px;
}
.holdings-summary-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.holdings-summary-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.holdings-summary-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.holdings-summary-card p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
}
.holdings-summary-card.accent-pii { border-top: 3px solid var(--count-pii); }
.holdings-summary-card.accent-sensitive { border-top: 3px solid var(--count-sensitive); }
.holdings-summary-card.accent-financial { border-top: 3px solid var(--count-financial); }
.holdings-summary-card.accent-pii strong { color: var(--count-pii); }
.holdings-summary-card.accent-sensitive strong { color: var(--count-sensitive); }
.holdings-summary-card.accent-financial strong { color: var(--count-financial); }
.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.panel-heading-row h2 { margin: 0; font-size: 18px; }
.holdings-filter-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
}
.table-scroll { overflow-x: auto; }
.holdings-table th.num,
.holdings-table td.num,
.classification-table th.num,
.classification-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.holdings-table .top-types,
.classification-table .keywords-cell {
    max-width: 260px;
    font-size: 13px;
    color: var(--muted);
}
.holdings-table tr.row-selected { background: #f8fafc; }
.holdings-table .actions-cell { white-space: nowrap; }
.muted { color: var(--muted); font-size: 13px; }

/* Classification report */
.classification-report { padding-bottom: 24px; }
.classification-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.classification-header h1 { margin-bottom: 6px; }
.classification-export { white-space: nowrap; margin-top: 8px; }
.classification-filters-panel { margin-bottom: 18px; }
.classification-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px 16px;
    align-items: end;
}
.classification-filters label span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}
.classification-filters select,
.classification-filters input[type="date"],
.classification-filters input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}
.classification-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.file-activity-filters select,
.file-activity-filters input[type="date"],
.file-activity-filters input[type="search"] {
    min-width: 140px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}
.classification-level-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.classification-level-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--level-accent, var(--accent));
}
.classification-level-card.level-public { --level-accent: #38a169; }
.classification-level-card.level-internal { --level-accent: #3182ce; }
.classification-level-card.level-private { --level-accent: #dd6b20; }
.classification-level-card.level-confidential { --level-accent: #e53e3e; }
.classification-level-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
.classification-level-card h3 {
    margin: 4px 0 10px;
    font-size: 17px;
}
.classification-level-count {
    margin: 0;
    font-size: 14px;
    color: var(--text);
}
.classification-level-size {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}
.classification-files-panel h2 { margin: 0; }
.classification-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.classification-pill.level-public { background: #dcfce7; color: #166534; }
.classification-pill.level-internal { background: #dbeafe; color: #1d4ed8; }
.classification-pill.level-private { background: #ffedd5; color: #9a3412; }
.classification-pill.level-confidential { background: #fee2e2; color: #991b1b; }
.classification-table code.file-path {
    font-size: 12px;
    color: #475569;
    word-break: break-all;
}
.classification-footnote { margin-top: 12px; }
@media (max-width: 900px) {
    .classification-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .classification-header { flex-direction: column; }
}
@media (max-width: 520px) {
    .classification-level-grid { grid-template-columns: 1fr; }
}

/* ── Portal submit busy / click feedback ── */
body.portal-busy {
    cursor: progress;
}

body.portal-busy main,
body.portal-busy .container {
    pointer-events: none;
    user-select: none;
}

.portal-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 31, 63, 0.35);
    backdrop-filter: blur(2px);
}

.portal-busy-overlay[hidden] {
    display: none !important;
}

.portal-busy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 200px;
    padding: 28px 32px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 31, 63, 0.08);
    box-shadow: 0 12px 40px rgba(0, 31, 63, 0.18);
}

.portal-busy-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(0, 31, 63, 0.12);
    border-top-color: #28a745;
    animation: portal-busy-spin 0.75s linear infinite;
}

.portal-busy-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #001f3f;
    letter-spacing: 0.01em;
}

button.is-loading,
input.is-loading {
    position: relative;
    opacity: 0.85;
    cursor: wait !important;
}

@keyframes portal-busy-spin {
    to { transform: rotate(360deg); }
}

html[data-theme="privonta-dark"] .portal-busy-card,
body[data-theme="privonta-dark"] .portal-busy-card {
    background: #0b1c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="privonta-dark"] .portal-busy-text,
body[data-theme="privonta-dark"] .portal-busy-text {
    color: #e8eef5;
}

/* DPDP Assessment wizard */
.assess-page { max-width: 860px; }
.assess-lead { max-width: 640px; }
.assess-back { margin: 0 0 16px; }
.assess-meta { color: var(--muted); font-size: 13px; margin: 4px 0 0; line-height: 1.45; }
.assess-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.assess-h3 { margin: 24px 0 10px; font-size: 16px; }
.assess-continue { margin-bottom: 24px; }
.assess-continue-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.assess-continue-row:first-of-type { border-top: 0; padding-top: 0; }
.assess-continue-row > div { flex: 1; min-width: 0; }
.assess-bar {
    height: 8px;
    background: color-mix(in srgb, var(--text) 8%, var(--border));
    border-radius: 99px;
    overflow: hidden;
    margin-top: 8px;
}
.assess-bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 99px;
    min-width: 0;
}
.assess-bar-lg { height: 10px; margin-top: 14px; }
.assess-industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}
.assess-industry {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: var(--card);
}
.assess-industry:has(input:checked) {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}
.assess-industry input { margin-top: 3px; }
.assess-industry span { display: flex; flex-direction: column; gap: 4px; }
.assess-table { width: 100%; }
.assess-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.assess-btn-primary {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}
.assess-wizard-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.assess-progress-stats { font-size: 14px; color: var(--muted); }
.assess-progress-stats strong { color: var(--text); }
.assess-dot { margin: 0 6px; }
.assess-q-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.assess-section-pill {
    background: color-mix(in srgb, var(--accent) 12%, var(--card));
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
}
.assess-code { font-size: 12px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.assess-q-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
}
.assess-q-status.is-done { color: var(--accent); }
.assess-q-status.is-open { color: var(--muted); }
.assess-q-title { margin: 0 0 8px; font-size: 20px; line-height: 1.35; }
.assess-why { color: var(--muted); margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.assess-hint {
    font-size: 13px;
    color: #1565C0;
    background: #e8f1fb;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 14px;
}
.assess-choices { display: grid; gap: 8px; }
.assess-choice {
    display: block;
    margin: 0;
    cursor: pointer;
}
.assess-choice input { position: absolute; opacity: 0; pointer-events: none; }
.assess-choice-body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
}
.assess-choice:hover .assess-choice-body {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.assess-choice:has(input:checked) .assess-choice-body {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--card));
    box-shadow: inset 0 0 0 1px var(--accent);
}
.assess-choice-key {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    background: color-mix(in srgb, var(--text) 8%, var(--card));
    color: var(--text);
}
.assess-choice:has(input:checked) .assess-choice-key {
    background: var(--accent);
    color: #fff;
}
.assess-choice-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.assess-choice-text strong { font-size: 14px; line-height: 1.4; }
.assess-choice-expl { font-size: 13px; color: var(--muted); line-height: 1.45; }
.assess-extras { margin-top: 18px; display: grid; gap: 12px; }
.assess-na { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.assess-notes { display: grid; gap: 6px; }
.assess-notes span { font-size: 13px; font-weight: 600; color: var(--text); }
.assess-notes em { font-style: normal; font-weight: 500; color: var(--muted); }
.assess-notes textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 84px;
    resize: vertical;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
}
.assess-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    bottom: 12px;
    z-index: 3;
}
.assess-nav-spacer { flex: 1; }
.assess-result-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.assess-score { font-size: 42px; font-weight: 800; line-height: 1; }
.assess-score span { font-size: 16px; font-weight: 600; color: var(--muted); }
.assess-band { font-size: 16px; font-weight: 700; margin-top: 6px; }
.assess-band-meaning { margin: 10px 0 0; font-size: 15px; max-width: 42rem; line-height: 1.45; }
.assess-result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; }
.assess-answer-row { border-top: 1px solid var(--border); padding: 14px 0; }
.assess-answer-row:first-of-type { border-top: 0; }
.assess-note-read { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.gap-report-hero { margin-bottom: 24px; }
.gap-report-title { margin: 4px 0 0; }
.gap-report-sub { margin: 6px 0 0; color: var(--muted); }
.gap-report-scoreline {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 16px;
}
.gap-report-summary { font-size: 15px; line-height: 1.55; max-width: 52rem; }
.gap-report-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.gap-mini-bar {
    margin-top: 6px;
    height: 6px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--text) 8%, var(--card));
    overflow: hidden;
    min-width: 72px;
}
.gap-mini-bar span { display: block; height: 100%; border-radius: 99px; }
.gap-mini-bar .gap-rag-ok { background: var(--low); }
.gap-mini-bar .gap-rag-watch { background: var(--medium); }
.gap-mini-bar .gap-rag-gap { background: var(--high); }
.gap-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
}
.gap-pill.gap-rag-ok { color: var(--low); background: color-mix(in srgb, var(--low) 14%, var(--card)); }
.gap-pill.gap-rag-watch { color: var(--medium); background: color-mix(in srgb, var(--medium) 14%, var(--card)); }
.gap-pill.gap-rag-gap { color: var(--high); background: color-mix(in srgb, var(--high) 14%, var(--card)); }
.gap-pill.gap-urgency { color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--card)); }
.gap-finding-list { display: grid; gap: 14px; }
.gap-finding {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    background: var(--card);
}
.gap-finding h3 { margin: 8px 0; font-size: 16px; }
.gap-finding p { margin: 6px 0; }
.gap-finding-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gap-strength-list { margin: 0; padding-left: 18px; }
.gap-strength-list li { margin: 8px 0; }
.gap-appendix summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
}
.gap-appendix[open] summary { margin-bottom: 12px; }
.gap-disclaimer { font-size: 12px; color: var(--muted); margin: 8px 0 24px; max-width: 52rem; }

@media print {
    .app-header, .product-tabbar, .nav-ribbon, .no-print, .assess-back, .gap-report-actions { display: none !important; }
    .gap-appendix { break-before: page; }
}

@media (max-width: 700px) {
    .assess-nav-spacer { display: none; }
    .assess-continue-row { flex-direction: column; align-items: stretch; }
}

.dlp-channel-stack { display: grid; gap: 12px; margin: 8px 0 16px; }
.dlp-channel-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px 10px;
    margin: 0;
}
.dlp-channel-card legend {
    font-weight: 700;
    padding: 0 6px;
}
.dlp-channel-card .assess-meta { margin: 0 0 8px; }
.dlp-allow-block {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.dlp-exceptions {
    border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent) 6%, var(--card));
    border-radius: 10px;
    padding: 12px 14px;
}
.dlp-exceptions[hidden],
.dlp-channel-note[hidden],
.dlp-custom-fields[hidden] { display: none !important; }
.dlp-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 8px;
}
.dlp-whitelist-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.dlp-whitelist-field textarea {
    width: 100%;
    min-height: 88px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    resize: vertical;
}
.dlp-whitelist-mode {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.dlp-whitelist-mode .radio-inline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text);
    font-weight: 500;
}
.dlp-whitelist-mode .radio-inline input[type="radio"] {
    margin-top: 3px;
}
.dlp-select-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 240px;
}
.dlp-channel-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--text) 4%, var(--card));
}
.dlp-custom-fields { margin: 12px 0 8px 8px; }

