[x-cloak] { display: none !important; }

/* ===============================
   DESIGN TOKENS
================================ */
:root {
    /* Brand */
    --color-primary:      #2d6cdf;
    --color-primary-dark: #1f5bd3;
    --color-primary-soft: rgba(45, 108, 223, 0.10);

    /* Semantic */
    --color-success:      #22c55e;
    --color-warning:      #f59e0b;
    --color-danger:       #ef4444;
    --color-info:         #3b82f6;

    /* Neutrals */
    --color-surface:      #f6f7fb;
    --color-card:         #ffffff;
    --color-border:       #e5e7eb;
    --color-text-main:    #111827;
    --color-text-body:    #374151;
    --color-text-muted:   #6b7280;
    --color-text-subtle:  #9ca3af;

    /* Typography */
    --font-body:          'Inter', 'Segoe UI', Arial, sans-serif;

    /* Shape */
    --radius-card:        16px;
    --radius-btn:         10px;
    --radius-pill:        999px;
    --shadow-card:        0 6px 18px rgba(0, 0, 0, 0.06);
    --shadow-card-hover:  0 10px 28px rgba(0, 0, 0, 0.10);
}

/* ===============================
   GLOBAL
================================ */
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-surface);
    color: var(--color-text-body);
    font-size: 14px;
}

/* ===============================
   LAYOUT (MENU)
================================ */
.layout {
    display: flex;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 230px;
    height: 100vh;
    background: #111827;
    color: #fff;
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, left 0.25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    flex-shrink: 0;
}

.sidebar .logo {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    padding: 18px 0 14px;
    letter-spacing: -0.01em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar .logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.sidebar .nav-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4b5563;
    padding: 0 12px;
    margin: 16px 0 6px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.sidebar a i {
    font-size: 15px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.sidebar a:hover {
    background: #1f2937;
    color: #e2e8f0;
}

.sidebar .active {
    background: rgba(45,108,223,0.2);
    color: #fff;
    border-radius: 8px;
}

.sidebar .active i {
    color: #fff;
}

.sidebar-spacer {
    flex: 1;
}

.sidebar-user {
    border-top: 1px solid #1f2937;
    padding-top: 16px;
    margin-top: 8px;
}

.sidebar-user .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-user .user-email {
    font-size: 11px;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user a.logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f87171;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 4px;
}

.sidebar-user a.logout-link:hover {
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

/* ===============================
   SIDEBAR TOOLTIPS (collapsed mode)
================================ */
.sidebar a[title] { position: relative; }

.sidebar.collapsed a[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #f9fafb;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.sidebar.collapsed a[title]:hover::before {
    content: '';
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #1f2937;
    pointer-events: none;
    z-index: 999;
}

/* ===============================
   SIDEBAR COLLAPSE
================================ */
.sidebar.collapsed {
    width: 60px;
    overflow: visible;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed ~ .main-content,
.layout:has(.sidebar.collapsed) .main-content {
    margin-left: 60px;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed a span,
.sidebar.collapsed .sidebar-user .user-info,
.sidebar.collapsed .sidebar-user a.logout-link span,
.sidebar.collapsed .sidebar-user > div {
    display: none;
}

.sidebar.collapsed .logo {
    justify-content: center;
    padding: 18px 0 14px;
}

.sidebar.collapsed .logo-icon {
    margin: 0;
}

.sidebar.collapsed a {
    justify-content: center;
    padding: 12px 0;
    border-radius: 10px;
    margin: 2px 8px;
}

.sidebar.collapsed .active {
    border-radius: 10px;
    background: rgba(45,108,223,0.2);
    color: #fff;
}

.sidebar.collapsed a i {
    font-size: 18px;
    margin: 0;
}

.sidebar.collapsed .sidebar-user {
    padding: 8px 0;
    align-items: center;
}

.sidebar.collapsed .sidebar-user a.logout-link {
    justify-content: center;
    padding: 10px 0;
    width: 44px;
    margin: auto;
}

/* Sidebar hamburger toggle button in topbar */
.sidebar-toggle {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    margin-right: 8px;
    transition: background 0.15s, color 0.15s;
}

.sidebar-toggle:hover {
    background: var(--color-surface);
    color: var(--color-primary);
}

/* Mobile overlay backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 199;
}

.sidebar-backdrop.visible {
    display: block;
}

/* On mobile: sidebar starts hidden off-screen, toggle slides it in */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100vh;
        z-index: 200;
        transition: left 0.25s ease;
    }

    .sidebar.collapsed {
        left: 0;
        width: 240px;
    }

    .sidebar.collapsed .logo span,
    .sidebar.collapsed .nav-section-label,
    .sidebar.collapsed a span,
    .sidebar.collapsed .sidebar-user .user-info,
    .sidebar.collapsed a.logout-link span,
    .sidebar.collapsed .sidebar-user > div {
        display: unset;
    }

    .sidebar.collapsed a {
        justify-content: flex-start;
        padding: 10px 20px;
        margin: 0;
        border-radius: 0;
    }

    .sidebar.collapsed .logo {
        justify-content: flex-start;
        padding: 20px 20px;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

.main-content {
    flex: 1;
    background: var(--color-surface);
    min-width: 0;
    margin-left: 230px;
    transition: margin-left 0.25s ease;
}

/* ===============================
   HEADER
================================ */
.topbar {
    background: var(--color-card);
    padding: 0 20px;
    height: 62px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.logo-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-area img {
    height: 38px;
}

.logo-title {
    font-size: 18px;
    font-weight: 600;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout {
    background: var(--color-primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s;
}

.logout:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.topbar-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    flex-shrink: 0;
}

.topbar-username {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-main);
    white-space: nowrap;
}

/* ===============================
   CARD (SAFE – matches your pages)
================================ */
.card {
    border: 0;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    background: var(--color-card);
}

/* ===============================
   TABLE / DASHBOARD
================================ */
.table-hover tbody tr:hover {
    background: #f9fbff;
}

tr.pending {
    background: #fff8e1;
}

.company-name {
    font-weight: 600;
    font-size: 13px;
}

.sub-text {
    font-size: 11px;
    color: #888;
}

/* Dashboard table compact */
.table.table-hover td,
.table.table-hover th {
    font-size: 13px;
    padding: 8px 10px;
    white-space: nowrap;
}

/* Icon-only action buttons */
.action-icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===============================
   BADGE / SCORE
================================ */
.badge-soft {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--radius-pill);
    padding: 4px 10px;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0.01em;
}

.score-pill {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-weight: 700;
    font-size: 12px;
    min-width: 60px;
    text-align: center;
}

/* ===============================
   PROGRESS (SCOPED)
================================ */
.progress {
    border-radius: 10px;
}

/* ===============================
   SURVEY FORM
================================ */
.qbox {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #eee;
    transition: 0.2s;
}

.qbox:hover {
    border-color: #d0d7e2;
}

.error-msg {
    font-size: 13px;
}

/* ===============================
   WIZARD
================================ */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

/* ===============================
   STICKY BAR (SURVEY)
================================ */
.sticky-combined {
    position: sticky;
    top: 0px;
    z-index: 999;
    background: #f6f7fb;
    padding-top: 5px;
}

.sticky-combined .card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sticky-combined .btn:hover {
    transform: translateY(-1px);
}

/* ===============================
   AUTOSAVE
================================ */
#autosaveStatus {
    min-width: 140px;
    text-align: center;
    font-size: 13px;
}

/* ===============================
   START SURVEY PAGE
================================ */
.container-custom {
    max-width: 900px;
    margin: auto;
}

.company-box {
    background: #f1f3f7;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===============================
   LOGIN PAGE (ISOLATED)
================================ */

.login-page {
    background: linear-gradient(135deg, #eef2f7 0%, #dde6f5 50%, #e6ecf5 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
}

.login-page .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* LOGO */
.login-page .logo-box {
    margin-bottom: 20px;
    text-align: center;
}

.login-page .logo-box img {
    max-width: 240px;
    transition: 0.3s;
}

.login-page .logo-box img:hover {
    transform: scale(1.05);
}

.login-page .tagline {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* CARD (IMPORTANT: override global card) */
.login-page .card {
    width: 380px;
    padding: 35px;
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* TEXT */
.login-page .title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-page .subtitle {
    font-size: 13px;
    color: #777;
    margin-bottom: 25px;
}

/* INPUT */
.login-page .input-group {
    margin-bottom: 18px;
}

.login-page .input-group label {
    font-size: 13px;
    color: #444;
}

.login-page .input-group input {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 14px;
    transition: 0.2s;
}

.login-page .input-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* BUTTON */
.login-page .btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 0.01em;
}

.login-page .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(45,108,223,0.3);
}

/* ERROR */
.login-page .error {
    margin-top: 12px;
    color: red;
    font-size: 13px;
    text-align: center;
}

/* FOOTER */
.login-page .footer {
    margin-top: 15px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* ===============================
   AI REPORT DASHBOARD
================================ */

/* Sticky Header (Report Page Only) */
.report-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	margin-bottom:0 !important;
    border-bottom:none;
}

/* Big KPI number */
.big {
    font-size: 48px;
    font-weight: 800;
}

/* Colored cards */
.card-success {
    border-left: 5px solid #22c55e;
}

.card-danger {
    border-left: 5px solid #ef4444;
}

.card-warning {
    border-left: 5px solid #f59e0b;
}

/* Smooth animation */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {opacity:0;transform:translateY(10px);}
    to {opacity:1;transform:translateY(0);}
}

/* Radar chart container */
.chart-box {
    position: relative;
    height: 300px;
}

/* Section spacing */
.section-title {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* ===== PREMIUM TABS ===== */

.report-tabs-wrapper{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    background:#f3f4f6;
    padding:0 20px;
    margin:0;
    border-bottom:1px solid #e5e7eb;
}


/* TAB BASE */
.report-tab{
    position:relative;
    padding:12px 24px;
    font-weight:600;
    font-size:14px;
    color:#4b5563;
    text-decoration:none !important;

    border-radius:12px 12px 0 0;
    margin-right:4px;

    background:transparent;
    transition:all 0.25s ease;
}

/* HOVER */
.report-tab:hover{
    background:#e5e7eb;
    color:#111827 !important;
}

/* ACTIVE TAB */
.report-tab.active{
    background:linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color:white !important;

    box-shadow:0 -2px 10px rgba(0,0,0,0.08);
}

/* REMOVE GAP BELOW ACTIVE TAB */
.report-tab.active::after{
    content:'';
    position:absolute;
    bottom:-1px;
    left:0;
    width:100%;
    height:2px;
    background:white;
}

/* Left tabs group */
.tabs-left{
    display:flex;
}

/* Right section */
.tabs-right{
    padding-bottom:6px;
}

/* Back button */
.btn-back{
    display:inline-block;
    padding:6px 14px;
    background:#111827;
    color:white !important;
    text-decoration:none;
    border-radius:8px;
    font-size:13px;
    transition:0.2s;
}

.btn-back:hover{
    background:#000;
}

/* Print button */
.btn-print{
    display:inline-block;
    padding:6px 14px;
    background:#62cb31;
    color:white;
    border:none;
    border-radius:8px;
    font-size:13px;
    cursor:pointer;
    transition:0.2s;
    margin-right:8px;
}

.btn-print:hover{
    background:#50a827;
}

/* ============================================================
   SURVEY NUMBERED STEPPER
   ============================================================ */
.survey-stepper-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.survey-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    min-width: max-content;
    padding: 4px 0 8px;
}

/* connecting line between circles */
.survey-stepper::before {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% / var(--step-count, 10));
    right: calc(50% / var(--step-count, 10));
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.cat-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
    cursor: default;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    transition: all 0.25s ease;
    margin-bottom: 6px;
    position: relative;
}

.step-label {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    max-width: 80px;
    line-height: 1.3;
    transition: color 0.25s ease;
}

/* COMPLETED state */
.cat-step.completed .step-circle {
    background: var(--color-success, #22c55e);
    border-color: var(--color-success, #22c55e);
    color: #fff;
    font-size: 0;
}

.cat-step.completed .step-circle::after {
    content: '✓';
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.cat-step.completed .step-label {
    color: var(--color-success, #22c55e);
    font-weight: 500;
}

/* ACTIVE state */
.cat-step.active .step-circle {
    background: var(--color-primary, #2d6cdf);
    border-color: var(--color-primary, #2d6cdf);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.18);
    transform: scale(1.08);
}

.cat-step.active .step-label {
    color: var(--color-primary, #2d6cdf);
    font-weight: 600;
}


/****** REPORT LOADER **********/

#page-loader {	
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    top: 0;
    left: 0;
    z-index: 9999;
    display: none; /* important */
    align-items: center;
    justify-content: center;
	backdrop-filter: blur(4px);
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
}

.loader-text {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ============================================================
   MOBILE RESPONSIVE — SURVEY FORM
   ============================================================ */
@media (max-width: 768px) {

    /* Unstick the sticky nav bar — too tall on mobile */
    .sticky-combined {
        position: static !important;
    }

    /* Stepper on mobile: horizontal scroll */
    .survey-stepper-wrap {
        overflow-x: auto;
    }

    .step-label {
        font-size: 10px;
        max-width: 60px;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Survey card padding reduction */
    .container.py-4 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .card.p-4 {
        padding: 14px !important;
    }

    /* Matrix tables: already have .table-responsive wrapper, ensure min-width */
    .table-responsive table {
        min-width: 480px;
    }

    /* Prev/Next buttons: full width on small screens */
    .d-flex.gap-2 .btn {
        flex: 1;
    }

    /* Report header: stack vertically */
    .report-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .report-header .no-print {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    /* Comparison page score cards */
    .score-big {
        font-size: 32px !important;
    }
}

/* ============================================================
   PRINT / SAVE AS PDF
   ============================================================ */
@media print {

    /* Hide all non-content UI */
    .no-print,
    .report-tabs-wrapper,
    #page-loader,
    .btn-back,
    .btn-print {
        display: none !important;
    }

    /* Clean white background */
    body {
        background: #fff !important;
        font-size: 12px;
    }

    /* Remove shadows and borders on cards so they print cleanly */
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    /* Report header: show company/dept info at top of every page */
    .report-header {
        background: #fff !important;
        border-bottom: 2px solid #62cb31 !important;
        padding: 12px 0 !important;
        margin-bottom: 16px !important;
        position: static !important;
    }

    /* Keep radar/bar charts visible (canvas renders to image on print) */
    canvas {
        max-width: 100% !important;
    }

    /* Ensure full width for container */
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Avoid orphaned headings */
    h4, h5, h6 {
        break-after: avoid;
    }

    /* Row cards: stack vertically */
    .row {
        display: block !important;
    }

    .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-md-12 {
        width: 100% !important;
        display: block !important;
        padding: 0 !important;
    }

    /* Maturity scale: keep it on one line */
    .maturity-scale {
        page-break-inside: avoid;
    }

    /* Page break before major sections */
    .page-break-before {
        page-break-before: always;
    }
}

/* ===============================
   STAT CARDS (UI6 — Dashboard)
================================ */
.stat-card {
    padding: 14px 18px;
    border-radius: var(--radius-card);
    background: var(--color-card);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
}

.stat-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px;
}

.stat-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-icon--grey   { background: #f3f4f6; color: #6b7280; }
.stat-icon--green  { background: #dcfce7; color: #16a34a; }
.stat-icon--amber  { background: #fef9c3; color: #b45309; }
.stat-icon--blue   { background: #dbeafe; color: #1d4ed8; }

.stat-card__value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-text-main);
    margin-bottom: 2px;
}

.stat-card__label {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.stat-card__sub {
    font-size: 11px;
    color: var(--color-text-subtle);
    margin-top: 4px;
}

.stat-card__progress {
    height: 3px;
    border-radius: 2px;
    background: #f3f4f6;
    margin-top: 8px;
    overflow: hidden;
}

.stat-card__progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--color-success);
    transition: width 0.6s ease;
}

/* ===============================
   SCORE GAUGE (UI7 — Report)
================================ */
.score-gauge-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.score-gauge-wrap canvas {
    width: 180px !important;
    height: 180px !important;
}

.score-gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    text-align: center;
    pointer-events: none;
}

.score-gauge-number {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-text-main);
}

.score-gauge-label {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.score-kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    gap: 16px;
}

.maturity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
}

.maturity-badge--initial      { background: #fee2e2; color: #dc2626; }
.maturity-badge--developing   { background: #fef9c3; color: #92400e; }
.maturity-badge--advanced     { background: #dbeafe; color: #1d4ed8; }
.maturity-badge--mature       { background: #dcfce7; color: #15803d; }

/* ===============================
   INSIGHT CARDS (UI8 — Report)
================================ */
.insight-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin: 28px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-card {
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border-left: 4px solid transparent;
    position: relative;
}

.insight-card--strength {
    background: #f0fdf4;
    border-left-color: var(--color-success);
}

.insight-card--bottleneck {
    background: #fffbeb;
    border-left-color: var(--color-warning);
}

.insight-card--redflag {
    background: #fef2f2;
    border-left-color: var(--color-danger);
}

.insight-card--action {
    background: #eff6ff;
    border-left-color: var(--color-info);
}

.insight-card__header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.insight-card__icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.insight-card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.4;
}

.insight-card__body {
    font-size: 13px;
    color: var(--color-text-body);
    line-height: 1.5;
    margin-left: 26px;
}

.insight-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-left: 26px;
}

.insight-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
}

.insight-tag--red    { background: #fee2e2; color: #dc2626; }
.insight-tag--amber  { background: #fef9c3; color: #92400e; }
.insight-tag--green  { background: #dcfce7; color: #15803d; }
.insight-tag--blue   { background: #dbeafe; color: #1d4ed8; }
.insight-tag--grey   { background: #f3f4f6; color: #4b5563; }

.action-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 18px;
    border-radius: 12px;
    background: #eff6ff;
    border-left: 4px solid var(--color-info);
    margin-bottom: 10px;
}

.action-step__num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-info);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.action-step__content {
    flex: 1;
}

.action-step__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.action-step__result {
    font-size: 12.5px;
    color: var(--color-text-muted);
}

/* ===============================
   ROADMAP TIMELINE (UI9 — Report)
================================ */
.roadmap-timeline {
    display: flex;
    gap: 0;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.roadmap-phase {
    flex: 1;
    padding: 22px 20px;
    position: relative;
    background: #fff;
}

.roadmap-phase + .roadmap-phase {
    border-left: 1px solid var(--color-border);
}

.roadmap-phase__arrow {
    position: absolute;
    right: -12px;
    top: 22px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-right: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    transform: rotate(45deg);
    z-index: 2;
}

.roadmap-phase--30 { border-top: 4px solid #3b82f6; }
.roadmap-phase--60 { border-top: 4px solid var(--color-success); }
.roadmap-phase--90 { border-top: 4px solid #a855f7; }

.roadmap-phase__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.roadmap-phase--30 .roadmap-phase__label { color: #3b82f6; }
.roadmap-phase--60 .roadmap-phase__label { color: #16a34a; }
.roadmap-phase--90 .roadmap-phase__label { color: #a855f7; }

.roadmap-phase__items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roadmap-phase__items li {
    font-size: 13px;
    color: var(--color-text-body);
    padding-left: 16px;
    position: relative;
    line-height: 1.4;
}

.roadmap-phase__items li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.roadmap-phase--30 .roadmap-phase__items li::before { background: #3b82f6; }
.roadmap-phase--60 .roadmap-phase__items li::before { background: #16a34a; }
.roadmap-phase--90 .roadmap-phase__items li::before { background: #a855f7; }

/* ===============================
   EMPTY STATE (UI11 — Dashboard)
================================ */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-state__icon {
    font-size: 56px;
    color: #d1d5db;
    margin-bottom: 20px;
    display: block;
}

.empty-state__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 8px;
}

.empty-state__body {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===============================
   BRANDED LOADER (UI13)
================================ */
.loader-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.loader-brand-icon {
    width: 52px;
    height: 52px;
    background: var(--color-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    animation: brandPulse 1.8s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(45,108,223,0.4); }
    50%       { opacity: 0.85; transform: scale(0.96); box-shadow: 0 0 0 10px rgba(45,108,223,0); }
}

.loader-steps {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* ============================================================
   ALPINE.JS — TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    pointer-events: all;
    min-width: 280px;
    max-width: 380px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    animation: toastIn 0.25s ease;
}

.toast-item--success { background:#f0fdf4; color:#166534; border-left:4px solid #22c55e; }
.toast-item--error   { background:#fef2f2; color:#991b1b; border-left:4px solid #ef4444; }
.toast-item--info    { background:#eff6ff; color:#1e40af; border-left:4px solid #3b82f6; }
.toast-item--warning { background:#fffbeb; color:#92400e; border-left:4px solid #f59e0b; }

.toast-item i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   ALPINE.JS — CONFIRM MODAL
   ============================================================ */
.alpine-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.alpine-modal {
    background: var(--color-card, #fff);
    border-radius: 14px;
    padding: 28px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.alpine-modal__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fef9c3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
}

.alpine-modal__title {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    color: var(--color-text, #111827);
    margin-bottom: 8px;
}

.alpine-modal__body {
    font-size: 14px;
    color: var(--color-text-muted, #6b7280);
    text-align: center;
    margin-bottom: 22px;
    line-height: 1.5;
}

.alpine-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ============================================================
   ALPINE.JS — BUTTON LOADING STATE
   ============================================================ */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* ============================================================
   ALPINE.JS — REPORT TABS
   ============================================================ */
/* ============================================================
   INSIGHT TABS (Alpine tab switcher on analytics_dashboard)
   ============================================================ */
.insight-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 4px;
    background: #f3f4f6;
    border-radius: 10px;
}

.insight-tab {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.18s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.insight-tab:hover {
    background: #e5e7eb;
    color: #111827;
}

.insight-tab.active {
    background: linear-gradient(135deg, var(--color-primary, #2d6cdf), #1a4fb5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(45,108,223,0.3);
}

/* ============================================================
   ALPINE.JS — COLLAPSIBLE PANELS (portal)
   ============================================================ */
.alpine-collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    color: #999;
    font-size: 13px;
    transition: color 0.15s;
}
.alpine-collapse-btn:hover { color: #333; }

@media print {
    .insight-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .roadmap-timeline { display: flex !important; }
    .roadmap-phase { flex: 1 !important; }
    .score-gauge-wrap { width: 140px !important; height: 140px !important; }
}
