/* ============================================================================
   ACCOUNT PAGES STYLES  (Login / Register / Forgot Password / Confirm Email)
   Matjhabeng Municipality · CCMS
   ----------------------------------------------------------------------------
   Single source of truth. All design tokens live under the .account-page scope
   so they cannot leak into the rest of the portal.
   ============================================================================ */


/* ============================================================================
   1. DESIGN TOKENS
   ============================================================================ */
.account-page {
    --acc-primary: #1a7a2e;
    --acc-primary-dark: #0d5c1e;
    --acc-primary-light: #4caf50;
    --acc-gold: #ffc107;
    --acc-gold-dark: #f9a825;
    --acc-gold-light: #ffd54f;
    --acc-text: #1a1a1a;
    --acc-muted: #6c757d;
    --acc-border: #e8ece8;
    --acc-bg: #fafcfa;
    --acc-danger: #dc3545;
    --acc-danger-dark: #b02a37;
    --acc-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
    --acc-radius: 16px;
    --acc-radius-sm: 12px;
    --acc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================================
   2. PAGE BACKGROUND
   ============================================================================ */
.account-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f0 0%, #e8f0e8 50%, #dce8dc 100%);
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

    .account-page::before {
        content: '';
        position: absolute;
        top: -30%;
        right: -20%;
        width: 60%;
        height: 150%;
        background: radial-gradient(ellipse, rgba(26, 122, 46, 0.05) 0%, transparent 70%);
        pointer-events: none;
    }

    .account-page::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--acc-gold), var(--acc-gold-light), var(--acc-gold-dark), var(--acc-gold));
        opacity: 0.35;
    }


/* ============================================================================
   3. CARD SHELL
   ============================================================================ */
.account-card {
    background: #fff;
    border-radius: var(--acc-radius);
    box-shadow: var(--acc-shadow-lg);
    overflow: hidden;
    max-width: 440px;
    width: 100%;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--acc-transition);
    animation: accFadeInUp 0.6s ease;
}

    .account-card:hover {
        box-shadow: 0 14px 60px rgba(0, 0, 0, 0.2);
        transform: translateY(-4px);
    }

.account-card-wide {
    max-width: 560px;
}


/* ============================================================================
   4. CARD HEADER
   ============================================================================ */
.account-card .card-header-custom {
    background: linear-gradient(135deg, #0d5c1e 0%, #1a7a2e 50%, #2e9e4a 100%);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .account-card .card-header-custom::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -30%;
        width: 80%;
        height: 200%;
        background: radial-gradient(ellipse, rgba(255, 193, 7, 0.08) 0%, transparent 70%);
        pointer-events: none;
    }

    .account-card .card-header-custom .logo-wrapper {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 50%;
        padding: 8px;
        border: 3px solid var(--acc-gold);
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.25);
        margin: 0 auto 0.75rem;
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 2;
        color: var(--acc-primary);
        font-size: 2rem;
        animation: accFloatLogo 3s ease-in-out infinite;
    }

        .account-card .card-header-custom .logo-wrapper img {
            width: 60px;
            height: 60px;
            object-fit: contain;
            border-radius: 50%;
            display: block;
        }

    .account-card .card-header-custom .header-badge {
        display: inline-block;
        background: rgba(255, 193, 7, 0.15);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 193, 7, 0.25);
        border-radius: 50px;
        padding: 0.25rem 1rem;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--acc-gold-light);
        margin-bottom: 0.6rem;
        position: relative;
        z-index: 2;
    }

    .account-card .card-header-custom h2 {
        color: #fff;
        font-weight: 700;
        font-size: 1.6rem;
        margin: 0;
        position: relative;
        z-index: 2;
        letter-spacing: -0.01em;
    }

        .account-card .card-header-custom h2 .highlight {
            color: var(--acc-gold);
        }

    .account-card .card-header-custom p {
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.85rem;
        margin: 0.35rem 0 0;
        position: relative;
        z-index: 2;
    }

    .account-card .card-header-custom .header-divider {
        border: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--acc-gold), transparent);
        opacity: 0.35;
        margin: 0.75rem auto 0;
        max-width: 80px;
    }


/* ============================================================================
   5. CARD BODY
   ============================================================================ */
.account-card .card-body-custom {
    padding: 2rem 2rem 1.75rem;
}


/* ============================================================================
   6. FORM FIELDS — FLOATING LABELS
   ----------------------------------------------------------------------------
   Markup order (required):
       <input class="form-control" placeholder=" " />
       <label class="form-label">…</label>
       <i class="bi field-icon"></i>
       <button class="field-icon field-icon-btn">…</button>
       <div class="validation-error">…</div>

   Behaviour:
     - Label is vertically centred inside the input when empty & unfocused
     - Label floats up to the top border (with white "cut-out" background)
       when the input is focused OR filled
     - Input content (typed text) sits BELOW the floated label position
     - Placeholder is always transparent — never visible
   ============================================================================ */
.form-floating-custom {
    position: relative;
    margin-bottom: 1.35rem;
}

    .form-floating-custom .form-control {
        /* CRITICAL: top padding must be big enough to clear the floated label */
        padding: 1.55rem 1.0rem 1.55rem 1.75rem;
        height: 40px;
        line-height: 1.0;
        font-size: 0.95rem;
        width: 100%;
        border: 2px solid var(--acc-border);
        border-radius: var(--acc-radius-sm);
        background: var(--acc-bg);
        color: var(--acc-text);
        transition: var(--acc-transition);
        /* Prevent the browser default floating-label overlap on autofill */
        -webkit-text-fill-color: var(--acc-text);
    }

        .form-floating-custom .form-control:focus {
            border-color: var(--acc-primary);
            box-shadow: 0 0 0 4px rgba(26, 122, 46, 0.12);
            background: #fff;
            outline: none;
        }

        .form-floating-custom .form-control.is-invalid {
            border-color: var(--acc-danger);
            box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
        }

            .form-floating-custom .form-control.is-invalid:focus {
                box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
            }

        /* Placeholder is ALWAYS invisible — the label is the placeholder */
        .form-floating-custom .form-control::placeholder {
            color: transparent !important;
            opacity: 0;
        }

    /* Label — resting position (centred inside the input) */
    .form-floating-custom .form-label {
        position: absolute;
        top: 50%;
        left: 1rem;
        transform: translateY(-50%);
        color: var(--acc-muted);
        font-weight: 500;
        font-size: 0.9rem;
        padding: 0 0.35rem;
        margin: 0;
        background: transparent;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        pointer-events: none;
        z-index: 2;
        transition: var(--acc-transition);
        /* No background until floated — so it visually sits inside the field */
        line-height: 1;
        white-space: nowrap;
    }

    /* Floated position (input focused OR has a value) */
    .form-floating-custom .form-control:focus ~ .form-label,
    .form-floating-custom .form-control:not(:placeholder-shown) ~ .form-label {
        top: 0;
        transform: translateY(-50%) scale(0.85);
        padding: 0 0.4rem;
        background: #fff; /* white cut-through effect */
        color: var(--acc-primary);
        font-weight: 600;
        /* Small negative margin pulls the label onto the border line */
        margin-left: -0.15rem;
    }

    .form-floating-custom .form-control.is-invalid ~ .form-label {
        color: var(--acc-danger);
    }

    /* Right-side icons */
    .form-floating-custom .field-icon {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #adb5bd;
        font-size: 1.05rem;
        pointer-events: none;
        z-index: 2;
        transition: var(--acc-transition);
    }

    .form-floating-custom .form-control:focus ~ .field-icon {
        color: var(--acc-primary);
    }

    .form-floating-custom .field-icon-btn {
        pointer-events: auto;
        background: transparent;
        border: none;
        padding: 0;
        cursor: pointer;
        width: 1.5rem;
        height: 1.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

        .form-floating-custom .field-icon-btn:hover {
            color: var(--acc-primary);
        }

    /* Per-field validation message */
    .form-floating-custom .validation-error {
        display: block;
        font-size: 0.78rem;
        color: var(--acc-danger);
        padding-left: 0.25rem;
        margin-top: 0.25rem;
    }

/* ============================================================================
   7. REMEMBER ME
   ============================================================================ */
.checkbox-custom {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 1rem 0 1.25rem;
}

    .checkbox-custom input[type="checkbox"] {
        width: 18px;
        height: 18px;
        border-radius: 4px;
        accent-color: var(--acc-primary);
        cursor: pointer;
        flex-shrink: 0;
        margin: 0;
    }

    .checkbox-custom label {
        margin: 0;
        color: var(--acc-text);
        font-size: 0.88rem;
        font-weight: 500;
        cursor: pointer;
        user-select: none;
    }

        .checkbox-custom label i {
            color: var(--acc-gold);
            margin-right: 0.25rem;
        }


/* ============================================================================
   8. PRIMARY BUTTON
   .btn-account is the markup class; .btn-login is kept as an alias for pages
   that still use the older class name.
   ============================================================================ */
.btn-account,
.btn-login {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
    border-radius: var(--acc-radius-sm);
    background: linear-gradient(135deg, var(--acc-primary), var(--acc-primary-dark));
    color: #fff;
    box-shadow: 0 4px 20px rgba(26, 122, 46, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--acc-transition);
}

    .btn-account:hover:not(:disabled),
    .btn-login:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(26, 122, 46, 0.4);
        background: linear-gradient(135deg, var(--acc-primary-dark), #0a4516);
        color: #fff;
    }

    .btn-account:active:not(:disabled),
    .btn-login:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-account:disabled,
    .btn-login:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }


/* ============================================================================
   9. LINKS BLOCK
   ============================================================================ */
.account-links,
.login-links {
    margin-top: 1.5rem;
    text-align: center;
}

    .account-links .divider-line,
    .login-links .divider-line {
        border: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.07);
        margin: 0.65rem auto;
        max-width: 60px;
    }

    .account-links .link-item,
    .login-links .link-item {
        display: block;
        padding: 0.35rem 0;
        color: var(--acc-muted);
        font-size: 0.85rem;
        text-decoration: none;
        transition: var(--acc-transition);
    }

        .account-links .link-item:hover,
        .login-links .link-item:hover {
            color: var(--acc-primary);
            transform: translateX(2px);
        }

        .account-links .link-item i,
        .login-links .link-item i {
            margin-right: 0.4rem;
            color: var(--acc-gold-dark);
            font-size: 0.85rem;
        }

    .account-links .support-link,
    .login-links .support-link {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        margin-top: 0.5rem;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        background: rgba(26, 122, 46, 0.06);
        color: var(--acc-primary);
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        transition: var(--acc-transition);
    }

        .account-links .support-link:hover,
        .login-links .support-link:hover {
            background: rgba(26, 122, 46, 0.14);
            color: var(--acc-primary-dark);
            transform: translateX(3px);
        }

        .account-links .support-link i,
        .login-links .support-link i {
            color: var(--acc-gold-dark);
        }

    .login-links .login-footer-text,
    .account-links .login-footer-text {
        display: block;
        margin-top: 0.9rem;
        font-size: 0.7rem;
        letter-spacing: 0.02em;
        color: #adb5bd;
    }


/* ============================================================================
   10. VALIDATION SUMMARY
   .validation-summary-custom is the markup class; .validation-summary is kept
   as an alias for older pages.
   ============================================================================ */
.validation-summary-custom,
.validation-summary {
    background: rgba(220, 53, 69, 0.06);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    color: var(--acc-danger-dark);
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

    .validation-summary ul {
        margin: 0;
        padding-left: 1.1rem;
    }

        .validation-summary ul li {
            margin: 0.25rem 0;
        }


/* ============================================================================
   11. SUCCESS ICON  (used by confirmation pages)
   ============================================================================ */
.account-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(26, 122, 46, 0.1);
    color: var(--acc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}


/* ============================================================================
   12. SPINNER
   ============================================================================ */
.spinner-border-sm-custom {
    width: 1.15rem;
    height: 1.15rem;
    border-width: 2px;
}


/* ============================================================================
   13. ANIMATIONS
   ============================================================================ */
@keyframes accFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes accFloatLogo {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}


/* ============================================================================
   14. RESPONSIVE
   ============================================================================ */
@media (max-width: 576px) {
    .account-card .card-header-custom {
        padding: 1.5rem 1.25rem 1rem;
    }

        .account-card .card-header-custom .logo-wrapper {
            width: 64px;
            height: 64px;
            font-size: 1.5rem;
        }

            .account-card .card-header-custom .logo-wrapper img {
                width: 48px;
                height: 48px;
            }

        .account-card .card-header-custom h2 {
            font-size: 1.35rem;
        }

    .account-card .card-body-custom {
        padding: 1.5rem 1.25rem;
    }

    .form-floating-custom .form-control {
        height: 50px;
        font-size: 0.9rem;
    }

    .form-floating-custom .form-label {
        font-size: 0.85rem;
    }

    .btn-account,
    .btn-login {
        font-size: 0.95rem;
        padding: 0.75rem;
    }

    .account-links .link-item,
    .login-links .link-item {
        font-size: 0.8rem;
    }

    .account-links .support-link,
    .login-links .support-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}

@media (max-width: 400px) {
    .account-card .card-header-custom h2 {
        font-size: 1.15rem;
    }

    .account-card .card-body-custom {
        padding: 1.25rem 1rem;
    }

    .checkbox-custom label {
        font-size: 0.82rem;
    }
}


/* ============================================================================
   15. UTILITIES
   ============================================================================ */
.text-gold {
    color: var(--acc-gold) !important;
}

.bg-gold {
    background-color: var(--acc-gold) !important;
}

.border-gold {
    border-color: var(--acc-gold) !important;
}
/* ============================================================
   MLM MAIN NAVBAR
   ============================================================ */

.navbar-main {
    position: sticky;
    top: 0;
    z-index: 1050;
    min-height: 62px;
    padding: 0.35rem 0;
    background: linear-gradient( 135deg, #0d5c1e 0%, #1a7a2e 50%, #2e9e4a 100% ) !important;
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 4px 24px rgba(13, 92, 30, 0.28);
    transition: var(--transition);
}

    /* Brand */
    .navbar-main .navbar-brand {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0;
        margin-right: 0.75rem;
        color: rgba(255, 255, 255, 0.95) !important;
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.1;
        text-decoration: none;
    }

    .navbar-main .logo-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 3px;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid var(--gold);
        border-radius: 50%;
        box-shadow: 0 0 14px rgba(255, 193, 7, 0.22);
        transition: var(--transition);
    }

        .navbar-main .logo-wrapper:hover {
            transform: rotate(-4deg) scale(1.05);
            box-shadow: 0 0 22px rgba(255, 193, 7, 0.35);
        }

        .navbar-main .logo-wrapper img {
            width: 32px;
            height: 32px;
            object-fit: contain;
            border-radius: 50%;
        }

    .navbar-main .brand-text {
        display: flex;
        flex-direction: column;
    }

    .navbar-main .brand-title {
        color: #fff;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.15;
    }

        .navbar-main .brand-title .highlight {
            color: var(--gold);
        }

    .navbar-main .brand-subtitle {
        margin-top: 1px;
        color: rgba(255, 255, 255, 0.68);
        font-size: 0.6rem;
        font-weight: 400;
        letter-spacing: 0.55px;
        text-transform: uppercase;
    }

    /* Toggler */
    .navbar-main .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.35);
        padding: 0.4rem 0.55rem;
    }

    .navbar-main .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* ============================================================
   NAV LINKS
   ============================================================ */

    .navbar-main .nav-compact .nav-link {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        position: relative;
        margin: 0 0.1rem;
        padding: 0.45rem 0.7rem;
        color: rgba(255, 255, 255, 0.88) !important;
        font-size: 0.82rem;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
        border-radius: 8px;
        transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }

        .navbar-main .nav-compact .nav-link i {
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .navbar-main .nav-compact .nav-link:hover,
        .navbar-main .nav-compact .nav-link:focus {
            color: #fff !important;
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-1px);
        }

        .navbar-main .nav-compact .nav-link.active {
            color: #fff !important;
            background: rgba(255, 193, 7, 0.18);
        }

            /* Gold underline 
        .navbar-main .nav-compact .nav-link::after {
            content: "";
            position: absolute;
            bottom: 3px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 2px;
            border-radius: 2px;
            background: var(--gold);
            transition: width 0.18s ease;
        }
        */
            .navbar-main .nav-compact .nav-link:hover::after,
            .navbar-main .nav-compact .nav-link.active::after {
                width: 58%;
            }

/* ============================================================
   DROPDOWN TOGGLE
   ============================================================ */

.dropdown-toggle-professional {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
}

    .dropdown-toggle-professional::after {
        margin-left: 0.3rem;
        font-size: 0.6rem;
        vertical-align: middle;
        transition: transform 0.18s ease;
    }

    .dropdown-toggle-professional[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }

/* ============================================================
   DROPDOWN MENU
   ============================================================ */

.dropdown-menu-professional {
    min-width: 230px;
    margin-top: 0.45rem;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

    .dropdown-menu-professional .dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.55rem 0.75rem;
        border-radius: 8px;
        color: #1e293b;
        font-size: 0.85rem;
        font-weight: 500;
        transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }

        .dropdown-menu-professional .dropdown-item i {
            width: 20px;
            color: var(--primary-green);
            font-size: 0.95rem;
            flex-shrink: 0;
        }

        .dropdown-menu-professional .dropdown-item:hover,
        .dropdown-menu-professional .dropdown-item:focus {
            background: rgba(26, 122, 46, 0.08);
            color: var(--primary-green);
            transform: translateX(3px);
        }

        .dropdown-menu-professional .dropdown-item.text-danger {
            color: #dc3545;
        }

            .dropdown-menu-professional .dropdown-item.text-danger:hover,
            .dropdown-menu-professional .dropdown-item.text-danger:focus {
                background: rgba(220, 53, 69, 0.08);
                color: #dc3545;
            }

            .dropdown-menu-professional .dropdown-item.text-danger i {
                color: #dc3545;
            }

.dropdown-divider-custom {
    margin: 0.35rem 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

/* Account summary */
.account-summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

    .account-summary .avatar-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        background: linear-gradient( 135deg, var(--primary-green), var(--primary-light) );
        border-radius: 50%;
        color: #fff;
        font-size: 1.1rem;
    }

    .account-summary .account-name {
        color: var(--text-dark);
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1.2;
    }

    .account-summary .account-email {
        color: #6c757d;
        font-size: 0.72rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.badge-notification {
    margin-left: auto;
    padding: 0.15rem 0.55rem;
    background: var(--gold);
    color: var(--primary-dark);
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 50px;
}

/* ============================================================
   AUTH / USER AREA
   ============================================================ */

.navbar-main .auth-links .btn {
    padding: 0.35rem 0.85rem;
    border-radius: 40px;
    font-size: 0.8rem;
}

.navbar-main .nav-user {
    max-width: 155px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {
    .navbar-main .navbar-collapse {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .navbar-main .nav-compact .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.55rem 0.85rem;
    }

        .navbar-main .nav-compact .nav-link::after {
            display: none;
        }

    .dropdown-menu-professional {
        margin: 0.25rem 0 0.25rem 0.75rem;
        padding: 0.25rem;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        border-radius: 8px;
        box-shadow: none;
    }

        .dropdown-menu-professional .dropdown-item {
            color: rgba(255, 255, 255, 0.88);
        }

            .dropdown-menu-professional .dropdown-item i {
                color: var(--gold);
            }

            .dropdown-menu-professional .dropdown-item:hover,
            .dropdown-menu-professional .dropdown-item:focus {
                background: rgba(255, 255, 255, 0.09);
                color: #fff;
                transform: none;
            }

            .dropdown-menu-professional .dropdown-item.text-danger,
            .dropdown-menu-professional .dropdown-item.text-danger:hover,
            .dropdown-menu-professional .dropdown-item.text-danger:focus {
                color: #ff8a8a;
            }

                .dropdown-menu-professional .dropdown-item.text-danger i {
                    color: #ff8a8a;
                }
}

@media (max-width: 575.98px) {
    .navbar-main .navbar-brand {
        font-size: 0.85rem;
    }

    .navbar-main .brand-subtitle {
        display: none;
    }

    .navbar-main .logo-wrapper {
        width: 34px;
        height: 34px;
    }

        .navbar-main .logo-wrapper img {
            width: 27px;
            height: 27px;
        }
}

/* ============================================================
   Contact Us + Notifications - Styles
   ============================================================ */

/* ---------- Notification urgency utility classes ---------- */
.urg-critical {
    --urg: #dc2626;
    --urg-bg: #fef2f2;
    --urg-border: #fecaca;
}

.urg-high {
    --urg: #f59e0b;
    --urg-bg: #fffbeb;
    --urg-border: #fde68a;
}

.urg-normal {
    --urg: #1a3a4a;
    --urg-bg: #eff6ff;
    --urg-border: #bfdbfe;
}

.urg-low {
    --urg: #64748b;
    --urg-bg: #f8fafc;
    --urg-border: #e2e8f0;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .contact-page .container {
        max-width: 1280px;
    }

/* ---------- Active notifications strip on contact page ---------- */
.notif-strip {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1rem 1.25rem;
}

.notif-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--mlm-border);
}

.notif-strip-title {
    font-weight: 700;
    color: var(--mlm-primary);
    font-size: 0.9rem;
}

.notif-strip-link {
    font-size: 0.8rem;
    color: var(--mlm-accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

    .notif-strip-link:hover {
        text-decoration: underline;
    }

.notif-strip-track {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.notif-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--urg-bg, #f1f5f9);
    border: 1px solid var(--urg-border, #e2e8f0);
    color: var(--urg, var(--mlm-primary));
    padding: 0.45rem 0.85rem;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition);
}

    .notif-chip:hover {
        transform: translateY(-1px);
        box-shadow: var(--mlm-shadow-sm);
        color: var(--urg, var(--mlm-primary));
    }

.notif-chip-title {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-chip-meta {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: 0.15rem;
}

/* ============================================================
   NOTIFICATIONS PAGE
   ============================================================ */

.notifications-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .notifications-page .container {
        max-width: 1280px;
    }


.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chip {
    border: 1.5px solid var(--mlm-border);
    background: white;
    color: var(--mlm-text);
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

    .filter-chip:hover {
        border-color: var(--mlm-primary);
        color: var(--mlm-primary);
    }

    .filter-chip.active {
        background: var(--mlm-primary);
        border-color: var(--mlm-primary);
        color: white;
    }

.filter-chip-critical.active {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.filter-chip-high.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.filter-chip-normal.active {
    background: #1a3a4a;
    border-color: #1a3a4a;
    color: white;
}

.filter-chip-low.active {
    background: #64748b;
    border-color: #64748b;
    color: white;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notif-card {
    display: flex;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

    .notif-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--mlm-shadow);
    }

.notif-card-accent {
    width: 5px;
    background: var(--urg, var(--mlm-primary));
    flex-shrink: 0;
}

.notif-card-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
    min-width: 0;
}

.notif-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--mlm-text);
    line-height: 1.35;
}

.notif-card-text {
    font-size: 0.875rem;
    color: var(--mlm-text-muted);
    line-height: 1.6;
    margin-bottom: 0.85rem;
    white-space: pre-wrap;
}

.notif-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--mlm-border);
}

/* ============================================================
   HOME PAGE NOTIFICATIONS STRIP
   ============================================================ */

.notif-home-strip {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.25rem;
}

.notif-home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px dashed var(--mlm-border);
}

.notif-home-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    color: var(--mlm-primary);
    font-size: 1rem;
}

.notif-home-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #fee2e2;
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.notif-home-link {
    color: var(--mlm-accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.notif-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.notif-home-card {
    display: block;
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 1rem;
    text-decoration: none;
    color: var(--mlm-text);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .notif-home-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--urg, var(--mlm-primary));
    }

    .notif-home-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--mlm-shadow);
        border-color: var(--mlm-primary);
        color: var(--mlm-text);
    }

.notif-home-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.notif-home-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.35;
    color: var(--mlm-text);
}

.notif-home-card-desc {
    font-size: 0.8rem;
    color: var(--mlm-text-muted);
    line-height: 1.5;
    margin: 0 0 0.65rem;
}

.notif-home-card-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
}

/* ---------- Loading state ---------- */
.loading-state {
    text-align: center;
    padding: 3rem 1rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 767.98px) {
    .notif-strip-track {
        flex-direction: column;
    }

    .notif-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .notif-chip-title {
        max-width: none;
        white-space: normal;
    }

    .notif-home-grid {
        grid-template-columns: 1fr;
    }

    .notif-card-body {
        padding: 1rem;
    }
}

/* ============================================================
   My Complaints (Citizen) - Page Styles
   ============================================================ */

.my-complaints-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--mlm-text);
    padding-bottom: 3rem;
}

    .my-complaints-page .container {
        max-width: 1280px;
    }

/* ---------- Loading state ---------- */
.loading-state {
    text-align: center;
    padding: 4rem 1rem;
}

/* ---------- Stat tiles ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .stat-tile::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--mlm-primary);
    }

    .stat-tile:hover {
        transform: translateY(-2px);
        box-shadow: var(--mlm-shadow);
        border-color: var(--mlm-primary);
    }

.stat-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    background: #eef2ff;
    color: var(--mlm-primary);
}

.stat-tile-body {
    min-width: 0;
}

.stat-tile-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--mlm-text);
}

.stat-tile-label {
    font-size: 0.8rem;
    color: var(--mlm-text-muted);
    margin-top: 0.15rem;
    font-weight: 500;
}

.stat-tile-total::before {
    background: var(--mlm-primary);
}

.stat-tile-total .stat-tile-icon {
    background: #eef2ff;
    color: var(--mlm-primary);
}

.stat-tile-new::before {
    background: #64748b;
}

.stat-tile-new .stat-tile-icon {
    background: #f1f5f9;
    color: #475569;
}

.stat-tile-progress::before {
    background: #f59e0b;
}

.stat-tile-progress .stat-tile-icon {
    background: #fef3c7;
    color: #b45309;
}

.stat-tile-resolved::before {
    background: #16a34a;
}

.stat-tile-resolved .stat-tile-icon {
    background: #dcfce7;
    color: #15803d;
}

.stat-tile-emergency::before {
    background: #dc2626;
}

.stat-tile-emergency .stat-tile-icon {
    background: #fee2e2;
    color: #b91c1c;
}

/* ---------- Toolbar ---------- */
.toolbar-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.toolbar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--mlm-border);
}

.toolbar-count {
    font-size: 0.85rem;
    color: var(--mlm-text-muted);
}

    .toolbar-count strong {
        color: var(--mlm-primary);
        font-weight: 700;
    }

    .toolbar-count .btn-link {
        color: var(--mlm-accent);
        font-weight: 600;
        text-decoration: none;
        font-size: 0.85rem;
    }

        .toolbar-count .btn-link:hover {
            text-decoration: underline;
        }

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    .toolbar-actions .btn-sm {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }

/* ---------- Complaints Card Grid ---------- */
.complaints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.complaint-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .complaint-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--mlm-primary);
    }

    .complaint-card.card-accent-new::before {
        background: #64748b;
    }

    .complaint-card.card-accent-progress::before {
        background: #f59e0b;
    }

    .complaint-card.card-accent-resolved::before {
        background: #16a34a;
    }

    .complaint-card.card-accent-emergency::before {
        background: #dc2626;
    }

    .complaint-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--mlm-shadow);
        border-color: var(--mlm-primary);
    }

.complaint-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ref-chip-light {
    background: #f1f5f9;
    border: 1px solid var(--mlm-border);
    color: var(--mlm-primary);
    padding: 0.3rem 0.75rem;
    border-radius: 40px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.complaint-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--mlm-text);
    margin: 0;
    line-height: 1.3;
}

.complaint-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.8rem;
    color: var(--mlm-text-muted);
}

    .complaint-card-meta span {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
    }

    .complaint-card-meta i {
        color: var(--mlm-primary);
        font-size: 0.85rem;
    }

.complaint-card-desc {
    font-size: 0.85rem;
    color: var(--mlm-text-muted);
    line-height: 1.5;
    margin: 0;
}

.complaint-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

    .complaint-card-badges .badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.65rem;
        font-weight: 600;
        border-radius: 40px;
    }

.complaint-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--mlm-border);
    flex-wrap: wrap;
}

    .complaint-card-footer .btn-sm {
        padding: 0.4rem 0.9rem;
        font-size: 0.78rem;
        border-radius: 40px;
    }

/* ---------- Table view ---------- */
.table-view-wrapper {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    overflow: hidden;
    box-shadow: var(--mlm-shadow-sm);
}

.complaints-table {
    margin: 0;
    font-size: 0.875rem;
}

    .complaints-table thead th {
        background: #f8fafc;
        font-weight: 600;
        color: #475569;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.85rem 1rem;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .complaints-table tbody td {
        padding: 0.85rem 1rem;
        vertical-align: middle;
        border-bottom: 1px solid #f1f5f9;
    }

    .complaints-table tbody tr:hover {
        background: #f8fafc;
    }

    .complaints-table .status-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
        border-radius: 40px;
        font-weight: 600;
    }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .toolbar-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions {
        justify-content: stretch;
    }

        .toolbar-actions .btn {
            flex: 1;
        }
}

@media (max-width: 767.98px) {
    .toolbar-card {
        padding: 1rem;
    }

    .stat-tile {
        padding: 0.9rem 1rem;
    }

    .stat-tile-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .stat-tile-value {
        font-size: 1.25rem;
    }

    .complaints-grid {
        grid-template-columns: 1fr;
    }

    .complaint-card {
        padding: 1rem;
    }

    .complaint-card-footer {
        flex-wrap: wrap;
    }

        .complaint-card-footer .btn-sm {
            flex: 1;
            min-width: 90px;
        }

    .complaints-table {
        font-size: 0.8rem;
    }

        .complaints-table thead th,
        .complaints-table tbody td {
            padding: 0.6rem 0.5rem;
        }
}

@media (max-width: 575.98px) {
    .toolbar-actions {
        flex-direction: column;
    }

        .toolbar-actions .btn {
            width: 100%;
        }

    .complaint-card-badges .badge {
        font-size: 0.65rem;
    }
}


/* ============================================================
   Matjhabeng Municipality - Complaints Module Styles
   Merged stylesheet: New Complaint + Track Complaint
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
    --mlm-primary: #1a3a4a;
    --mlm-primary-dark: #0f2937;
    --mlm-primary-light: #2c5368;
    --mlm-accent: #2e7d32;
    --mlm-accent-dark: #1b5e20;
    --mlm-warning: #f59e0b;
    --mlm-danger: #dc2626;
    --mlm-success: #16a34a;
    --mlm-bg: #f4f7fc;
    --mlm-card-bg: #ffffff;
    --mlm-border: #e9edf4;
    --mlm-text: #1e293b;
    --mlm-text-muted: #64748b;
    --mlm-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --mlm-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --mlm-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
    --mlm-radius: 20px;
    --mlm-radius-sm: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Shared Page Base ---------- */
.complaint-page,
.track-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--mlm-text);
    padding-bottom: 3rem;
}

    .complaint-page .container,
    .track-page .container {
        max-width: 1280px;
    }

/* ---------- Header ---------- */
.mlm-header {
    background: linear-gradient(135deg, var(--mlm-accent) 0%, var(--mlm-accent-dark) 100%);
    color: white;
    padding: 1.0rem 0 2rem;
    border-radius: 0px 0px 32px 32px;
    margin: 0.1rem 0.1rem 0.1rem 0.1rem;
    box-shadow: var(--mlm-shadow);
    position: relative;
    overflow: hidden;
}

    .mlm-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
        border-radius: 10%;
        pointer-events: none;
    }

    .mlm-header h1 {
        font-weight: 700;
        letter-spacing: -0.02em;
    }

.welcome-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-container {
    background: var(--mlm-card-bg);
    border-radius: var(--mlm-radius-sm);
    border: 1px solid var(--mlm-border);
    padding: 0.75rem 1.5rem;
    box-shadow: var(--mlm-shadow-sm);
}

    .breadcrumb-container .breadcrumb {
        margin-bottom: 0;
        font-size: 0.875rem;
    }

    .breadcrumb-container .breadcrumb-item a {
        color: var(--mlm-primary);
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition);
    }

        .breadcrumb-container .breadcrumb-item a:hover {
            color: var(--mlm-accent);
        }

    .breadcrumb-container .breadcrumb-item.active {
        color: var(--mlm-text-muted);
    }

/* ---------- Step Indicator (New Complaint page) ---------- */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--mlm-card-bg);
    border-radius: 60px;
    padding: 1rem 1.5rem;
    border: 1px solid var(--mlm-border);
    box-shadow: var(--mlm-shadow-sm);
    max-width: 640px;
    margin: 0 auto 2rem;
    gap: 0.5rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
    position: relative;
    padding: 0.5rem;
    transition: var(--transition);
}

    .step:not(:last-child)::after {
        content: '';
        position: absolute;
        right: -12px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 2px;
        background: #d0d8e3;
        transition: background 0.4s ease;
    }

    .step.completed:not(:last-child)::after {
        background: var(--mlm-accent);
    }

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9edf4;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.step.active .step-circle {
    background: var(--mlm-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(26, 58, 74, 0.3);
    transform: scale(1.05);
}

.step.completed .step-circle {
    background: var(--mlm-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--mlm-text-muted);
    transition: color 0.3s;
    white-space: nowrap;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--mlm-primary);
    font-weight: 600;
}

/* ---------- Form Sections ---------- */
.form-section {
    background: var(--mlm-card-bg);
    border-radius: var(--mlm-radius);
    border: 1px solid var(--mlm-border);
    box-shadow: var(--mlm-shadow-sm);
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--mlm-border);
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* ---------- Form Controls ---------- */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-radius: var(--mlm-radius-sm);
    border: 1.5px solid #e2e8f0;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
    background: white;
    color: var(--mlm-text);
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--mlm-primary);
        box-shadow: 0 0 0 4px rgba(26, 58, 74, 0.08);
        outline: none;
    }

    .form-control::placeholder {
        color: #94a3b8;
    }

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s;
}

.form-control.with-icon,
.form-select.with-icon {
    padding-left: 2.75rem;
}

.input-icon-wrapper:focus-within .input-icon {
    color: var(--mlm-primary);
}

/* ---------- Emergency Toggle ---------- */
.emergency-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--mlm-radius-sm);
    background: white;
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    min-height: 46px;
}

    .emergency-toggle.active {
        border-color: var(--mlm-danger);
        background: #fef2f2;
    }

    .emergency-toggle label {
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        color: var(--mlm-text);
    }

    .emergency-toggle.active label {
        color: var(--mlm-danger);
    }

/* ---------- Location Capture ---------- */
.location-capture-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--mlm-radius-sm);
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
}

    .location-capture-box:hover {
        border-color: var(--mlm-primary);
        background: #f1f5f9;
    }

.location-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
}

/* ---------- Image Upload ---------- */
.image-upload-area {
    position: relative;
    border: 2px dashed #d0d8e3;
    border-radius: var(--mlm-radius-sm);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafbff;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .image-upload-area:hover {
        border-color: var(--mlm-primary);
        background: #f1f4ff;
        transform: translateY(-2px);
    }

    .image-upload-area i.bi-cloud-arrow-up {
        font-size: 2.5rem;
        color: #94a3b8;
        transition: var(--transition);
    }

    .image-upload-area:hover i.bi-cloud-arrow-up {
        color: var(--mlm-primary);
        transform: scale(1.1);
    }

    .image-upload-area p {
        font-size: 0.875rem;
        color: #475569;
        margin: 0.75rem 0 0.25rem;
        font-weight: 500;
    }

    .image-upload-area small {
        font-size: 0.75rem;
        color: #94a3b8;
    }

    .image-upload-area.has-preview {
        padding: 0;
        border-style: solid;
        border-color: var(--mlm-success);
    }

.preview-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: calc(var(--mlm-radius-sm) - 2px);
}

.btn-remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    line-height: 1;
}

    .btn-remove-image:hover {
        background: var(--mlm-danger);
        transform: scale(1.1);
    }

/* ---------- Buttons ---------- */
.btn-mlm-primary {
    background: var(--mlm-primary);
    border: none;
    color: white;
    padding: 0.7rem 1.75rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn-mlm-primary:hover:not(:disabled) {
        background: var(--mlm-primary-dark);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(26, 58, 74, 0.25);
    }

    .btn-mlm-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-outline-mlm-primary {
    border: 2px solid var(--mlm-primary);
    color: var(--mlm-primary);
    background: transparent;
    border-radius: 40px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn-outline-mlm-primary:hover {
        background: var(--mlm-primary);
        color: white;
    }

/* ---------- Review Grid (New Complaint) ---------- */
.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.review-card {
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 1.25rem;
}

    .review-card.full-width {
        grid-column: 1 / -1;
    }

.review-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--mlm-primary);
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--mlm-border);
}

    .review-card-header i {
        font-size: 1.1rem;
    }

    .review-card-header .btn-link {
        color: var(--mlm-accent);
        text-decoration: none;
        font-size: 0.8rem;
        font-weight: 600;
        padding: 0;
    }

        .review-card-header .btn-link:hover {
            text-decoration: underline;
        }

.review-list {
    margin: 0;
    font-size: 0.875rem;
}

    .review-list > div {
        display: flex;
        padding: 0.4rem 0;
    }

    .review-list dt {
        width: 35%;
        color: var(--mlm-text-muted);
        font-weight: 500;
        flex-shrink: 0;
    }

    .review-list dd {
        margin: 0;
        color: var(--mlm-text);
        font-weight: 500;
        word-break: break-word;
    }

.description-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--mlm-text);
    white-space: pre-wrap;
}

/* ---------- Confirmation Box ---------- */
.confirmation-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--mlm-radius-sm);
    padding: 1rem 1.25rem;
}

    .confirmation-box .form-check-input {
        margin-top: 0.2rem;
        flex-shrink: 0;
        width: 1.15rem;
        height: 1.15rem;
    }

        .confirmation-box .form-check-input:checked {
            background-color: var(--mlm-accent);
            border-color: var(--mlm-accent);
        }

    .confirmation-box label {
        font-size: 0.875rem;
        color: #78350f;
        cursor: pointer;
        margin: 0;
    }

/* ---------- Sidebar Cards ---------- */
.instruction-card {
    background: var(--mlm-card-bg);
    border-radius: var(--mlm-radius);
    border: 1px solid var(--mlm-border);
    box-shadow: var(--mlm-shadow-sm);
    position: sticky;
    top: 1rem;
}

.text-mlm-primary {
    color: var(--mlm-primary);
}

/* ---------- Guidelines List ---------- */
.guidelines-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .guidelines-list li {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        font-size: 0.85rem;
        padding: 0.4rem 0;
        color: #475569;
        line-height: 1.5;
    }

        .guidelines-list li i {
            flex-shrink: 0;
            margin-top: 0.15rem;
            font-size: 0.9rem;
        }

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--mlm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ---------- Simple Timeline (New Complaint sidebar) ---------- */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 7px;
        top: 8px;
        bottom: 8px;
        width: 2px;
        background: #e2e8f0;
    }

.timeline-item {
    position: relative;
    display: flex;
    gap: 0.85rem;
    padding: 0.5rem 0;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
    flex-shrink: 0;
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--mlm-radius-sm);
    border: none;
    font-size: 0.9rem;
}

/* ---------- Spinner ---------- */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ---------- Step content fade ---------- */
.step-content {
    animation: fadeSlideIn 0.35s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================
   TRACK PAGE SPECIFIC
   ============================================================ */

/* ---------- Search hints ---------- */
.search-hints {
    padding-top: 0.75rem;
    border-top: 1px dashed var(--mlm-border);
}

    .search-hints code {
        background: #f1f5f9;
        color: var(--mlm-primary);
        padding: 0.15rem 0.4rem;
        border-radius: 6px;
        font-size: 0.8rem;
    }

/* ---------- Status Hero ---------- */
.status-hero {
    position: relative;
    border-radius: var(--mlm-radius);
    overflow: hidden;
    box-shadow: var(--mlm-shadow-lg);
    animation: slideInUp 0.4s ease-out;
}

.status-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--mlm-primary) 0%, var(--mlm-primary-dark) 60%, var(--mlm-accent-dark) 100%);
    z-index: 0;
}

    .status-hero-bg::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -10%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
        border-radius: 50%;
    }

    .status-hero-bg::after {
        content: '';
        position: absolute;
        bottom: -50%;
        left: -5%;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(46,125,50,0.15) 0%, transparent 70%);
        border-radius: 50%;
    }

.status-hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    color: white;
}

.ref-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 40px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-badge-lg {
    padding: 0.4rem 0.9rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pulse-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ---------- Progress Ring ---------- */
.progress-ring-wrapper {
    position: relative;
    display: inline-block;
    width: 110px;
    height: 110px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: #facc15;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.5));
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.progress-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.progress-label {
    font-size: 0.65rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.2rem;
}

/* ---------- Progress Steps (Hero) ---------- */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    gap: 0.25rem;
    overflow-x: auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 70px;
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.4s ease;
}

.progress-step.done .progress-step-circle {
    background: var(--mlm-accent);
    border-color: var(--mlm-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
}

.progress-step.current .progress-step-circle {
    background: #facc15;
    border-color: #facc15;
    color: var(--mlm-primary-dark);
    box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.2);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.2);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(250, 204, 21, 0.1);
    }
}

.progress-step-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}

.progress-step.done .progress-step-label,
.progress-step.current .progress-step-label {
    color: white;
    font-weight: 600;
}

.progress-step-connector {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    min-width: 20px;
    margin: 0 -0.5rem;
    margin-bottom: 1.5rem;
    transition: background 0.4s ease;
}

    .progress-step-connector.done {
        background: var(--mlm-accent);
    }

/* ---------- Action Bar ---------- */
.action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    box-shadow: var(--mlm-shadow-sm);
}

    .action-bar .btn-outline-mlm-primary {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

/* ---------- Details List (Track) ---------- */
.details-list {
    margin: 0;
}

.details-row {
    display: flex;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--mlm-border);
}

    .details-row:last-child {
        border-bottom: none;
    }

    .details-row dt {
        width: 40%;
        font-weight: 500;
        color: var(--mlm-text-muted);
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }

        .details-row dt i {
            color: var(--mlm-primary);
            font-size: 0.95rem;
            width: 18px;
            text-align: center;
        }

    .details-row dd {
        margin: 0;
        font-size: 0.9rem;
        color: var(--mlm-text);
        font-weight: 500;
        word-break: break-word;
    }

.description-block {
    background: #f8fafc;
    border-left: 3px solid var(--mlm-accent);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

/* ---------- Timeline Track (Track page) ---------- */
.timeline-track {
    position: relative;
    padding-left: 2rem;
}

    .timeline-track::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 12px;
        bottom: 12px;
        width: 2px;
        background: linear-gradient(to bottom, var(--mlm-accent), #e2e8f0);
    }

.timeline-entry {
    position: relative;
    padding: 0.85rem 0 0.85rem 0.5rem;
}

    .timeline-entry:not(:last-child) {
        border-bottom: 1px dashed var(--mlm-border);
    }

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.85rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    z-index: 1;
    transition: var(--transition);
}

.timeline-entry.latest .timeline-marker {
    background: var(--mlm-accent);
    border-color: var(--mlm-accent);
    color: white;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.15);
}

.timeline-body {
    padding-left: 0.5rem;
}

/* ---------- SLA ---------- */
.sla-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--mlm-border);
}

    .sla-item:last-of-type {
        border-bottom: none;
    }

.sla-label {
    font-size: 0.8rem;
    color: var(--mlm-text-muted);
    font-weight: 500;
}

.sla-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mlm-text);
}

/* ---------- Resolved Card ---------- */
.resolved-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0 !important;
}

.resolved-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    color: var(--mlm-success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.2);
}

/* ---------- Contact Rows ---------- */
.contact-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
}

    .contact-row + .contact-row {
        border-top: 1px dashed var(--mlm-border);
    }

/* ---------- Legend ---------- */
.legend-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .legend-item .status-badge {
        min-width: 90px;
        text-align: center;
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

/* ---------- Empty States ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

    .empty-state i {
        font-size: 2.5rem;
        color: #cbd5e1;
    }

.empty-search-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--mlm-card-bg);
    border: 1px dashed var(--mlm-border);
    border-radius: var(--mlm-radius);
}

.empty-search-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: var(--mlm-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
}

.feature-tile {
    padding: 1.25rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    transition: var(--transition);
    height: 100%;
}

    .feature-tile:hover {
        transform: translateY(-3px);
        box-shadow: var(--mlm-shadow);
        border-color: var(--mlm-primary);
    }

    .feature-tile i {
        font-size: 1.5rem;
    }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
    .instruction-card {
        position: static;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .status-hero-content {
        padding: 1.5rem;
    }

    .progress-ring-wrapper {
        margin: 0 auto;
    }

    .progress-steps {
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .mlm-header {
        padding: 1.75rem 0 1.5rem;
        border-radius: 0 0 24px 24px;
    }

        .mlm-header .row {
            text-align: center;
            gap: 1rem;
        }

        .mlm-header .col-md-4 {
            text-align: center !important;
        }

    .step-indicator {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.85rem;
        border-radius: 24px;
    }

    .step {
        flex: 0 0 auto;
    }

        .step:not(:last-child)::after {
            display: none;
        }

    .step-label {
        font-size: 0.7rem;
    }

    .step-circle {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .form-section {
        padding: 1.25rem !important;
    }

    .review-list dt {
        width: 45%;
    }

    .details-row {
        flex-direction: column;
        gap: 0.25rem;
    }

        .details-row dt {
            width: 100%;
        }

    .progress-step-label {
        font-size: 0.6rem;
    }

    .progress-step-circle {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .action-bar {
        justify-content: center;
    }

        .action-bar .ms-auto {
            margin-left: 0 !important;
            width: 100%;
        }

            .action-bar .ms-auto .btn {
                width: 100%;
            }
}

@media (max-width: 575.98px) {
    .complaint-page,
    .track-page {
        padding-bottom: 1.5rem;
    }

    .breadcrumb-container {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .step-label {
        display: none;
    }

    .step-indicator {
        max-width: 100%;
    }

    .step {
        flex: 1;
    }

    .image-upload-area {
        min-height: 140px;
        padding: 1.25rem 0.75rem;
    }

    .preview-image {
        height: 140px;
    }

    .ref-chip {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    .status-hero-content {
        padding: 1.25rem;
    }

    .progress-value {
        font-size: 1.15rem;
    }

    .progress-ring-wrapper {
        width: 90px;
        height: 90px;
    }

    .progress-ring {
        width: 90px;
        height: 90px;
    }

        .progress-ring circle {
            r: 38;
        }
}
/* ============================================================
   Finalisations Page
   ============================================================ */

.final-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .final-page .container {
        max-width: 1280px;
    }

/* ---------- Summary tiles ---------- */
.fin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.fin-summary-tile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .fin-summary-tile::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.fin-summary-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.fin-summary-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
}

.fin-summary-label {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

.fin-unit {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-left: 2px;
}

/* Tile accents */
.tile-pending::before {
    background: #f59e0b;
}

.tile-pending .fin-summary-icon {
    background: #fef3c7;
    color: #b45309;
}

.tile-approved::before {
    background: #16a34a;
}

.tile-approved .fin-summary-icon {
    background: #dcfce7;
    color: #15803d;
}

.tile-returned::before {
    background: #0891b2;
}

.tile-returned .fin-summary-icon {
    background: #cffafe;
    color: #0e7490;
}

.tile-escalated::before {
    background: #dc2626;
}

.tile-escalated .fin-summary-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.tile-overdue::before {
    background: #ef4444;
}

.tile-overdue .fin-summary-icon {
    background: #fef2f2;
    color: #b91c1c;
}

.tile-avg::before {
    background: #1a3a4a;
}

.tile-avg .fin-summary-icon {
    background: #eef2ff;
    color: #1a3a4a;
}

/* ---------- Toolbar / batch ---------- */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--mlm-border);
}

.batch-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

.batch-count {
    font-size: 0.82rem;
    color: var(--mlm-primary);
    font-weight: 600;
}

/* ---------- Card list ---------- */
.final-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.final-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

    .final-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #f59e0b;
    }

    .final-card.urgent::before {
        background: #dc2626;
    }

    .final-card.selected {
        border-color: var(--mlm-primary);
        box-shadow: 0 8px 24px rgba(26, 58, 74, 0.12);
    }

    .final-card:hover {
        box-shadow: var(--mlm-shadow);
    }

.final-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.final-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
}

    .final-meta span {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
    }

.final-card-body {
    padding: 1.25rem;
}

.final-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.final-desc {
    font-size: 0.88rem;
    color: var(--mlm-text-muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}

.final-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: var(--mlm-radius-sm);
    border: 1px solid var(--mlm-border);
    margin-bottom: 0.85rem;
}

.final-detail {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.final-detail-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
}

.final-detail-value {
    font-size: 0.85rem;
    color: var(--mlm-text);
    font-weight: 500;
    word-break: break-word;
}

.final-updates {
    border: 1px dashed var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

    .final-updates summary {
        cursor: pointer;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--mlm-primary);
        list-style: none;
    }

        .final-updates summary::-webkit-details-marker {
            display: none;
        }

.final-updates-list {
    list-style: none;
    padding: 0;
    margin: 0.65rem 0 0;
    max-height: 220px;
    overflow-y: auto;
}

    .final-updates-list li {
        font-size: 0.82rem;
        padding: 0.4rem 0;
        border-bottom: 1px solid var(--mlm-border);
    }

        .final-updates-list li:last-child {
            border-bottom: none;
        }

.final-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.final-image-thumb {
    display: inline-block;
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mlm-border);
    transition: var(--transition);
}

    .final-image-thumb:hover {
        transform: scale(1.03);
    }

    .final-image-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.final-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid var(--mlm-border);
}

    .final-card-actions .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
        border-radius: 40px;
    }

/* ---------- Modal ---------- */
.fin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 41, 55, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fin-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 540px;
    background: white;
    border-radius: var(--mlm-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    overflow: hidden;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.fin-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.fin-modal-body {
    padding: 1.25rem 1.4rem;
}

.fin-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--mlm-border);
    background: #f8fafc;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .fin-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .final-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .final-card-actions {
        justify-content: stretch;
    }

        .final-card-actions .btn {
            flex: 1;
        }

            .final-card-actions .btn.ms-auto {
                margin-left: 0 !important;
            }

    .final-meta {
        font-size: 0.72rem;
    }
}
/* ============================================================
   Age Analysis Page
   ============================================================ */

.age-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .age-page .container {
        max-width: 1280px;
    }

/* ---------- KPI tiles ---------- */
.age-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.age-kpi {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .age-kpi::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.age-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.age-kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
}

.age-kpi-label {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

.age-kpi-sub {
    font-size: 0.65rem;
    opacity: 0.8;
    margin-left: 2px;
}

.age-unit {
    font-size: 0.85rem;
    opacity: 0.65;
    margin-left: 1px;
}

.kpi-open::before {
    background: #1a3a4a;
}

.kpi-open .age-kpi-icon {
    background: #eef2ff;
    color: #1a3a4a;
}

.kpi-overdue::before {
    background: #dc2626;
}

.kpi-overdue .age-kpi-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.kpi-avg::before {
    background: #0891b2;
}

.kpi-avg .age-kpi-icon {
    background: #cffafe;
    color: #0e7490;
}

.kpi-median::before {
    background: #7c3aed;
}

.kpi-median .age-kpi-icon {
    background: #ede9fe;
    color: #6d28d9;
}

.kpi-oldest::before {
    background: #f59e0b;
}

.kpi-oldest .age-kpi-icon {
    background: #fef3c7;
    color: #b45309;
}

/* ---------- Bucket bar ---------- */
.age-buckets-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.25rem;
}

.age-bucket-bar {
    display: flex;
    height: 34px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    gap: 2px;
    margin-bottom: 1rem;
}

.age-bucket-seg {
    border: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 3px;
    padding: 0;
}

    .age-bucket-seg:hover {
        filter: brightness(1.08);
    }

    .age-bucket-seg.active {
        box-shadow: inset 0 0 0 3px white;
    }

.age-bucket-seg-label {
    padding: 0 0.4rem;
    white-space: nowrap;
}

/* Bucket colors */
.b-0-1 {
    background: #16a34a;
}

.b-2-3 {
    background: #65a30d;
}

.b-4-7 {
    background: #eab308;
}

.b-8-14 {
    background: #f59e0b;
}

.b-15-30 {
    background: #ea580c;
}

.b-31 {
    background: #dc2626;
}

.age-bucket-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.age-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    padding-right: 5px;
    border-radius: 3px
}

.age-legend-swatch {
    padding-left: 5px;
}

.b-0-1 .age-legend-swatch {
    background: #fff;
    color: darkgreen;
}

.b-2-3 .age-legend-swatch {
    background: #fff;
}

.b-4-7 .age-legend-swatch {
    background: #fff;
}

.b-8-14 .age-legend-swatch {
    background: #f59e0b;
}

.b-15-30 .age-legend-swatch {
    background: #ea580c;
}

.b-31 .age-legend-swatch {
    background: #dc2626;
}

.age-legend-label {
    color: var(--mlm-text-white);
    font-weight: 500;
}

.age-legend-count {
    font-weight: 700;
    color: var(--mlm-text-white);
}

.age-legend-pct {
    font-size: 0.7rem;
    color: var(--mlm-text-white);
}

/* ---------- Department table ---------- */
.age-dept-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.25rem;
}

.age-dept-table {
    margin: 0;
    font-size: 0.85rem;
}

    .age-dept-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.6rem 0.75rem;
        font-weight: 600;
    }

    .age-dept-table tbody td {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

.dept-bucket-bar {
    display: flex;
    height: 14px;
    border-radius: 4px;
    overflow: hidden;
    gap: 1px;
    background: #f1f5f9;
    min-width: 220px;
}

.dept-bucket-seg {
    height: 100%;
    min-width: 2px;
    transition: var(--transition);
}

/* ---------- Toolbar ---------- */
.age-toolbar {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    background: #eef2ff;
    color: var(--mlm-primary);
    border: 1px solid #c7d2fe;
    padding: 0.35rem 0.75rem;
    border-radius: 40px;
    font-size: 0.8rem;
}

/* ---------- Rows table ---------- */
.age-rows-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    overflow: hidden;
    box-shadow: var(--mlm-shadow-sm);
}

.age-rows-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.age-table {
    margin: 0;
    font-size: 0.85rem;
}

    .age-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.7rem 0.85rem;
        font-weight: 600;
    }

    .age-table tbody td {
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .age-table tbody tr:hover {
        background: #f8fafc;
    }

    .age-table tr.row-overdue {
        background: #fef2f2;
    }

        .age-table tr.row-overdue:hover {
            background: #fee2e2;
        }

    .age-table tr.row-emergency {
        box-shadow: inset 4px 0 0 #dc2626;
    }

.age-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 40px;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
}

    .age-pill.b-0-1 {
        background: #16a34a;
    }

    .age-pill.b-2-3 {
        background: #65a30d;
    }

    .age-pill.b-4-7 {
        background: #eab308;
    }

    .age-pill.b-8-14 {
        background: #f59e0b;
    }

    .age-pill.b-15-30 {
        background: #ea580c;
    }

    .age-pill.b-31 {
        background: #dc2626;
    }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .age-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .age-bucket-bar {
        height: 28px;
    }

    .dept-bucket-bar {
        min-width: 140px;
    }
}

@media (max-width: 767.98px) {
    .age-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .age-kpi {
        padding: 0.85rem 0.9rem;
    }

    .age-kpi-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .age-kpi-value {
        font-size: 1.15rem;
    }

    .age-bucket-bar {
        height: 22px;
    }

    .age-bucket-seg-label {
        display: none;
    }

    .age-bucket-legend {
        font-size: 0.72rem;
        gap: 0.5rem 1rem;
    }

    .age-table thead th {
        display: none;
    }

    .age-table tbody td {
        padding: 0.55rem 0.5rem;
    }
}

/* ============================================================
   Reports & Analytics
   ============================================================ */

.reports-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .reports-page .container {
        max-width: 1280px;
    }

/* ---------- Filter bar ---------- */
.reports-filter-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

/* ---------- Executive KPI strip ---------- */
.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.reports-kpi {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .reports-kpi::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.reports-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

    .reports-kpi-head i {
        font-size: 1rem;
        opacity: 0.7;
    }

.reports-kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    color: var(--mlm-text);
    letter-spacing: -0.02em;
}

.reports-unit {
    font-size: 1rem;
    opacity: 0.6;
    margin-left: 1px;
}

.reports-kpi-foot {
    margin-top: 0.5rem;
}

.reports-kpi-bar {
    margin-top: 0.6rem;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.reports-kpi-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: currentColor;
    transition: width 0.6s ease;
}

.kpi-total::before {
    background: #1a3a4a;
}

.kpi-total .reports-kpi-head i {
    color: #1a3a4a;
}

.kpi-resolved::before {
    background: #16a34a;
}

.kpi-resolved {
    color: #16a34a;
}

    .kpi-resolved .reports-kpi-value {
        color: #15803d;
    }

    .kpi-resolved .reports-kpi-head i {
        color: #16a34a;
    }

.kpi-sla::before {
    background: #0891b2;
}

.kpi-sla {
    color: #0891b2;
}

    .kpi-sla .reports-kpi-value {
        color: #0e7490;
    }

    .kpi-sla .reports-kpi-head i {
        color: #0891b2;
    }

.kpi-hours::before {
    background: #7c3aed;
}

.kpi-hours .reports-kpi-head i {
    color: #7c3aed;
}

.kpi-emergency::before {
    background: #dc2626;
}

.kpi-emergency .reports-kpi-value {
    color: #b91c1c;
}

.kpi-emergency .reports-kpi-head i {
    color: #dc2626;
}

/* ---------- Insights ---------- */
.insights-panel {
    background: #fff;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.insights-header {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--mlm-primary);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--mlm-border);
}

.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
}

    .insight-item.danger {
        background: #fef2f2;
        color: #991b1b;
    }

    .insight-item.warning {
        background: #fffbeb;
        color: #92400e;
    }

    .insight-item.success {
        background: #f0fdf4;
        color: #166534;
    }

    .insight-item.info {
        background: #eff6ff;
        color: #1e40af;
    }

/* ---------- Tabs ---------- */
.reports-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: 16px;
    padding: 0.35rem;
    box-shadow: var(--mlm-shadow-sm);
}

.reports-tab {
    border: none;
    background: transparent;
    color: var(--mlm-text);
    padding: 0.55rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

    .reports-tab:hover {
        background: #f1f5f9;
        color: var(--mlm-primary);
    }

    .reports-tab.active {
        background: var(--mlm-primary);
        color: white;
        font-weight: 600;
    }

.reports-tab-badge {
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    margin-left: 0.35rem;
    font-weight: 700;
}

.reports-tab.active .reports-tab-badge {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Table card ---------- */
.reports-table-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
}

.reports-table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.reports-table {
    margin: 0;
    font-size: 0.87rem;
}

    .reports-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.7rem 0.85rem;
        font-weight: 600;
        white-space: nowrap;
    }

.reports-th-share {
    min-width: 200px;
}

.reports-th-name {
    min-width: 180px;
}

.reports-table tbody td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.reports-row:hover {
    background: #f8fafc;
}

.reports-num {
    display: inline-block;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.reports-total-row td {
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

/* ---------- Distribution bar ---------- */
.reports-dist-bar {
    display: flex;
    height: 18px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    min-width: 180px;
    position: relative;
}

.reports-dist-resolved {
    background: #16a34a;
    transition: width 0.4s ease;
}

.reports-dist-pending {
    background: #f59e0b;
    transition: width 0.4s ease;
}

.reports-dist-emerg {
    background: #dc2626;
    transition: width 0.4s ease;
}

/* ---------- Resolution pill ---------- */
.reports-pill {
    display: inline-block;
    padding: 0.22rem 0.6rem;
    border-radius: 40px;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

    .reports-pill.pill-success {
        background: #dcfce7;
        color: #15803d;
    }

    .reports-pill.pill-warning {
        background: #fef3c7;
        color: #b45309;
    }

    .reports-pill.pill-danger {
        background: #fee2e2;
        color: #b91c1c;
    }

/* ---------- Legend ---------- */
.reports-legend {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
    border-top: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-left: 0.75rem;
}

    .legend-dot:first-child {
        margin-left: 0;
    }

.legend-resolved {
    background: #16a34a;
}

.legend-pending {
    background: #f59e0b;
}

.legend-emerg {
    background: #dc2626;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .reports-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reports-th-share {
        min-width: 130px;
    }

    .reports-dist-bar {
        min-width: 120px;
    }
}

@media (max-width: 767.98px) {
    .reports-kpi-value {
        font-size: 1.35rem;
    }

    .reports-tab {
        font-size: 0.78rem;
        padding: 0.45rem 0.7rem;
    }

    .reports-tabs {
        gap: 0.25rem;
    }

    .reports-table {
        font-size: 0.8rem;
    }

        .reports-table thead th,
        .reports-table tbody td {
            padding: 0.5rem 0.55rem;
        }

    .reports-th-share {
        min-width: 90px;
    }

    .reports-dist-bar {
        height: 14px;
        min-width: 90px;
    }

    .reports-filter-card .row {
        gap: 0.5rem;
    }
}

/* ============================================================
   Lookups Admin Page
   ============================================================ */

.lookups-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .lookups-page .container {
        max-width: 1280px;
    }

/* ---------- Stat tiles ---------- */
.lookup-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.lookup-stat {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.lookup-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.lookup-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.lookup-stat-label {
    font-size: 0.75rem;
    color: var(--mlm-text-muted);
    font-weight: 500;
    margin-top: 0.2rem;
}

.lookup-stat-sub {
    display: block;
    font-size: 0.68rem;
    opacity: 0.8;
    margin-top: 0.15rem;
}

/* ---------- Tabs ---------- */
.lookup-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0.35rem;
    margin: 0 0 1rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: 16px;
    box-shadow: var(--mlm-shadow-sm);
}

.lookup-tab {
    border: none;
    background: transparent;
    color: var(--mlm-text);
    padding: 0.55rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
    white-space: nowrap;
}

    .lookup-tab:hover {
        background: #f1f5f9;
        color: var(--mlm-primary);
    }

    .lookup-tab.active {
        background: var(--mlm-primary);
        color: white;
        font-weight: 600;
    }

.lookup-tab-badge {
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    margin-left: 0.25rem;
    font-weight: 700;
}

.lookup-tab.active .lookup-tab-badge {
    background: rgba(255, 255, 255, 0.22);
}

/* ---------- Card + add form ---------- */
.lookup-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.25rem;
}

.lookup-add-card {
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.lookup-add-card-alt {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* ---------- Toolbar ---------- */
.lookup-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--mlm-border);
}

.lookup-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Table ---------- */
.lookup-table {
    margin: 0;
    font-size: 0.87rem;
}

    .lookup-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.75rem;
    }

    .lookup-table tbody td {
        padding: 0.7rem 0.75rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .lookup-table tbody tr:hover {
        background: #f8fafc;
    }

.lookup-row-editing {
    background: #fffbeb !important;
}

.btn-icon-tiny {
    border: none;
    background: transparent;
    color: var(--mlm-text-muted);
    font-size: 0.8rem;
    padding: 0.15rem 0.35rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

    .btn-icon-tiny:hover {
        background: #f1f5f9;
        color: var(--mlm-primary);
    }

/* ---------- Expanded row ---------- */
.lookup-expand-row td {
    background: #f8fafc !important;
    padding: 0.85rem 0.75rem 1rem !important;
}

.lookup-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.lookup-detail-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.lookup-detail-value {
    font-size: 0.85rem;
    color: var(--mlm-text);
    font-weight: 500;
}

/* ---------- Ward grid ---------- */
.ward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

.ward-card {
    background: #fff;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    overflow: hidden;
    box-shadow: var(--mlm-shadow-sm);
    transition: var(--transition);
    position: relative;
}

    .ward-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--mlm-accent);
    }

.ward-card-inactive {
    opacity: 0.7;
}

    .ward-card-inactive::before {
        background: #94a3b8;
    }

.ward-card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    cursor: pointer;
    user-select: none;
}

    .ward-card-head:hover {
        background: #f8fafc;
    }

.ward-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--mlm-primary);
    border-radius: 12px;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.ward-badge-no {
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
}

.ward-badge-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    margin-top: 2px;
}

.ward-card-info {
    flex: 1;
    min-width: 0;
}

.ward-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--mlm-text);
    margin-bottom: 0.2rem;
}

.ward-card-sub {
    font-size: 0.75rem;
    color: var(--mlm-text-muted);
}

.ward-card-actions {
    display: flex;
    align-items: center;
    color: var(--mlm-text-muted);
}

.ward-card-body {
    padding: 0 1.15rem 1rem;
    border-top: 1px dashed var(--mlm-border);
    background: #f8fafc;
}

.suburb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.75rem;
}

.suburb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff;
    border: 1px solid var(--mlm-border);
    color: var(--mlm-text);
    padding: 0.35rem 0.65rem;
    border-radius: 40px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition);
}

    .suburb-chip:hover {
        border-color: var(--mlm-primary);
        color: var(--mlm-primary);
    }

    .suburb-chip i {
        color: var(--mlm-primary);
        font-size: 0.7rem;
    }

.suburb-remove-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 0 0 0 0.15rem;
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    transition: var(--transition);
}

    .suburb-remove-btn:hover {
        color: var(--mlm-danger);
    }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .lookup-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .lookup-toolbar-right {
        justify-content: flex-end;
    }

    .lookup-table thead th {
        font-size: 0.65rem;
    }

    .lookup-table tbody td {
        padding: 0.55rem 0.4rem;
        font-size: 0.78rem;
    }

    .ward-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Department Workspace
   ============================================================ */

.dept-workspace-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .dept-workspace-page .container {
        max-width: 1280px;
    }

/* KPI grid */
.dw-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.dw-kpi {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .dw-kpi::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.dw-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.dw-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.dw-kpi-foot {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 0.35rem;
}

.dw-kpi-bar {
    margin-top: 0.5rem;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.dw-kpi-bar-fill {
    height: 100%;
    background: currentColor;
    transition: width 0.6s ease;
}

.kpi-total::before {
    background: #1a3a4a;
}

.kpi-total .dw-kpi-head i {
    color: #1a3a4a;
}

.kpi-awaiting::before {
    background: #3b82f6;
}

.kpi-awaiting .dw-kpi-value {
    color: #1d4ed8;
}

.kpi-awaiting .dw-kpi-head i {
    color: #3b82f6;
}

.kpi-emergency::before {
    background: #dc2626;
}

.kpi-emergency .dw-kpi-value {
    color: #b91c1c;
}

.kpi-emergency .dw-kpi-head i {
    color: #dc2626;
}

.kpi-overdue::before {
    background: #ea580c;
}

.kpi-overdue .dw-kpi-value {
    color: #c2410c;
}

.kpi-overdue .dw-kpi-head i {
    color: #ea580c;
}

.kpi-rate::before {
    background: #16a34a;
}

.kpi-rate {
    color: #16a34a;
}

    .kpi-rate .dw-kpi-value {
        color: #15803d;
    }

.kpi-sla::before {
    background: #0891b2;
}

.kpi-sla {
    color: #0891b2;
}

    .kpi-sla .dw-kpi-value {
        color: #0e7490;
    }

/* Chart cards */
.dw-chart-card, .dw-tech-card, .dw-map-card, .dw-queue-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.dw-chart-title {
    font-size: 0.9rem;
    color: var(--mlm-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Doughnut */
.dw-donut-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dw-donut {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.dw-donut-legend {
    flex: 1;
    min-width: 140px;
}

.dw-legend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    padding: 0.2rem 0;
}

.dw-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.dw-legend-label {
    flex: 1;
    color: var(--mlm-text-muted);
}

.dw-legend-count {
    font-weight: 700;
    color: var(--mlm-text);
}

/* Trend */
.dw-trend-svg {
    width: 100%;
    height: 110px;
}

.dw-trend-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--mlm-text-muted);
    margin-top: 0.5rem;
    justify-content: center;
}

.dw-trend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

/* Category bars */
.dw-cat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dw-cat-row {
    display: grid;
    grid-template-columns: 110px 1fr 40px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.dw-cat-label {
    color: var(--mlm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-cat-bar-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
}

.dw-cat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2e7d32, #16a34a);
    border-radius: 5px;
    transition: width 0.6s ease;
}

.dw-cat-count {
    text-align: right;
    font-weight: 700;
    color: var(--mlm-text);
}

/* Technician grid */
.dw-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.dw-tech-tile {
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 0.85rem 1rem;
    position: relative;
    overflow: hidden;
}

    .dw-tech-tile::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
    }

.tech-ok::before {
    background: #16a34a;
}

.tech-busy::before {
    background: #f59e0b;
}

.tech-warning::before {
    background: #dc2626;
}

.dw-tech-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.dw-tech-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

    .dw-tech-stats > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

.dw-tech-val {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--mlm-text);
}

.dw-tech-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--mlm-text-muted);
    margin-top: 2px;
}

.dw-tech-avail {
    display: flex;
    justify-content: center;
}

/* Map */
.dw-map {
    width: 100%;
    height: 400px;
    border-radius: var(--mlm-radius-sm);
    z-index: 1;
}

.dw-map-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
}

.dw-map-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
}

.dw-map-popup {
    margin-top: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 0.85rem 1rem;
}

/* Queue */
.dw-toolbar {
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--mlm-border);
}

.dw-toolbar-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.dw-queue-table-wrapper {
    background: #fff;
    border-radius: var(--mlm-radius-sm);
    overflow: hidden;
}

.dw-queue-table {
    margin: 0;
    font-size: 0.85rem;
}

    .dw-queue-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.75rem;
    }

    .dw-queue-table tbody td {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .dw-queue-table tr.row-emergency {
        background: #fef2f2;
    }

    .dw-queue-table tr.row-overdue {
        background: #fffbeb;
    }

    .dw-queue-table tr:hover {
        background: #f8fafc;
    }

/* Modals */
.dw-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 41, 55, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
}

.dw-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 540px;
    background: #fff;
    border-radius: var(--mlm-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    overflow: hidden;
    animation: dwSlideUp 0.25s ease-out;
}

@keyframes dwSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.dw-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.dw-modal-body {
    padding: 1.25rem 1.4rem;
}

.dw-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--mlm-border);
    background: #f8fafc;
}

/* Responsive */
@media (max-width: 991.98px) {
    .dw-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    .dw-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dw-kpi-value {
        font-size: 1.25rem;
    }

    .dw-map {
        height: 300px;
    }

    .dw-tech-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dw-cat-row {
        grid-template-columns: 80px 1fr 34px;
        font-size: 0.72rem;
    }
}

/* ============================================================
   Workforce Control Center
   ============================================================ */

.wf-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .wf-page .container {
        max-width: 1280px;
    }

/* KPI grid */
.wf-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.wf-kpi {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .wf-kpi::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.wf-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.wf-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.wf-kpi-foot {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 0.35rem;
}

.wf-kpi-bar {
    margin-top: 0.5rem;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.wf-kpi-bar-fill {
    height: 100%;
    background: currentColor;
    transition: width 0.6s ease;
}

.wf-unit {
    font-size: 1rem;
    opacity: 0.6;
    margin-left: 1px;
}

.kpi-techs::before {
    background: #1a3a4a;
}

.kpi-techs .wf-kpi-head i {
    color: #1a3a4a;
}

.kpi-jobs::before {
    background: #0891b2;
}

.kpi-jobs .wf-kpi-head i {
    color: #0891b2;
}

.kpi-awaiting::before {
    background: #3b82f6;
}

.kpi-awaiting .wf-kpi-value {
    color: #1d4ed8;
}

.kpi-awaiting .wf-kpi-head i {
    color: #3b82f6;
}

.kpi-overdue::before {
    background: #dc2626;
}

.kpi-overdue .wf-kpi-value {
    color: #b91c1c;
}

.kpi-overdue .wf-kpi-head i {
    color: #dc2626;
}

.kpi-resolution::before {
    background: #7c3aed;
}

.kpi-resolution .wf-kpi-head i {
    color: #7c3aed;
}

.kpi-sla::before {
    background: #16a34a;
}

.kpi-sla {
    color: #16a34a;
}

    .kpi-sla .wf-kpi-value {
        color: #15803d;
    }

    .kpi-sla .wf-kpi-head i {
        color: #16a34a;
    }

/* Chart cards */
.wf-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    height: 100%;
}

.wf-card-title {
    font-size: 0.9rem;
    color: var(--mlm-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Doughnut */
.wf-donut-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.wf-donut {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.wf-legend {
    flex: 1;
    min-width: 140px;
}

.wf-legend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    padding: 0.2rem 0;
}

.wf-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.wf-legend-label {
    flex: 1;
    color: var(--mlm-text-muted);
}

.wf-legend-count {
    font-weight: 700;
}

/* Load bars */
.wf-load-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wf-load-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wf-load-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mlm-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wf-load-body {
    flex: 1;
    min-width: 0;
}

.wf-load-name {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.wf-load-bar-track {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.wf-load-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0891b2, #16a34a);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.wf-load-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mlm-primary);
    min-width: 24px;
    text-align: right;
}

/* Snapshot */
.wf-snapshot {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wf-snapshot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--mlm-border);
    font-size: 0.85rem;
}

    .wf-snapshot-row:last-child {
        border-bottom: none;
    }

.wf-snapshot-label {
    color: var(--mlm-text-muted);
    font-weight: 500;
}

.wf-snapshot-value {
    font-weight: 700;
}

/* Roster card */
.wf-roster-card, .wf-jobs-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.25rem;
}

.wf-roster-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mlm-border);
}

/* Technician cards */
.wf-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.wf-tech-card {
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

    .wf-tech-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
    }

    .wf-tech-card.tech-available::before {
        background: #16a34a;
    }

    .wf-tech-card.tech-busy::before {
        background: #f59e0b;
    }

.wf-tech-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.wf-tech-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.wf-tech-info {
    flex: 1;
    min-width: 0;
}

.wf-tech-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--mlm-text);
    margin-bottom: 0.15rem;
}

.wf-tech-meta {
    font-size: 0.7rem;
    color: var(--mlm-text-muted);
}

.wf-tech-status {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 40px;
    font-weight: 600;
}

    .wf-tech-status.status-ok {
        background: #dcfce7;
        color: #15803d;
    }

    .wf-tech-status.status-busy {
        background: #fef3c7;
        color: #b45309;
    }

.wf-tech-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-top: 1px dashed var(--mlm-border);
    border-bottom: 1px dashed var(--mlm-border);
}

    .wf-tech-stats > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

.wf-tech-val {
    font-weight: 700;
    font-size: 0.95rem;
}

.wf-tech-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    color: var(--mlm-text-muted);
    margin-top: 2px;
}

.wf-tech-progress {
    margin: 0.65rem 0;
}

.wf-tech-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--mlm-text-muted);
    margin-bottom: 0.25rem;
}

.wf-tech-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.wf-tech-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.wf-tech-metrics {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--mlm-text-muted);
}

    .wf-tech-metrics > div {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
    }

.wf-tech-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

    .wf-tech-actions .btn {
        flex: 1;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

/* Mini avatar */
.wf-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.72rem;
    flex-shrink: 0;
}

/* Technician table */
.wf-tech-table {
    margin: 0;
    font-size: 0.85rem;
}

    .wf-tech-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.75rem;
    }

    .wf-tech-table tbody td {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .wf-tech-table tbody tr:hover {
        background: #f8fafc;
    }

/* Job cards toolbar + table */
.wf-jobs-toolbar {
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px dashed var(--mlm-border);
}

.wf-jobs-table {
    margin: 0;
    font-size: 0.85rem;
}

    .wf-jobs-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.75rem;
    }

    .wf-jobs-table tbody td {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .wf-jobs-table tbody tr.row-overdue {
        background: #fef2f2;
    }

    .wf-jobs-table tbody tr.row-emergency {
        box-shadow: inset 4px 0 0 #dc2626;
    }

    .wf-jobs-table tbody tr:hover {
        background: #f8fafc;
    }

/* Modals */
.wf-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 41, 55, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
}

.wf-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 540px;
    background: #fff;
    border-radius: var(--mlm-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    overflow: hidden;
    animation: wfSlideUp 0.25s ease-out;
}

@keyframes wfSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.wf-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
}










/* ============================================================
   Technician Job Card Page
   ============================================================ */

.jc-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .jc-page .container {
        max-width: 1280px;
    }

/* Status strip */
.jc-status-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .jc-status-strip::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
    }

    .jc-status-strip.strip-assigned::before {
        background: #0891b2;
    }

    .jc-status-strip.strip-inprogress::before {
        background: #f59e0b;
    }

    .jc-status-strip.strip-onhold::before {
        background: #64748b;
    }

    .jc-status-strip.strip-complete::before {
        background: #16a34a;
    }

    .jc-status-strip.strip-finalised::before {
        background: #1e293b;
    }

.jc-status-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.jc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 1rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.8rem;
}

.jc-status-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.82rem;
    color: var(--mlm-text-muted);
}

    .jc-status-meta span {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
    }

.jc-status-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    .jc-status-actions .btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.82rem;
        border-radius: 40px;
    }

/* Card */
.jc-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.25rem;
}

.jc-card-head {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mlm-border);
}

/* Details list */
.jc-details {
    margin: 0;
}

    .jc-details > div {
        display: flex;
        padding: 0.65rem 0;
        border-bottom: 1px dashed var(--mlm-border);
    }

        .jc-details > div:last-child {
            border-bottom: none;
        }

    .jc-details dt {
        width: 32%;
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--mlm-text-muted);
        flex-shrink: 0;
    }

    .jc-details dd {
        margin: 0;
        font-size: 0.85rem;
        color: var(--mlm-text);
        font-weight: 500;
        word-break: break-word;
    }

.jc-details-compact > div {
    padding: 0.4rem 0;
}

/* Description */
.jc-description {
    font-size: 0.9rem;
    color: var(--mlm-text);
    line-height: 1.65;
    white-space: pre-wrap;
    margin: 0;
}

/* Citizen photos */
.jc-citizen-photos {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--mlm-border);
}

.jc-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mlm-border);
    display: inline-block;
}

    .jc-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Mini-map */
.jc-map {
    width: 100%;
    height: 280px;
    border-radius: var(--mlm-radius-sm);
    z-index: 1;
}

/* Work log timeline */
.jc-timeline {
    position: relative;
    padding-left: 1.75rem;
}

    .jc-timeline::before {
        content: '';
        position: absolute;
        left: 12px;
        top: 8px;
        bottom: 8px;
        width: 2px;
        background: linear-gradient(to bottom, var(--mlm-accent), #e2e8f0);
    }

.jc-timeline-item {
    position: relative;
    padding: 0.7rem 0 0.7rem 0.6rem;
}

    .jc-timeline-item:not(:last-child) {
        border-bottom: 1px dashed var(--mlm-border);
    }

.jc-timeline-marker {
    position: absolute;
    left: -1.7rem;
    top: 0.7rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--mlm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 1;
}

.jc-timeline-body {
    padding-left: 0.4rem;
}

/* Gallery */
.jc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
}

.jc-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mlm-border);
    transition: var(--transition);
}

    .jc-gallery-item:hover {
        transform: scale(1.02);
        box-shadow: var(--mlm-shadow-sm);
    }

    .jc-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.jc-gallery-type {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Photo upload area (reuse from complaint page styles) */
.jc-card .image-upload-area {
    min-height: 160px;
}

/* Modal */
.jc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 41, 55, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
}

.jc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 540px;
    background: #fff;
    border-radius: var(--mlm-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    overflow: hidden;
    animation: jcSlideUp 0.25s ease-out;
}

@keyframes jcSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.jc-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.jc-modal-body {
    padding: 1.25rem 1.4rem;
}

.jc-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--mlm-border);
    background: #f8fafc;
}

/* Responsive */
@media (max-width: 767.98px) {
    .jc-status-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .jc-status-actions {
        justify-content: stretch;
    }

        .jc-status-actions .btn {
            flex: 1;
        }

    .jc-details > div {
        flex-direction: column;
        gap: 0.15rem;
    }

    .jc-details dt {
        width: 100%;
    }

    .jc-map {
        height: 220px;
    }

    .jc-thumb {
        width: 68px;
        height: 68px;
    }
}

/* ============================================================
   Dashboard (role-aware)
   ============================================================ */

.dash-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .dash-page .container {
        max-width: 1280px;
    }

/* ---------- KPI grid ---------- */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.dash-kpi {
    text-align: left;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    color: inherit;
}

    .dash-kpi:hover {
        transform: translateY(-2px);
        box-shadow: var(--mlm-shadow);
        border-color: var(--mlm-primary);
    }

    .dash-kpi::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.dash-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.dash-kpi-value {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.dash-kpi-foot {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 0.35rem;
}

.kpi-total::before {
    background: #1a3a4a;
}

.kpi-total .dash-kpi-head i {
    color: #1a3a4a;
}

.kpi-new::before {
    background: #64748b;
}

.kpi-new .dash-kpi-head i {
    color: #475569;
}

.kpi-assigned::before {
    background: #0891b2;
}

.kpi-assigned .dash-kpi-value {
    color: #0e7490;
}

.kpi-assigned .dash-kpi-head i {
    color: #0891b2;
}

.kpi-inprogress::before {
    background: #f59e0b;
}

.kpi-inprogress .dash-kpi-value {
    color: #b45309;
}

.kpi-inprogress .dash-kpi-head i {
    color: #f59e0b;
}

.kpi-resolved::before {
    background: #16a34a;
}

.kpi-resolved .dash-kpi-value {
    color: #15803d;
}

.kpi-resolved .dash-kpi-head i {
    color: #16a34a;
}

.kpi-emergency::before {
    background: #dc2626;
}

.kpi-emergency .dash-kpi-value {
    color: #b91c1c;
}

.kpi-emergency .dash-kpi-head i {
    color: #dc2626;
}

.kpi-emergency.kpi-hot {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
    animation: dashPulse 2.4s ease-in-out infinite;
}

@keyframes dashPulse {
    0%, 100% {
        box-shadow: var(--mlm-shadow-sm);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
    }
}

/* ---------- Cards ---------- */
.dash-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    display: flex;
    flex-direction: column;
}

.dash-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mlm-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--mlm-border);
}

/* ---------- Quick actions ---------- */
.dash-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--mlm-radius-sm);
    border: 1px solid var(--mlm-border);
    background: #f8fafc;
    text-decoration: none;
    color: var(--mlm-text);
    transition: var(--transition);
}

    .dash-action:hover {
        background: white;
        border-color: var(--mlm-primary);
        transform: translateX(2px);
        color: var(--mlm-primary);
    }

.dash-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.dash-action-body {
    flex: 1;
    min-width: 0;
}

.dash-action-title {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
}

.dash-action-sub {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 2px;
}

.dash-action-chevron {
    color: var(--mlm-text-muted);
    font-size: 0.8rem;
}

/* ---------- Doughnut ---------- */
.dash-donut-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.dash-donut {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.dash-legend {
    flex: 1;
    min-width: 140px;
}

.dash-legend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    padding: 0.22rem 0;
}

.dash-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.dash-legend-label {
    flex: 1;
    color: var(--mlm-text-muted);
}

.dash-legend-count {
    font-weight: 700;
}

/* ---------- Alerts ---------- */
.dash-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--mlm-radius-sm);
    border: 1px solid transparent;
}

    .dash-alert.alert-danger {
        background: #fef2f2;
        border-color: #fecaca;
        color: #991b1b;
    }

    .dash-alert.alert-warning {
        background: #fffbeb;
        border-color: #fde68a;
        color: #92400e;
    }

    .dash-alert.alert-info {
        background: #eff6ff;
        border-color: #bfdbfe;
        color: #1e40af;
    }

    .dash-alert.alert-success {
        background: #f0fdf4;
        border-color: #bbf7d0;
        color: #166534;
    }

.dash-alert-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.dash-alert-title {
    font-weight: 700;
    font-size: 0.85rem;
}

.dash-alert-sub {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 2px;
}

    .dash-alert-sub a {
        color: inherit;
        font-weight: 600;
        text-decoration: underline;
    }

/* ---------- Table card ---------- */
.dash-table-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
}

.dash-table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.dash-table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dash-table {
    margin: 0;
    font-size: 0.85rem;
}

    .dash-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.85rem;
        white-space: nowrap;
    }

    .dash-table tbody td {
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .dash-table tbody tr.row-overdue {
        background: #fffbeb;
    }

    .dash-table tbody tr.row-emergency {
        box-shadow: inset 3px 0 0 #dc2626;
    }

    .dash-table tbody tr:hover {
        background: #f8fafc;
    }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-kpi-value {
        font-size: 1.25rem;
    }

    .dash-table-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dash-table-actions {
        justify-content: stretch;
    }

        .dash-table-actions > * {
            flex: 1;
        }

    .dash-table thead th, .dash-table tbody td {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ============================================================
   Profile Page
   ============================================================ */

.profile-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .profile-page .container {
        max-width: 1280px;
    }

/* ---------- Profile hero ---------- */
.profile-hero {
    position: relative;
    border-radius: var(--mlm-radius);
    overflow: hidden;
    box-shadow: var(--mlm-shadow-lg);
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--mlm-primary) 0%, var(--mlm-primary-dark) 60%, var(--mlm-accent-dark) 100%);
    z-index: 0;
}

    .profile-hero-bg::after {
        content: '';
        position: absolute;
        top: -40%;
        right: -10%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
        border-radius: 50%;
    }

.profile-hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Avatar */
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    overflow: hidden;
}

    .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.avatar-edit-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mlm-card-bg);
    color: var(--mlm-primary);
    border: 2px solid white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

    .avatar-edit-btn:hover {
        transform: scale(1.1);
    }

/* Identity */
.profile-identity {
    flex: 1;
    min-width: 220px;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.4rem 0;
    color: white;
    letter-spacing: -0.01em;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

    .profile-tags .badge {
        font-size: 0.72rem;
        padding: 0.35rem 0.7rem;
        border-radius: 40px;
        font-weight: 600;
    }

.role-badge {
    color: white;
}

.dept-badge {
    background: rgba(255,255,255,0.15);
    color: white;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
}

/* Stats */
.profile-stats {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.15);
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.profile-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* ---------- Tabs ---------- */
.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0.35rem;
    margin: 0 0 1rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: 16px;
    box-shadow: var(--mlm-shadow-sm);
}

.profile-tab {
    border: none;
    background: transparent;
    color: var(--mlm-text);
    padding: 0.55rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
    white-space: nowrap;
}

    .profile-tab:hover {
        background: #f1f5f9;
        color: var(--mlm-primary);
    }

    .profile-tab.active {
        background: var(--mlm-primary);
        color: white;
        font-weight: 600;
    }

/* ---------- Card ---------- */
.profile-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.5rem;
}

.profile-card-head {
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--mlm-border);
}

/* ---------- Form ---------- */
.profile-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.4rem;
    display: block;
}

.profile-input-wrap {
    position: relative;
}

.profile-input {
    width: 100%;
    border: 1.5px solid var(--mlm-border);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    background: white;
    color: var(--mlm-text);
    transition: var(--transition);
}

    .profile-input.with-icon {
        padding-left: 2.75rem;
        padding-right: 2.75rem;
    }

    .profile-input:focus {
        border-color: var(--mlm-primary);
        box-shadow: 0 0 0 4px rgba(26,58,74,0.08);
        outline: none;
    }

.profile-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.profile-input-wrap:focus-within .profile-input-icon {
    color: var(--mlm-primary);
}

.profile-input-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
}

    .profile-input-btn:hover {
        color: var(--mlm-primary);
        background: #f1f5f9;
    }

.profile-error {
    font-size: 0.78rem;
    color: var(--mlm-danger);
    margin-top: 0.25rem;
    display: block;
}

.profile-input-group {
    margin-bottom: 1rem;
}

/* ---------- Security card ---------- */
.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--mlm-border);
    font-size: 0.85rem;
}

    .security-item:last-child {
        border-bottom: none;
    }

.security-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mlm-text);
}

.security-value {
    font-weight: 600;
    color: var(--mlm-text-muted);
}

/* ---------- Account info list ---------- */
.account-info-list {
    margin: 0;
}

    .account-info-list > div {
        display: flex;
        padding: 0.7rem 0;
        border-bottom: 1px solid #f1f5f9;
    }

        .account-info-list > div:last-child {
            border-bottom: none;
        }

    .account-info-list dt {
        width: 40%;
        color: var(--mlm-text-muted);
        font-size: 0.82rem;
        font-weight: 500;
        flex-shrink: 0;
    }

    .account-info-list dd {
        margin: 0;
        font-size: 0.85rem;
        color: var(--mlm-text);
        word-break: break-word;
    }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .profile-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .profile-stats {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.15);
        padding-top: 1rem;
        width: 100%;
        justify-content: center;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }

    .account-info-list > div {
        flex-direction: column;
        gap: 0.2rem;
    }

    .account-info-list dt {
        width: 100%;
    }
}
/* ============================================================================
   MATJHABENG PORTAL — COMPLETE VISUAL SYSTEM
   Evergreen and gold palette, applied consistently across account and portal UI.
   Existing component names and page structure are preserved.
   ============================================================================ */
:root {
    color-scheme: light;
    --mlm-primary: #164b3a;
    --mlm-primary-dark: #103a2e;
    --mlm-primary-light: #2f7659;
    --mlm-accent: #25804e;
    --mlm-accent-dark: #1b633d;
    --mlm-gold: #d8a63e;
    --mlm-gold-light: #efd28b;
    --mlm-warning: #bd8420;
    --mlm-danger: #b83d42;
    --mlm-success: #25804e;
    --mlm-bg: #f3f6f3;
    --mlm-card-bg: #ffffff;
    --mlm-border: #e1e8e2;
    --mlm-text: #1d2d25;
    --mlm-text-muted: #68786e;
    --mlm-shadow-sm: 0 2px 8px rgba(23, 54, 39, .045);
    --mlm-shadow: 0 8px 24px rgba(23, 54, 39, .075);
    --mlm-shadow-lg: 0 20px 54px rgba(23, 54, 39, .14);
    --mlm-radius: 18px;
    --mlm-radius-sm: 11px;
    --transition: 180ms cubic-bezier(.2, .7, .2, 1);
    --surface-highlight: #f7faf7;
}

html {
    scroll-behavior: smooth;
    background: var(--mlm-bg);
}

body {
    color: var(--mlm-text);
    background: var(--mlm-bg);
    font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    color: var(--mlm-primary-dark);
    background: rgba(216, 166, 62, .32);
}

/* Account pages */
.account-page {
    --acc-primary: var(--mlm-primary);
    --acc-primary-dark: var(--mlm-primary-dark);
    --acc-primary-light: #398864;
    --acc-gold: var(--mlm-gold);
    --acc-gold-dark: var(--mlm-warning);
    --acc-gold-light: var(--mlm-gold-light);
    --acc-text: var(--mlm-text);
    --acc-muted: var(--mlm-text-muted);
    --acc-border: var(--mlm-border);
    --acc-bg: #f8faf8;
    --acc-danger: var(--mlm-danger);
    --acc-danger-dark: #963238;
    --acc-shadow-lg: var(--mlm-shadow-lg);
    --acc-radius: 20px;
    --acc-radius-sm: 12px;
    --acc-transition: var(--transition);
    isolation: isolate;
    background: radial-gradient(ellipse at 80% 12%, rgba(37,128,78,.11), transparent 34%), radial-gradient(ellipse at 12% 92%, rgba(216,166,62,.11), transparent 36%), #f2f6f2;
}

    .account-page::before {
        top: -18%;
        right: -12%;
        width: 48%;
        height: 85%;
        background: radial-gradient(ellipse, rgba(22,75,58,.07), transparent 70%);
    }

    .account-page::after {
        height: 4px;
        opacity: .75;
        background: linear-gradient(90deg, transparent, var(--mlm-gold), #f2d58f, var(--mlm-gold), transparent);
    }

.account-card {
    border: 1px solid rgba(225,232,226,.9);
    border-radius: 20px;
    box-shadow: 0 24px 65px rgba(20,58,42,.16);
    animation: accFadeInUp .45s ease both;
}

    .account-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 28px 72px rgba(20,58,42,.19);
    }

    .account-card .card-header-custom {
        padding: 2.25rem 2rem 1.8rem;
        background: radial-gradient(circle at 82% 15%, rgba(239,210,139,.16), transparent 30%), linear-gradient(140deg,#103a2e 0%,#164b3a 62%,#267354 100%);
    }

        .account-card .card-header-custom .logo-wrapper {
            border-color: rgba(239,210,139,.95);
            box-shadow: 0 8px 24px rgba(4,28,20,.2);
            animation: none;
        }

        .account-card .card-header-custom .header-badge {
            color: #f6dfa7;
            background: rgba(216,166,62,.13);
            border-color: rgba(239,210,139,.28);
            letter-spacing: .1em;
        }

        .account-card .card-header-custom h2 {
            letter-spacing: -.035em;
        }

    .account-card .card-body-custom {
        padding: 2rem;
    }

/* Fields and controls */
.form-floating-custom .form-control,
.profile-input,
.form-control,
.form-select {
    border-color: var(--mlm-border);
    border-radius: 11px;
    color: var(--mlm-text);
    background-color: #fbfcfb;
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

    .form-floating-custom .form-control:focus,
    .profile-input:focus,
    .form-control:focus,
    .form-select:focus {
        border-color: #398864;
        background-color: #fff;
        box-shadow: 0 0 0 3px rgba(38,116,88,.13);
        outline: none;
    }

    .form-floating-custom .form-control.is-invalid,
    .form-control.is-invalid {
        border-color: var(--mlm-danger);
    }

/* Navigation and menus */
.navbar-main {
    background: linear-gradient(105deg,#103a2e 0%,#164b3a 70%,#1b5e43 100%);
    border-bottom: 1px solid rgba(239,210,139,.24);
    box-shadow: 0 6px 22px rgba(16,45,34,.18);
}

    .navbar-main .brand-title, .navbar-main .brand-text {
        letter-spacing: -.025em;
    }

        .navbar-main .brand-title .highlight {
            color: #f0ce81;
        }

    .navbar-main .nav-compact .nav-link {
        border-radius: 9px;
        transition: color var(--transition), background-color var(--transition);
    }

        .navbar-main .nav-compact .nav-link:hover,
        .navbar-main .nav-compact .nav-link:focus,
        .navbar-main .nav-compact .nav-link.active {
            color: #fff;
            background: rgba(255,255,255,.11);
        }

        .navbar-main .nav-compact .nav-link::after {
            background: var(--mlm-gold);
        }

.dropdown-menu-professional {
    border: 1px solid var(--mlm-border);
    border-radius: 13px;
    box-shadow: var(--mlm-shadow-lg);
    padding: .45rem;
}

    .dropdown-menu-professional .dropdown-item {
        border-radius: 8px;
    }

/* Buttons and accessible focus */
.btn {
    border-radius: 9px;
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition);
}

.btn-account, .btn-login, .btn-mlm-primary {
    border-radius: 10px;
    font-weight: 650;
    letter-spacing: .01em;
    box-shadow: 0 4px 12px rgba(22,75,58,.15);
}

    .btn-account:hover, .btn-login:hover, .btn-mlm-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(22,75,58,.2);
    }

.btn-outline-mlm-primary:hover {
    color: #fff;
    background: var(--mlm-primary);
    border-color: var(--mlm-primary);
}

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid rgba(216,166,62,.78);
    outline-offset: 2px;
}

/* Page canvas and branded section headers */
.contact-page, .notifications-page, .my-complaints-page,
.complaint-page, .dash-page, .profile-page {
    color: var(--mlm-text);
    background: radial-gradient(ellipse at 95% 0%, rgba(37,128,78,.045), transparent 28%), var(--mlm-bg);
}

    .contact-page .container, .notifications-page .container,
    .my-complaints-page .container, .dash-page .container,
    .profile-page .container {
        padding-top: 1.5rem;
    }

/*.mlm-header {
    color: #fff;
    border: 0;
    border-radius: var(--mlm-radius);
    background: radial-gradient(circle at 88% 12%, rgba(239,210,139,.18), transparent 28%), linear-gradient(125deg,#103a2e,#164b3a 65%,#267354);
    box-shadow: var(--mlm-shadow);
}*/

/* Cards, KPIs, lists and data surfaces */
.dash-kpi, .dash-card, .dash-table-card, .profile-card,
.stat-tile, .toolbar-card, .complaint-card, .notif-card,
.notif-home-card, .table-view-wrapper {
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    background: var(--mlm-card-bg);
    box-shadow: var(--mlm-shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

    .dash-kpi:hover, .dash-card:hover, .profile-card:hover, .stat-tile:hover,
    .complaint-card:hover, .notif-card:hover, .notif-home-card:hover {
        transform: translateY(-2px);
        border-color: #d0ded3;
        box-shadow: var(--mlm-shadow);
    }

.dash-kpi-value, .dash-card-title, .profile-name, .stat-tile-value,
.notif-card-title, .notif-home-card-title {
    color: var(--mlm-text);
    letter-spacing: -.03em;
}

.dash-kpi-head, .profile-card-head {
    border-color: var(--mlm-border);
}

.dash-kpi-foot, .dash-action-sub, .notif-chip-meta,
.notif-card-footer, .profile-meta {
    color: var(--mlm-text-muted);
}

.dash-action {
    border: 1px solid var(--mlm-border);
    border-radius: 13px;
    background: #fff;
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

    .dash-action:hover {
        transform: translateY(-1px);
        border-color: rgba(37,128,78,.3);
        background: var(--surface-highlight);
        box-shadow: var(--mlm-shadow-sm);
    }

/* Tables and dense data */
.dash-table-card, .table-view-wrapper {
    overflow: hidden;
}

.dash-table {
    color: var(--mlm-text);
}

    .dash-table thead th {
        color: #53665a;
        background: #f2f6f2;
        border-bottom: 1px solid var(--mlm-border);
        font-size: .7rem;
        letter-spacing: .08em;
    }

    .dash-table tbody td {
        border-bottom-color: #edf1ed;
    }

    .dash-table tbody tr:hover {
        background: #f5f9f5;
    }

    .dash-table tbody tr.row-overdue {
        background: #fffaf0;
    }

/* Notifications and status filters */
.filter-chip, .notif-chip, .badge-notification,
.urg-critical, .urg-high, .urg-normal, .urg-low {
    border-radius: 999px;
}

.filter-chip {
    border: 1px solid var(--mlm-border);
    background: #fff;
    transition: border-color var(--transition), color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

    .filter-chip:hover, .filter-chip.active {
        border-color: rgba(37,128,78,.28);
        box-shadow: 0 3px 10px rgba(22,75,58,.08);
    }

.notif-strip, .notif-home-strip {
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    background: #fff;
    box-shadow: var(--mlm-shadow-sm);
}

.notif-card-accent {
    border-radius: 999px;
}

/* Profile */
.profile-hero {
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: var(--mlm-shadow-lg);
}

.profile-hero-bg {
    background: radial-gradient(circle at 88% 12%, rgba(239,210,139,.17), transparent 30%), linear-gradient(125deg,#103a2e 0%,#164b3a 66%,#267354 100%);
}

.profile-tabs {
    border-radius: 13px;
    box-shadow: var(--mlm-shadow-sm);
}

.profile-tab.active {
    background: var(--mlm-primary);
    box-shadow: 0 4px 11px rgba(22,75,58,.19);
}

.profile-input {
    background: #fbfcfb;
}

* {
    scrollbar-color: #b8c9bd transparent;
    scrollbar-width: thin;
}

@media (max-width: 767.98px) {
    .account-card .card-header-custom {
        padding: 1.75rem 1.35rem 1.45rem;
    }

    .account-card .card-body-custom {
        padding: 1.5rem 1.25rem;
    }

    .contact-page .container, .notifications-page .container,
    .my-complaints-page .container, .dash-page .container,
    .profile-page .container {
        padding-top: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   Privacy Policy Page
   ============================================================ */

.privacy-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .privacy-page .container {
        max-width: 1280px;
    }

/* ---------- Meta banner ---------- */
.privacy-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.privacy-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .privacy-meta-item i {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: #eef2ff;
        color: var(--mlm-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

.privacy-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
}

.privacy-meta-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mlm-text);
}

/* ---------- Table of contents ---------- */
.privacy-toc {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    position: sticky;
    top: 1rem;
}

.privacy-toc-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mlm-primary);
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--mlm-border);
}

.privacy-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.privacy-toc-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--mlm-text-muted);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

    .privacy-toc-link:hover {
        background: #f1f5f9;
        color: var(--mlm-primary);
    }

    .privacy-toc-link.active {
        background: var(--mlm-primary);
        color: white;
        font-weight: 600;
    }

.privacy-toc-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--mlm-primary);
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.privacy-toc-link.active .privacy-toc-number {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ---------- Content card ---------- */
.privacy-content {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 2rem;
}

.privacy-intro {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--mlm-text);
    background: #f8fafc;
    border-left: 4px solid var(--mlm-accent);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

/* ---------- Sections ---------- */
.privacy-section {
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
    scroll-margin-top: 100px;
}

    .privacy-section:not(:last-of-type) {
        border-bottom: 1px dashed var(--mlm-border);
        margin-bottom: 1.5rem;
    }

    .privacy-section p {
        font-size: 0.9rem;
        line-height: 1.7;
        color: var(--mlm-text);
        margin-bottom: 0.75rem;
    }

.privacy-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mlm-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.privacy-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--mlm-primary), var(--mlm-primary-dark));
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(26, 58, 74, 0.25);
}

/* ---------- Lists ---------- */
.privacy-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1rem;
}

    .privacy-list li {
        position: relative;
        padding: 0.4rem 0 0.4rem 1.75rem;
        font-size: 0.9rem;
        line-height: 1.55;
        color: var(--mlm-text);
    }

        .privacy-list li::before {
            content: '✓';
            position: absolute;
            left: 0;
            top: 0.4rem;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #dcfce7;
            color: #15803d;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
        }

/* ---------- Callouts ---------- */
.privacy-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin: 1rem 0;
}

.privacy-callout-muted {
    background: #f8fafc;
    border-color: var(--mlm-border);
}

.privacy-callout-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.privacy-callout-regulator {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.privacy-callout-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: white;
    color: var(--mlm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.privacy-callout-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--mlm-primary);
    margin-bottom: 0.2rem;
}

/* ---------- Highlight banner ---------- */
.privacy-highlight {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    font-size: 0.88rem;
    color: #166534;
    margin: 0.75rem 0 1rem;
}

    .privacy-highlight i {
        font-size: 1.2rem;
        color: #16a34a;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

/* ---------- Collect cards ---------- */
.privacy-collect-card {
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: 12px;
    padding: 1rem;
    height: 100%;
    transition: var(--transition);
}

    .privacy-collect-card:hover {
        border-color: var(--mlm-primary);
        box-shadow: var(--mlm-shadow-sm);
    }

.privacy-collect-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--mlm-primary);
    margin-bottom: 0.65rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--mlm-border);
}

    .privacy-collect-head i {
        font-size: 1rem;
    }

.privacy-collect-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
}

    .privacy-collect-list li {
        padding: 0.25rem 0 0.25rem 1rem;
        color: var(--mlm-text-muted);
        position: relative;
    }

        .privacy-collect-list li::before {
            content: '•';
            position: absolute;
            left: 0;
            color: var(--mlm-accent);
            font-weight: 700;
        }

/* ---------- Legal basis grid ---------- */
.privacy-basis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 0.85rem;
}

.privacy-basis {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

    .privacy-basis i {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #eef2ff;
        color: var(--mlm-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        flex-shrink: 0;
    }

.privacy-basis-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--mlm-text);
    margin-bottom: 0.15rem;
}

.privacy-basis-sub {
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
    line-height: 1.5;
}

/* ---------- Retention table ---------- */
.privacy-retention-table {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--mlm-border);
    margin-top: 0.75rem;
}

    .privacy-retention-table table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.85rem;
    }

    .privacy-retention-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-weight: 600;
        color: #475569;
        padding: 0.75rem 1rem;
        text-align: left;
        border-bottom: 2px solid #e2e8f0;
        white-space: nowrap;
    }

    .privacy-retention-table tbody td {
        padding: 0.7rem 1rem;
        border-bottom: 1px solid #f1f5f9;
        color: var(--mlm-text);
    }

    .privacy-retention-table tbody tr:last-child td {
        border-bottom: none;
    }

/* ---------- Security items ---------- */
.privacy-security-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    height: 100%;
}

    .privacy-security-item i {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #dcfce7;
        color: #15803d;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        flex-shrink: 0;
    }

/* ---------- Rights grid ---------- */
.privacy-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 0.85rem;
}

.privacy-right {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    transition: var(--transition);
}

    .privacy-right:hover {
        border-color: var(--mlm-primary);
        box-shadow: var(--mlm-shadow-sm);
    }

.privacy-right-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--mlm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.privacy-right-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--mlm-text);
    margin-bottom: 0.15rem;
}

.privacy-right-sub {
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
    line-height: 1.5;
}

/* ---------- Contact cards ---------- */
.privacy-contact-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: 12px;
    padding: 1rem;
    height: 100%;
}

.privacy-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eef2ff;
    color: var(--mlm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.privacy-contact-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--mlm-primary);
    margin-bottom: 0.25rem;
}

.privacy-contact-sub {
    font-size: 0.8rem;
    color: var(--mlm-text-muted);
    line-height: 1.5;
}

.privacy-contact-link {
    font-size: 0.82rem;
    color: var(--mlm-accent);
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

    .privacy-contact-link:hover {
        text-decoration: underline;
    }

/* ---------- Footer ---------- */
.privacy-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px dashed var(--mlm-border);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-top: 1.5rem;
    font-size: 0.82rem;
    color: var(--mlm-text-muted);
}

    .privacy-footer i {
        color: var(--mlm-accent);
        font-size: 1.1rem;
    }

    .privacy-footer a {
        color: var(--mlm-accent);
        font-weight: 600;
        text-decoration: none;
    }

        .privacy-footer a:hover {
            text-decoration: underline;
        }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .privacy-toc {
        position: static;
        margin-bottom: 1rem;
    }

    .privacy-toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .privacy-toc-link {
        padding: 0.35rem 0.65rem;
        font-size: 0.78rem;
        width: auto;
        background: #f8fafc;
        border: 1px solid var(--mlm-border);
    }

    .privacy-toc-number {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .privacy-content {
        padding: 1.25rem;
    }

    .privacy-meta {
        grid-template-columns: repeat(2, 1fr);
        padding: 0.9rem 1rem;
    }

    .privacy-meta-item {
        gap: 0.5rem;
    }

        .privacy-meta-item i {
            width: 34px;
            height: 34px;
            font-size: 0.95rem;
        }

    .privacy-heading {
        font-size: 1rem;
    }

    .privacy-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .privacy-retention-table thead th,
    .privacy-retention-table tbody td {
        padding: 0.55rem 0.7rem;
        font-size: 0.78rem;
    }
}

@media print {
    .privacy-toc,
    .breadcrumb-container,
    .privacy-meta,
    .mlm-header,
    .privacy-footer button {
        display: none !important;
    }

    .privacy-content {
        box-shadow: none;
        border: none;
    }
}

/* ============================================================
   Complaint Capture — Role-aware additions
   ============================================================ */

/* Citizen auto-fill banner */
.auto-fill-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 0.95rem 1.15rem;
    color: #166534;
    font-size: 0.88rem;
    line-height: 1.5;
}

    .auto-fill-banner i {
        font-size: 1.2rem;
        color: #16a34a;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

    .auto-fill-banner a {
        color: #15803d;
        font-weight: 600;
        text-decoration: none;
    }

        .auto-fill-banner a:hover {
            text-decoration: underline;
        }

/* Staff scope banner */
.staff-scope-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 0.9rem 1.15rem;
    color: #1e40af;
    font-size: 0.88rem;
    line-height: 1.5;
}

    .staff-scope-banner i {
        font-size: 1.15rem;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

/* Read-only field display */
.readonly-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f8fafc;
    border: 1.5px solid var(--mlm-border);
    border-radius: var(--mlm-radius-sm);
    padding: 0.7rem 1rem;
    min-height: 44px;
    font-size: 0.9rem;
    color: var(--mlm-text);
}

    .readonly-field i {
        color: var(--mlm-text-muted);
        font-size: 1rem;
        flex-shrink: 0;
    }

    .readonly-field span {
        font-weight: 500;
    }

/* ============================================================
   Activity Logs Page
   ============================================================ */

.logs-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .logs-page .container {
        max-width: 1280px;
    }

/* ---------- Summary tiles ---------- */
.logs-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.logs-summary-tile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .logs-summary-tile::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.logs-summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.logs-summary-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.logs-summary-label {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

.tile-total::before {
    background: #1a3a4a;
}

.tile-total .logs-summary-icon {
    background: #eef2ff;
    color: #1a3a4a;
}

.tile-today::before {
    background: #0891b2;
}

.tile-today .logs-summary-icon {
    background: #cffafe;
    color: #0e7490;
}

.tile-users::before {
    background: #7c3aed;
}

.tile-users .logs-summary-icon {
    background: #ede9fe;
    color: #6d28d9;
}

.tile-actions::before {
    background: #f59e0b;
}

.tile-actions .logs-summary-icon {
    background: #fef3c7;
    color: #b45309;
}

/* ---------- Toolbar ---------- */
.logs-toolbar {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.logs-toolbar-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--mlm-border);
}

/* ---------- Table ---------- */
.logs-table-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
}

.logs-table {
    margin: 0;
    font-size: 0.85rem;
}

    .logs-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.85rem;
        white-space: nowrap;
    }

    .logs-table tbody td {
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .logs-table tbody tr:hover {
        background: #f8fafc;
    }

.details-cell {
    max-width: 400px;
    word-break: break-word;
}

/* ---------- Badges ---------- */
.logs-action-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
    border-radius: 40px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
}

.action-success {
    background: #dcfce7;
    color: #15803d;
}

.action-warning {
    background: #fef3c7;
    color: #b45309;
}

.action-info {
    background: #cffafe;
    color: #0e7490;
}

.action-primary {
    background: #e0e7ff;
    color: #3730a3;
}

.action-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.action-accent {
    background: #f3e8ff;
    color: #6d28d9;
}

.action-muted {
    background: #f1f5f9;
    color: #475569;
}

.entity-badge {
    background: #eef2ff;
    color: var(--mlm-primary);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #c7d2fe;
}

/* ---------- Pagination ---------- */
.logs-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--mlm-border);
    background: #f8fafc;
}

    .logs-pagination .btn {
        min-width: 34px;
        font-size: 0.78rem;
        padding: 0.35rem 0.6rem;
    }

    .logs-pagination .btn-light {
        background: #fff;
        border: 1px solid var(--mlm-border);
        color: var(--mlm-text-muted);
    }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .logs-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .logs-toolbar-foot {
        flex-direction: column;
        align-items: stretch;
    }

        .logs-toolbar-foot .d-flex {
            justify-content: stretch;
        }

            .logs-toolbar-foot .d-flex .btn {
                flex: 1;
            }

    .logs-table thead th,
    .logs-table tbody td {
        padding: 0.55rem 0.5rem;
        font-size: 0.78rem;
    }

    .details-cell {
        max-width: 180px;
    }
}

/* ============================================================
   User Role Manager
   ============================================================ */

.users-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .users-page .container {
        max-width: 1280px;
    }

/* Summary tiles */
.users-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.users-summary-tile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .users-summary-tile::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.users-summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.users-summary-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.users-summary-label {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

.tile-total::before {
    background: #1a3a4a;
}

.tile-total .users-summary-icon {
    background: #eef2ff;
    color: #1a3a4a;
}

.tile-active::before {
    background: #16a34a;
}

.tile-active .users-summary-icon {
    background: #dcfce7;
    color: #15803d;
}

.tile-staff::before {
    background: #7c3aed;
}

.tile-staff .users-summary-icon {
    background: #ede9fe;
    color: #6d28d9;
}

.tile-nodep::before {
    background: #f59e0b;
}

.tile-nodep .users-summary-icon {
    background: #fef3c7;
    color: #b45309;
}

/* Toolbar */
.users-toolbar {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.users-toolbar-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--mlm-border);
}

/* Table */
.users-table-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
}

.users-table {
    margin: 0;
    font-size: 0.85rem;
}

    .users-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.85rem;
        white-space: nowrap;
    }

    .users-table tbody td {
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .users-table tbody tr:hover {
        background: #f8fafc;
    }

    .users-table tr.row-editing {
        background: #fffbeb !important;
    }

    .users-table tr.row-inactive {
        opacity: 0.75;
    }

/* Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.avatar-active {
    background: var(--mlm-accent);
}

.avatar-inactive {
    background: #94a3b8;
}

/* Role badges */
.role-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.65rem;
    border-radius: 40px;
    font-weight: 600;
}

/* Role checkboxes in edit mode */
.role-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    max-width: 380px;
}

    .role-checkboxes .form-check {
        margin: 0;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
    }

    .role-checkboxes .form-check-input {
        width: 15px;
        height: 15px;
        margin: 0;
    }

    .role-checkboxes .form-check-label {
        font-size: 0.78rem;
        cursor: pointer;
    }

/* Responsive */
@media (max-width: 991.98px) {
    .users-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .role-checkboxes {
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .users-toolbar-foot {
        flex-direction: column;
        align-items: stretch;
    }

        .users-toolbar-foot .d-flex {
            justify-content: stretch;
        }

            .users-toolbar-foot .d-flex .btn {
                flex: 1;
            }

    .users-table thead th,
    .users-table tbody td {
        padding: 0.55rem 0.5rem;
        font-size: 0.78rem;
    }

    .role-checkboxes .form-check-label {
        font-size: 0.72rem;
    }
}

/* ============================================================
   Executive Analytics Page
   ============================================================ */

.an-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .an-page .container {
        max-width: 1280px;
    }

/* Filter bar */
.an-filter-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

/* KPI grid */
.an-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.an-kpi {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .an-kpi::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.an-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.an-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.an-kpi-foot {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 0.35rem;
}

.an-unit {
    font-size: 1rem;
    opacity: 0.6;
    margin-left: 1px;
}

.kpi-total::before {
    background: #1a3a4a;
}

.kpi-total .an-kpi-head i {
    color: #1a3a4a;
}

.kpi-rate::before {
    background: #16a34a;
}

.kpi-rate {
    color: #16a34a;
}

    .kpi-rate .an-kpi-value {
        color: #15803d;
    }

.kpi-sla::before {
    background: #0891b2;
}

.kpi-sla {
    color: #0891b2;
}

    .kpi-sla .an-kpi-value {
        color: #0e7490;
    }

.kpi-hours::before {
    background: #7c3aed;
}

.kpi-hours .an-kpi-head i {
    color: #7c3aed;
}

.kpi-emergency::before {
    background: #dc2626;
}

.kpi-emergency .an-kpi-value {
    color: #b91c1c;
}

.kpi-emergency .an-kpi-head i {
    color: #dc2626;
}

.kpi-rating::before {
    background: #f59e0b;
}

.kpi-rating .an-kpi-value {
    color: #b45309;
}

.kpi-rating .an-kpi-head i {
    color: #f59e0b;
}

.an-kpi-bar {
    margin-top: 0.6rem;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.an-kpi-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: currentColor;
    transition: width 0.6s ease;
}

    .an-kpi-bar-fill.bar-danger {
        background: #dc2626;
    }

/* Cards */
.an-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

.an-card-title {
    font-size: 0.9rem;
    color: var(--mlm-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--mlm-border);
}

/* Trend */
.an-trend-svg {
    width: 100%;
    height: 140px;
}

.an-trend-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
    margin-top: 0.4rem;
    justify-content: center;
}

.an-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

/* Horizontal bar lists */
.an-bar-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.an-bar-row {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.an-bar-label {
    color: var(--mlm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.an-bar-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
}

.an-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}

.an-bar-value {
    text-align: right;
    font-weight: 700;
    color: var(--mlm-text);
    font-variant-numeric: tabular-nums;
}

/* Ageing bar */
.an-age-bar {
    display: flex;
    height: 32px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    gap: 2px;
    margin-bottom: 0.85rem;
}

.an-age-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    transition: var(--transition);
}

.b-0-1 {
    background: #16a34a;
}

.b-2-3 {
    background: #65a30d;
}

.b-4-7 {
    background: #eab308;
}

.b-8-14 {
    background: #f59e0b;
}

.b-15-30 {
    background: #ea580c;
}

.b-31 {
    background: #dc2626;
}

.an-age-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.78rem;
}

.an-age-leg {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.an-age-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.b-0-1 .an-age-swatch {
    background: #16a34a;
}

.b-2-3 .an-age-swatch {
    background: #65a30d;
}

.b-4-7 .an-age-swatch {
    background: #eab308;
}

.b-8-14 .an-age-swatch {
    background: #f59e0b;
}

.b-15-30 .an-age-swatch {
    background: #ea580c;
}

.b-31 .an-age-swatch {
    background: #dc2626;
}

.an-age-lbl {
    color: var(--mlm-text-muted);
    font-weight: 500;
}

.an-age-cnt {
    font-weight: 700;
}

.an-mini-stat {
    background: #f8fafc;
    border: 1px solid var(--mlm-border);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}

.an-mini-value {
    font-size: 1.15rem;
    font-weight: 800;
}

.an-mini-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    margin-top: 0.15rem;
}

.an-mini-stat.mini-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

/* Rating summary */
.an-rating-summary {
    text-align: center;
}

.an-rating-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f59e0b;
    line-height: 1;
}

.an-rating-stars {
    color: #f59e0b;
    font-size: 1.2rem;
    margin: 0.35rem 0;
}

.an-rating-count {
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
}

/* Tables */
.an-table {
    margin: 0;
    width: 100%;
    font-size: 0.85rem;
}

    .an-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.65rem 0.75rem;
        white-space: nowrap;
    }

    .an-table tbody td {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .an-table tbody tr:hover {
        background: #f8fafc;
    }

    .an-table tbody tr.row-overdue {
        background: #fef2f2;
    }

/* Resolution % bar in tables */
.an-pct-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.an-pct-track {
    flex: 1;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}

.an-pct-fill {
    height: 100%;
    border-radius: 3px;
}

.pct-good {
    background: #16a34a;
}

.pct-warn {
    background: #f59e0b;
}

.pct-bad {
    background: #dc2626;
}

.an-pct-value {
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 45px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Footer */
.an-footer {
    text-align: center;
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
    padding: 1rem 0;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .an-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .an-bar-row {
        grid-template-columns: 80px 1fr 34px;
    }
}

@media (max-width: 767.98px) {
    .an-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .an-kpi-value {
        font-size: 1.3rem;
    }

    .an-age-bar {
        height: 24px;
    }

    .an-age-seg span {
        display: none;
    }

    .an-table thead th,
    .an-table tbody td {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }

    .an-bar-row {
        grid-template-columns: 70px 1fr 30px;
        font-size: 0.72rem;
    }
}

/* ============================================================
   Calendar Overview Page
   ============================================================ */

.cal-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .cal-page .container {
        max-width: 1280px;
    }

/* KPI tiles */
.cal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.cal-kpi {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .cal-kpi::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.cal-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.cal-kpi-value {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.cal-kpi-foot {
    font-size: 0.72rem;
    color: var(--mlm-text-muted);
    margin-top: 0.35rem;
}

.kpi-lodged::before {
    background: #1a3a4a;
}

.kpi-lodged .cal-kpi-head i {
    color: #1a3a4a;
}

.kpi-resolved::before {
    background: #16a34a;
}

.kpi-resolved .cal-kpi-value {
    color: #15803d;
}

.kpi-resolved .cal-kpi-head i {
    color: #16a34a;
}

.kpi-outstanding::before {
    background: #f59e0b;
}

.kpi-outstanding .cal-kpi-value {
    color: #b45309;
}

.kpi-outstanding .cal-kpi-head i {
    color: #f59e0b;
}

.kpi-inprogress::before {
    background: #0891b2;
}

.kpi-inprogress .cal-kpi-value {
    color: #0e7490;
}

.kpi-inprogress .cal-kpi-head i {
    color: #0891b2;
}

.kpi-emergency::before {
    background: #dc2626;
}

.kpi-emergency .cal-kpi-value {
    color: #b91c1c;
}

.kpi-emergency .cal-kpi-head i {
    color: #dc2626;
}

/* Filter bar */
.cal-filter-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
}

/* Calendar card */
.cal-main-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
}

.cal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.cal-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cal-month-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--mlm-primary);
    margin-left: 0.5rem;
}

.cal-toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cal-legend-inline {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--mlm-text-muted);
}

    .cal-legend-inline span {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

.cal-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.dot-new {
    background: #64748b;
}

.dot-inprog {
    background: #f59e0b;
}

.dot-resolved {
    background: #16a34a;
}

.dot-emerg {
    background: #dc2626;
}

/* Calendar grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--mlm-border);
    padding: 1px;
}

.cal-weekday {
    background: #f8fafc;
    padding: 0.65rem 0.5rem;
    text-align: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    font-weight: 700;
}

.cal-cell {
    background: #fff;
    min-height: 92px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

    .cal-cell:hover {
        background: #f8fafc;
    }

.cal-cell-other {
    background: #fafbfc;
    cursor: default;
    pointer-events: none;
}

.cal-cell-today {
    box-shadow: inset 0 0 0 2px var(--mlm-accent);
}

.cal-cell-selected {
    background: #eef2ff !important;
    box-shadow: inset 0 0 0 2px var(--mlm-primary);
}

.cal-cell-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.cal-day-number {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--mlm-text);
}

.cal-today-chip {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mlm-accent);
    font-weight: 800;
    background: #dcfce7;
    padding: 1px 5px;
    border-radius: 4px;
}

/* Day stats */
.cal-cell-stats {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: auto;
}

.cal-cell-count {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    align-self: flex-start;
    color: white;
}

    .cal-cell-count.heat-low {
        background: #a7d8b7;
        color: #14532d;
    }

    .cal-cell-count.heat-mid {
        background: #fcd34d;
        color: #78350f;
    }

    .cal-cell-count.heat-high {
        background: #fb923c;
        color: #7c2d12;
    }

    .cal-cell-count.heat-veryhigh {
        background: #dc2626;
        color: white;
    }

.cal-cell-bars {
    display: flex;
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
    background: #f1f5f9;
    gap: 1px;
}

.cal-mini-bar {
    height: 100%;
    transition: width 0.3s;
}

.bar-new {
    background: #64748b;
}

.bar-inprog {
    background: #f59e0b;
}

.bar-resolved {
    background: #16a34a;
}

.bar-emerg {
    background: #dc2626;
}

/* Legend */
.cal-legend {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid var(--mlm-border);
    font-size: 0.78rem;
}

.cal-legend-title {
    color: var(--mlm-text-muted);
    font-weight: 600;
    margin-right: 0.25rem;
}

.cal-legend-cell {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    color: white;
    font-size: 0.72rem;
}

    .cal-legend-cell.heat-low {
        background: #a7d8b7;
        color: #14532d;
    }

    .cal-legend-cell.heat-mid {
        background: #fcd34d;
        color: #78350f;
    }

    .cal-legend-cell.heat-high {
        background: #fb923c;
    }

    .cal-legend-cell.heat-veryhigh {
        background: #dc2626;
    }

/* .cal-detail-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    overflow: hidden;
}
.cal-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

/* ---------- Calendar detail table ---------- */
.cal-table {
    width: 100%;
    margin: 0;
    font-size: 0.87rem;
    border-collapse: collapse;
}

    .cal-table thead th {
        background: #f8fafc;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
        padding: 0.7rem 0.85rem;
        white-space: nowrap;
        text-align: left;
    }

    .cal-table tbody td {
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
        color: var(--mlm-text);
    }

    .cal-table tbody tr:last-child td {
        border-bottom: none;
    }

    .cal-table tbody tr:hover {
        background: #f8fafc;
    }

    /* Row emphasis */
    .cal-table tbody tr.row-overdue {
        background: #fffbeb;
    }

        .cal-table tbody tr.row-overdue:hover {
            background: #fef3c7;
        }

    .cal-table tbody tr.row-emergency {
        box-shadow: inset 4px 0 0 #dc2626;
    }

    /* Right-aligned numeric cells */
    .cal-table .text-end {
        text-align: right;
    }

/* ---------- Empty state (already defined globally, override here) ---------- */
.cal-detail-card .empty-search-state {
    padding: 2.5rem 1rem;
    border-radius: 0;
    border: none;
    background: transparent;
}

/* ============================================================
   Calendar Overview — Responsive
   ============================================================ */

@media (max-width: 991.98px) {
    .cal-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .cal-toolbar-left,
    .cal-toolbar-right {
        justify-content: space-between;
    }

    .cal-legend-inline {
        flex-wrap: wrap;
    }

    .cal-cell {
        min-height: 80px;
        padding: 0.4rem;
    }

    .cal-cell-count {
        font-size: 1rem;
        padding: 0.1rem 0.4rem;
    }
}

@media (max-width: 767.98px) {
    .cal-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cal-kpi-value {
        font-size: 1.3rem;
    }

    .cal-month-label {
        font-size: 0.9rem;
    }

    .cal-legend-inline {
        font-size: 0.7rem;
        gap: 0.5rem;
    }

    .cal-weekday {
        font-size: 0.62rem;
        padding: 0.4rem 0.25rem;
    }

    .cal-cell {
        min-height: 64px;
        padding: 0.3rem;
    }

    .cal-day-number {
        font-size: 0.72rem;
    }

    .cal-today-chip {
        font-size: 0.5rem;
        padding: 0 3px;
    }

    .cal-cell-count {
        font-size: 0.85rem;
        padding: 0.05rem 0.35rem;
    }

    .cal-cell-bars {
        height: 4px;
    }

    .cal-legend {
        font-size: 0.7rem;
        gap: 0.4rem;
        padding: 0.65rem 1rem;
    }

    .cal-table {
        font-size: 0.78rem;
    }

        .cal-table thead th,
        .cal-table tbody td {
            padding: 0.5rem 0.55rem;
        }

    .cal-detail-head {
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .cal-kpi-grid {
        grid-template-columns: 1fr;
    }

    .cal-weekday {
        font-size: 0.55rem;
        padding: 0.3rem 0.15rem;
    }

    .cal-cell {
        min-height: 54px;
        padding: 0.2rem;
    }

    .cal-day-number {
        font-size: 0.65rem;
    }

    .cal-today-chip {
        display: none;
    }

    .cal-cell-count {
        font-size: 0.72rem;
        padding: 0.05rem 0.25rem;
    }

    .cal-cell-bars {
        display: none;
    }

    .cal-table thead th:nth-child(6),
    .cal-table tbody td:nth-child(6) {
        display: none; /* hide "Logged" column on phones */
    }

    .cal-legend-cell {
        font-size: 0.65rem;
        padding: 1px 6px;
    }
}

/* ============================================================
   Complaint Details Page
   ============================================================ */

.cd-page {
    background: var(--mlm-bg);
    min-height: 100vh;
    padding-bottom: 3rem;
    color: var(--mlm-text);
}

    .cd-page .container {
        max-width: 1280px;
    }

/* Status strip */
.cd-status-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mlm-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .cd-status-strip::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
    }

    .cd-status-strip.strip-new::before {
        background: #64748b;
    }

    .cd-status-strip.strip-assigned::before {
        background: #0891b2;
    }

    .cd-status-strip.strip-inprogress::before {
        background: #f59e0b;
    }

    .cd-status-strip.strip-awaiting::before {
        background: #3b82f6;
    }

    .cd-status-strip.strip-escalated::before {
        background: #dc2626;
    }

    .cd-status-strip.strip-resolved::before {
        background: #16a34a;
    }

    .cd-status-strip.strip-closed::before {
        background: #1e293b;
    }

.cd-status-main {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cd-ref-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #f1f5f9;
    color: var(--mlm-primary);
    border: 1px solid var(--mlm-border);
    padding: 0.35rem 0.85rem;
    border-radius: 40px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.8rem;
    font-weight: 700;
}

.cd-status-badge {
    font-size: 0.72rem;
    padding: 0.4rem 0.85rem;
    border-radius: 40px;
    font-weight: 700;
    text-transform: uppercase;
}

.cd-status-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    .cd-status-actions .btn {
        font-size: 0.78rem;
        border-radius: 40px;
    }

/* Pulse badge */
.pulse-badge {
    animation: cdPulse 2s infinite;
}

@keyframes cdPulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

/* Cards */
.cd-card {
    background: var(--mlm-card-bg);
    border: 1px solid var(--mlm-border);
    border-radius: var(--mlm-radius);
    box-shadow: var(--mlm-shadow-sm);
    padding: 1.25rem;
}

.cd-card-head {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mlm-border);
}

/* Details list */
.cd-details {
    margin: 0;
}

    .cd-details > div {
        display: flex;
        padding: 0.65rem 0;
        border-bottom: 1px dashed var(--mlm-border);
    }

        .cd-details > div:last-child {
            border-bottom: none;
        }

    .cd-details dt {
        width: 32%;
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--mlm-text-muted);
        flex-shrink: 0;
    }

    .cd-details dd {
        margin: 0;
        font-size: 0.88rem;
        color: var(--mlm-text);
        font-weight: 500;
        word-break: break-word;
    }

.cd-details-compact > div {
    padding: 0.4rem 0;
}

.cd-description {
    background: #f8fafc;
    border-left: 4px solid var(--mlm-accent);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin-top: 1rem;
}

    .cd-description p {
        font-size: 0.88rem;
        line-height: 1.65;
        white-space: pre-wrap;
        color: var(--mlm-text);
    }

/* Map */
.cd-map {
    width: 100%;
    height: 260px;
    border-radius: var(--mlm-radius-sm);
    border: 1px solid var(--mlm-border);
    z-index: 1;
}

/* Gallery */
.cd-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cd-thumb {
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mlm-border);
    transition: var(--transition);
}

    .cd-thumb:hover {
        transform: scale(1.03);
        border-color: var(--mlm-primary);
        box-shadow: var(--mlm-shadow-sm);
    }

    .cd-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Timeline */
.cd-timeline {
    position: relative;
    padding-left: 2rem;
}

    .cd-timeline::before {
        content: '';
        position: absolute;
        left: 14px;
        top: 8px;
        bottom: 8px;
        width: 2px;
        background: linear-gradient(to bottom, var(--mlm-accent), #e2e8f0);
    }

.cd-timeline-item {
    position: relative;
    padding: 0.7rem 0 0.7rem 0.5rem;
}

    .cd-timeline-item:not(:last-child) {
        border-bottom: 1px dashed var(--mlm-border);
    }

.cd-timeline-marker {
    position: absolute;
    left: -1.9rem;
    top: 0.75rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 1;
    transition: var(--transition);
}

    .cd-timeline-marker.marker-new {
        background: #f1f5f9;
        border-color: #64748b;
        color: #475569;
    }

    .cd-timeline-marker.marker-assigned {
        background: #cffafe;
        border-color: #0891b2;
        color: #0e7490;
    }

    .cd-timeline-marker.marker-progress {
        background: #fef3c7;
        border-color: #f59e0b;
        color: #b45309;
    }

    .cd-timeline-marker.marker-resolved {
        background: #dcfce7;
        border-color: #16a34a;
        color: #15803d;
    }

    .cd-timeline-marker.marker-escalated {
        background: #fee2e2;
        border-color: #dc2626;
        color: #b91c1c;
    }

    .cd-timeline-marker.marker-default {
        background: #f1f5f9;
        border-color: #94a3b8;
        color: #64748b;
    }

.cd-timeline-body {
    padding-left: 0.35rem;
}

/* Photo preview */
.cd-photo-preview {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--mlm-border);
}

/* Rating */
.cd-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.75rem 0;
}

.cd-star {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

    .cd-star:hover {
        color: #f59e0b;
        transform: scale(1.1);
    }

    .cd-star.active {
        color: #f59e0b;
    }

/* Modal */
.cd-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 41, 55, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
}

.cd-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 520px;
    background: #fff;
    border-radius: var(--mlm-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    overflow: hidden;
}

.cd-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--mlm-border);
    background: #f8fafc;
}

.cd-modal-body {
    padding: 1.25rem 1.4rem;
}

.cd-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--mlm-border);
    background: #f8fafc;
}

/* Print */
@media print {
    .cd-status-actions,
    .cd-modal,
    .cd-modal-backdrop,
    .breadcrumb-container,
    .mlm-header,
    .col-lg-4 {
        display: none !important;
    }

    .cd-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .cd-page {
        background: #fff;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .cd-status-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .cd-status-actions {
        width: 100%;
    }

        .cd-status-actions .btn {
            flex: 1;
        }
}

@media (max-width: 767.98px) {
    .cd-details > div {
        flex-direction: column;
        gap: 0.2rem;
    }

    .cd-details dt {
        width: 100%;
    }

    .cd-map {
        height: 200px;
    }

    .cd-thumb {
        width: 90px;
        height: 90px;
    }
}
/* ============================================================================
   GLOBAL PORTAL THEME CONSISTENCY LAYER
   Applied across NavMenu-linked pages without changing page workflows.
   ============================================================================ */
:root {
    --portal-primary: #1a7a2e;
    --portal-primary-dark: #0d5c1e;
    --portal-primary-soft: #2e9e4a;
    --portal-accent: #ffc107;
    --portal-accent-dark: #f9a825;
    --portal-bg: #f3f7f4;
    --portal-surface: #ffffff;
    --portal-border: #dbe7df;
    --portal-text: #1f2a23;
    --portal-muted: #5f7466;
    --portal-shadow-sm: 0 6px 18px rgba(17, 57, 27, 0.08);
    --portal-shadow-md: 0 12px 30px rgba(17, 57, 27, 0.12);
    --portal-radius: 14px;
}

html,
body {
    background: var(--portal-bg);
    color: var(--portal-text);
}

.site-body {
    background:
        radial-gradient(circle at 15% 20%, rgba(26, 122, 46, 0.05), transparent 30%),
        radial-gradient(circle at 85% 8%, rgba(255, 193, 7, 0.08), transparent 28%),
        var(--portal-bg);
}

.site-body::before {
    content: "";
    position: fixed;
    right: -40px;
    bottom: 52px;
    width: 180px;
    height: 180px;
    background: url('/_content/MLM_ComplaintsSystem_maui.Shared/mlm_logo.png') center/contain no-repeat;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

.site-body > * {
    position: relative;
    z-index: 1;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-footer {
    background: linear-gradient(135deg, #0d5c1e 0%, #1a7a2e 45%, #2e9e4a 100%);
    color: #fff;
    padding: 2.2rem 1.5rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -10px 28px rgba(13, 92, 30, 0.22);
}

.site-footer a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold, #ffc107);
    text-decoration: underline;
}

.site-footer .social-icons a {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.site-footer .social-icons a:hover {
    border-color: rgba(255, 193, 7, 0.7);
    background: rgba(255, 193, 7, 0.2);
    transform: translateY(-1px);
}

.portal-nav-theme {
    background: linear-gradient(135deg, #0d5c1e 0%, #1a7a2e 48%, #2e9e4a 100%) !important;
    position: relative;
}

.portal-nav-theme::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.05), transparent 35%);
    pointer-events: none;
}

.portal-nav-theme .logo-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.92);
    padding: 4px;
    border: 2px solid rgba(255, 193, 7, 0.85);
    box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}

.portal-nav-theme.navbar-main {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(13, 92, 30, 0.3);
}

.portal-nav-theme .container-xxl {
    position: relative;
    z-index: 1;
}

.portal-nav-theme .nav-compact {
    gap: 0.25rem;
}

.portal-nav-theme .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.52rem 0.9rem !important;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.portal-nav-theme .nav-link:hover {
    background-color: rgba(255,255,255,0.14);
    color: #fff !important;
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.portal-nav-theme .nav-link.active {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.26), rgba(255, 213, 79, 0.2));
    color: #fff !important;
    border-color: rgba(255, 193, 7, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.portal-nav-theme .dropdown-menu-professional {
    border-radius: 12px;
    border: 1px solid rgba(19, 84, 35, 0.12);
    box-shadow: 0 16px 30px rgba(0,0,0,0.18);
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.portal-nav-theme .dropdown-menu-professional .dropdown-item {
    font-weight: 500;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.portal-nav-theme .dropdown-menu-professional .dropdown-item:hover,
.portal-nav-theme .dropdown-menu-professional .dropdown-item:focus {
    background: rgba(26, 122, 46, 0.1);
}

.mlm-header,
.breadcrumb-container,
.dash-card,
.an-card,
.form-section,
.instruction-card,
.action-card,
.account-card,
.card,
.table,
.alert,
.list-group {
    border-radius: var(--portal-radius);
    border-color: var(--portal-border);
}

.dash-card,
.an-card,
.form-section,
.instruction-card,
.action-card,
.account-card,
.card,
.table-responsive,
.list-group,
.alert {
    box-shadow: var(--portal-shadow-sm);
}

.dash-card:hover,
.an-card:hover,
.form-section:hover,
.instruction-card:hover,
.action-card:hover,
.card:hover {
    box-shadow: var(--portal-shadow-md);
}

.mlm-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--portal-primary-dark), var(--portal-primary), var(--portal-primary-soft));
}

.mlm-header::before {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 84px;
    height: 84px;
    background: url('/_content/MLM_ComplaintsSystem_maui.Shared/mlm_logo.png') center/contain no-repeat;
    opacity: 0.11;
    pointer-events: none;
}

.mlm-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 193, 7, 0.12), transparent 35%);
    pointer-events: none;
}

.welcome-badge {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    backdrop-filter: blur(2px);
}

.breadcrumb-container {
    background: var(--portal-surface);
}

.text-gold {
    color: var(--portal-accent) !important;
}

.btn-mlm-primary,
.btn-gold,
.btn-primary,
.btn-success {
    border-radius: 10px;
    font-weight: 600;
}

.btn-mlm-primary,
.btn-success {
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-primary-dark));
    border-color: var(--portal-primary);
}

.btn-mlm-primary:hover,
.btn-mlm-primary:focus,
.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, var(--portal-primary-soft), var(--portal-primary));
    border-color: var(--portal-primary-soft);
}

.table thead th {
    background: rgba(26, 122, 46, 0.08);
    color: #194928;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(26, 122, 46, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(26, 122, 46, 0.16);
}

@media (max-width: 767.98px) {
    .mlm-header::before {
        width: 58px;
        height: 58px;
        right: 0.75rem;
    }

    .site-body::before {
        width: 120px;
        height: 120px;
        right: -25px;
        bottom: 30px;
    }
}

/* ============================================================================
   NAVMENU PAGE FAMILY THEME EXTENSIONS
   Complaints + Account + Admin + Public pages
   ============================================================================ */
.complaint-page,
.track-page,
.my-complaints-page,
.dept-workspace-page,
.cd-page,
.account-page,
.contact-page,
.notifications-page,
.privacy-page,
.wf-page,
.final-page,
.cal-page,
.dash-page,
.reports-page,
.lookups-page,
.stats-page,
.analytics-page,
.age-page,
.jobs-page,
.activity-page,
.users-page {
    position: relative;
}

.complaint-page::after,
.track-page::after,
.my-complaints-page::after,
.dept-workspace-page::after,
.cd-page::after,
.account-page::after,
.contact-page::after,
.notifications-page::after,
.privacy-page::after,
.wf-page::after,
.final-page::after,
.cal-page::after,
.dash-page::after,
.reports-page::after,
.lookups-page::after,
.stats-page::after,
.analytics-page::after,
.age-page::after,
.jobs-page::after,
.activity-page::after,
.users-page::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 170px;
    background: linear-gradient(140deg, rgba(26, 122, 46, 0.08), rgba(255, 193, 7, 0.09));
    border-bottom-left-radius: 28px;
    pointer-events: none;
    z-index: 0;
}

.complaint-page > *,
.track-page > *,
.my-complaints-page > *,
.dept-workspace-page > *,
.cd-page > *,
.account-page > *,
.contact-page > *,
.notifications-page > *,
.privacy-page > *,
.wf-page > *,
.final-page > *,
.cal-page > *,
.dash-page > *,
.reports-page > *,
.lookups-page > *,
.stats-page > *,
.analytics-page > *,
.age-page > *,
.jobs-page > *,
.activity-page > *,
.users-page > * {
    position: relative;
    z-index: 1;
}

.form-section,
.instruction-card,
.action-card,
.toolbar-card,
.dw-chart-card,
.dw-tech-card,
.dw-map-card,
.dw-queue-card,
.wf-card,
.wf-roster-card,
.wf-jobs-card,
.fin-summary-tile,
.fin-queue-card,
.cal-filter-card,
.cal-event-card,
.an-card,
.dash-card,
.notif-card,
.privacy-meta,
.privacy-toc,
.privacy-section,
.account-card,
.card-header-custom,
.card-body-custom {
    background: var(--portal-surface);
}

.filter-chip,
.btn,
.badge,
.nav-pills .nav-link,
.pagination .page-link {
    border-radius: 10px;
}

.table {
    overflow: hidden;
    border-radius: 12px;
}

.table tbody tr:hover {
    background: rgba(26, 122, 46, 0.04);
}

.alert-success {
    border-color: rgba(25, 135, 84, 0.28);
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.14), rgba(255, 255, 255, 0.94));
}

.alert-warning {
    border-color: rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.16), rgba(255, 255, 255, 0.96));
}

.alert-danger {
    border-color: rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12), rgba(255, 255, 255, 0.96));
}

.form-label {
    font-weight: 600;
    color: #2f4738;
}

.empty-state,
.empty-search-state,
.loading-state {
    border-radius: var(--portal-radius);
    border: 1px dashed rgba(26, 122, 46, 0.25);
    background: linear-gradient(180deg, rgba(26, 122, 46, 0.05), rgba(255, 255, 255, 0.98));
    padding: 1.5rem;
}

@media (max-width: 767.98px) {
    .complaint-page::after,
    .track-page::after,
    .my-complaints-page::after,
    .dept-workspace-page::after,
    .cd-page::after,
    .account-page::after,
    .contact-page::after,
    .notifications-page::after,
    .privacy-page::after,
    .wf-page::after,
    .final-page::after,
    .cal-page::after,
    .dash-page::after,
    .reports-page::after,
    .lookups-page::after,
    .stats-page::after,
    .analytics-page::after,
    .age-page::after,
    .jobs-page::after,
    .activity-page::after,
    .users-page::after {
        width: 180px;
        height: 110px;
    }
}

/* ============================================================================
   ADMIN HIGH-VISIBILITY PAGE POLISH (Dashboard, Analytics, Workforce, Reports)
   ============================================================================ */
.dash-page .mlm-header h1,
.an-page .mlm-header h1,
.wf-page .mlm-header h1,
.reports-page .mlm-header h1 {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.dash-page .mlm-header p,
.an-page .mlm-header p,
.wf-page .mlm-header p,
.reports-page .mlm-header p {
    max-width: 65ch;
}

.dash-page [class*="kpi-grid"],
.an-page [class*="kpi-grid"],
.wf-page [class*="kpi-grid"],
.reports-page [class*="kpi-grid"] {
    gap: 0.9rem;
}

.dash-page [class*="kpi"],
.an-page [class*="kpi"],
.wf-page [class*="kpi"],
.reports-page [class*="kpi"] {
    padding: 1rem 1rem;
}

.dash-page [class*="kpi-head"],
.an-page [class*="kpi-head"],
.wf-page [class*="kpi-head"],
.reports-page [class*="kpi-head"] {
    font-size: 0.86rem;
    font-weight: 600;
    color: #3a5444;
}

.dash-page [class*="kpi-value"],
.an-page [class*="kpi-value"],
.wf-page [class*="kpi-value"],
.reports-page [class*="kpi-value"] {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.dash-page [class*="kpi-foot"],
.an-page [class*="kpi-foot"],
.wf-page [class*="kpi-foot"],
.reports-page [class*="kpi-foot"] {
    color: #5e7567;
    font-size: 0.82rem;
}

.dash-page [class*="filter-card"],
.an-page [class*="filter-card"],
.wf-page [class*="toolbar"],
.reports-page [class*="filter-card"] {
    background: linear-gradient(180deg, #ffffff, #f8fbf9);
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    padding: 0.95rem;
}

.dash-page .dash-card,
.an-page .an-card,
.wf-page .wf-card,
.wf-page .wf-roster-card,
.wf-page .wf-jobs-card,
.reports-page [class*="reports-"] {
    border: 1px solid var(--portal-border);
}

.dash-page .dash-card-title,
.an-page .an-card-title,
.wf-page .wf-card-title,
.reports-page [class*="-title"] {
    font-weight: 700;
    letter-spacing: 0.15px;
}

.dash-page .table thead th,
.an-page .table thead th,
.wf-page .table thead th,
.reports-page .table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.dash-page .table tbody td,
.an-page .table tbody td,
.wf-page .table tbody td,
.reports-page .table tbody td {
    vertical-align: middle;
}

.dash-page .btn-sm,
.an-page .btn-sm,
.wf-page .btn-sm,
.reports-page .btn-sm {
    padding: 0.36rem 0.72rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .dash-page [class*="kpi-grid"],
    .an-page [class*="kpi-grid"],
    .wf-page [class*="kpi-grid"],
    .reports-page [class*="kpi-grid"] {
        gap: 0.7rem;
    }

    .dash-page [class*="kpi"],
    .an-page [class*="kpi"],
    .wf-page [class*="kpi"],
    .reports-page [class*="kpi"] {
        padding: 0.85rem 0.85rem;
    }
}

/* ============================================================================
   ADMIN PAGE CONSISTENCY LAYER
   Normalizes repeated admin card/kpi/filter/table blocks across role pages.
   ============================================================================ */
.dash-page [class*="dash-"],
.analytics-page [class*="an-"],
.wf-page [class*="wf-"],
.final-page [class*="fin-"],
.cal-page [class*="cal-"],
.age-page [class*="age-"],
.activity-page [class*="logs-"],
.reports-page [class*="rep-"],
.lookups-page [class*="lookup"],
.stats-page [class*="stat"],
.users-page [class*="user"],
.users-page [class*="role"] {
    border-radius: 12px;
}

.dash-page [class*="dash-card"],
.analytics-page [class*="an-card"],
.wf-page [class*="wf-card"],
.wf-page [class*="wf-kpi"],
.final-page [class*="fin-summary"],
.final-page [class*="fin-queue-card"],
.cal-page [class*="cal-kpi"],
.cal-page [class*="cal-filter-card"],
.age-page [class*="age-kpi"],
.age-page [class*="age-buckets-card"],
.age-page [class*="age-dept-card"],
.activity-page [class*="logs-summary"],
.reports-page [class*="rep-kpi"],
.reports-page [class*="rep-card"],
.lookups-page [class*="lookup-card"],
.stats-page [class*="stats-card"],
.users-page [class*="user-card"],
.users-page [class*="role-card"] {
    border: 1px solid var(--portal-border);
    background: linear-gradient(180deg, #ffffff, #f8fcf9);
    box-shadow: var(--portal-shadow-sm);
}

.dash-page [class*="dash-card"]:hover,
.analytics-page [class*="an-card"]:hover,
.wf-page [class*="wf-card"]:hover,
.final-page [class*="fin-summary"]:hover,
.cal-page [class*="cal-kpi"]:hover,
.age-page [class*="age-kpi"]:hover,
.reports-page [class*="rep-card"]:hover {
    box-shadow: var(--portal-shadow-md);
}

.wf-page .table,
.final-page .table,
.cal-page .table,
.age-page .table,
.activity-page .table,
.reports-page .table,
.lookups-page .table,
.stats-page .table,
.users-page .table {
    border: 1px solid var(--portal-border);
}
