/* ===================================================================
   CAPI — Capacitación en Prevención de Infecciones
   Design System v6 - New Visual Identity
   =================================================================== */

/* ---------- Design Tokens ---------- */
:root {
    --font-sans:    'Montserrat', 'Segoe UI', Arial, sans-serif;
    --weight-body: 300;
    --weight-subtitle: 450;
    --weight-title: 650;
    /* Base Colors & Text */
    --bg-main:       #F8F9FA; /* Fondo Principal limpio */
    --text-main:     #0D47A1; /* Texto Principal y Títulos (Cobalt Blue) */
    --text-main-dark:#082C66; /* Variant for deeper contrast */
    --text-main-light:#1A62D6;

    --bg-sec:        #8ECAE6; /* Fondos Secundarios (Sky Blue) */
    --bg-sec-dark:   #6EA6C2; 
    --bg-sec-light:  #AEE2FA;

    --bg-faint:      #FFF3E0; /* Fondos Tenues (Old Lace) */
    --bg-faint-dark: #FFE5B5;

    /* Buttons, States & Accents */
    --btn-cta:       #F16D71; /* Botones Principales (Light Coral) */
    --btn-cta-hover: #D9565A;
    --btn-cta-shadow:#FCA5A8;

    --accent:        #A8E6CF; /* Acentos y Etiquetas (Pearl Aqua) */
    --accent-dark:   #7EC2A8;

    --success:       #98D8A7; /* Éxito / Completado (Celadon) */
    --warning:       #FFB74D; /* Advertencia / En Proceso (Honey Bronze) */
    
    /* Neutrals */
    --ink:          #1e293b;
    --ink-soft:     #475569;
    --slate-400:    #94a3b8;
    --slate-500:    #64748b;
    --slate-100:    #f1f5f9;

    /* Surfaces */
    --card:         rgba(255, 255, 255, 0.95);
    --card-hover:   #ffffff;

    /* Gradients */
    --gradient-body:    linear-gradient(160deg, var(--bg-main) 0%, var(--slate-100) 100%);
    --gradient-cta:     linear-gradient(135deg, var(--btn-cta), var(--btn-cta-hover));
    --gradient-brand:   linear-gradient(135deg, var(--text-main-light), var(--text-main), var(--text-main-dark));
    --gradient-sidebar: linear-gradient(160deg, #bfe8fb 0%, #8ecae6 42%, #5f93e5 100%);
    --gradient-profile: linear-gradient(145deg, #a9e2f7 0%, #6ea6e9 56%, #0e356f 100%);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--gradient-body);
    background-attachment: fixed;
    font-family: var(--font-sans);
    font-weight: var(--weight-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button,
input,
select,
textarea {
    font-family: var(--font-sans);
}

/* ---------- Background Pattern ---------- */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(13, 71, 161, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

/* ---------- Glass Card ---------- */
.glass-card {
    background: var(--card);
    border: 1px solid rgba(13, 71, 161, 0.08);
    box-shadow:
        0 8px 32px rgba(13, 71, 161, 0.05),
        0 1px 3px rgba(13, 71, 161, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    box-shadow:
        0 12px 40px rgba(13, 71, 161, 0.08),
        0 2px 6px rgba(13, 71, 161, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(13, 71, 161, 0.15);
}

/* ---------- Hover Grow ---------- */
.hover-grow {
    transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 250ms ease;
}

.hover-grow:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 12px 28px rgba(13, 71, 161, 0.08);
}

/* ---------- Buttons ---------- */
.btn-hero {
    background: var(--gradient-cta);
    color: #fff;
    font-weight: var(--weight-title);
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: filter 0.25s ease, box-shadow 0.25s ease;
}

.btn-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
    pointer-events: none;
}

.btn-hero:hover {
    filter: brightness(1.1);
    box-shadow: 0 8px 24px var(--btn-cta-shadow);
}

.btn-hero:active {
    transform: scale(0.98);
}

/* Secondary Button using Accent */
.btn-accent {
    background: var(--accent);
    color: var(--text-main-dark);
    font-weight: var(--weight-title);
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: filter 0.25s ease, box-shadow 0.25s ease;
}

.btn-accent:hover {
    filter: brightness(0.95);
    box-shadow: 0 4px 14px rgba(168, 230, 207, 0.5);
}

/* ---------- Typography ---------- */
.text-gradient {
    /* Uses text-main to a lighter blue */
    background: linear-gradient(120deg, var(--text-main-dark), var(--text-main), var(--text-main-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.display-font {
    font-family: var(--font-sans);
    font-weight: var(--weight-title);
    letter-spacing: -0.02em;
}

/* Base Title Style */
h1, h2, h3, h4, h5, h6, .title-text {
    color: var(--text-main);
    font-weight: var(--weight-title);
}

p,
li,
td,
dd,
dt,
small {
    font-weight: var(--weight-body);
}

label,
label.font-semibold,
label.font-bold,
th,
th.font-semibold,
thead,
.subtitle-text,
.font-medium {
    font-weight: var(--weight-subtitle) !important;
}

.font-semibold,
.font-bold {
    font-weight: var(--weight-title) !important;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
    animation: fadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.stagger-1 { animation-delay: 0.08s; }
.stagger-2 { animation-delay: 0.16s; }
.stagger-3 { animation-delay: 0.24s; }

/* ====================================================================
   SIDEBAR (App Layout)
   ==================================================================== */
.sidebar-shell {
    position: relative;
    overflow: hidden;
    background: var(--gradient-sidebar);
    box-shadow:
        10px 0 30px rgba(13, 71, 161, 0.16),
        inset -1px 0 0 rgba(255, 255, 255, 0.35);
}

.sidebar-content {
    position: relative;
    z-index: 1;
    min-height: 100%;
}

.sidebar-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar-bubble {
    position: absolute;
    bottom: -80px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.42),
        rgba(255, 255, 255, 0.16) 42%,
        rgba(142, 202, 230, 0.08) 70%,
        rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        inset -6px -6px 14px rgba(255, 255, 255, 0.12),
        inset 6px 6px 16px rgba(255, 255, 255, 0.22),
        0 10px 30px rgba(13, 71, 161, 0.12);
    animation: riseBubble linear infinite, sway ease-in-out infinite;
}

.sidebar-bubble:nth-child(1) { left: 10%; width: 96px; height: 96px; animation-duration: 16s, 7s; animation-delay: 0s, 0s; }
.sidebar-bubble:nth-child(2) { left: 62%; width: 56px; height: 56px; animation-duration: 19s, 8s; animation-delay: 3s, 1s; }
.sidebar-bubble:nth-child(3) { left: 20%; width: 42px; height: 42px; animation-duration: 15s, 6s; animation-delay: 5s, 1.5s; }
.sidebar-bubble:nth-child(4) { left: 70%; width: 118px; height: 118px; animation-duration: 22s, 9s; animation-delay: 2s, 0.5s; }
.sidebar-bubble:nth-child(5) { left: 44%; width: 72px; height: 72px; animation-duration: 18s, 7s; animation-delay: 8s, 2s; }
.sidebar-bubble:nth-child(6) { left: 82%; width: 36px; height: 36px; animation-duration: 13s, 5s; animation-delay: 6s, 1.5s; }

.sidebar-brand-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    border-radius: 24px;
    padding: 0.7rem 0.7rem 0.55rem;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow:
        0 16px 30px rgba(13, 71, 161, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-align: center;
    perspective: 900px;
    overflow: hidden;
}

.sidebar-brand-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    overflow: visible;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: default;
}

.sidebar-brand-bubbles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
}

.sidebar-brand-card:hover .sidebar-brand-bubbles,
.sidebar-brand-card:focus-within .sidebar-brand-bubbles,
.sidebar-brand-card.is-bubbling .sidebar-brand-bubbles {
    opacity: 1;
}

.sidebar-brand-bubble {
    position: absolute;
    left: var(--bubble-origin-x, 50%);
    top: var(--bubble-origin-y, 50%);
    width: var(--bubble-size, 20px);
    height: var(--bubble-size, 20px);
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%,
        rgba(217, 239, 255, 0.72),
        rgba(123, 170, 235, 0.34) 42%,
        rgba(34, 74, 148, 0.2) 72%,
        rgba(13, 38, 92, 0.08) 100%);
    border: 1px solid rgba(88, 133, 205, 0.34);
    box-shadow:
        inset -4px -4px 10px rgba(220, 238, 255, 0.28),
        inset 4px 4px 10px rgba(255, 255, 255, 0.16),
        0 8px 18px rgba(13, 71, 161, 0.2);
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.35);
    animation: logoBubbleBurst var(--bubble-duration, 1200ms) ease-out forwards;
}

.sidebar-logo-large {
    width: 136px;
    height: 136px;
    display: block;
    object-fit: contain;
    margin: -6px 0 -10px;
    transform: rotateX(0deg) rotateY(0deg) scale(1);
    transform-origin: center center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, filter;
    transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1), filter 220ms ease;
    background: transparent;
    filter: drop-shadow(0 10px 22px rgba(13, 71, 161, 0.18));
}

.sidebar-brand-card:hover .sidebar-logo-large,
.sidebar-brand-card:focus-within .sidebar-logo-large {
    transform: rotateX(16deg) rotateY(-16deg) scale(1.1);
    filter: drop-shadow(0 18px 30px rgba(13, 71, 161, 0.28));
}

@keyframes logoBubbleBurst {
    0% {
        transform: translate(-50%, -50%) translate(0, 0) scale(0.35);
        opacity: 0;
    }
    20% {
        opacity: var(--bubble-opacity, 0.6);
    }
    75% {
        opacity: calc(var(--bubble-opacity, 0.6) * 0.5);
    }
    100% {
        transform: translate(-50%, -50%) translate(var(--bubble-dx, 0px), var(--bubble-dy, -90px)) scale(var(--bubble-scale, 1.15));
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-logo-large {
        transition: none;
    }

    .sidebar-brand-bubbles,
    .sidebar-brand-bubble {
        animation: none !important;
        transition: none;
    }
}

.sidebar-brand-title {
    margin: 0;
    font-size: 1.82rem;
    line-height: 1;
    letter-spacing: 0.08em;
    color: var(--text-main-dark);
    font-weight: 700;
}

.sidebar-brand-subtitle {
    margin: 0;
    max-width: 13rem;
    font-size: 0.72rem;
    line-height: 1.45;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(8, 44, 102, 0.68);
    font-weight: var(--weight-subtitle);
}

.sidebar-nav-panel {
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 24px 42px rgba(13, 71, 161, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 18px;
    padding: 0.8rem 0.9rem;
    font-weight: var(--weight-subtitle);
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.nav-active {
    background: var(--gradient-brand);
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(13, 71, 161, 0.22);
}

.sidebar-profile-wrap {
    padding: 0 0.75rem 0.85rem;
}

.sidebar-profile-button {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 0;
    border-radius: 22px;
    padding: 0.95rem 1rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.sidebar-profile-button:hover {
    background: rgba(255, 255, 255, 0.84);
}

.sidebar-avatar-chip {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 0;
    color: #fff;
    font-size: 0.92rem;
    font-weight: var(--weight-title);
    background: var(--gradient-profile);
    box-shadow:
        0 12px 22px rgba(13, 71, 161, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sidebar-avatar-chip-sm {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.75rem;
}

.sidebar-avatar-chip-lg {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 1.2rem;
    font-size: 1.15rem;
}

.sidebar-profile-popup {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 28px 46px rgba(13, 71, 161, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.sidebar-profile-item,
.sidebar-logout-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 0;
    border-radius: 18px;
    padding: 0.8rem 0.85rem;
    cursor: pointer;
    text-decoration: none;
    color: #334155;
    background: transparent;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.sidebar-profile-item:hover {
    background: rgba(191, 232, 251, 0.38);
    color: var(--text-main-dark);
}

.sidebar-profile-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: rgba(191, 232, 251, 0.42);
}

.sidebar-logout-button {
    color: #e05f67;
}

.sidebar-logout-button:hover {
    background: rgba(255, 228, 230, 0.9);
}

@media (max-width: 767px) {
    .sidebar-shell {
        box-shadow:
            16px 0 34px rgba(13, 71, 161, 0.24),
            inset -1px 0 0 rgba(255, 255, 255, 0.3);
    }
}

/* ====================================================================
   MODULE EDIT
   ==================================================================== */
.module-edit-shell {
    --module-edit-navy: #163f83;
    --module-edit-sky: #74b7ef;
    --module-edit-green: #79c49f;
    --module-edit-orange: #f2af58;
}

.module-edit-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(116, 183, 239, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(121, 196, 159, 0.16), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
}

.module-edit-hero-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.85;
}

.module-edit-hero-glow--sky {
    top: -2rem;
    right: -1rem;
    width: 13rem;
    height: 13rem;
    background: radial-gradient(circle, rgba(116, 183, 239, 0.22), rgba(116, 183, 239, 0));
}

.module-edit-hero-glow--green {
    left: -2rem;
    bottom: -4rem;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(121, 196, 159, 0.18), rgba(121, 196, 159, 0));
}

.module-edit-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.35rem;
}

.module-edit-eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #7b8ea8;
}

.module-edit-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1;
}

.module-edit-subtitle {
    margin: 0.95rem 0 0;
    max-width: 46rem;
    color: #61758f;
    font-size: 0.98rem;
    line-height: 1.7;
}

.module-edit-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.15rem;
}

.module-edit-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 1.1rem;
    color: #42536c;
    font-size: 0.88rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.module-edit-chip strong {
    color: #11284c;
    font-size: 1rem;
}

.module-edit-chip--sky {
    background: rgba(227, 243, 255, 0.94);
}

.module-edit-chip--green {
    background: rgba(227, 246, 236, 0.94);
}

.module-edit-chip--orange {
    background: rgba(255, 240, 217, 0.94);
}

.module-edit-chip--navy {
    background: rgba(227, 235, 255, 0.94);
}

.module-edit-hero-side {
    display: grid;
    gap: 0.85rem;
}

.module-edit-mini-card {
    border-radius: 1.35rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.64);
    box-shadow:
        0 14px 28px rgba(13, 71, 161, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.module-edit-mini-card--sky {
    background: linear-gradient(135deg, rgba(229, 245, 255, 0.96), rgba(211, 237, 255, 0.92));
}

.module-edit-mini-card--green {
    background: linear-gradient(135deg, rgba(230, 247, 236, 0.96), rgba(212, 241, 224, 0.92));
}

.module-edit-mini-card--orange {
    background: linear-gradient(135deg, rgba(255, 243, 220, 0.97), rgba(255, 232, 197, 0.92));
}

.module-edit-mini-label {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #69809f;
}

.module-edit-mini-value {
    margin: 0.55rem 0 0;
    color: #14305b;
    font-size: 1.65rem;
    line-height: 1.08;
    font-weight: var(--weight-title);
}

.module-edit-mini-note {
    margin: 0.45rem 0 0;
    color: #61758f;
    font-size: 0.84rem;
}

.module-edit-form {
    display: grid;
    gap: 1.2rem;
}

.module-edit-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.module-edit-section-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: 1.5rem;
    line-height: 1.08;
    font-weight: var(--weight-title);
}

.module-edit-grid {
    display: grid;
    gap: 1rem;
}

.module-edit-field span {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6f84a0;
}

.module-edit-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    color: #233551;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.module-edit-input:focus {
    outline: none;
    border-color: rgba(14, 53, 111, 0.28);
    box-shadow:
        0 0 0 4px rgba(116, 183, 239, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.module-edit-upload-card {
    border-radius: 1.2rem;
    padding: 1rem 1.05rem;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(236, 243, 251, 0.92));
    border: 1px solid rgba(13, 71, 161, 0.08);
}

.module-edit-upload-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.module-edit-upload-title {
    margin: 0;
    color: #203451;
    font-size: 0.96rem;
    font-weight: var(--weight-title);
}

.module-edit-upload-copy {
    margin: 0.35rem 0 0;
    color: #667a95;
    font-size: 0.84rem;
    line-height: 1.6;
}

.module-edit-resource-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(13, 71, 161, 0.1);
    color: #1e4f97;
    font-size: 0.82rem;
    font-weight: var(--weight-subtitle);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-edit-resource-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(14, 53, 111, 0.08);
}

.module-edit-file-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px dashed rgba(13, 71, 161, 0.2);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.8rem 0.9rem;
    color: #355070;
    font-size: 0.9rem;
}

.module-edit-file-input::file-selector-button {
    margin-right: 0.85rem;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, rgba(22, 63, 131, 0.95), rgba(116, 183, 239, 0.92));
    color: #fff;
    font-size: 0.82rem;
    font-weight: var(--weight-title);
    cursor: pointer;
}

.module-edit-upload-meta {
    margin: 0.75rem 0 0;
    color: #69809f;
    font-size: 0.83rem;
    line-height: 1.55;
}

.module-edit-textarea {
    resize: vertical;
    min-height: 9rem;
}

.module-edit-split {
    display: grid;
    gap: 1.2rem;
}

.module-edit-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 1.2rem;
    padding: 1rem 1.05rem;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(235, 242, 250, 0.92));
    border: 1px solid rgba(13, 71, 161, 0.06);
}

.module-edit-toggle-title {
    margin: 0;
    color: #203451;
    font-size: 1rem;
    font-weight: var(--weight-title);
}

.module-edit-toggle-copy {
    margin: 0.45rem 0 0;
    color: #667a95;
    font-size: 0.86rem;
    line-height: 1.6;
}

.module-edit-switch {
    position: relative;
    width: 3.7rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.module-edit-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.module-edit-switch span {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.9);
    transition: background-color 0.22s ease;
}

.module-edit-switch span::after {
    content: '';
    position: absolute;
    top: 0.22rem;
    left: 0.24rem;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    transition: transform 0.22s ease;
}

.module-edit-switch input:checked + span {
    background: linear-gradient(135deg, rgba(121, 196, 159, 0.98), rgba(110, 166, 233, 0.92));
}

.module-edit-switch input:checked + span::after {
    transform: translateX(1.38rem);
}

.module-edit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.module-edit-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: #43536c;
    font-size: 0.9rem;
    font-weight: var(--weight-title);
    text-decoration: none;
}

@media (min-width: 960px) {
    .module-edit-hero-inner {
        grid-template-columns: minmax(0, 1.5fr) minmax(15rem, 19rem);
        align-items: center;
    }

    .module-edit-hero-side {
        grid-template-columns: 1fr;
    }

    .module-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-edit-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .module-edit-upload-head {
        flex-direction: column;
    }

    .module-edit-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .module-edit-secondary-btn,
    .module-edit-actions .btn-hero {
        width: 100%;
        text-align: center;
    }
}

/* ====================================================================
   QUESTIONS
   ==================================================================== */
.questions-shell {
    --questions-navy: #163f83;
    --questions-sky: #74b7ef;
    --questions-green: #79c49f;
    --questions-orange: #f2af58;
}

.questions-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(116, 183, 239, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(242, 175, 88, 0.14), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
}

.questions-hero-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.85;
}

.questions-hero-glow--sky {
    top: -2rem;
    right: -1rem;
    width: 12rem;
    height: 12rem;
    background: radial-gradient(circle, rgba(116, 183, 239, 0.22), rgba(116, 183, 239, 0));
}

.questions-hero-glow--orange {
    left: -2rem;
    bottom: -4rem;
    width: 14rem;
    height: 14rem;
    background: radial-gradient(circle, rgba(242, 175, 88, 0.18), rgba(242, 175, 88, 0));
}

.questions-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.35rem;
}

.questions-eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #7b8ea8;
}

.questions-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1;
}

.questions-subtitle,
.questions-section-copy {
    margin: 0.9rem 0 0;
    color: #61758f;
    font-size: 0.98rem;
    line-height: 1.7;
}

.questions-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.15rem;
}

.questions-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 1.1rem;
    color: #42536c;
    font-size: 0.88rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.questions-chip strong {
    color: #11284c;
    font-size: 1rem;
}

.questions-chip--sky {
    background: rgba(227, 243, 255, 0.94);
}

.questions-chip--green {
    background: rgba(227, 246, 236, 0.94);
}

.questions-chip--navy {
    background: rgba(227, 235, 255, 0.94);
}

.questions-hero-side {
    display: grid;
    gap: 0.85rem;
}

.questions-mini-card {
    border-radius: 1.35rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.64);
    box-shadow:
        0 14px 28px rgba(13, 71, 161, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.questions-mini-card--sky {
    background: linear-gradient(135deg, rgba(229, 245, 255, 0.96), rgba(211, 237, 255, 0.92));
}

.questions-mini-card--orange {
    background: linear-gradient(135deg, rgba(255, 243, 220, 0.97), rgba(255, 232, 197, 0.92));
}

.questions-mini-label {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #69809f;
}

.questions-mini-value {
    margin: 0.55rem 0 0;
    color: #14305b;
    font-size: 2rem;
    line-height: 1;
    font-weight: var(--weight-title);
}

.questions-mini-note {
    margin: 0.45rem 0 0;
    color: #61758f;
    font-size: 0.84rem;
}

.questions-hero-action,
.questions-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.questions-section-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: 1.5rem;
    line-height: 1.08;
    font-weight: var(--weight-title);
}

.questions-upload {
    background: linear-gradient(135deg, rgba(255, 247, 233, 0.98), rgba(255, 239, 214, 0.95));
}

.questions-upload-head,
.questions-list-head,
.questions-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.questions-secondary-btn,
.questions-edit-btn,
.questions-delete-btn,
.questions-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    font-size: 0.84rem;
    font-weight: var(--weight-title);
    text-decoration: none;
}

.questions-secondary-btn,
.questions-edit-btn,
.questions-close-btn {
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: #43536c;
}

.questions-delete-btn {
    border: 1px solid rgba(244, 63, 94, 0.12);
    background: rgba(255, 228, 230, 0.92);
    color: #d6455d;
}

.questions-list {
    margin-top: 1.35rem;
    display: grid;
    gap: 1rem;
}

.questions-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(13, 71, 161, 0.08);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(234, 242, 250, 0.94));
    padding: 1.15rem;
}

.questions-card-top {
    display: grid;
    gap: 1rem;
}

.questions-card-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(227, 235, 255, 0.96);
    color: #285796;
    font-size: 0.8rem;
    font-weight: var(--weight-title);
}

.questions-card-title {
    margin: 0;
    color: #1b2d49;
    font-size: 1.08rem;
    line-height: 1.55;
    font-weight: var(--weight-title);
}

.questions-card-meta {
    margin: 0.6rem 0 0;
    color: #667a95;
    font-size: 0.88rem;
}

.questions-card-meta strong {
    color: #18345d;
}

.questions-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.questions-options-grid {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.1rem;
}

.questions-option {
    border-radius: 1.1rem;
    border: 1px solid rgba(13, 71, 161, 0.08);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.9rem 1rem;
}

.questions-option--correct {
    background: linear-gradient(180deg, rgba(228, 246, 236, 0.98), rgba(214, 241, 225, 0.95));
    border-color: rgba(121, 196, 159, 0.28);
}

.questions-option-key {
    display: inline-block;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7790ab;
}

.questions-option-text {
    margin: 0.45rem 0 0;
    color: #243652;
    font-size: 0.95rem;
    line-height: 1.6;
}

.questions-empty {
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: rgba(247, 250, 255, 0.9);
    color: #64748b;
    text-align: center;
}

.questions-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(9, 21, 45, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.questions-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.questions-label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6f84a0;
}

.questions-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    color: #233551;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.questions-input:focus {
    outline: none;
    border-color: rgba(14, 53, 111, 0.28);
    box-shadow:
        0 0 0 4px rgba(116, 183, 239, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.questions-textarea {
    resize: vertical;
    min-height: 8rem;
}

.questions-form-grid {
    display: grid;
    gap: 1rem;
}

.questions-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (min-width: 960px) {
    .questions-hero-inner {
        grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 20rem) auto;
        align-items: center;
    }

    .questions-card-top {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
    }

    .questions-options-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .questions-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .questions-hero,
    .questions-upload,
    .questions-list-panel,
    .questions-modal {
        padding: 1.15rem;
    }

    .questions-secondary-btn,
    .questions-edit-btn,
    .questions-delete-btn,
    .questions-close-btn {
        width: 100%;
    }

    .questions-modal-actions {
        flex-direction: column-reverse;
    }
}

/* ====================================================================
   MODULES
   ==================================================================== */
.modules-shell {
    --modules-navy: #163f83;
    --modules-sky: #74b7ef;
    --modules-green: #79c49f;
    --modules-orange: #f2af58;
}

.modules-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(116, 183, 239, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(121, 196, 159, 0.16), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
}

.modules-hero-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.85;
}

.modules-hero-glow--sky {
    top: -2rem;
    right: -1rem;
    width: 13rem;
    height: 13rem;
    background: radial-gradient(circle, rgba(116, 183, 239, 0.22), rgba(116, 183, 239, 0));
}

.modules-hero-glow--green {
    left: -2rem;
    bottom: -4rem;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(121, 196, 159, 0.18), rgba(121, 196, 159, 0));
}

.modules-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.4rem;
}

.modules-eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #7a8ea8;
}

.modules-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    line-height: 0.98;
}

.modules-subtitle {
    margin: 0.95rem 0 0;
    max-width: 46rem;
    color: #61758f;
    font-size: 1rem;
    line-height: 1.7;
}

.modules-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.15rem;
}

.modules-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 1.1rem;
    color: #42536c;
    font-size: 0.88rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.modules-chip strong {
    color: #12284b;
    font-size: 1rem;
}

.modules-chip--sky {
    background: rgba(227, 243, 255, 0.94);
}

.modules-chip--green {
    background: rgba(227, 246, 236, 0.94);
}

.modules-chip--orange {
    background: rgba(255, 240, 217, 0.94);
}

.modules-chip--navy {
    background: rgba(227, 235, 255, 0.94);
}

.modules-hero-side {
    display: grid;
    gap: 0.85rem;
}

.modules-mini-card {
    border-radius: 1.4rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 14px 28px rgba(13, 71, 161, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.modules-mini-card--sky {
    background: linear-gradient(135deg, rgba(229, 245, 255, 0.96), rgba(211, 237, 255, 0.92));
}

.modules-mini-card--green {
    background: linear-gradient(135deg, rgba(230, 247, 236, 0.96), rgba(212, 241, 224, 0.92));
}

.modules-mini-card--orange {
    background: linear-gradient(135deg, rgba(255, 243, 220, 0.97), rgba(255, 232, 197, 0.92));
}

.modules-mini-label {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #69809f;
}

.modules-mini-value {
    margin: 0.55rem 0 0;
    color: #14305b;
    font-size: 2rem;
    line-height: 1;
    font-weight: var(--weight-title);
}

.modules-mini-note {
    margin: 0.45rem 0 0;
    color: #61758f;
    font-size: 0.84rem;
}

.modules-hero-action {
    display: flex;
    align-items: flex-end;
}

.modules-empty {
    text-align: center;
}

.modules-empty-title {
    margin: 0;
    color: var(--text-main-dark);
    font-size: 1.4rem;
    font-weight: var(--weight-title);
}

.modules-empty-copy {
    margin: 0.7rem auto 0;
    max-width: 34rem;
    color: #637790;
    line-height: 1.7;
}

.modules-grid {
    display: grid;
    gap: 1.25rem;
}

.modules-card {
    position: relative;
    overflow: hidden;
    padding: 1.35rem;
    border-radius: 1.7rem;
}

.modules-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 0.34rem;
}

.modules-card--navy::before {
    background: var(--modules-navy);
}

.modules-card--sky::before {
    background: var(--modules-sky);
}

.modules-card--green::before {
    background: var(--modules-green);
}

.modules-card--orange::before {
    background: var(--modules-orange);
}

.modules-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.modules-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.modules-category-badge,
.modules-state-badge,
.modules-meta-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
    font-weight: var(--weight-title);
}

.modules-category-badge--navy {
    background: rgba(227, 235, 255, 0.96);
    color: #305899;
}

.modules-category-badge--sky {
    background: rgba(228, 244, 255, 0.96);
    color: #397ab0;
}

.modules-category-badge--green {
    background: rgba(228, 246, 236, 0.96);
    color: #2f7c59;
}

.modules-category-badge--orange {
    background: rgba(255, 241, 220, 0.96);
    color: #c37d20;
}

.modules-state-badge--active,
.modules-meta-tag--green {
    background: rgba(228, 246, 236, 0.96);
    color: #2f7c59;
}

.modules-state-badge--inactive {
    background: rgba(238, 243, 248, 0.96);
    color: #70829b;
}

.modules-card-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #fff;
    box-shadow: 0 12px 24px rgba(13, 71, 161, 0.14);
}

.modules-card-icon--navy {
    background: linear-gradient(135deg, rgba(22, 63, 131, 0.95), rgba(60, 102, 182, 0.9));
}

.modules-card-icon--sky {
    background: linear-gradient(135deg, rgba(73, 135, 189, 0.95), rgba(116, 183, 239, 0.9));
}

.modules-card-icon--green {
    background: linear-gradient(135deg, rgba(63, 141, 104, 0.95), rgba(121, 196, 159, 0.9));
}

.modules-card-icon--orange {
    background: linear-gradient(135deg, rgba(195, 125, 32, 0.95), rgba(242, 175, 88, 0.9));
}

.modules-card-title {
    margin: 1rem 0 0;
    color: #1b2d49;
    font-size: 1.5rem;
    line-height: 1.15;
    font-weight: var(--weight-title);
}

.modules-card-copy {
    margin: 0.85rem 0 0;
    color: #637790;
    font-size: 0.95rem;
    line-height: 1.75;
}

.modules-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.modules-detail-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.9rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(235, 242, 250, 0.92));
    color: #62748d;
    font-size: 0.85rem;
    border: 1px solid rgba(13, 71, 161, 0.06);
}

.modules-detail-pill strong {
    color: #13284e;
}

.modules-footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.2rem;
}

.modules-meta-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.modules-meta-tag--slate {
    background: rgba(238, 243, 248, 0.96);
    color: #70829b;
}

.modules-meta-text {
    color: #71849c;
    font-size: 0.82rem;
}

.modules-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.modules-primary-btn,
.modules-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    padding: 0.85rem 1.05rem;
    border-radius: 1rem;
    font-size: 0.84rem;
    font-weight: var(--weight-title);
    text-decoration: none;
}

.modules-primary-btn {
    background: linear-gradient(135deg, rgba(15, 28, 60, 0.98), rgba(26, 43, 84, 0.94));
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 28, 60, 0.14);
}

.modules-secondary-btn {
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: #43536c;
}

@media (min-width: 960px) {
    .modules-hero-inner {
        grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 22rem) auto;
        align-items: center;
    }

    .modules-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .modules-card,
    .modules-mini-card {
        padding: 1.1rem;
    }

    .modules-primary-btn,
    .modules-secondary-btn {
        width: 100%;
    }
}

/* ====================================================================
   CERTIFICATE TEMPLATES
   ==================================================================== */
.template-library-shell,
.template-editor-shell {
    --template-navy: #163f83;
    --template-sky: #74b7ef;
    --template-green: #79c49f;
    --template-orange: #f2af58;
}

.template-library-hero,
.template-editor-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(116, 183, 239, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(242, 175, 88, 0.14), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
}

.template-library-glow,
.template-editor-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.85;
}

.template-library-glow--sky,
.template-editor-glow--sky {
    top: -2rem;
    right: -1rem;
    width: 14rem;
    height: 14rem;
    background: radial-gradient(circle, rgba(116, 183, 239, 0.22), rgba(116, 183, 239, 0));
}

.template-library-glow--orange {
    left: -2rem;
    bottom: -4rem;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(242, 175, 88, 0.18), rgba(242, 175, 88, 0));
}

.template-editor-glow--green {
    left: -2rem;
    bottom: -4rem;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(121, 196, 159, 0.18), rgba(121, 196, 159, 0));
}

.template-library-hero-inner,
.template-editor-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.35rem;
}

.template-library-eyebrow,
.template-editor-eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #7b8ea8;
}

.template-library-title,
.template-editor-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1;
}

.template-library-subtitle,
.template-editor-subtitle {
    margin: 0.95rem 0 0;
    max-width: 46rem;
    color: #61758f;
    font-size: 0.98rem;
    line-height: 1.7;
}

.template-library-chip-row,
.template-editor-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.15rem;
}

.template-library-chip,
.template-editor-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 1.1rem;
    color: #42536c;
    font-size: 0.88rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.template-library-chip strong,
.template-editor-chip strong {
    color: #11284c;
    font-size: 1rem;
}

.template-library-chip--navy,
.template-editor-chip--navy {
    background: rgba(227, 235, 255, 0.94);
}

.template-library-chip--sky,
.template-editor-chip--sky {
    background: rgba(227, 243, 255, 0.94);
}

.template-library-chip--green,
.template-editor-chip--green {
    background: rgba(227, 246, 236, 0.94);
}

.template-library-chip--orange,
.template-editor-chip--orange {
    background: rgba(255, 240, 217, 0.94);
}

.template-library-actions,
.template-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-content: start;
}

.template-library-grid {
    display: grid;
    gap: 1.2rem;
}

.template-card,
.template-editor-result-box,
.template-preview-result {
    border-radius: 1.4rem;
    border: 1px solid rgba(13, 71, 161, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 249, 255, 0.92));
    box-shadow:
        0 18px 40px rgba(13, 71, 161, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.template-card-preview {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1.35rem 1.35rem 0 0;
    background: rgba(238, 244, 252, 0.9);
}

.template-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 19, 42, 0.3);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.template-card:hover .template-card-overlay {
    opacity: 1;
}

.template-card-body {
    padding: 1.1rem;
}

.template-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.template-card-head h2,
.template-library-empty h2,
.template-editor-section-title {
    margin: 0;
    color: #17345f;
    font-size: 1.25rem;
    font-weight: var(--weight-title);
}

.template-card-head p,
.template-library-empty p,
.template-editor-section-copy,
.template-editor-hint,
.template-editor-result-box p,
.template-preview-result p {
    margin: 0.45rem 0 0;
    color: #667a95;
    font-size: 0.9rem;
    line-height: 1.6;
}

.template-card-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    background: rgba(227, 246, 236, 0.92);
    color: #2b7a57;
    font-size: 0.76rem;
    font-weight: var(--weight-title);
    white-space: nowrap;
}

.template-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1rem;
    color: #69809f;
    font-size: 0.82rem;
}

.template-card-stats strong {
    color: #17345f;
    font-weight: var(--weight-title);
}

.template-card-actions,
.template-editor-result-actions,
.template-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.template-card-primary,
.template-card-secondary,
.template-editor-secondary-btn,
.template-editor-preview-btn,
.template-editor-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    padding: 0.85rem 1.05rem;
    border-radius: 1rem;
    font-size: 0.84rem;
    font-weight: var(--weight-title);
    text-decoration: none;
}

.template-card-primary,
.template-editor-preview-btn {
    background: linear-gradient(135deg, rgba(15, 28, 60, 0.98), rgba(26, 43, 84, 0.94));
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 28, 60, 0.14);
    border: 0;
}

.template-card-secondary,
.template-editor-secondary-btn,
.template-editor-inline-btn--light {
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: #43536c;
}

.template-editor-inline-btn {
    min-width: 0;
}

.template-library-empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.template-library-empty-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(227, 243, 255, 0.92);
    color: #3b6ea2;
}

.template-editor-layout {
    display: grid;
    gap: 1.2rem;
}

.template-editor-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.template-editor-field span {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6f84a0;
}

.template-editor-input,
.template-editor-file-input,
.template-editor-color-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    color: #233551;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.template-editor-input:focus,
.template-editor-file-input:focus {
    outline: none;
    border-color: rgba(14, 53, 111, 0.28);
    box-shadow:
        0 0 0 4px rgba(116, 183, 239, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.template-editor-file-input::file-selector-button {
    margin-right: 0.85rem;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, rgba(22, 63, 131, 0.95), rgba(116, 183, 239, 0.92));
    color: #fff;
    font-size: 0.82rem;
    font-weight: var(--weight-title);
    cursor: pointer;
}

.template-editor-color-input {
    min-height: 3.1rem;
    padding: 0.45rem;
}

.template-editor-tools {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-editor-tool-btn,
.template-editor-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(13, 71, 161, 0.1);
    background: rgba(255, 255, 255, 0.86);
    color: #31517f;
    font-size: 0.84rem;
    font-weight: var(--weight-title);
}

.template-editor-tool-btn--qr {
    grid-column: 1 / -1;
    background: rgba(228, 246, 242, 0.96);
    color: #187d77;
}

.template-editor-danger-btn {
    width: 100%;
    background: rgba(252, 229, 234, 0.96);
    color: #ce5a72;
}

.template-editor-stage {
    position: relative;
    min-height: 620px;
    border-radius: 1.5rem;
    border: 2px dashed rgba(148, 163, 184, 0.35);
    background: linear-gradient(180deg, rgba(241, 246, 253, 0.96), rgba(234, 241, 249, 0.92));
    padding: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    text-align: center;
    white-space: nowrap;
    box-shadow: inset 0 10px 24px rgba(13, 71, 161, 0.06);
}

.template-editor-stage .canvas-container {
    margin: 0 auto;
    display: inline-block;
    vertical-align: middle;
}

.template-editor-stage-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #91a3ba;
    text-align: center;
    padding: 1.5rem;
}

.template-preview-modal {
    width: min(100%, 820px);
    max-height: calc(100vh - 3rem);
    overflow: auto;
}

.template-preview-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(13, 71, 161, 0.1);
    background: rgba(255, 255, 255, 0.8);
    color: #4a607d;
}

.template-preview-form {
    display: grid;
    gap: 1rem;
}

.template-preview-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 960px) {
    .template-library-hero-inner,
    .template-editor-hero-inner {
        grid-template-columns: minmax(0, 1.5fr) auto;
        align-items: center;
    }

    .template-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .template-editor-layout {
        grid-template-columns: minmax(19rem, 24rem) minmax(0, 1fr);
    }

    .template-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .template-library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .template-library-actions,
    .template-editor-actions,
    .template-card-actions,
    .template-preview-actions,
    .template-editor-result-actions {
        flex-direction: column;
    }

    .template-card-primary,
    .template-card-secondary,
    .template-editor-secondary-btn,
    .template-editor-preview-btn,
    .template-editor-inline-btn,
    .template-editor-actions .btn-hero,
    .template-preview-actions .btn-hero {
        width: 100%;
    }

    .template-library-empty,
    .template-card-head,
    .template-editor-section-head {
        flex-direction: column;
    }

    .template-editor-tools {
        grid-template-columns: 1fr;
    }

    .template-editor-tool-btn--qr {
        grid-column: auto;
    }
}

/* ====================================================================
   USERS
   ==================================================================== */
.users-shell {
    --users-navy: #163f83;
    --users-sky: #74b7ef;
    --users-green: #79c49f;
    --users-orange: #f2af58;
}

.users-hero,
.reports-hero {
    position: relative;
    overflow: hidden;
}

.users-hero {
    background:
        radial-gradient(circle at top right, rgba(116, 183, 239, 0.18), transparent 26%),
        radial-gradient(circle at bottom left, rgba(121, 196, 159, 0.16), transparent 22%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
}

.users-hero-glow,
.reports-hero-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.85;
}

.users-hero-glow--sky {
    top: -2rem;
    right: -1rem;
    width: 14rem;
    height: 14rem;
    background: radial-gradient(circle, rgba(116, 183, 239, 0.24), rgba(116, 183, 239, 0));
}

.users-hero-glow--green {
    left: -2rem;
    bottom: -4rem;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(121, 196, 159, 0.18), rgba(121, 196, 159, 0));
}

.users-hero-inner,
.reports-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.35rem;
}

.users-eyebrow,
.reports-eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #7b8ea8;
}

.users-title,
.reports-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1;
}

.users-subtitle,
.reports-subtitle {
    margin: 0.95rem 0 0;
    max-width: 46rem;
    color: #61758f;
    font-size: 0.98rem;
    line-height: 1.7;
}

.users-chip-row,
.reports-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.15rem;
}

.users-chip,
.reports-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 1.1rem;
    color: #42536c;
    font-size: 0.88rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.users-chip strong,
.reports-chip strong {
    color: #11284c;
    font-size: 1rem;
}

.users-chip--navy,
.reports-chip--navy {
    background: rgba(227, 235, 255, 0.94);
}

.users-chip--sky,
.reports-chip--sky {
    background: rgba(227, 243, 255, 0.94);
}

.users-chip--green,
.reports-chip--green {
    background: rgba(227, 246, 236, 0.94);
}

.users-chip--orange,
.reports-chip--orange {
    background: rgba(255, 240, 217, 0.94);
}

.users-hero-side,
.reports-hero-side {
    display: grid;
    gap: 0.85rem;
}

.users-mini-card,
.reports-mini-card,
.users-stat-card,
.reports-kpi-card,
.reports-type-card {
    border-radius: 1.35rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.64);
    box-shadow:
        0 14px 28px rgba(13, 71, 161, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.users-mini-card--sky,
.users-stat-card--sky,
.reports-mini-card--sky,
.reports-kpi-card--sky,
.reports-type-card--sky {
    background: linear-gradient(135deg, rgba(229, 245, 255, 0.96), rgba(211, 237, 255, 0.92));
}

.users-mini-card--orange,
.users-stat-card--orange,
.reports-kpi-card--orange {
    background: linear-gradient(135deg, rgba(255, 243, 220, 0.97), rgba(255, 232, 197, 0.92));
}

.users-stat-card--navy,
.reports-kpi-card--navy,
.reports-type-card--navy {
    background: linear-gradient(135deg, rgba(232, 238, 255, 0.98), rgba(216, 228, 255, 0.92));
}

.users-stat-card--green,
.reports-mini-card--green,
.reports-kpi-card--green,
.reports-type-card--green {
    background: linear-gradient(135deg, rgba(230, 247, 236, 0.96), rgba(212, 241, 224, 0.92));
}

.users-mini-label,
.reports-mini-label,
.users-stat-label,
.reports-kpi-label,
.reports-type-label {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #69809f;
}

.users-mini-value,
.reports-mini-value,
.users-stat-value,
.reports-kpi-value,
.reports-type-value {
    margin: 0.55rem 0 0;
    color: #14305b;
    font-size: 1.65rem;
    line-height: 1.08;
    font-weight: var(--weight-title);
}

.reports-kpi-value {
    font-size: clamp(1.8rem, 2.8vw, 2.25rem);
}

.users-mini-note,
.reports-mini-note,
.users-stat-note,
.reports-kpi-note,
.reports-type-note {
    margin: 0.45rem 0 0;
    color: #61758f;
    font-size: 0.84rem;
    line-height: 1.55;
}

.users-section-head,
.reports-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.users-section-head--spread {
    margin-bottom: 1.2rem;
}

.users-section-title,
.reports-section-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: 1.5rem;
    line-height: 1.08;
    font-weight: var(--weight-title);
}

.users-section-copy,
.reports-section-copy {
    margin: 0.55rem 0 0;
    color: #667a95;
    font-size: 0.92rem;
    line-height: 1.65;
}

.users-pending-grid {
    display: grid;
    gap: 1rem;
}

.users-request-card,
.users-row-card,
.reports-module-card,
.reports-dept-card,
.reports-empty-card {
    border-radius: 1.4rem;
    border: 1px solid rgba(13, 71, 161, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 249, 255, 0.92));
    box-shadow:
        0 18px 40px rgba(13, 71, 161, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.users-request-card {
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
}

.users-request-head,
.users-row-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.users-request-copy h3,
.users-row-titleline h3,
.reports-module-title,
.reports-dept-head h3,
.reports-empty-card h3 {
    margin: 0;
    color: #1a2f57;
    font-size: 1.05rem;
    font-weight: var(--weight-title);
}

.users-request-copy p,
.users-row-email,
.reports-module-copy,
.reports-empty-card p {
    margin: 0.4rem 0 0;
    color: #667a95;
    font-size: 0.9rem;
    line-height: 1.6;
}

.users-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(116, 183, 239, 0.96), rgba(22, 63, 131, 0.96));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow:
        0 14px 26px rgba(22, 63, 131, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.users-avatar--small {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
}

.users-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.users-pill-row--compact {
    justify-content: flex-end;
}

.users-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    font-size: 0.76rem;
    font-weight: var(--weight-subtitle);
}

.users-pill--navy {
    background: rgba(229, 236, 255, 0.95);
    color: #2856aa;
}

.users-pill--sky {
    background: rgba(230, 246, 255, 0.95);
    color: #376a95;
}

.users-pill--green {
    background: rgba(232, 246, 239, 0.95);
    color: #2d7b58;
}

.users-request-actions,
.users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.users-danger-btn,
.users-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    font-size: 0.84rem;
    font-weight: var(--weight-title);
    text-decoration: none;
}

.users-danger-btn {
    border: 0;
    background: linear-gradient(135deg, rgba(252, 227, 233, 0.96), rgba(255, 212, 221, 0.92));
    color: #d84d67;
}

.users-stats-grid,
.reports-kpi-grid,
.reports-type-grid {
    display: grid;
    gap: 1rem;
}

.users-filter-bar {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(238, 244, 251, 0.94));
    border: 1px solid rgba(13, 71, 161, 0.06);
}

.users-search-wrap {
    position: relative;
    display: block;
}

.users-search-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    width: 1rem;
    height: 1rem;
    transform: translateY(-50%);
    color: #89a0bc;
}

.users-filter-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.95rem 1rem;
    color: #233551;
    font-size: 0.92rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.users-filter-input:focus {
    outline: none;
    border-color: rgba(14, 53, 111, 0.28);
    box-shadow:
        0 0 0 4px rgba(116, 183, 239, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.users-filter-input--search {
    padding-left: 2.8rem;
}

.users-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.users-results-copy {
    margin: 0;
    color: #8ca0ba;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.users-directory,
.reports-module-list,
.reports-dept-list {
    display: grid;
    gap: 1rem;
}

.users-row-card {
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
}

.users-row-titleline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.users-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.8rem;
    color: #69809f;
    font-size: 0.82rem;
}

.users-row-meta strong {
    color: #516782;
    font-weight: var(--weight-subtitle);
}

.users-row-side {
    display: grid;
    gap: 0.8rem;
    align-content: center;
}

.users-status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.76rem;
    font-weight: var(--weight-title);
}

.users-status-pill--active {
    background: rgba(228, 246, 236, 0.98);
    color: #20815c;
}

.users-status-pill--pending {
    background: rgba(255, 244, 220, 0.98);
    color: #b87515;
}

.users-status-pill--rejected {
    background: rgba(252, 228, 233, 0.98);
    color: #ce5a72;
}

.users-action-btn {
    padding: 0.8rem 0.95rem;
}

.users-action-btn--view {
    background: rgba(228, 242, 255, 0.95);
    color: #2d5fa5;
}

.users-action-btn--edit {
    background: rgba(255, 245, 224, 0.95);
    color: #b87a1d;
}

.users-empty-card,
.reports-empty-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
}

.users-empty-icon {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 241, 219, 0.9);
    color: #c2821f;
}

.users-empty-icon--sky {
    background: rgba(228, 242, 255, 0.92);
    color: #3c70a5;
}

.users-empty-card h3 {
    margin: 0;
    color: #1a2f57;
    font-size: 1rem;
    font-weight: var(--weight-title);
}

.users-empty-card p {
    margin: 0.35rem 0 0;
    color: #667a95;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ====================================================================
   REPORTS
   ==================================================================== */
.reports-shell {
    --reports-navy: #163f83;
    --reports-sky: #74b7ef;
    --reports-green: #79c49f;
    --reports-orange: #f2af58;
}

.reports-hero {
    background:
        radial-gradient(circle at top right, rgba(116, 183, 239, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(242, 175, 88, 0.14), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
}

.reports-hero-glow--sky {
    top: -2rem;
    right: -1rem;
    width: 14rem;
    height: 14rem;
    background: radial-gradient(circle, rgba(116, 183, 239, 0.22), rgba(116, 183, 239, 0));
}

.reports-hero-glow--orange {
    left: -2rem;
    bottom: -4rem;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(242, 175, 88, 0.18), rgba(242, 175, 88, 0));
}

.reports-grid {
    display: grid;
    gap: 1.2rem;
}

.reports-module-card {
    padding: 1.15rem;
}

.reports-module-card--navy {
    background:
        linear-gradient(180deg, rgba(244, 248, 255, 0.96), rgba(233, 240, 255, 0.92));
}

.reports-module-card--sky {
    background:
        linear-gradient(180deg, rgba(244, 251, 255, 0.96), rgba(231, 245, 255, 0.92));
}

.reports-module-card--green {
    background:
        linear-gradient(180deg, rgba(244, 252, 247, 0.96), rgba(231, 246, 238, 0.92));
}

.reports-module-head,
.reports-dept-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.reports-module-rate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.25rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: rgba(227, 243, 255, 0.85);
    color: #245592;
    font-size: 0.95rem;
    font-weight: var(--weight-title);
}

.reports-progress {
    position: relative;
    width: 100%;
    height: 0.72rem;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(223, 232, 244, 0.9);
}

.reports-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(22, 63, 131, 0.95), rgba(116, 183, 239, 0.92));
}

.reports-progress--slim {
    height: 0.62rem;
    margin-top: 0.9rem;
}

.reports-module-meta,
.reports-dept-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.95rem;
    color: #69809f;
    font-size: 0.82rem;
}

.reports-module-meta strong,
.reports-dept-meta strong {
    color: #1d355e;
    font-weight: var(--weight-title);
}

.reports-dept-card {
    padding: 1.1rem;
}

.reports-dept-head span {
    color: #5b7190;
    font-size: 0.85rem;
    font-weight: var(--weight-subtitle);
}

.reports-empty-card--tight {
    min-height: 100%;
}

@media (min-width: 960px) {
    .users-hero-inner,
    .reports-hero-inner {
        grid-template-columns: minmax(0, 1.5fr) minmax(15rem, 19rem);
        align-items: center;
    }

    .users-stats-grid,
    .reports-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .users-filter-bar {
        grid-template-columns: minmax(0, 1.5fr) minmax(14rem, 16rem) minmax(12rem, 14rem);
        align-items: center;
    }

    .users-pending-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .users-row-card {
        grid-template-columns: minmax(0, 1.8fr) auto;
        align-items: center;
    }

    .reports-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 959px) {
    .users-section-head--spread {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 767px) {
    .users-hero-side,
    .reports-hero-side {
        grid-template-columns: 1fr;
    }

    .users-request-actions,
    .users-actions {
        flex-direction: column;
    }

    .users-danger-btn,
    .users-action-btn {
        width: 100%;
    }

    .users-row-main {
        align-items: flex-start;
    }

    .users-row-side {
        justify-items: stretch;
    }

    .users-pill-row--compact {
        justify-content: flex-start;
    }

    .reports-module-head,
    .reports-dept-head,
    .users-row-titleline {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ====================================================================
   STUDENT PROFILE
   ==================================================================== */
.profile-shell {
    --profile-navy-soft: #e3ebff;
    --profile-sky-soft: #e4f4ff;
    --profile-green-soft: #e4f6ec;
    --profile-orange-soft: #fff1dc;
}

.profile-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(116, 183, 239, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(121, 196, 159, 0.16), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
}

.profile-hero-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(8px);
    opacity: 0.8;
}

.profile-hero-glow--sky {
    top: -3rem;
    right: -2rem;
    width: 12rem;
    height: 12rem;
    background: radial-gradient(circle, rgba(116, 183, 239, 0.22), rgba(116, 183, 239, 0));
}

.profile-hero-glow--mint {
    left: -2rem;
    bottom: -4rem;
    width: 14rem;
    height: 14rem;
    background: radial-gradient(circle, rgba(121, 196, 159, 0.18), rgba(121, 196, 159, 0));
}

.profile-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.profile-avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.profile-avatar-mark {
    position: relative;
    width: 6.8rem;
    height: 6.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.9rem;
    background: var(--gradient-profile);
    color: #fff;
    font-size: 2.3rem;
    font-weight: var(--weight-title);
    box-shadow:
        0 18px 34px rgba(14, 53, 111, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.profile-avatar-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 60%);
    pointer-events: none;
}

.profile-avatar-caption {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #6a7f9d;
}

.profile-eyebrow {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #7c8faa;
}

.profile-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 0.98;
}

.profile-primary-meta {
    margin: 0.75rem 0 0;
    font-size: 1rem;
    color: #5f738f;
}

.profile-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    font-size: 0.83rem;
    color: #29415f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.profile-pill--navy {
    background: rgba(227, 235, 255, 0.96);
}

.profile-pill--sky {
    background: rgba(228, 244, 255, 0.96);
}

.profile-pill--green {
    background: rgba(228, 246, 236, 0.96);
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-start;
}

.profile-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.15rem;
    border-radius: 1rem;
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: #41526d;
    font-size: 0.95rem;
    font-weight: var(--weight-subtitle);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.profile-tab-btn.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, rgba(14, 53, 111, 0.92), rgba(110, 166, 233, 0.92));
    color: #fff;
    box-shadow: 0 16px 28px rgba(14, 53, 111, 0.18);
}

.profile-form-card,
.profile-progress-panel,
.profile-module-panel,
.profile-badge-panel {
    position: relative;
    overflow: hidden;
}

.profile-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.profile-section-title {
    margin: 0.45rem 0 0;
    color: var(--text-main-dark);
    font-size: 1.55rem;
    line-height: 1.08;
    font-weight: var(--weight-title);
}

.profile-field span {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6f84a0;
}

.profile-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(13, 71, 161, 0.12);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    color: #233551;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.profile-input:focus {
    outline: none;
    border-color: rgba(14, 53, 111, 0.28);
    box-shadow:
        0 0 0 4px rgba(116, 183, 239, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.profile-stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.profile-stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.6rem;
    padding: 1.3rem;
    min-height: 11rem;
    border: 1px solid rgba(255, 255, 255, 0.64);
    box-shadow:
        0 14px 30px rgba(13, 71, 161, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.profile-stat-card::before {
    content: '';
    position: absolute;
    inset: auto -1.2rem -2.4rem auto;
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 999px;
    opacity: 0.25;
}

.profile-stat-card--navy {
    background: linear-gradient(180deg, rgba(227, 235, 255, 0.98), rgba(212, 225, 251, 0.95));
}

.profile-stat-card--navy::before {
    background: rgba(14, 53, 111, 0.3);
}

.profile-stat-card--sky {
    background: linear-gradient(180deg, rgba(228, 244, 255, 0.98), rgba(213, 237, 255, 0.95));
}

.profile-stat-card--sky::before {
    background: rgba(116, 183, 239, 0.34);
}

.profile-stat-card--green {
    background: linear-gradient(180deg, rgba(228, 246, 236, 0.98), rgba(213, 241, 225, 0.95));
}

.profile-stat-card--green::before {
    background: rgba(121, 196, 159, 0.34);
}

.profile-stat-card--orange {
    background: linear-gradient(180deg, rgba(255, 241, 220, 0.98), rgba(255, 233, 203, 0.95));
}

.profile-stat-card--orange::before {
    background: rgba(242, 175, 88, 0.32);
}

.profile-stat-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #fff;
    background: linear-gradient(135deg, rgba(14, 53, 111, 0.88), rgba(110, 166, 233, 0.88));
    box-shadow: 0 12px 24px rgba(14, 53, 111, 0.16);
}

.profile-stat-value {
    margin: 1rem 0 0;
    font-size: 2.7rem;
    line-height: 0.94;
    color: #18305b;
    font-weight: var(--weight-title);
}

.profile-stat-label {
    margin: 0.8rem 0 0;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6c82a0;
}

.profile-stat-note {
    margin: 0.6rem 0 0;
    color: #5f748f;
    font-size: 0.9rem;
    line-height: 1.55;
}

.profile-progress-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.profile-progress-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(227, 235, 255, 0.95);
    color: var(--text-main-dark);
    font-weight: var(--weight-title);
}

.profile-progress-track {
    margin-top: 1.25rem;
    width: 100%;
    height: 0.9rem;
    border-radius: 999px;
    background: rgba(219, 231, 244, 0.85);
    overflow: hidden;
}

.profile-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #79c49f 0%, #6ea6e9 55%, #0e356f 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.profile-progress-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.9rem;
    margin-top: 0.95rem;
    color: #667a95;
    font-size: 0.92rem;
}

.profile-module-grid,
.profile-badge-grid {
    display: grid;
    gap: 1rem;
}

.profile-module-card,
.profile-badge-card {
    border-radius: 1.4rem;
    border: 1px solid rgba(13, 71, 161, 0.08);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(234, 242, 250, 0.94));
    padding: 1.05rem 1.1rem;
}

.profile-module-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.profile-module-title {
    margin: 0;
    color: #203451;
    font-size: 1rem;
    line-height: 1.45;
    font-weight: var(--weight-subtitle);
}

.profile-module-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: var(--weight-title);
    white-space: nowrap;
}

.profile-module-status--pass {
    background: rgba(228, 246, 236, 0.96);
    color: #2f7c59;
}

.profile-module-status--retry {
    background: rgba(255, 230, 232, 0.96);
    color: #cb5960;
}

.profile-module-status--idle {
    background: rgba(238, 243, 248, 0.96);
    color: #70829b;
}

.profile-module-bar {
    margin-top: 1rem;
    width: 100%;
    height: 0.65rem;
    border-radius: 999px;
    background: rgba(220, 231, 243, 0.9);
    overflow: hidden;
}

.profile-module-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.profile-module-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    margin-top: 0.85rem;
    color: #677c96;
    font-size: 0.84rem;
}

.profile-badge-card {
    background: linear-gradient(180deg, rgba(255, 248, 227, 0.98), rgba(255, 241, 209, 0.95));
    border-color: rgba(242, 175, 88, 0.16);
}

.profile-badge-title {
    margin: 0;
    color: #1f3452;
    font-size: 1rem;
    font-weight: var(--weight-title);
}

.profile-badge-text {
    margin: 0.55rem 0 0;
    color: #667992;
    font-size: 0.9rem;
    line-height: 1.6;
}

.profile-badge-date {
    margin: 0.8rem 0 0;
    color: #8b7a49;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .profile-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-module-grid,
    .profile-badge-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .profile-hero-inner {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .profile-actions {
        justify-content: flex-end;
    }

    .profile-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .profile-avatar-mark {
        width: 5.75rem;
        height: 5.75rem;
        font-size: 2rem;
        border-radius: 1.6rem;
    }

    .profile-title {
        font-size: 2rem;
    }

    .profile-tab-btn {
        width: 100%;
        justify-content: center;
    }

    .profile-progress-header {
        flex-direction: column;
    }
}

/* ====================================================================
   DASHBOARD
   ==================================================================== */
.dashboard-shell {
    --dashboard-navy-strong: #163f83;
    --dashboard-sky-strong: #74b7ef;
    --dashboard-sky-soft: #e3f3ff;
    --dashboard-green-strong: #79c49f;
    --dashboard-green-soft: #e3f6ec;
    --dashboard-orange-strong: #f2af58;
    --dashboard-orange-soft: #fff0d9;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(116, 183, 239, 0.2), transparent 24%),
        radial-gradient(circle at bottom left, rgba(121, 196, 159, 0.16), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 247, 255, 0.94) 100%);
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    inset: auto -4rem -5rem auto;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(22, 63, 131, 0.1), rgba(22, 63, 131, 0));
    pointer-events: none;
}

.dashboard-eyebrow,
.dashboard-panel-eyebrow {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #7b8da9;
}

.dashboard-heading {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    line-height: 0.96;
    color: var(--dashboard-navy-strong);
}

.dashboard-subtitle {
    margin: 0;
    max-width: 44rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #62748d;
}

.dashboard-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(22, 63, 131, 0.08);
    color: var(--dashboard-navy-strong);
    font-size: 0.75rem;
    font-weight: var(--weight-subtitle);
}

.dashboard-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 1.15rem;
    font-size: 0.88rem;
    color: #43536c;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dashboard-chip strong {
    font-size: 1rem;
    color: #11284c;
}

.dashboard-chip--sky {
    background: rgba(227, 243, 255, 0.9);
}

.dashboard-chip--navy {
    background: rgba(225, 234, 251, 0.92);
}

.dashboard-chip--green {
    background: rgba(227, 246, 236, 0.92);
}

.dashboard-chip--orange {
    background: rgba(255, 240, 217, 0.92);
}

.dashboard-hero-grid {
    display: grid;
    gap: 0.9rem;
}

.dashboard-mini-stat {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 16px 32px rgba(13, 71, 161, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.76);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;
    will-change: transform, box-shadow;
}

.dashboard-mini-stat::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    transform: translate(-30%, -40%);
    opacity: 0.4;
}

.dashboard-mini-stat--navy {
    background: linear-gradient(135deg, rgba(224, 235, 255, 0.95), rgba(206, 223, 252, 0.92));
}

.dashboard-mini-stat--navy::before {
    background: rgba(22, 63, 131, 0.18);
}

.dashboard-mini-stat--green {
    background: linear-gradient(135deg, rgba(228, 247, 236, 0.95), rgba(207, 239, 222, 0.92));
}

.dashboard-mini-stat--green::before {
    background: rgba(121, 196, 159, 0.22);
}

.dashboard-mini-stat--orange {
    background: linear-gradient(135deg, rgba(255, 242, 219, 0.96), rgba(255, 232, 193, 0.93));
}

.dashboard-mini-stat--orange::before {
    background: rgba(242, 175, 88, 0.22);
}

.dashboard-mini-stat--sky {
    background: linear-gradient(135deg, rgba(230, 245, 255, 0.95), rgba(212, 237, 255, 0.92));
}

.dashboard-mini-stat--sky::before {
    background: rgba(116, 183, 239, 0.24);
}

.dashboard-mini-label {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #69809f;
}

.dashboard-mini-value {
    position: relative;
    z-index: 1;
    margin: 0.5rem 0 0;
    font-size: 2rem;
    line-height: 1;
    color: #10284e;
    font-weight: var(--weight-title);
}

.dashboard-mini-note {
    position: relative;
    z-index: 1;
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #62748d;
}

.dashboard-kpi {
    position: relative;
    overflow: hidden;
    min-height: 13rem;
    padding: 1.35rem;
    border-radius: 1.7rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 14px 30px rgba(13, 71, 161, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;
    will-change: transform, box-shadow;
}

.dashboard-kpi::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 58%);
    pointer-events: none;
}

.dashboard-kpi::after {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 0.35rem;
}

.dashboard-kpi--navy {
    background: linear-gradient(180deg, rgba(229, 238, 255, 0.96), rgba(214, 226, 252, 0.94));
}

.dashboard-kpi--navy::after {
    background: var(--dashboard-navy-strong);
}

.dashboard-kpi--sky {
    background: linear-gradient(180deg, rgba(231, 246, 255, 0.96), rgba(215, 239, 255, 0.94));
}

.dashboard-kpi--sky::after {
    background: var(--dashboard-sky-strong);
}

.dashboard-kpi--green {
    background: linear-gradient(180deg, rgba(232, 247, 238, 0.96), rgba(217, 241, 228, 0.94));
}

.dashboard-kpi--green::after {
    background: var(--dashboard-green-strong);
}

.dashboard-kpi--orange {
    background: linear-gradient(180deg, rgba(255, 244, 223, 0.97), rgba(255, 235, 205, 0.94));
}

.dashboard-kpi--orange::after {
    background: var(--dashboard-orange-strong);
}

.dashboard-kpi-icon {
    width: 2.8rem;
    height: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #fff;
    background: rgba(22, 63, 131, 0.88);
    box-shadow: 0 10px 18px rgba(22, 63, 131, 0.16);
}

.dashboard-kpi-label,
.dashboard-progress-label,
.dashboard-feed-heading {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6f84a0;
}

.dashboard-kpi-value {
    margin: 0.75rem 0 0;
    font-size: 2.9rem;
    line-height: 0.95;
    color: #1b2740;
    font-weight: var(--weight-title);
}

.dashboard-kpi-note,
.dashboard-row-meta,
.dashboard-feed-meta {
    margin: 0.7rem 0 0;
    color: #62748d;
    font-size: 0.88rem;
    line-height: 1.6;
}

.dashboard-panel {
    border-radius: 2rem;
    padding: 1.35rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(13, 71, 161, 0.08);
    box-shadow:
        0 16px 32px rgba(13, 71, 161, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.84);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;
    will-change: transform, box-shadow;
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.dashboard-panel-title {
    margin: 0.4rem 0 0;
    font-size: 1.45rem;
    line-height: 1.1;
    color: var(--dashboard-navy-strong);
    font-weight: var(--weight-title);
}

.dashboard-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    color: #70859f;
    font-size: 0.8rem;
}

.dashboard-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dashboard-legend-dot,
.dashboard-feed-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    display: inline-block;
}

.dashboard-legend-dot--sky {
    background: var(--dashboard-sky-strong);
}

.dashboard-legend-dot--green {
    background: var(--dashboard-green-strong);
}

.dashboard-legend-dot--orange {
    background: var(--dashboard-orange-strong);
}

.dashboard-trend-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.95rem;
    min-height: 18rem;
}

.dashboard-trend-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
}

.dashboard-trend-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.32rem;
    min-height: 13.5rem;
    padding: 0.8rem 0.45rem;
    border-radius: 1.3rem;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(233, 241, 250, 0.8));
}

.dashboard-trend-bar {
    width: min(1rem, 28%);
    min-height: 0.35rem;
    border-radius: 999px 999px 0.65rem 0.65rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dashboard-trend-meta {
    text-align: center;
}

.dashboard-trend-label {
    margin: 0;
    color: #324766;
    font-size: 0.86rem;
    font-weight: var(--weight-subtitle);
}

.dashboard-trend-values {
    margin: 0.25rem 0 0;
    color: #7b8da9;
    font-size: 0.76rem;
}

.dashboard-ring-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.dashboard-ring {
    width: 11.25rem;
    height: 11.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.dashboard-ring-core {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    text-align: center;
    box-shadow: 0 10px 26px rgba(13, 71, 161, 0.08);
}

.dashboard-ring-core p {
    margin: 0;
    font-size: 2rem;
    line-height: 1;
    color: #182a4b;
    font-weight: var(--weight-title);
}

.dashboard-ring-core span {
    margin-top: 0.4rem;
    color: #7285a0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.dashboard-metric-stack {
    width: 100%;
    display: grid;
    gap: 0.7rem;
}

.dashboard-metric-pill,
.dashboard-progress-card,
.dashboard-module-card,
.dashboard-feed-item {
    border-radius: 1.2rem;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.94), rgba(235, 242, 250, 0.92));
    border: 1px solid rgba(13, 71, 161, 0.06);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;
}

@media (hover: hover) {
    .dashboard-mini-stat:hover,
    .dashboard-kpi:hover,
    .dashboard-panel:hover,
    .dashboard-metric-pill:hover,
    .dashboard-progress-card:hover,
    .dashboard-module-card:hover,
    .dashboard-feed-item:hover {
        transform: translateY(-6px) scale(1.012);
        border-color: rgba(22, 63, 131, 0.18);
        box-shadow:
            0 22px 42px rgba(13, 71, 161, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.84);
    }
}

.dashboard-metric-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-metric-pill span,
.dashboard-module-metrics span {
    color: #62748d;
    font-size: 0.86rem;
}

.dashboard-metric-pill strong,
.dashboard-progress-value,
.dashboard-rate-pill {
    color: #13284e;
    font-weight: var(--weight-title);
}

.dashboard-progress-track {
    margin-top: 0.7rem;
    width: 100%;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(204, 217, 233, 0.38);
    overflow: hidden;
}

.dashboard-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.dashboard-module-card {
    display: grid;
    gap: 0.8rem;
}

.dashboard-rate-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.8rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(227, 243, 255, 0.92);
}

.dashboard-module-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
}

.dashboard-feed-block + .dashboard-feed-block {
    margin-top: 1.35rem;
}

.dashboard-feed-heading {
    margin-top: 0;
    margin-bottom: 0.9rem;
}

.dashboard-feed-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.dashboard-feed-title {
    margin: 0;
    color: #1a2b49;
    font-size: 0.94rem;
    font-weight: var(--weight-subtitle);
}

@media (min-width: 1024px) {
    .dashboard-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 22rem);
        align-items: center;
    }

    .dashboard-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-ring-layout {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 767px) {
    .dashboard-panel,
    .dashboard-kpi {
        padding: 1.1rem;
    }

    .dashboard-trend-chart {
        gap: 0.55rem;
    }

    .dashboard-legend {
        justify-content: flex-start;
    }
}

/* ====================================================================
   LOGIN / AUTH PAGES (Professional Gradient using Brand Colors)
   ==================================================================== */

/* Full-page wrapper: Elegant gradient Sky Blue to Faint Old Lace to Primary background */
.login-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, var(--bg-sec-light) 0%, var(--bg-sec) 40%, var(--text-main-light) 100%);
    overflow: hidden;
    padding: 1.5rem;
}

/* ---- Decorative Animated Elements (Soft Glowing Orbs) ---- */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

@keyframes riseBubble {
    0%   { bottom: -100px; transform: scale(0.8); opacity: 0; }
    10%  { opacity: 0.4; }
    50%  { opacity: 0.5; }
    90%  { opacity: 0.2; }
    100% { bottom: 110%; transform: scale(1.2); opacity: 0; }
}

@keyframes sway {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(30px); }
}

.bubble {
    position: absolute;
    bottom: -100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%,
        rgba(255, 255, 255, 0.4),
        rgba(255, 255, 255, 0.1) 40%,
        rgba(142, 202, 230, 0.05) 70%,
        rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        inset -4px -4px 12px rgba(255, 255, 255, 0.2),
        inset 4px 4px 12px rgba(255, 255, 255, 0.4),
        0 4px 20px rgba(13, 71, 161, 0.1);
    animation: riseBubble linear infinite,
               sway ease-in-out infinite;
    will-change: bottom, transform, opacity;
}

/* Generating varied bubbles */
.bubble:nth-child(1)  { width: 80px; height: 80px; left:  5%; animation-duration: 12s, 4s;   animation-delay: 0s, 0s; }
.bubble:nth-child(2)  { width: 45px; height: 45px; left: 15%; animation-duration: 15s, 6s;   animation-delay: 2s, 1s; }
.bubble:nth-child(3)  { width: 90px; height: 90px; left: 25%; animation-duration: 18s, 7s;   animation-delay: 4s, 2s; }
.bubble:nth-child(4)  { width: 55px; height: 55px; left: 35%; animation-duration: 14s, 5s;   animation-delay: 1s, 0.5s; }
.bubble:nth-child(5)  { width: 35px; height: 35px; left: 45%; animation-duration: 16s, 5.5s; animation-delay: 6s, 1.5s; }
.bubble:nth-child(6)  { width: 75px; height: 75px; left: 60%; animation-duration: 19s, 8s;   animation-delay: 3s, 0s; }
.bubble:nth-child(7)  { width: 50px; height: 50px; left: 70%; animation-duration: 13s, 4.5s; animation-delay: 7s, 2s; }
.bubble:nth-child(8)  { width: 85px; height: 85px; left: 85%; animation-duration: 17s, 6.5s; animation-delay: 5s, 1s; }
.bubble:nth-child(9)  { width: 40px; height: 40px; left: 95%; animation-duration: 14.5s, 5s; animation-delay: 8s, 0.5s; }

/* ---- Login Card: Pure White, Strong Drop Shadow for Contrast against blue ---- */
.login-card {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 20px;
    border: none;
    box-shadow:
        0 20px 50px rgba(13, 71, 161, 0.3),
        0 8px 16px rgba(13, 71, 161, 0.15);
    color: var(--text-main);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2rem;
}

.login-card input, .login-card select {
    background: var(--bg-main) !important;
    border: 1px solid var(--bg-sec) !important;
    color: var(--text-main) !important;
    transition: all 0.25s ease;
}

.login-card input::placeholder {
    color: var(--bg-sec-dark);
}

.login-card input:focus, .login-card select:focus {
    border-color: var(--text-main) !important;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.15) !important;
    background: #ffffff !important;
    outline: none;
}

.login-card label {
    color: var(--text-main);
}

.login-card select option {
    background: #ffffff;
    color: var(--text-main);
}

/* Video/logo container – 16:9 rectangle */
.login-video-container {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 16 / 9;
    margin: 0 auto 1.5rem;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.1);
    position: relative;
    background: var(--bg-main);
}

.login-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ====================================================================
   RESPONSIVE
   ==================================================================== */

@media (max-width: 767px) {
    .sidebar-logo {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }

    .login-video-container {
        max-width: 260px;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(13, 71, 161, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 71, 161, 0.5);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(142, 202, 230, 0.4);
    color: inherit;
}
