/*
 * Cleverer Compliance Platform — Front-end Portal
 *
 * This is the customer-facing application shell + all view styles.
 * wp-admin is for Cleverer platform admins only.
 *
 * Design direction: Vision §15
 *   Modern SaaS, premium corporate, clear and calm,
 *   Apple-level simplicity, structured, confidence-building.
 *
 * RAG palette: Vision §8
 *   Green  = #16a34a
 *   Amber  = #d97706
 *   Red    = #dc2626
 */


/* ════════════════════════════════════════
   APPLICATION SHELL
   Standalone page — no theme chrome.
   ════════════════════════════════════════ */

/* Reset: the shell owns the full page */
.clvr-portal-body {
    margin: 0;
    padding: 0;
    background: #f8fafc;
}

.clvr-portal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
    background: #f8fafc;
}

/* ── Nav bar ── */
.clvr-portal-nav {
    background: #0f172a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* WP admin bar offset (only when logged-in admin viewing front-end) */
.admin-bar .clvr-portal-nav {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .clvr-portal-nav {
        top: 46px;
    }
}

.clvr-portal-nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.clvr-portal-nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Brand */
.clvr-portal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.clvr-portal-brand svg {
    color: #60a5fa;
}

/* Nav links */
.clvr-portal-nav-links {
    display: flex;
    gap: 4px;
}

.clvr-portal-nav-link {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.12s, background 0.12s;
}

.clvr-portal-nav-link:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.06);
}

.clvr-portal-nav-link--active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Button variant (Help trigger) — reset to match anchor styling */
button.clvr-portal-nav-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
}

/* User / logout */
.clvr-portal-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.clvr-portal-user {
    font-size: 13px;
    color: #94a3b8;
}

.clvr-portal-logout {
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    transition: color 0.12s, border-color 0.12s;
}

.clvr-portal-logout:hover {
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.2);
}

/* Org context badge */
.clvr-portal-org-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.clvr-portal-org-name {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.clvr-portal-org-role {
    font-size: 11px;
    color: #64748b;
}

/* Divider between org and user */
.clvr-portal-nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.1);
}


/* ── Mobile hamburger toggle ── */
.clvr-mobile-menu-toggle {
    display: none;           /* hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.clvr-mobile-menu-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #94a3b8;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate to X when open */
.clvr-mobile-menu-toggle--open .clvr-mobile-menu-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.clvr-mobile-menu-toggle--open .clvr-mobile-menu-bar:nth-child(2) {
    opacity: 0;
}
.clvr-mobile-menu-toggle--open .clvr-mobile-menu-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ── Mobile slide-down menu ── */
.clvr-mobile-menu {
    display: none;           /* hidden on desktop */
    background: #0f172a;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.clvr-mobile-menu--open {
    max-height: 500px;
}

.clvr-mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 8px 16px;
}

.clvr-mobile-menu-link {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    transition: color 0.12s, background 0.12s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
    text-align: left;
    width: 100%;
}

.clvr-mobile-menu-link:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.06);
}

.clvr-mobile-menu-link--active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.clvr-mobile-menu-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.clvr-mobile-menu-org {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.clvr-mobile-menu-user {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ── Mobile breakpoint: show hamburger, hide desktop nav ── */
@media (max-width: 768px) {

    .clvr-portal-nav-links {
        display: none;
    }

    .clvr-portal-nav-right {
        display: none;
    }

    .clvr-mobile-menu-toggle {
        display: flex;
    }

    .clvr-mobile-menu {
        display: block;
    }

    .clvr-portal-nav-inner {
        padding: 0 16px;
    }
}


/* ── Tighter content padding on small screens ── */
@media (max-width: 640px) {
    .clvr-portal-content {
        padding: 20px 14px 48px;
    }
}


/* ── Billing status banner ── */
.clvr-billing-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
}

.clvr-billing-banner--warning {
    background: #fef3c7;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
}

.clvr-billing-banner--error {
    background: #fee2e2;
    color: #991b1b;
    border-bottom: 1px solid #fecaca;
}

.clvr-billing-banner__text {
    flex: 1;
    text-align: center;
}

.clvr-billing-banner__link {
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.clvr-billing-banner--warning .clvr-billing-banner__link {
    background: #92400e;
    color: #fff;
}

.clvr-billing-banner--warning .clvr-billing-banner__link:hover {
    background: #78350f;
}

.clvr-billing-banner--error .clvr-billing-banner__link {
    background: #991b1b;
    color: #fff;
}

.clvr-billing-banner--error .clvr-billing-banner__link:hover {
    background: #7f1d1d;
}


/* ── Content area ── */
.clvr-portal-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* Narrow mode: learner-facing views (training, certificates) */
.clvr-portal-content--narrow {
    max-width: 680px;
}


/* ════════════════════════════════════════
   SHARED FOUNDATION
   ════════════════════════════════════════ */
.clvr-portal-content *, .clvr-portal-content *::before, .clvr-portal-content *::after {
    box-sizing: border-box;
}


/* ── Page header ── */
.clvr-page-header {
    margin-bottom: 28px;
}

.clvr-page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 2px;
    padding: 0;
    letter-spacing: -0.01em;
}

.clvr-page-header .clvr-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}


/* ── Zone headers (label + line) ── */
.clvr-zone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.clvr-zone-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    flex-shrink: 0;
}

.clvr-zone-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Section heading */
.clvr-section-heading {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 28px 0 14px;
}


/* ════════════════════════════════════════
   STATUS HERO — used by Dashboard view
   ════════════════════════════════════════ */
.clvr-status-hero {
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
    opacity: 0.92;
}

.clvr-status-hero-accent {
    height: 3px;
}

.clvr-status-hero-accent--green { background: #16a34a; }
.clvr-status-hero-accent--amber { background: #d97706; }
.clvr-status-hero-accent--red   { background: #dc2626; }

.clvr-status-hero-body {
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Score ring */
.clvr-status-ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.clvr-status-ring svg {
    transform: rotate(-90deg);
}

.clvr-status-ring .ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 6;
}

.clvr-status-ring .ring-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.clvr-status-ring .ring-fill--green { stroke: #22c55e; }
.clvr-status-ring .ring-fill--amber { stroke: #fbbf24; }
.clvr-status-ring .ring-fill--red   { stroke: #f87171; }

.clvr-status-ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

/* Status text */
.clvr-status-text {
    flex: 1;
}

.clvr-status-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
}

.clvr-status-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* Stat pills */
.clvr-status-pills {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.clvr-status-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    min-width: 72px;
}

.clvr-status-pill-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.clvr-status-pill-value--red   { color: #f87171; }
.clvr-status-pill-value--amber { color: #fbbf24; }
.clvr-status-pill-value--green { color: #4ade80; }

.clvr-status-pill-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-top: 2px;
}


/* ════════════════════════════════════════
   DASHBOARD LAYOUT — two-column
   ════════════════════════════════════════ */
.clvr-main-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .clvr-main-grid {
        grid-template-columns: 1fr;
    }
}

.clvr-actions-panel {
    min-width: 0;
}

.clvr-coverage-panel {
    min-width: 0;
}

/* Action items */
.clvr-action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clvr-action-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: border-color 0.12s;
}

.clvr-action-item:hover {
    border-color: #cbd5e1;
}

.clvr-action-item--red {
    border-left: 3px solid #dc2626;
    border-radius: 2px 10px 10px 2px;
}

.clvr-action-item--amber {
    border-left: 3px solid #d97706;
    border-radius: 2px 10px 10px 2px;
}

.clvr-action-body {
    flex: 1;
    min-width: 0;
}

.clvr-action-body-text {
    font-size: 14px;
    color: #0f172a;
    margin: 0 0 2px;
    line-height: 1.4;
}

.clvr-action-body-text strong {
    font-weight: 600;
}

.clvr-action-btn {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    transition: background 0.12s, border-color 0.12s;
}

.clvr-action-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}


/* ── Coverage sidebar ── */
.clvr-cov-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 12px;
}

.clvr-cov-card-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin: 0 0 12px;
}

.clvr-cov-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.clvr-cov-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.clvr-cov-row:first-child {
    padding-top: 0;
}

.clvr-cov-label {
    font-size: 13px;
    color: #64748b;
}

.clvr-cov-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.clvr-cov-value--red   { color: #dc2626; }
.clvr-cov-value--amber { color: #d97706; }
.clvr-cov-value--green { color: #16a34a; }

/* Role bars */
.clvr-role-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.clvr-role-bar:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.clvr-role-bar:first-child {
    padding-top: 0;
}

.clvr-role-bar-label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    width: 80px;
    flex-shrink: 0;
}

.clvr-role-bar-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.clvr-role-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.clvr-role-bar-fill--green { background: #16a34a; }
.clvr-role-bar-fill--amber { background: #d97706; }
.clvr-role-bar-fill--red   { background: #dc2626; }

.clvr-role-bar-fraction {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    width: 40px;
    text-align: right;
    flex-shrink: 0;
}


/* ════════════════════════════════════════
   FOOTER BAR
   ════════════════════════════════════════ */
.clvr-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.clvr-footer-left {
    display: flex;
    gap: 10px;
}

.clvr-footer-left a {
    text-decoration: none;
}


/* ════════════════════════════════════════
   BUTTONS — shared
   ════════════════════════════════════════ */
.clvr-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.clvr-btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.clvr-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s;
}

.clvr-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}


/* ════════════════════════════════════════
   DATA TABLE — used by Team, Compliance views
   ════════════════════════════════════════ */
.clvr-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: visible;
    margin-bottom: 28px;
}

/* Restore rounded corners on first/last rows without overflow:hidden */
.clvr-table-wrap .clvr-table thead th:first-child { border-top-left-radius: 10px; }
.clvr-table-wrap .clvr-table thead th:last-child { border-top-right-radius: 10px; }
.clvr-table-wrap .clvr-table tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }
.clvr-table-wrap .clvr-table tbody tr:last-child td:last-child { border-bottom-right-radius: 10px; }

/* Dropdown positioning variants */
.clvr-role-path-dropdown,
.clvr-dept-dropdown {
    max-height: 70vh;
    overflow-y: auto;
}
.clvr-dropdown-up {
    top: auto !important;
    bottom: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 4px;
}

.clvr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.clvr-table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 9px 16px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.clvr-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.clvr-table tbody tr:last-child td {
    border-bottom: none;
}

/* Hover */
.clvr-table tbody tr {
    transition: background 0.1s ease;
}
.clvr-table tbody tr:hover {
    background: #f8fafc;
}

/* ── Certification table: user grouping ── */
/* First row of a new user group: stronger top border */
.clvr-table tbody tr.is-first-user td {
    border-top: 1px solid #e2e8f0;
}
.clvr-table tbody tr.is-first-user:first-child td {
    border-top: none;
}

/* Duplicate user name: muted so the eye groups naturally */
.clvr-table tbody td .clvr-cert-user--dup {
    color: #cbd5e1;
    font-weight: 400;
}

/* Course name: primary emphasis */
.clvr-table tbody td .clvr-cert-course {
    font-weight: 500;
    color: #0f172a;
}

/* Date cells: secondary */
.clvr-table tbody td.clvr-cert-date {
    color: #94a3b8;
    font-size: 12px;
}

/* Action button: low visual weight */
.clvr-table .clvr-cert-action {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
}
.clvr-table .clvr-cert-action:hover {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}


/* ── Badges ── */
.clvr-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}

.clvr-badge.badge-green  { background: #dcfce7; color: #15803d; }
.clvr-badge.badge-amber  { background: #fef3c7; color: #92400e; }
.clvr-badge.badge-red    { background: #fee2e2; color: #b91c1c; }
.clvr-badge.badge-grey   { background: #f1f5f9; color: #64748b; }

/* Progress track */
.clvr-progress-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.clvr-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.clvr-progress-fill.fill-green { background: #16a34a; }
.clvr-progress-fill.fill-amber { background: #d97706; }
.clvr-progress-fill.fill-red   { background: #dc2626; }


/* ── Toolbar (Team view) ── */
.clvr-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.clvr-toolbar-left {
    display: flex;
    gap: 8px;
    align-items: center;
}

.clvr-search {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    width: 260px;
    outline: none;
    transition: border-color 0.15s;
    background: #fff;
}

.clvr-search:focus {
    border-color: #2563eb;
}

.clvr-select {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

/* Seat counter */
.clvr-seat-counter {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.clvr-seat-counter strong {
    color: #0f172a;
}


/* ════════════════════════════════════════
   COMPLIANCE VIEW — score ring + summary
   ════════════════════════════════════════ */
.clvr-score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clvr-score-ring svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.clvr-score-ring .ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.clvr-score-ring .ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.clvr-score-ring .ring-fill.ring-green { stroke: #16a34a; }
.clvr-score-ring .ring-fill.ring-amber { stroke: #d97706; }
.clvr-score-ring .ring-fill.ring-red   { stroke: #dc2626; }

.clvr-score-label {
    position: relative;
    z-index: 1;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.clvr-summary-strip {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 28px;
}

.clvr-summary-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
}

.clvr-summary-item .clvr-sum-num {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.clvr-summary-item .clvr-sum-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.clvr-export-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}


/* ════════════════════════════════════════
   REFINEMENT CLASSES
   ════════════════════════════════════════ */

/* Coverage denominator (e.g. "/ 25") */
.clvr-cov-denom {
    font-weight: 400;
    color: #94a3b8;
}

/* Warning card variant */
.clvr-cov-card--warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.clvr-cov-card-title--warning {
    color: #a16207;
}

.clvr-cov-warning-name {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 2px;
}

.clvr-cov-warning-detail {
    font-size: 13px;
    color: #a16207;
    margin: 0;
}

/* Table utility classes */
.clvr-table-secondary {
    font-size: 12px;
    color: #64748b;
}

.clvr-table-muted {
    color: #94a3b8;
}

.clvr-table-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Compliance summary layout */
.clvr-compliance-summary {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* Summary number colour variants */
.clvr-sum-num--green { color: #16a34a; }
.clvr-sum-num--amber { color: #d97706; }
.clvr-sum-num--red   { color: #dc2626; }

/* Certificate summary strip (certificates view) */
.clvr-cert-summary {
    display: flex;
    gap: 28px;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.clvr-cert-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.clvr-cert-summary-num {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.clvr-cert-summary-num--green { color: #16a34a; }
.clvr-cert-summary-num--amber { color: #d97706; }

.clvr-cert-summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-top: 2px;
}

/* Empty state */
.clvr-empty-state {
    padding: 40px 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.clvr-empty-state p {
    margin: 0;
}


/* ════════════════════════════════════════
   DASHBOARD — action urgency tiers
   ════════════════════════════════════════ */
.clvr-zone-label--red {
    color: #dc2626;
}

.clvr-action-body-detail {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

/* System status line — shows what Cleverer has already done */
.clvr-action-system-status {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 0;
    font-style: italic;
}


/* ════════════════════════════════════════
   COMPLIANCE — urgency callout cards
   ════════════════════════════════════════ */
.clvr-urgency-cards {
    margin-bottom: 28px;
}

.clvr-urgency-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #dc2626;
    border-radius: 2px 10px 10px 2px;
    margin-bottom: 6px;
}

.clvr-urgency-card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.clvr-urgency-card-left strong {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}


/* ════════════════════════════════════════
   CERTIFICATES — progress bar + pending cards
   ════════════════════════════════════════ */
.clvr-cert-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.clvr-cert-progress-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.clvr-cert-progress-fill--partial {
    height: 100%;
    border-radius: 4px;
    background: #d97706;
}

.clvr-cert-progress-fill--complete {
    height: 100%;
    border-radius: 4px;
    background: #16a34a;
}

.clvr-cert-progress-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pending cert card */
.clvr-cert-pending {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #d97706;
    border-radius: 2px 10px 10px 2px;
    margin-bottom: 8px;
}

.clvr-cert-pending-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #b45309;
}

.clvr-cert-pending-body {
    flex: 1;
    min-width: 0;
}

.clvr-cert-pending-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 2px;
}

.clvr-cert-pending-body p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.clvr-cert-pending-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}


/* ════════════════════════════════════════
   TEAM — expandable member detail panel
   ════════════════════════════════════════ */
.clvr-member-row {
    cursor: default;
}

.clvr-member-detail td {
    padding: 0 !important;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* On mobile, detail rows stay hidden — content shows in the
   slide-up panel instead. The table row is still toggled by JS
   on desktop where it works well. */
@media (max-width: 768px) {
    .clvr-member-detail {
        display: none !important;
    }
}


/* ── Mobile detail panel (slide-up) ──
   Reuses the help-drawer pattern: fixed overlay + panel.
   Content is cloned from the table row into this container. */

.clvr-mobile-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    z-index: 299;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.clvr-mobile-detail-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.clvr-mobile-detail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: #fff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.12);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.clvr-mobile-detail--open {
    transform: translateY(0);
}

.clvr-mobile-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.clvr-mobile-detail-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.clvr-mobile-detail-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s;
}

.clvr-mobile-detail-close:hover {
    color: #475569;
}

.clvr-mobile-detail-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px;
}

/* Reset the detail panel layout when rendered inside the mobile panel */
.clvr-mobile-detail-body .clvr-detail-panel {
    padding: 0;
    flex-direction: column;
    gap: 16px;
}

/* Compliance grid panels: stack inside mobile panel */
.clvr-mobile-detail-body .clvr-detail-panel[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.clvr-mobile-detail-body .clvr-detail-actions {
    width: 100%;
    flex-shrink: 1;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.clvr-mobile-detail-body .clvr-detail-actions .clvr-btn-sm {
    width: 100%;
    justify-content: center;
}

.clvr-mobile-detail-body .clvr-detail-course-row {
    flex-wrap: wrap;
    gap: 8px;
}

.clvr-mobile-detail-body .clvr-detail-course-name {
    flex-basis: 100%;
}

/* Action dropdowns: flow inline in mobile panel */
.clvr-mobile-detail-body .clvr-role-path-change,
.clvr-mobile-detail-body .clvr-dept-change {
    position: static !important;
    display: block !important;
}

.clvr-mobile-detail-body .clvr-role-path-dropdown,
.clvr-mobile-detail-body .clvr-dept-dropdown {
    position: relative !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Hide the mobile panel on desktop — it should never appear */
@media (min-width: 769px) {
    .clvr-mobile-detail,
    .clvr-mobile-detail-overlay {
        display: none !important;
    }
}

.clvr-detail-panel {
    padding: 20px 24px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.clvr-detail-courses {
    flex: 1;
    min-width: 0;
}

.clvr-detail-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 10px;
}

.clvr-detail-course-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.clvr-detail-course-row:last-child {
    border-bottom: none;
}

.clvr-detail-course-name {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    flex: 1;
    min-width: 0;
}

.clvr-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.clvr-btn-sm {
    padding: 6px 14px !important;
    font-size: 12px !important;
}

.clvr-btn-sm--danger {
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.clvr-btn-sm--danger:hover {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
}

.clvr-action-btn--active {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.clvr-action-btn--success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #15803d;
}

.clvr-action-btn:disabled {
    opacity: 0.7;
    cursor: default;
}


/* ════════════════════════════════════════
   CREDENTIAL CARDS — shared between
   Training, Certificates views
   ════════════════════════════════════════ */
.clvr-cert-card {
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.clvr-cert-card-band {
    height: 3px;
    background: #16a34a;
}

.clvr-cert-card-band--expiring { background: #d97706; }
.clvr-cert-card-band--expired  { background: #dc2626; }

.clvr-cert-card-body {
    padding: 20px 24px;
}

.clvr-cert-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.clvr-cert-card-shield {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clvr-cert-card-title {
    flex: 1;
}

.clvr-cert-card-title h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 3px;
    line-height: 1.3;
}

.clvr-cert-card-title-meta {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.3;
}

.clvr-cert-card-validity-tag {
    flex-shrink: 0;
    padding-top: 2px;
}

.clvr-cert-card-validity-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-block;
}

.clvr-cert-card-validity-badge--current  { background: #dcfce7; color: #15803d; }
.clvr-cert-card-validity-badge--expiring { background: #fef3c7; color: #b45309; }
.clvr-cert-card-validity-badge--expired  { background: #fee2e2; color: #dc2626; }

.clvr-cert-card-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    gap: 16px;
}

.clvr-cert-card-dates {
    display: flex;
    gap: 24px;
}

.clvr-cert-card-date-item {
    display: flex;
    flex-direction: column;
}

.clvr-cert-card-date-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    line-height: 1;
    margin-bottom: 3px;
}

.clvr-cert-card-date-value {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.clvr-cert-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.clvr-cert-card-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
}

.clvr-cert-card-dl:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.clvr-cert-card-dl svg {
    width: 13px;
    height: 13px;
    color: #64748b;
}

/* Renewal context line inside cert card */
.clvr-cert-card-renewal {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clvr-cert-card-renewal svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #94a3b8;
}

.clvr-cert-card-renewal strong {
    font-weight: 600;
    color: #334155;
}


/* ════════════════════════════════════════
   TEAM — member detail enrichments
   ════════════════════════════════════════ */
.clvr-detail-summary {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.5;
}

.clvr-detail-summary strong {
    color: #334155;
    font-weight: 600;
}

.clvr-detail-course-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.clvr-detail-actions-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 8px;
}

.clvr-detail-primary-action {
    margin-bottom: 8px;
}


/* ════════════════════════════════════════
   COMPLIANCE — toolbar position for exports
   ════════════════════════════════════════ */
.clvr-compliance-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.clvr-compliance-toolbar-left {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Pipeline filter tabs */
.clvr-filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.clvr-filter-tab {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.12s;
}

.clvr-filter-tab:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.clvr-filter-tab--active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.clvr-filter-tab--active:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

/* Count badge inside filter tab */
.clvr-filter-tab-count {
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
    opacity: 0.7;
}


/* ════════════════════════════════════════
   DASHBOARD — structured action items
   ════════════════════════════════════════ */
.clvr-action-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1px;
}

.clvr-action-item-issue {
    font-size: 13px;
    color: #475569;
    margin: 0 0 2px;
}

/* Hero pills replaced by a single focused number for clarity */
.clvr-status-hero-focus {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.clvr-status-hero-focus-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}

.clvr-status-hero-focus-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.clvr-status-hero-focus-num--green { color: #4ade80; }
.clvr-status-hero-focus-num--amber { color: #fbbf24; }
.clvr-status-hero-focus-num--red   { color: #f87171; }

.clvr-status-hero-focus-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-top: 4px;
}


/* ════════════════════════════════════════
   DASHBOARD — department compliance section
   ════════════════════════════════════════ */
.clvr-dept-section {
    margin-bottom: 24px;
}

.clvr-dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.clvr-dept-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
}

.clvr-dept-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.clvr-dept-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.clvr-dept-card-pct {
    font-size: 14px;
    font-weight: 700;
}

.clvr-dept-card-pct--green { color: #16a34a; }
.clvr-dept-card-pct--amber { color: #d97706; }
.clvr-dept-card-pct--red   { color: #dc2626; }

.clvr-dept-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.clvr-dept-card-meta--red {
    color: #dc2626;
    font-weight: 600;
}

/* ════════════════════════════════════════
   DASHBOARD — Recommended actions
   ════════════════════════════════════════ */
.clvr-insights-section {
    margin-bottom: 20px;
}

.clvr-insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clvr-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: border-color 0.12s;
}

.clvr-insight-item:hover {
    border-color: #cbd5e1;
}

.clvr-insight-item--red {
    border-left: 3px solid #dc3545;
    border-radius: 2px 10px 10px 2px;
}

.clvr-insight-item--amber {
    border-left: 3px solid #f0ad4e;
    border-radius: 2px 10px 10px 2px;
}

.clvr-insight-item--grey {
    border-left: 3px solid #6c757d;
    border-radius: 2px 10px 10px 2px;
}

.clvr-insight-indicator {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
    padding-top: 2px;
}

.clvr-insight-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.clvr-insight-dot--red { background: #dc3545; }
.clvr-insight-dot--amber { background: #f0ad4e; }
.clvr-insight-dot--grey { background: #6c757d; }

.clvr-insight-severity {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
}

.clvr-insight-severity--red { color: #dc3545; }
.clvr-insight-severity--amber { color: #b8860b; }
.clvr-insight-severity--grey { color: #6c757d; }

.clvr-insight-body {
    flex: 1;
    min-width: 0;
}

.clvr-insight-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 2px;
    line-height: 1.4;
}

.clvr-insight-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.clvr-insight-link {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: #1BA39C;
    text-decoration: none;
    white-space: nowrap;
    align-self: center;
}

.clvr-insight-link:hover {
    text-decoration: underline;
}

/* Department helper text */
.clvr-dept-helper {
    font-size: 13px;
    color: #64748b;
    margin: -4px 0 12px;
    line-height: 1.4;
}

/* Export bar grouping */
.clvr-export-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.clvr-export-group + .clvr-export-group {
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid #e2e8f0;
}


/* ════════════════════════════════════════
   BILLING VIEW
   Owner/admin billing status + subscription.
   ════════════════════════════════════════ */

.clvr-billing {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 0;
}

.clvr-billing-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px 0;
}

/* Alert banners */
.clvr-billing-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.clvr-billing-alert--warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.clvr-billing-alert--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Cards */
.clvr-billing-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.clvr-billing-card h2 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

/* Key-value rows */
.clvr-billing-kv {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clvr-billing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.clvr-billing-label {
    color: #64748b;
    font-weight: 500;
}

.clvr-billing-muted {
    color: #94a3b8;
    font-style: italic;
}

.clvr-billing-text--red {
    color: #dc2626;
    font-weight: 600;
}

/* Status badges */
.clvr-billing-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.clvr-billing-badge--green {
    background: #dcfce7;
    color: #166534;
}

.clvr-billing-badge--amber {
    background: #fef3c7;
    color: #92400e;
}

.clvr-billing-badge--red {
    background: #fee2e2;
    color: #991b1b;
}

.clvr-billing-badge--grey {
    background: #f1f5f9;
    color: #475569;
}

.clvr-billing-badge--blue {
    background: #dbeafe;
    color: #1e40af;
}

/* Health labels */
.clvr-billing-health {
    font-size: 13px;
    font-weight: 600;
}

.clvr-billing-health--ok {
    color: #16a34a;
}

.clvr-billing-health--warning {
    color: #d97706;
}

.clvr-billing-health--critical {
    color: #dc2626;
}

/* Seat pressure bar */
.clvr-billing-bar-wrap {
    margin-top: 12px;
}

.clvr-billing-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.clvr-billing-bar__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.clvr-billing-bar--green {
    background: #16a34a;
}

.clvr-billing-bar--amber {
    background: #d97706;
}

.clvr-billing-bar--red {
    background: #dc2626;
}

.clvr-billing-bar--critical {
    background: #991b1b;
}

.clvr-billing-bar__label {
    font-size: 12px;
    color: #64748b;
}

/* Description text */
.clvr-billing-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

/* Buttons */
.clvr-billing-actions {
    margin: 0;
}

.clvr-billing-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.clvr-billing-btn--primary {
    background: #0f172a;
    color: #fff;
}

.clvr-billing-btn--primary:hover {
    background: #1e293b;
}

/* Timeline */
.clvr-billing-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.clvr-billing-timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 13px;
}

.clvr-billing-timeline-item:last-child {
    border-bottom: none;
}

.clvr-billing-timeline-item--alert .clvr-billing-timeline-label {
    color: #dc2626;
    font-weight: 600;
}

.clvr-billing-timeline-date {
    color: #64748b;
    white-space: nowrap;
    min-width: 120px;
}

.clvr-billing-timeline-time {
    color: #94a3b8;
    margin-left: 4px;
    font-size: 12px;
}

.clvr-billing-timeline-label {
    color: #1e293b;
    text-align: right;
}

/* ── Account team management ── */

.clvr-account-members {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.clvr-account-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    gap: 12px;
}

.clvr-account-member:last-child {
    border-bottom: none;
}

.clvr-account-member__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.clvr-account-member__name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.clvr-account-member__email {
    font-size: 12px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clvr-account-member__role {
    flex-shrink: 0;
}

.clvr-account-role-select {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
}

.clvr-account-role-select:focus {
    border-color: #1BA39C;
    outline: none;
}

.clvr-account-role-select:disabled {
    opacity: 0.5;
    cursor: wait;
}

.clvr-account-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.clvr-account-input:focus {
    border-color: #1BA39C;
}


/* ════════════════════════════════════════
   SHARED COMPLIANCE COMPONENTS
   Used across Check-ins, Concerns, Evidence, Governance tabs.
   ════════════════════════════════════════ */

/* ── Content card ── */
.clvr-comp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 12px;
}

.clvr-comp-card h2 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 16px;
}

/* ── Toolbar (action bar above lists) ── */
.clvr-comp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.clvr-comp-toolbar__count {
    font-size: 13px;
    color: #64748b;
}

/* ── Status banner ── */
.clvr-comp-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.clvr-comp-banner--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.clvr-comp-banner--warning { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }
.clvr-comp-banner--info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.clvr-comp-banner--error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ── Empty state (enhanced) ── */
.clvr-comp-empty {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
}

.clvr-comp-empty h3 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 6px;
}

.clvr-comp-empty p {
    font-size: 14px;
    margin: 0 0 4px;
    line-height: 1.6;
}

.clvr-comp-empty .clvr-comp-empty__cta {
    margin-top: 16px;
}

/* ── Status badges ── */
.clvr-comp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.clvr-comp-badge--green    { background: #dcfce7; color: #166534; }
.clvr-comp-badge--amber    { background: #fef3c7; color: #92400e; }
.clvr-comp-badge--red      { background: #fee2e2; color: #991b1b; }
.clvr-comp-badge--blue     { background: #eff6ff; color: #1d4ed8; }
.clvr-comp-badge--grey     { background: #f1f5f9; color: #64748b; }

/* ── Form controls (consistent across modals and inline forms) ── */
.clvr-comp-form-group {
    margin-bottom: 14px;
}

.clvr-comp-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}

.clvr-comp-input,
.clvr-comp-select,
.clvr-comp-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.12s;
}

.clvr-comp-input:focus,
.clvr-comp-select:focus,
.clvr-comp-textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.clvr-comp-textarea {
    resize: vertical;
    min-height: 64px;
}

.clvr-comp-select[multiple] {
    min-height: 80px;
    padding: 4px;
}

.clvr-comp-form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 3px;
}

.clvr-comp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 640px) {
    .clvr-comp-form-row { grid-template-columns: 1fr; }
}

/* ── List items ── */
.clvr-comp-list-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 8px;
    transition: border-color 0.12s;
}

.clvr-comp-list-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.clvr-comp-list-item__title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.clvr-comp-list-item__meta {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.clvr-comp-list-item__desc {
    font-size: 13px;
    color: #475569;
    margin: 6px 0 0;
}

.clvr-comp-list-item__actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.clvr-comp-list-item__actions button {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-weight: 500;
    transition: background 0.12s;
}

.clvr-comp-list-item__actions button:hover { background: #e2e8f0; }
.clvr-comp-list-item__actions button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Result messages ── */
.clvr-comp-result { font-size: 13px; margin-top: 10px; }
.clvr-comp-result--success { color: #16a34a; }
.clvr-comp-result--error { color: #dc2626; }

/* ── Modal (shared) ── */
.clvr-comp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.clvr-comp-modal-overlay.active { display: flex; }

.clvr-comp-modal {
    background: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.clvr-comp-modal h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #0f172a;
}

.clvr-comp-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}


/* ════════════════════════════════════════
   CHECK-INS TAB
   ════════════════════════════════════════ */
.clvr-checkin-q { padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.clvr-checkin-q:last-child { border-bottom: none; }
.clvr-checkin-q__text { font-size: 14px; color: #0f172a; margin: 0 0 8px; font-weight: 500; }
.clvr-checkin-q__options { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.clvr-checkin-q__options label { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #475569; cursor: pointer; font-weight: 400; }
.clvr-checkin-q__note { width: 100%; padding: 8px 12px; font-size: 13px; border: 1px solid #e2e8f0; border-radius: 6px; font-family: inherit; color: #0f172a; margin-top: 6px; display: none; outline: none; transition: border-color 0.12s; }
.clvr-checkin-q__note:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,0.08); }
.clvr-checkin-q__note.visible { display: block; }

.clvr-checkin-history-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.clvr-checkin-history-item:last-child { border-bottom: none; }
.clvr-checkin-followup { font-size: 11px; font-weight: 600; color: #92400e; background: #fef3c7; padding: 2px 8px; border-radius: 4px; }


/* ════════════════════════════════════════
   EVIDENCE TIMELINE TAB
   ════════════════════════════════════════ */
.clvr-ev-filters { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }

.clvr-ev-filters select {
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.12s;
}

.clvr-ev-filters select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

.clvr-ev-month { font-size: 15px; font-weight: 600; color: #2563eb; margin: 24px 0 12px; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0; }
.clvr-ev-month:first-child { margin-top: 0; }

.clvr-ev-item { padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.clvr-ev-item:last-child { border-bottom: none; }
.clvr-ev-item__title { font-size: 14px; font-weight: 500; color: #0f172a; margin: 0; }
.clvr-ev-item__desc { font-size: 13px; color: #475569; margin: 3px 0 0; line-height: 1.5; }
.clvr-ev-item__meta { font-size: 11px; color: #94a3b8; margin: 4px 0 0; }

.clvr-ev-cat { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; margin-right: 6px; }
/* Evidence category badges — aligned with score component palette.
   Do NOT use RAG colours (green/amber/red) for categories. */
.clvr-ev-cat--training { background: #eff6ff; color: #3b82f6; }
.clvr-ev-cat--governance { background: #f5f3ff; color: #8b5cf6; }
.clvr-ev-cat--checkins { background: #f0fdfa; color: #0d9488; }
.clvr-ev-cat--concerns { background: #fdf2f8; color: #F62B89; }


/* ════════════════════════════════════════
   HELP DRAWER
   Contextual slide-out help panel.
   ════════════════════════════════════════ */

.clvr-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.clvr-help-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.clvr-help-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 90vw;
    background: #fff;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.10);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.clvr-help-drawer--open {
    transform: translateX(0);
}

/* WP admin bar offset */
.admin-bar .clvr-help-drawer { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .clvr-help-drawer { top: 46px; }
}

.clvr-help-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.clvr-help-drawer-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.clvr-help-drawer-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.12s;
}
.clvr-help-drawer-close:hover { color: #475569; }

.clvr-help-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ── Intro line (larger, sets context) ── */
.clvr-help-intro {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 16px;
}

/* ── Content blocks (card containers) ── */
.clvr-help-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.clvr-help-block--muted {
    background: #f8fafc;
    border-color: #f1f5f9;
}

.clvr-help-block-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 0 0 6px;
}

.clvr-help-block-text {
    font-size: 13px;
    color: #334155;
    margin: 0;
    line-height: 1.6;
}

/* ── Workflows list ── */
.clvr-help-workflows {
    list-style: none;
    margin: 0;
    padding: 0;
}
.clvr-help-workflows li {
    font-size: 13px;
    color: #334155;
    padding: 7px 0 7px 18px;
    position: relative;
    line-height: 1.5;
    border-bottom: 1px solid #f1f5f9;
}
.clvr-help-workflows li:last-child { border-bottom: none; padding-bottom: 0; }
.clvr-help-workflows li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}

/* ── Legacy flat sections (footer, fallback) ── */
.clvr-help-section { margin-bottom: 20px; }
.clvr-help-section:last-child { margin-bottom: 0; }

.clvr-help-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 0 0 6px;
}

.clvr-help-section-text {
    font-size: 13px;
    color: #334155;
    margin: 0;
    line-height: 1.6;
}

.clvr-help-section--footer {
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
}

.clvr-help-browse-link {
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}
.clvr-help-browse-link:hover { text-decoration: underline; }

/* ── Progress indicator ── */
.clvr-help-progress {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.clvr-help-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    margin-top: 4px;
}
.clvr-help-progress-dot--active { background: #22c55e; }
.clvr-help-progress-text {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    line-height: 1.5;
}

/* ── Primary & secondary CTAs ── */
.clvr-help-cta-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.clvr-help-cta-primary {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    text-decoration: none;
    transition: background 0.12s;
}
.clvr-help-cta-primary:hover { background: #1d4ed8; }

.clvr-help-cta-secondary {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #2563eb;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    text-decoration: none;
    transition: border-color 0.12s;
}
.clvr-help-cta-secondary:hover { border-color: #93c5fd; }

/* Feedback widget */
.clvr-help-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.clvr-help-feedback-label {
    font-size: 12px;
    color: #94a3b8;
}
.clvr-help-feedback-btn {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 3px 12px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.12s, border-color 0.12s;
}
.clvr-help-feedback-btn:hover {
    color: #2563eb;
    border-color: #93c5fd;
}
.clvr-help-feedback-thanks {
    font-size: 12px;
    color: #16a34a;
    font-weight: 500;
}

/* Help trigger button — used in page headers */
.clvr-help-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s;
}
.clvr-help-trigger:hover {
    color: #2563eb;
    border-color: #93c5fd;
}
.clvr-help-trigger svg { flex-shrink: 0; }


/* ════════════════════════════════════════
   HELP PAGE
   Dedicated browsable help centre.
   ════════════════════════════════════════ */

.clvr-help-page-intro {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 24px;
    line-height: 1.6;
    max-width: 640px;
}

.clvr-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.clvr-help-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 22px;
}

.clvr-help-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px;
}

.clvr-help-card-item { margin-bottom: 10px; }
.clvr-help-card-item:last-child { margin-bottom: 0; }

.clvr-help-card-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 2px;
}

.clvr-help-card-text {
    font-size: 13px;
    color: #334155;
    margin: 0;
    line-height: 1.5;
}

.clvr-help-area-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
}

.clvr-help-area-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px;
}

.clvr-help-area-desc {
    font-size: 13px;
    color: #475569;
    margin: 0 0 10px;
    line-height: 1.5;
}

.clvr-help-area-link {
    font-size: 12px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}
.clvr-help-area-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   Verified Compliance Badge — Share Panel & Badge Card
   ═══════════════════════════════════════════════════════════════ */

/* Panel container — sits above compliance tabs */
.clvr-badge-panel {
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.clvr-badge-panel--current {
    border-color: #bbf7d0;
    background: linear-gradient(160deg, #f0fdf4 0%, #fafffe 40%, #fff 100%);
}
.clvr-badge-panel--revoked {
    border-color: #fef08a;
    background: #fffefb;
}
.clvr-badge-panel--locked {
    border-color: #e2e8f0;
    background: #fafbfc;
}

/* Panel header — icon + title row */
.clvr-badge-panel__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.clvr-badge-panel__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #dcfce7;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}
.clvr-badge-panel__icon--grey {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.clvr-badge-panel__icon--amber {
    background: #fefce8;
    border-color: #fef08a;
}
.clvr-badge-panel__title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.clvr-badge-panel__title--muted {
    color: #64748b;
    font-weight: 600;
}
.clvr-badge-panel__subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}
.clvr-badge-panel__description {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px;
}
.clvr-badge-panel__description--muted {
    color: #94a3b8;
}

/* Panel content grid — badge card left, share controls right */
.clvr-badge-panel__content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 768px) {
    .clvr-badge-panel__content {
        grid-template-columns: 1fr;
    }
}

/* ── Share Badge Card (screenshot / future PNG export target) ── */
.clvr-badge-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #16a34a;
    border-radius: 12px;
    padding: 28px 24px 24px;
    width: 260px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.03);
}
.clvr-badge-card__shield {
    margin-bottom: 16px;
}
.clvr-badge-card__org {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.clvr-badge-card__headline {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.clvr-badge-card__verified {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 3px;
}
.clvr-badge-card__date {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 16px;
}
.clvr-badge-card__qr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

/* ── Share controls (LinkedIn copy, URL) ── */
.clvr-badge-share-controls {
    min-width: 0; /* prevent grid blowout */
}
.clvr-badge-share {
    margin-bottom: 18px;
}
.clvr-badge-share:last-child {
    margin-bottom: 0;
}
.clvr-badge-share__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 8px;
}
.clvr-badge-share__copy-wrap {
    /* static positioning — buttons are in normal flow */
}
.clvr-badge-share__textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.55;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    resize: none;
    box-sizing: border-box;
}
.clvr-badge-share__textarea:focus {
    outline: none;
    border-color: #cbd5e1;
}
.clvr-badge-share__url-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.clvr-badge-share__url-input {
    flex: 1;
    padding: 10px 12px;
    font-size: 12px;
    font-family: 'SF Mono', 'Courier New', Courier, monospace;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}
.clvr-badge-share__url-input:focus {
    outline: none;
    border-color: #cbd5e1;
}

/* Button row under textarea (Copy + Open LinkedIn) */
.clvr-badge-share__btn-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-start;
}
.clvr-badge-share__btn-row .clvr-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.clvr-badge-share__btn-row a.clvr-btn-sm {
    text-decoration: none;
}

/* Hint text below share controls */
.clvr-badge-share__hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 8px 0 0;
    line-height: 1.5;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}


/* ════════════════════════════════════════
   PHASE 2 — MOBILE RESPONSIVE FIXES
   Shared patterns: tables, toolbars, grids,
   detail panels, dropdowns, summaries.
   ════════════════════════════════════════ */


/* ── 1. Table horizontal scroll on narrow viewports ── */
@media (max-width: 900px) {
    .clvr-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Tighter table cell padding on phones */
@media (max-width: 640px) {
    .clvr-table thead th {
        padding: 8px 10px;
    }

    .clvr-table tbody td {
        padding: 8px 10px;
    }
}


/* ── 2. Toolbar wrapping + responsive search/filters ── */
@media (max-width: 768px) {
    .clvr-toolbar-left {
        flex-wrap: wrap;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .clvr-toolbar {
        gap: 10px;
    }

    .clvr-toolbar-left {
        gap: 6px;
    }

    .clvr-search {
        width: 100%;
    }

    .clvr-toolbar-left .clvr-select {
        flex: 1;
        min-width: 0;
    }
}


/* ── 3. Department grid — safe minimum on narrow screens ── */
.clvr-dept-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}


/* ── 4. Team detail panel — stack on mobile ── */
@media (max-width: 640px) {
    .clvr-detail-panel {
        flex-direction: column;
        gap: 16px;
    }

    .clvr-detail-actions {
        flex-shrink: 1;
        width: 100%;
    }

    .clvr-detail-course-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .clvr-detail-course-name {
        flex-basis: 100%;
    }
}


/* ── 5. Action dropdown viewport constraints ── */
@media (max-width: 640px) {
    .clvr-role-path-change,
    .clvr-dept-change {
        position: static !important;
        display: block !important;
    }

    .clvr-role-path-dropdown,
    .clvr-dept-dropdown {
        position: relative !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        margin-top: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
}


/* ── 6. Compliance summary — tighter on mobile ── */
@media (max-width: 640px) {
    .clvr-compliance-summary {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .clvr-compliance-summary {
        gap: 14px;
    }

    .clvr-summary-item {
        min-width: 60px;
    }
}


/* ── 7. Certificate card dates — wrap on narrow screens ── */
@media (max-width: 640px) {
    .clvr-cert-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .clvr-cert-card-dates {
        flex-wrap: wrap;
        gap: 12px;
    }

    .clvr-cert-card-actions {
        flex-shrink: 1;
    }
}


/* ════════════════════════════════════════
   PHASE 3 — UX POLISH & REFINEMENT
   Spacing, hierarchy, tap targets,
   interaction feedback, visual noise.
   ════════════════════════════════════════ */


/* ── 1. Tap target sizing ──
   iOS HIG: 44px minimum. Android: 48dp.
   We target ~42–44px for all interactive
   elements on mobile. ── */

@media (max-width: 768px) {

    /* Mobile nav menu links */
    .clvr-mobile-menu-link {
        padding: 12px 12px;
        font-size: 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Help trigger button */
    .clvr-help-trigger {
        padding: 8px 14px;
        min-height: 40px;
    }

    /* Filter tabs */
    .clvr-filter-tab {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    /* Action buttons in table/detail rows */
    .clvr-action-btn {
        padding: 8px 16px;
        min-height: 40px;
    }

    /* Small buttons (detail panel actions) */
    .clvr-btn-sm {
        padding: 8px 16px !important;
        font-size: 13px !important;
        min-height: 40px;
    }

    /* Primary and secondary buttons */
    .clvr-btn-primary,
    .clvr-btn-secondary {
        padding: 10px 18px;
        min-height: 44px;
    }

    /* Select dropdowns */
    .clvr-select {
        padding: 10px 14px;
        min-height: 44px;
    }

    /* Search input */
    .clvr-search {
        padding: 10px 14px;
        min-height: 44px;
    }

    /* Cert card download/action buttons */
    .clvr-cert-card-dl {
        padding: 8px 14px;
        min-height: 40px;
    }

    /* Table cert action button */
    .clvr-table .clvr-cert-action {
        padding: 8px 14px;
        min-height: 40px;
    }
}


/* ── 2. Interaction feedback (tap states) ──
   Touch screens need :active not :hover.
   Subtle but immediate. ── */

.clvr-btn-primary:active {
    background: #1e40af;
    transform: scale(0.98);
}

.clvr-btn-secondary:active {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: scale(0.98);
}

.clvr-action-btn:active {
    background: #e2e8f0;
    transform: scale(0.98);
}

.clvr-filter-tab:active {
    background: #f1f5f9;
    transform: scale(0.97);
}

.clvr-cert-card-dl:active {
    background: #e2e8f0;
    transform: scale(0.98);
}

.clvr-mobile-menu-link:active {
    background: rgba(255,255,255,0.1);
}

.clvr-table .clvr-cert-action:active {
    background: #e2e8f0;
}


/* ── 3. Spacing rhythm — mobile ──
   Consistent cadence: 12 / 16 / 20 / 28.
   Tighten generous desktop spacing,
   add breathing room where cramped. ── */

@media (max-width: 640px) {

    /* Page header: reduce bottom margin */
    .clvr-page-header {
        margin-bottom: 20px;
    }

    .clvr-page-header h1 {
        font-size: 21px;
    }

    /* Section heading: tighter */
    .clvr-section-heading {
        font-size: 15px;
        margin: 20px 0 12px;
    }

    /* Status hero: tighten internal padding */
    .clvr-status-hero-body {
        padding: 18px 16px;
        gap: 16px;
    }

    /* Status hero focus numbers */
    .clvr-status-hero-focus {
        gap: 14px;
    }

    .clvr-status-hero-focus-item {
        min-width: 48px;
    }

    .clvr-status-hero-focus-num {
        font-size: 24px;
    }

    /* Action items: breathe */
    .clvr-action-item {
        padding: 12px 14px;
        gap: 10px;
    }

    /* Urgency cards */
    .clvr-urgency-card {
        padding: 12px 14px;
        gap: 12px;
    }

    /* Insight items */
    .clvr-insight-item {
        padding: 12px 14px;
    }

    /* Coverage cards: consistent */
    .clvr-cov-card {
        padding: 16px;
    }

    /* Department cards */
    .clvr-dept-card {
        padding: 14px 16px;
    }

    /* Certificate cards: balanced padding */
    .clvr-cert-card-body {
        padding: 16px;
    }

    /* Certificate progress bar */
    .clvr-cert-progress {
        padding: 14px 16px;
        gap: 12px;
    }

    /* Pending cert card */
    .clvr-cert-pending {
        padding: 14px 16px;
        gap: 12px;
    }

    /* Team detail panel: tighten */
    .clvr-detail-panel {
        padding: 16px 14px;
    }

    /* Compliance summary */
    .clvr-compliance-summary {
        margin-bottom: 24px;
    }

    /* Summary strip */
    .clvr-summary-strip {
        gap: 16px;
        margin-bottom: 20px;
    }

    /* Certificate summary strip */
    .clvr-cert-summary {
        padding: 16px;
        gap: 16px;
    }

    /* Export bar */
    .clvr-export-bar {
        margin-bottom: 16px;
    }

    /* Filter tabs: add gap for wrapped items */
    .clvr-filter-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Toolbar: consistent bottom margin */
    .clvr-toolbar {
        margin-bottom: 16px;
    }

    /* Main grid gap */
    .clvr-main-grid {
        gap: 16px;
        margin-bottom: 24px;
    }

    /* Table wrap bottom margin */
    .clvr-table-wrap {
        margin-bottom: 20px;
    }

    /* Empty state */
    .clvr-empty-state {
        padding: 28px 16px;
    }
}


/* ── 4. Typography hierarchy — mobile ──
   Sharpen size/weight distinctions.
   Lift low-contrast secondary text. ── */

@media (max-width: 640px) {

    /* Table header: readable but clearly secondary */
    .clvr-table thead th {
        font-size: 10px;
        letter-spacing: 0.06em;
        color: #64748b;
    }

    /* Table body: primary reading size */
    .clvr-table tbody td {
        font-size: 13px;
        color: #1e293b;
    }

    /* Secondary table text: lift contrast */
    .clvr-table-secondary {
        color: #475569;
    }

    /* Muted text: still visible */
    .clvr-table-muted {
        color: #64748b;
    }

    /* Detail summary: slightly larger for readability */
    .clvr-detail-summary {
        font-size: 14px;
        color: #475569;
    }

    /* Coverage labels: lift contrast */
    .clvr-cov-label {
        color: #475569;
    }

    /* Action body detail: ensure readability */
    .clvr-action-body-detail {
        color: #64748b;
    }

    /* Zone labels */
    .clvr-zone-label {
        color: #64748b;
    }

    /* Summary labels */
    .clvr-sum-label {
        font-size: 11px;
    }

    /* Badge: ensure readable on small screens */
    .clvr-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
}


/* ── 5. Visual noise reduction — mobile ──
   Soften non-essential borders.
   Let spacing do the grouping work. ── */

@media (max-width: 640px) {

    /* Coverage rows: soften dividers */
    .clvr-cov-row {
        border-bottom-color: #f1f5f9;
        padding: 6px 0;
    }

    /* Role bars: softer dividers */
    .clvr-role-bar {
        border-bottom-color: #f8fafc;
        padding: 8px 0;
    }

    /* Detail course rows: softer separator */
    .clvr-detail-course-row {
        border-bottom-color: #f1f5f9;
        padding: 10px 0;
    }

    /* Detail course meta: tighter */
    .clvr-detail-course-meta {
        gap: 8px;
        font-size: 12px;
        color: #64748b;
    }

    /* Cert card meta border: softer */
    .clvr-cert-card-meta {
        border-top-color: #f1f5f9;
        padding-top: 14px;
    }

    /* Cert card renewal border: softer */
    .clvr-cert-card-renewal {
        border-top-color: #f1f5f9;
    }
}


/* ── 6. Card & panel polish — mobile ──
   Subtle shadow lift for depth.
   Consistent radius. ── */

@media (max-width: 640px) {

    /* Slight elevation for primary content cards */
    .clvr-action-item,
    .clvr-urgency-card,
    .clvr-insight-item,
    .clvr-dept-card,
    .clvr-cert-pending {
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }

    /* Coverage cards: subtle lift */
    .clvr-cov-card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    }

    /* Table wrap: clean edge */
    .clvr-table-wrap {
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        border-color: #e2e8f0;
    }

    /* Cert card: already has shadow, ensure consistency */
    .clvr-cert-card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
}


/* ── 7. Detail panel visual separation — mobile ──
   When stacked, add clear section break
   between courses and actions. ── */

@media (max-width: 640px) {
    .clvr-detail-actions {
        padding-top: 14px;
        border-top: 1px solid #e2e8f0;
    }

    /* Actions: stack buttons wider for easier tapping */
    .clvr-detail-actions .clvr-btn-sm {
        width: 100%;
        justify-content: center;
    }

    .clvr-detail-actions .clvr-btn-secondary.clvr-btn-sm {
        width: 100%;
        justify-content: center;
    }
}


/* ── 8. Table first-column anchoring ──
   Make the name/primary column stand out
   when scrolling horizontally. ── */

@media (max-width: 900px) {
    .clvr-table thead th:first-child,
    .clvr-table tbody td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: inherit;
    }

    .clvr-table thead th:first-child {
        background: #f8fafc;
    }

    .clvr-table tbody td:first-child {
        background: #fff;
    }

    /* Subtle shadow to indicate the column is pinned */
    .clvr-table thead th:first-child::after,
    .clvr-table tbody td:first-child::after {
        content: '';
        position: absolute;
        top: 0;
        right: -6px;
        bottom: 0;
        width: 6px;
        pointer-events: none;
        background: linear-gradient(to right, rgba(0,0,0,0.04), transparent);
    }

    /* Hover row: first cell matches */
    .clvr-table tbody tr:hover td:first-child {
        background: #f8fafc;
    }
}


/* ── 9. Mobile micro-adjustments ── */

@media (max-width: 640px) {

    /* Billing banner: stack on very narrow */
    .clvr-billing-banner {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 14px;
        font-size: 13px;
        gap: 8px;
    }

    .clvr-billing-banner__text {
        text-align: center;
        flex-basis: 100%;
    }

    /* Score ring: slightly smaller on phone */
    .clvr-score-ring {
        width: 96px;
        height: 96px;
    }

    .clvr-score-label {
        font-size: 22px;
    }

    /* Status ring in hero: slightly smaller */
    .clvr-status-ring {
        width: 60px;
        height: 60px;
    }

    .clvr-status-ring-label {
        font-size: 17px;
    }

    .clvr-status-title {
        font-size: 16px;
    }

    .clvr-status-desc {
        font-size: 12px;
    }

    /* Compliance toolbar wrapping */
    .clvr-compliance-toolbar {
        gap: 10px;
    }

    .clvr-compliance-toolbar-left {
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }

    /* Cert summary: wrap stats */
    .clvr-cert-summary {
        flex-wrap: wrap;
    }

    .clvr-cert-summary-num {
        font-size: 20px;
    }

    /* Footer bar */
    .clvr-footer-bar {
        padding-top: 16px;
        gap: 8px;
    }

    /* Zone header: tighter */
    .clvr-zone-header {
        margin-bottom: 10px;
    }
}

/* Very narrow phones: additional tightening */
@media (max-width: 360px) {
    .clvr-portal-content {
        padding: 16px 10px 40px;
    }

    .clvr-status-hero-body {
        padding: 14px 12px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .clvr-status-hero-focus {
        width: 100%;
        justify-content: center;
        gap: 16px;
    }

    .clvr-cert-card-body {
        padding: 14px 12px;
    }

    .clvr-detail-panel {
        padding: 14px 10px;
    }
}
