
/* =============================================================================
   EXACTESTATE DESIGN SYSTEM - CORE
   =============================================================================
   All reusable base components for the ExactEstate application.

   REQUIRES: ee_tokens.html (must be included first)

   USAGE:



   CONTENTS:
   1. CSS Reset & Base
   2. Typography
   3. Page Layout
   4. Buttons
   5. Cards
   6. Forms
   7. Tables
   8. Alerts
   9. Badges
   10. Modals (base)
   11. Dropdowns
   12. Loading States
   13. Empty States
   14. Utilities
   15. Agent-first support intake — now the Agent Studio app's own sheet; only
       the fallback form's thinking skeleton remains (banner near end of file)
   ============================================================================= */

/* =============================================================================
   1. CSS RESET & BASE
   ============================================================================= */

/* strong is inline by spec; enforce it so flex/grid parents don't treat it as a block item */
strong { display: inline; font-weight: 600; }

/* =============================================================================
   2. TYPOGRAPHY
   ============================================================================= */

.ee-h1, .ee-h2, .ee-h3, .ee-h4, .ee-h5, .ee-h6 {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    line-height: var(--ee-leading-tight);
    color: var(--ee-text-primary);
}

.ee-h1 { font-size: var(--ee-text-3xl); font-weight: 700; }
.ee-h2 { font-size: var(--ee-text-2xl); font-weight: 700; }
.ee-h3 { font-size: var(--ee-text-xl); }
.ee-h4 { font-size: var(--ee-text-lg); }
.ee-h5 { font-size: var(--ee-text-base); }
.ee-h6 { font-size: var(--ee-text-sm); }

.ee-lead { font-size: var(--ee-text-lg); font-weight: 400; color: var(--ee-text-secondary); }
.ee-small, small { font-size: var(--ee-text-sm); }

.ee-text-xs { font-size: var(--ee-text-xs); }
.ee-text-sm { font-size: var(--ee-text-sm); }
.ee-text-base { font-size: var(--ee-text-base); }
.ee-text-lg { font-size: var(--ee-text-lg); }
.ee-text-xl { font-size: var(--ee-text-xl); }
.ee-text-2xl { font-size: var(--ee-text-2xl); }

.ee-font-normal { font-weight: 400; }
.ee-font-medium { font-weight: 500; }
.ee-font-semibold { font-weight: 600; }
.ee-font-bold { font-weight: 700; }

.ee-text-left { text-align: left; }
.ee-text-center { text-align: center; }
.ee-text-right { text-align: right; }

.ee-uppercase { text-transform: uppercase; letter-spacing: var(--ee-tracking-wide); }
.ee-lowercase { text-transform: lowercase; }
.ee-capitalize { text-transform: capitalize; }

.ee-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ee-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ee-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* =============================================================================
   TEXT COLORS
   ============================================================================= */
/* Brand */
.ee-text-indigo { color: var(--ee-indigo) !important; }
.ee-text-indigo-dark { color: var(--ee-indigo-dark) !important; }
.ee-text-indigo-light { color: var(--ee-indigo-light) !important; }
.ee-text-teal { color: var(--ee-teal) !important; }
.ee-text-teal-dark { color: var(--ee-teal-dark) !important; }

/* Semantic */
.ee-text-success { color: var(--ee-success) !important; }
.ee-text-success-dark { color: var(--ee-success-dark) !important; }
.ee-text-warning { color: var(--ee-warning) !important; }
.ee-text-warning-dark { color: var(--ee-warning-dark) !important; }
.ee-text-danger { color: var(--ee-danger) !important; }
.ee-text-danger-dark { color: var(--ee-danger-dark) !important; }
.ee-text-info { color: var(--ee-info) !important; }
.ee-text-info-dark { color: var(--ee-info-dark) !important; }

/* Neutral — the token scale. AGENTS.md lists these as universal utilities and
   ~190 templates use them (ExactID staff pages, the verification packet, …),
   but they lived only in ee_old_styles.html, which base.html stopped loading:
   "muted" helper text rendered in full body colour. */
.ee-text-primary { color: var(--ee-text-primary) !important; }
.ee-text-secondary { color: var(--ee-text-secondary) !important; }
.ee-text-muted { color: var(--ee-text-muted) !important; }
.ee-text-dim { color: var(--ee-text-dim) !important; }
/* Keeps the line breaks a person typed (notes, comments) and wraps long
   unbroken strings (URLs, codes) instead of widening the table cell. */
.ee-text-pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.ee-text-white { color: #ffffff !important; }
.ee-text-black { color: #000000 !important; }
.ee-text-dark { color: #1e293b !important; }
.ee-text-gray { color: #475569 !important; }
.ee-text-gray-light { color: #64748b !important; }
.ee-text-gray-lighter { color: #94a3b8 !important; }

/* Gradient */
.ee-text-gradient {
    background: linear-gradient(90deg, var(--ee-indigo) 0%, var(--ee-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============================================================================
   3. PAGE LAYOUT
   ============================================================================= */

.ee-page {
    background: var(--ee-bg-page);
    min-height: 100vh;
    padding: var(--ee-space-5) var(--ee-space-6);
}

.ee-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--ee-space-4);
    margin-bottom: var(--ee-space-5);
}

.ee-page-header h1 {
    font-size: var(--ee-text-2xl);
    font-weight: 700;
    color: var(--ee-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}

.ee-page-header h1 i { color: var(--ee-indigo); }

.ee-page-header p {
    color: var(--ee-text-muted);
    font-size: var(--ee-text-base);
    margin: 0;
}

.ee-page-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ee-page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ee-header-actions {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    flex-wrap: wrap;
}

.ee-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-2);
    padding: var(--ee-space-2) var(--ee-space-4);
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    color: var(--ee-text-secondary);
    font-size: var(--ee-text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--ee-transition-fast);
}

.ee-back-link:hover {
    background: var(--ee-indigo);
    border-color: var(--ee-indigo);
    color: var(--ee-text-inverse);
    text-decoration: none;
}

.ee-back-link i { font-size: 0.75rem; }

.ee-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--ee-space-4);
}

.ee-container-fluid {
    width: 100%;
    padding: 0 var(--ee-space-4);
}

/* Bootstrap container-fluid override */
.container-fluid {
    padding-left: var(--ee-space-6);
    padding-right: var(--ee-space-6);
}

.ee-page .container-fluid { padding-left: 0; padding-right: 0; }

#main.container-fluid,
main.container-fluid {
    padding-top: var(--ee-space-5);
    padding-bottom: var(--ee-space-5);
}

/* =============================================================================
   4. BUTTONS
   ============================================================================= */

.ee-btn {
    padding: var(--ee-space-2) var(--ee-space-5);
    border-radius: var(--ee-radius-md);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ee-space-2);
    transition: all var(--ee-transition-fast);
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    line-height: 1.4;
}

.ee-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.ee-btn i { font-size: var(--ee-text-base); }

/* Button Sizes */
.ee-btn-sm { padding: var(--ee-space-1) var(--ee-space-3); font-size: var(--ee-text-xs); gap: var(--ee-space-1); }
.ee-btn-sm i { font-size: var(--ee-text-xs); }
.ee-btn-lg { padding: var(--ee-space-3) var(--ee-space-6); font-size: var(--ee-text-base); gap: var(--ee-space-3); }
.ee-btn-lg i { font-size: var(--ee-text-lg); }

/* Solid Buttons */
.ee-btn-indigo {
    background: var(--ee-indigo) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-indigo) !important;
}
/* A save button that waits for an edit: grey outline while disabled, indigo once live. */
.ee-btn-indigo.ee-btn-idle-outline:disabled {
    background: transparent !important;
    color: var(--ee-text-muted) !important;
    border-color: var(--ee-border-light) !important;
    opacity: 1;
}
.ee-btn-indigo:hover:not(:disabled) {
    background: var(--ee-indigo-dark) !important;
    border-color: var(--ee-indigo-dark) !important;
    color: var(--ee-text-inverse) !important;
    text-decoration: none;
}

.ee-btn-indigo-invert {
    background: var(--ee-indigo) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-indigo) !important;
}
.ee-btn-indigo-invert:hover:not(:disabled) {
    background: transparent !important;
    border-color: var(--ee-indigo) !important;
    color: var(--ee-indigo) !important;
    text-decoration: none;
}

.ee-btn-teal {
    background: var(--ee-teal) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-teal) !important;
}
.ee-btn-teal:hover:not(:disabled) {
    background: var(--ee-teal-dark) !important;
    border-color: var(--ee-teal-dark) !important;
    color: var(--ee-text-inverse) !important;
    text-decoration: none;
}

.ee-btn-success {
    background: var(--ee-success) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-success) !important;
}
.ee-btn-success:hover:not(:disabled) {
    background: var(--ee-success-dark) !important;
    border-color: var(--ee-success-dark) !important;
    color: var(--ee-text-inverse) !important;
}

.ee-btn-success-dark {
    background: var(--ee-success-dark) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-success-dark) !important;
}
.ee-btn-success-dark:hover:not(:disabled) {
    background: #047857 !important;
    border-color: #047857 !important;
    color: var(--ee-text-inverse) !important;
}

.ee-btn-warning {
    background: var(--ee-warning) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-warning) !important;
}
.ee-btn-warning i { color: var(--ee-text-inverse) !important; }
.ee-btn-warning:hover:not(:disabled) {
    background: var(--ee-warning-dark) !important;
    border-color: var(--ee-warning-dark) !important;
    color: var(--ee-text-inverse) !important;
}

/* Staff Go Back Button - for portal impersonation/viewing as staff */
.ee-btn-staff-back {
    background: var(--ee-warning) !important;
    color: white !important;
    border: 2px solid transparent !important;
}
.ee-btn-staff-back:hover:not(:disabled) {
    background: var(--ee-warning-dark) !important;
    color: white !important;
}
.ee-btn-staff-back i {
    color: white !important;
}

.ee-btn-danger {
    background: var(--ee-danger) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-danger) !important;
}
.ee-btn-danger:hover:not(:disabled) {
    background: var(--ee-danger-dark) !important;
    border-color: var(--ee-danger-dark) !important;
}

.ee-btn-info {
    background: var(--ee-info) !important;
    color: var(--ee-text-inverse) !important;
    border-color: var(--ee-info) !important;
}
.ee-btn-info:hover:not(:disabled) {
    background: var(--ee-info-dark) !important;
    border-color: var(--ee-info-dark) !important;
    color: var(--ee-text-inverse) !important;
}

/* Outline Buttons */
.ee-btn-outline-indigo {
    background: transparent !important;
    color: var(--ee-indigo) !important;
    border-color: var(--ee-indigo) !important;
}
.ee-btn-outline-indigo:hover:not(:disabled) {
    background: var(--ee-indigo) !important;
    color: var(--ee-text-inverse) !important;
    text-decoration: none;
}
.ee-btn-outline-indigo:hover:not(:disabled) i,
.ee-btn-outline-indigo:hover:not(:disabled) span {
    color: var(--ee-text-inverse) !important;
}

/* White outline button - for use on dark backgrounds (indigo headers, etc.) */
.ee-btn-outline-white {
    background: transparent !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}
.ee-btn-outline-white:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    text-decoration: none;
}

.ee-btn-outline-teal {
    background: transparent !important;
    color: var(--ee-teal) !important;
    border-color: var(--ee-teal) !important;
}
.ee-btn-outline-teal:hover:not(:disabled) {
    background: var(--ee-teal) !important;
    color: var(--ee-text-inverse) !important;
    text-decoration: none;
}

.ee-btn-outline-success {
    background: transparent !important;
    color: var(--ee-success) !important;
    border-color: var(--ee-success) !important;
}
.ee-btn-outline-success:hover:not(:disabled) {
    background: var(--ee-success) !important;
    color: var(--ee-text-inverse) !important;
}

.ee-btn-outline-warning {
    background: transparent !important;
    color: var(--ee-warning-dark) !important;
    border-color: var(--ee-warning) !important;
}
.ee-btn-outline-warning:hover:not(:disabled) {
    background: var(--ee-warning) !important;
    color: var(--ee-text-primary) !important;
}

.ee-btn-outline-danger {
    background: transparent !important;
    color: var(--ee-danger) !important;
    border-color: var(--ee-danger) !important;
}
.ee-btn-outline-danger:hover:not(:disabled) {
    background: var(--ee-danger) !important;
    color: var(--ee-text-inverse) !important;
}

.ee-btn-outline-info {
    background: transparent !important;
    color: var(--ee-info) !important;
    border-color: var(--ee-info) !important;
}
.ee-btn-outline-info:hover:not(:disabled) {
    background: var(--ee-info) !important;
    color: var(--ee-text-inverse) !important;
}

.ee-btn-outline-secondary {
    background: transparent !important;
    color: var(--ee-gray-600) !important;
    border-color: var(--ee-gray-400) !important;
}
.ee-btn-outline-secondary:hover:not(:disabled) {
    background: var(--ee-gray-100) !important;
    color: var(--ee-gray-700) !important;
    border-color: var(--ee-gray-500) !important;
    text-decoration: none;
}

/* Special Buttons */
.ee-btn-gray, .btn-gray {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ee-space-2, 0.5rem);
    padding: var(--ee-space-2, 0.5rem) var(--ee-space-5, 1.25rem);
    background: #e5e7eb !important;
    color: #374151 !important;
    border: 2px solid transparent !important;
    border-radius: var(--ee-radius-md, 0.5rem);
    font-size: var(--ee-text-sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--ee-transition-fast, 0.2s ease);
    cursor: pointer;
    line-height: 1.4;
}
.ee-btn-gray:hover:not(:disabled), .btn-gray:hover:not(:disabled) {
    background: var(--ee-indigo, #3f51b5) !important;
    color: #fff !important;
    text-decoration: none;
}

.ee-btn-light {
    background: var(--ee-bg-hover) !important;
    color: var(--ee-text-secondary) !important;
    border-color: var(--ee-border-light) !important;
}
.ee-btn-light:hover:not(:disabled) {
    background: var(--ee-bg-card) !important;
    border-color: var(--ee-border-default) !important;
    color: var(--ee-text-primary) !important;
}

/* Back Link Button - Gray with indigo hover */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ee-text-secondary, #6c757d);
    background: var(--ee-bg-card, #fff);
    border: 1px solid var(--ee-border-light, #dee2e6);
    border-radius: var(--ee-radius-md, 0.375rem);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.back-link:hover {
    background: var(--ee-indigo, #3f51b5);
    border-color: var(--ee-indigo, #3f51b5);
    color: var(--ee-text-inverse, #fff);
    text-decoration: none;
}
.back-link i {
    font-size: 0.875rem;
}

.ee-btn-cancel {
    padding: var(--ee-space-2) var(--ee-space-5);
    font-size: var(--ee-text-sm);
    font-weight: 500;
    color: var(--ee-text-secondary);
    background: var(--ee-bg-hover);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    cursor: pointer;
    transition: all var(--ee-transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-2);
}
.ee-btn-cancel:hover { background: var(--ee-bg-card); border-color: var(--ee-border-default); }

.ee-btn-delete {
    padding: var(--ee-space-2) var(--ee-space-5);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-inverse);
    background: var(--ee-danger);
    border: none;
    border-radius: var(--ee-radius-md);
    cursor: pointer;
    transition: all var(--ee-transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-2);
}
.ee-btn-delete:hover { background: var(--ee-danger-dark); transform: translateY(-1px); }

.ee-btn-close-modal {
    padding: var(--ee-space-2) var(--ee-space-6);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-indigo);
    background: var(--ee-bg-card);
    border: 2px solid var(--ee-indigo);
    border-radius: var(--ee-radius-md);
    cursor: pointer;
    transition: all var(--ee-transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-1);
}
.ee-btn-close-modal:hover { background: var(--ee-indigo); color: var(--ee-text-inverse); }

/* Icon-Only Button */
.ee-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--ee-radius-md);
    border: 1px solid var(--ee-border-light);
    background: var(--ee-bg-card);
    color: var(--ee-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--ee-transition-fast);
}
.ee-btn-icon:hover { background: var(--ee-indigo); border-color: var(--ee-indigo); color: var(--ee-text-inverse); }
.ee-btn-icon-sm { width: 28px; height: 28px; }
.ee-btn-icon-lg { width: 44px; height: 44px; }

.ee-btn-link {
    background: transparent !important;
    border: none !important;
    color: var(--ee-indigo) !important;
    padding: var(--ee-space-1) var(--ee-space-2);
    text-decoration: none;
}
.ee-btn-link:hover:not(:disabled) { color: var(--ee-indigo-dark) !important; text-decoration: underline; }

/* =============================================================================
   5. CARDS
   ============================================================================= */

.ee-card {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    overflow: hidden;
    box-shadow: var(--ee-shadow-card, var(--ee-shadow-sm));
}

.ee-card-elevated { box-shadow: var(--ee-shadow-card-hover, var(--ee-shadow-md)); }

/* Equal Height Card Row - Use on Bootstrap row to make all cards same height */
.ee-card-row {
    display: flex;
    flex-wrap: wrap;
}
.ee-card-row > [class*="col"] {
    display: flex;
}
.ee-card-row .ee-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ee-card-row .ee-card-body {
    flex-grow: 1;
}

.ee-card-gradient-top { position: relative; }
.ee-card-gradient-top::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ee-indigo) 0%, var(--ee-teal) 100%);
    border-radius: var(--ee-radius-lg) var(--ee-radius-lg) 0 0;
    z-index: 10;
}

.ee-card-gradient-top-reverse { position: relative; }
.ee-card-gradient-top-reverse::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ee-teal) 0%, var(--ee-indigo) 100%);
    border-radius: var(--ee-radius-lg) var(--ee-radius-lg) 0 0;
    z-index: 10;
}

/* Info Card */
.ee-info-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    padding: var(--ee-space-6);
    margin-bottom: var(--ee-space-5);
    box-shadow: var(--ee-shadow-card, var(--ee-shadow-sm));
    position: relative;
}
.ee-info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ee-indigo) 0%, var(--ee-teal) 100%);
    border-radius: var(--ee-radius-lg) var(--ee-radius-lg) 0 0;
}

.ee-info-card-content { display: flex; align-items: center; gap: var(--ee-space-3); }

.ee-info-card-icon {
    width: 32px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: var(--ee-indigo);
    border-radius: var(--ee-radius-sm);
    color: var(--ee-text-inverse);
    font-size: var(--ee-text-base);
    flex-shrink: 0;
}

.ee-info-card-text {
    flex: 1;
    font-size: var(--ee-text-sm);
    line-height: var(--ee-leading-normal);
    color: var(--ee-text-secondary);
}
.ee-info-card-text strong { color: var(--ee-text-primary); }

/* Help Card */
.ee-help-card {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    overflow: hidden;
    box-shadow: var(--ee-shadow-card, var(--ee-shadow-sm));
}

.ee-help-header {
    display: flex; align-items: center; gap: var(--ee-space-3);
    padding: var(--ee-space-3) var(--ee-space-4);
    background: var(--ee-indigo);
}

.ee-help-icon {
    width: 28px; height: 28px;
    border-radius: var(--ee-radius-sm);
    background: rgba(255, 255, 255, 0.2);
    display: flex; align-items: center; justify-content: center;
}
.ee-help-icon i { color: var(--ee-text-inverse); font-size: var(--ee-text-sm); }

.ee-help-title { font-size: var(--ee-text-base); font-weight: 600; margin: 0; color: var(--ee-text-inverse); }

.ee-help-body { padding: var(--ee-space-4); }
.ee-help-body p { font-size: var(--ee-text-sm); color: var(--ee-text-secondary); margin-bottom: var(--ee-space-3); }

.ee-help-list { display: flex; flex-direction: column; gap: var(--ee-space-2); }

.ee-help-item {
    display: flex; align-items: flex-start; gap: var(--ee-space-2);
    padding: var(--ee-space-2) var(--ee-space-3);
    background: var(--ee-bg-hover);
    border-radius: var(--ee-radius-md);
    border: 1px solid var(--ee-border-light);
}

.ee-help-item-icon {
    width: 22px; height: 22px;
    border-radius: var(--ee-radius-sm);
    background: var(--ee-indigo-bg);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ee-help-item-icon i { color: var(--ee-indigo); font-size: 0.625rem; }

.ee-help-item-text { font-size: var(--ee-text-xs); color: var(--ee-text-secondary); line-height: 1.4; }
.ee-help-item-text strong { color: var(--ee-text-primary); }

/* =============================================================================
   6. FORMS
   ============================================================================= */

.ee-form-group { margin-bottom: var(--ee-space-4); }

.ee-label {
    display: block;
    margin-bottom: var(--ee-space-1);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-primary);
}
.ee-label-required::after { content: ' *'; color: var(--ee-danger); }

.ee-input {
    display: block; width: 100%;
    padding: var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-base);
    font-weight: 400;
    line-height: var(--ee-leading-normal);
    color: var(--ee-text-primary);
    background-color: var(--ee-bg-card);
    background-clip: padding-box;
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
    transition: border-color var(--ee-transition-fast), box-shadow var(--ee-transition-fast);
}
.ee-input:focus { border-color: var(--ee-indigo); outline: 0; box-shadow: 0 0 0 3px var(--ee-indigo-bg); }
.ee-input::placeholder { color: var(--ee-text-dim); }
.ee-input:disabled { background-color: var(--ee-bg-hover); opacity: 0.7; cursor: not-allowed; }

/* Hide spin buttons on all number inputs to prevent accidental value changes */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.ee-input-sm { padding: var(--ee-space-1) var(--ee-space-3); font-size: var(--ee-text-sm); border-radius: var(--ee-radius-sm); }
.ee-input-lg { padding: var(--ee-space-3) var(--ee-space-4); font-size: var(--ee-text-lg); border-radius: var(--ee-radius-md); }

.ee-input-error { border-color: var(--ee-danger); }
.ee-input-error:focus { border-color: var(--ee-danger); box-shadow: 0 0 0 3px var(--ee-danger-bg); }

.ee-input-success { border-color: var(--ee-success); }
.ee-input-success:focus { border-color: var(--ee-success); box-shadow: 0 0 0 3px var(--ee-success-bg); }

.ee-textarea {
    display: block; width: 100%;
    padding: var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-base);
    line-height: var(--ee-leading-normal);
    color: var(--ee-text-primary);
    background-color: var(--ee-bg-card);
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
    resize: vertical;
    min-height: 80px;
    max-height: 300px;
    overflow-y: auto;
    transition: border-color var(--ee-transition-fast), box-shadow var(--ee-transition-fast);
}
.ee-textarea:focus { border-color: var(--ee-indigo); outline: 0; box-shadow: 0 0 0 3px var(--ee-indigo-bg); }

/* Scrollable textarea for magic_render type='comments' */
textarea.md-textarea {
    min-height: 80px;
    max-height: 300px;
    overflow-y: auto !important;
    resize: vertical;
}
/* Ensure textarea scrolling works in all form contexts */
.md-form textarea.md-textarea,
.form-group textarea.md-textarea {
    overflow-y: auto !important;
    max-height: 300px;
}

.ee-select {
    display: block; width: 100%;
    padding: var(--ee-space-2) 2rem var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-base);
    font-weight: 400;
    line-height: var(--ee-leading-normal);
    color: var(--ee-text-primary);
    background-color: var(--ee-bg-card);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
    appearance: none;
    transition: border-color var(--ee-transition-fast), box-shadow var(--ee-transition-fast);
}
.ee-select:focus { border-color: var(--ee-indigo); outline: 0; box-shadow: 0 0 0 3px var(--ee-indigo-bg); }
.ee-select:disabled { background-color: var(--ee-bg-hover); opacity: 0.7; cursor: not-allowed; }
.ee-select-sm { padding: var(--ee-space-1) 2rem var(--ee-space-1) var(--ee-space-3); font-size: var(--ee-text-sm); }

/* Checkbox & Radio */
.ee-checkbox-wrapper, .ee-radio-wrapper { display: flex; align-items: center; gap: var(--ee-space-2); cursor: pointer; }
.ee-checkbox, .ee-radio { width: 18px; height: 18px; accent-color: var(--ee-indigo); cursor: pointer; }
.ee-checkbox-label, .ee-radio-label { font-size: var(--ee-text-base); color: var(--ee-text-primary); user-select: none; }

/* Custom Checkbox */
.ee-custom-checkbox { position: relative; display: flex; align-items: center; gap: var(--ee-space-2); cursor: pointer; }
.ee-custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.ee-custom-checkbox .ee-checkmark {
    width: 18px; height: 18px;
    background-color: var(--ee-bg-card);
    border: 2px solid var(--ee-border-default);
    border-radius: var(--ee-radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--ee-transition-fast);
    flex-shrink: 0;
}
.ee-custom-checkbox:hover .ee-checkmark { border-color: var(--ee-indigo); }
.ee-custom-checkbox input:checked ~ .ee-checkmark { background-color: var(--ee-indigo); border-color: var(--ee-indigo); }
.ee-custom-checkbox .ee-checkmark::after {
    content: '';
    display: none;
    width: 5px; height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}
.ee-custom-checkbox input:checked ~ .ee-checkmark::after { display: block; }

/* magic_render checkbox (field_checkbox.html, mdb .filled-in): a ticked box is the
   house indigo box with a white tick, not mdb's purple. */
.form-check .form-check-input[type=checkbox].filled-in:checked + label:after {
    background-color: var(--ee-indigo);
    border-color: var(--ee-indigo);
}

/* Toggle Switch */
.ee-toggle { position: relative; display: inline-flex; align-items: center; gap: var(--ee-space-2); cursor: pointer; }
.ee-toggle input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.ee-toggle-slider {
    width: 44px; height: 24px;
    background-color: var(--ee-border-default);
    border-radius: 12px;
    position: relative;
    transition: background-color var(--ee-transition-fast);
    flex-shrink: 0;
}
.ee-toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background-color: white;
    border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform var(--ee-transition-fast);
    box-shadow: var(--ee-shadow-sm);
}
.ee-toggle input:checked + .ee-toggle-slider { background-color: var(--ee-indigo); }
.ee-toggle input:checked + .ee-toggle-slider::after { transform: translateX(20px); }
.ee-toggle input:disabled + .ee-toggle-slider { opacity: 0.5; cursor: not-allowed; }

.ee-form-help { margin-top: var(--ee-space-1); font-size: var(--ee-text-xs); color: var(--ee-text-muted); }
.ee-form-error { margin-top: var(--ee-space-1); font-size: var(--ee-text-xs); color: var(--ee-danger); }

/* Input Group */
.ee-input-group { display: flex; align-items: stretch; }
.ee-input-group .ee-input { flex: 1; border-radius: 0; }
.ee-input-group .ee-input:first-child { border-radius: var(--ee-radius-md) 0 0 var(--ee-radius-md); }
.ee-input-group .ee-input:last-child { border-radius: 0 var(--ee-radius-md) var(--ee-radius-md) 0; }

.ee-input-group-prepend, .ee-input-group-append {
    display: flex; align-items: center;
    padding: var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-base);
    background-color: var(--ee-bg-hover);
    border: 1px solid var(--ee-border-default);
    color: var(--ee-text-secondary);
}
.ee-input-group-prepend { border-right: none; border-radius: var(--ee-radius-md) 0 0 var(--ee-radius-md); }
.ee-input-group-append { border-left: none; border-radius: 0 var(--ee-radius-md) var(--ee-radius-md) 0; }

.ee-search-input { position: relative; }
.ee-search-input .ee-input { padding-left: 2.5rem; }
.ee-search-input i { position: absolute; left: var(--ee-space-3); top: 50%; transform: translateY(-50%); color: var(--ee-text-muted); font-size: var(--ee-text-base); }

/* =============================================================================
   7. TABLES
   ============================================================================= */

.ee-table-wrapper {
    overflow-x: auto;
    border-radius: var(--ee-radius-lg);
    border: 1px solid var(--ee-border-light);
    background: var(--ee-bg-card);
}

.ee-table { width: 100%; border-collapse: collapse; font-size: var(--ee-text-base); }

/* .ee-table-stack: on a phone each row becomes a card and every cell prints its column
   name from data-label="..." (ExactQA 2026-10-22: at 390px the HCV queue, the HQS
   deficiencies and the participant's requests cut off their last columns, and the
   participant's Withdraw button was off-screen). Above the phone breakpoint the
   table is unchanged. */
@media (max-width: 575.98px) {
    .ee-table-stack thead {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap;
    }
    .ee-table-stack, .ee-table-stack tbody, .ee-table-stack tr, .ee-table-stack td { display: block; width: 100%; }
    .ee-table-stack tr {
        border: 1px solid var(--ee-border-light);
        border-radius: var(--ee-radius-md);
        background: var(--ee-bg-card);
        margin-bottom: var(--ee-space-3);
        padding: var(--ee-space-2) var(--ee-space-3);
    }
    .ee-table-stack td {
        display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
        gap: var(--ee-space-1) var(--ee-space-3);
        border: 0; padding: var(--ee-space-1) 0; text-align: right; overflow-wrap: anywhere;
    }
    .ee-table-stack td[data-label]::before {
        content: attr(data-label);
        font-weight: 600; color: var(--ee-text-muted); text-align: left;
    }
    .ee-table-stack td:empty { display: none; }
}

/* .ee-pref-control: a preference row's control (a select beside its label and
   description) keeps a steady width beside the words; on a phone it takes its own
   full line, so the description is not squeezed into a one-word column
   (My Notifications, EEva tips, at 390px). The row must allow wrapping. */
.ee-pref-control { flex: 0 0 16rem; max-width: 100%; min-width: 0; }
@media (max-width: 575.98px) {
    .ee-pref-control { flex: 1 1 100%; }
}

/* .ee-col-roomy: a column a table can spare on a tablet. Between the phone's cards
   and the desktop, a wide audit table ran past its frame and cut off its last column
   (HUD Submission History at 834px lost Submitted By); its roomy columns step aside
   there so the ones a person acts on fit. Phone cards and the desktop show them all. */
@media (min-width: 577px) and (max-width: 991.98px) {
    th.ee-col-roomy, td.ee-col-roomy { display: none; }
}

.ee-table th {
    padding: var(--ee-space-3) var(--ee-space-4);
    text-align: left;
    font-weight: 600;
    font-size: var(--ee-text-xs);
    text-transform: uppercase;
    letter-spacing: var(--ee-tracking-wide);
    color: var(--ee-text-inverse);
    background: var(--ee-indigo);
    border: none;
}
.ee-table th:first-child { border-radius: var(--ee-radius-lg) 0 0 0; }
.ee-table th:last-child { border-radius: 0 var(--ee-radius-lg) 0 0; }
.ee-table-no-radius th:first-child,
.ee-table-no-radius th:last-child { border-radius: 0; }

.ee-table td {
    padding: var(--ee-space-3) var(--ee-space-4);
    border-bottom: 1px solid var(--ee-border-light);
    color: var(--ee-text-primary);
    vertical-align: middle;
}
.ee-table tbody tr:last-child td { border-bottom: none; }
.ee-table tbody tr:hover { background-color: var(--ee-bg-hover); }

.ee-table-striped tbody tr:nth-child(odd) { background-color: var(--ee-bg-hover); }
.ee-table-striped tbody tr:nth-child(odd):hover { background-color: var(--ee-indigo-bg); }

.ee-table-compact th, .ee-table-compact td { padding: var(--ee-space-2) var(--ee-space-3); }
.ee-table-footer td { background: var(--ee-bg-hover); font-weight: 600; }
.ee-table-bordered th, .ee-table-bordered td { border: 1px solid var(--ee-border-light); }
.ee-table-teal th { background: var(--ee-teal); }
.ee-table-actions { display: flex; gap: var(--ee-space-1); justify-content: flex-end; }

/* =============================================================================
   7b. DATATABLES - Universal Fixes
   ============================================================================= */

/* Hide DataTables sizing row that causes extra header row */
.dataTables_sizing {
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* Ensure header and body scroll containers take full width */
div.dataTables_scrollHead,
div.dataTables_scrollBody {
    width: 100% !important;
}

/* Ensure header doesn't show scrollbar but stays in sync */
.dataTables_scrollHead {
    overflow: hidden !important;
}

/* Remove card styling from datatable wrappers */
.dataTables_wrapper #datatables_container_card,
.dataTables_wrapper .card.card-cascade,
.dataTables_wrapper .card-cascade.narrower,
#datatables_container_card.card.card-cascade {
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-box-shadow: none !important;
}

/* Toolbar alignment */
.toolbar .indigo {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.toolbar nav.navbar {
    background: transparent !important;
    padding: 0;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Toolbar items */
.toolbar_item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
}

/* DataTable toolbars share one responsive, token-driven layout across includes. */
[id^="datatable_nav"] {
    width: 100%;
    min-width: 0;
}

[id^="datatable_nav"] [id^="navbarSupportedContent23"] {
    min-width: 0;
    gap: var(--ee-space-3);
}

[id^="datatable_nav"] h3 {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[id^="datatable-topright"] {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    gap: var(--ee-space-1) !important;
    min-width: 0;
    max-width: 55%;
    margin-left: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

[id^="datatable_nav"] .toolbar_item {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: var(--ee-space-2) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

[id^="datatable_nav"] .toolbar_item {
    color: var(--ee-text-inverse) !important;
    cursor: pointer;
}

[id^="datatable_nav"] .toolbar_item i {
    color: currentColor !important;
    font-size: 1.3em;
}

[id^="datatable_nav"] .toolbar_item:hover {
    background: var(--ee-bg-inverse-hover) !important;
}

[id^="datatable_nav"] .toolbar_item:active {
    background: var(--ee-bg-inverse-active) !important;
}

[id^="datatable_nav"] .toolbar_item:focus-visible,
[id^="datatable_nav"] [class*="search_input"]:focus-visible {
    outline: 2px solid var(--ee-text-inverse) !important;
    outline-offset: -3px;
}

[id^="datatable_nav"] input[type="search"]::-webkit-search-cancel-button {
    filter: brightness(0) invert(1);
}

[id^="datatable_nav"] input[type="search"] {
    min-width: 7.5rem;
    max-width: 12.5rem;
    padding: var(--ee-space-2) 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ee-border-inverse-muted) !important;
    border-radius: 0 !important;
    color: var(--ee-text-inverse) !important;
}

[id^="datatable_nav"] input[type="search"]:focus {
    border-bottom: 2px solid var(--ee-text-inverse) !important;
    box-shadow: none !important;
}

[id^="datatable_nav"] .form-control::placeholder {
    color: var(--ee-text-inverse) !important;
    opacity: 1;
    text-align: left !important;
}

[id^="datatable-topright"] .dataTables_filter {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

[id^="datatable-topright"] .dataTables_filter label {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

div.dataTables_wrapper div.dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    margin: 0;
    padding: var(--ee-space-4) var(--ee-space-6);
    transform: translate(-50%, -50%);
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-indigo);
    border-radius: var(--ee-radius-md);
    box-shadow: var(--ee-shadow-md);
    color: var(--ee-text-primary);
    font-weight: 600;
    z-index: var(--ee-z-sticky);
}

.dt-loader {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
    white-space: nowrap;
}

.dt-loader-spinner {
    width: 1.375rem;
    height: 1.375rem;
    border: 3px solid var(--ee-indigo-bg-hover);
    border-top-color: var(--ee-indigo);
    border-radius: var(--ee-radius-full);
    display: inline-block;
    animation: ee-spin 0.7s linear infinite;
}

tr.loader td {
    text-align: center !important;
}

tr.loader .preloader-wrapper {
    display: inline-block;
}

.dataTables_wrapper tbody tr[data-href],
.dataTables_wrapper tbody tr.clickable_row,
.dataTables_wrapper tbody tr.clickable_row_color {
    cursor: pointer;
}

.dataTables_wrapper tbody tr[data-href]:focus-visible,
.dataTables_wrapper tbody tr.clickable_row:focus-visible,
.dataTables_wrapper tbody tr.clickable_row_color:focus-visible {
    outline: 3px solid var(--ee-indigo);
    outline-offset: -3px;
}

@media (max-width: 767.98px) {
    [id^="datatable_nav"] [id^="navbarSupportedContent23"] {
        flex-wrap: wrap;
        padding: var(--ee-space-3) !important;
    }

    [id^="datatable_nav"] h3 {
        display: -webkit-box !important;
        flex: 1 0 100%;
        font-size: var(--ee-text-xl);
        line-height: var(--ee-leading-tight);
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    [id^="datatable-topright"] {
        flex: 1 0 100%;
        flex-wrap: wrap;
        justify-content: flex-end !important;
        max-width: 100%;
    }

    [id^="datatable-topright"] [id^="export_filter"],
    [id^="datatable-topright"] input[type="search"] {
        flex: 1 0 100%;
        width: 100% !important;
        max-width: none;
    }

    /* ADVERTISE THE HORIZONTAL SCROLL.

       MEASURED on the recertification queue at 390px CSS (dpr 3): the table is
       678px wide inside a .dataTables_scrollBody whose client width is 332px.
       The container already carries overflow-x:auto, so the columns ARE
       reachable -- but 51% of them are off-screen with nothing on the page
       saying so, and a column cut mid-word ("Last Cer", a due date ending
       "07/29/20") reads as a truncated table rather than a scrollable one.
       This is the single most common way a dense compliance table looks broken
       on a phone.

       The two opaque gradients are painted with background-attachment:local so
       they travel with the content and vanish at each end of the scroll; the
       two dark ones are :scroll, so they stay pinned to the edges and show only
       while there is more table in that direction. Together they are the
       standard "there is more this way" cue, and they cost no markup, which
       matters because this DOM is built by DataTables, not by our templates. */
    .dataTables_wrapper .dataTables_scrollBody {
        -webkit-overflow-scrolling: touch;
        background-image:
            linear-gradient(to right, var(--ee-bg-card, #fff), rgba(255, 255, 255, 0)),
            linear-gradient(to left,  var(--ee-bg-card, #fff), rgba(255, 255, 255, 0)),
            linear-gradient(to right, rgba(15, 23, 42, 0.13), rgba(15, 23, 42, 0)),
            linear-gradient(to left,  rgba(15, 23, 42, 0.13), rgba(15, 23, 42, 0));
        background-position: 0 0, 100% 0, 0 0, 100% 0;
        background-repeat: no-repeat;
        background-size: 30px 100%, 30px 100%, 14px 100%, 14px 100%;
        background-attachment: local, local, scroll, scroll;
    }

    /* A cell that wraps to four lines is not denser, it is taller. MEASURED on
       the same queue: every row spent four lines on "Trinity Heights
       Affordable Building C", so eight rows filled the screen. Long identifiers
       stay on one line and the row keeps its height; the column is reachable by
       the scroll the rules above now advertise. */
    .dataTables_wrapper table.dataTable tbody td {
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dataTables_wrapper *,
    .dataTables_wrapper *::before,
    .dataTables_wrapper *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    .dataTables_wrapper .dt-loader-spinner {
        animation: none !important;
    }
}

/* =============================================================================
   8. ALERTS
   ============================================================================= */

.ee-alert {
    /* display:block so inline content (<b>, <strong>, <em> etc.) renders with normal word spacing.
       display:flex was stripping leading/trailing whitespace from anonymous flex items,
       causing inline bold/italic text to lose the spaces around it. */
    display: block;
    overflow: hidden; /* clearfix for .ee-alert-icon float */
    padding: var(--ee-space-3) var(--ee-space-4);
    border-radius: var(--ee-radius-md);
    margin-bottom: var(--ee-space-3);
}

/* .ee-alert-danger is the Bootstrap-shaped name for the same thing; 12 templates
   already ship it and rendered as an unstyled box until it was aliased here. */
.ee-alert-error, .ee-alert-danger { background: var(--ee-danger-bg); border: 1px solid rgba(239, 68, 68, 0.2); border-left: 3px solid var(--ee-danger); }
.ee-alert-warning { background: var(--ee-warning-bg); border: 1px solid rgba(245, 158, 11, 0.2); border-left: 3px solid var(--ee-warning); }
.ee-alert-success { background: var(--ee-success-bg); border: 1px solid rgba(16, 185, 129, 0.2); border-left: 3px solid var(--ee-success); }
.ee-alert-info { background: var(--ee-info-bg); border: 1px solid rgba(59, 130, 246, 0.2); border-left: 3px solid var(--ee-info); }

.ee-alert-icon {
    float: left;
    width: 24px; height: 24px;
    border-radius: var(--ee-radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin-right: var(--ee-space-3);
}
.ee-alert-error .ee-alert-icon, .ee-alert-danger .ee-alert-icon { background: var(--ee-danger); }
.ee-alert-warning .ee-alert-icon { background: var(--ee-warning); }
.ee-alert-success .ee-alert-icon { background: var(--ee-success); }
.ee-alert-info .ee-alert-icon { background: var(--ee-info); }
.ee-alert-icon i { color: var(--ee-text-inverse); font-size: var(--ee-text-xs); }

.ee-alert-text { font-size: var(--ee-text-sm); font-weight: 600; }
.ee-alert-error .ee-alert-text, .ee-alert-danger .ee-alert-text { color: var(--ee-danger); }
.ee-alert-warning .ee-alert-text { color: var(--ee-warning-on-bg, var(--ee-warning-dark)); }
.ee-alert-success .ee-alert-text { color: var(--ee-success-dark); }
.ee-alert-info .ee-alert-text { color: var(--ee-info-dark); }

.ee-fixed-save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    border-radius: var(--ee-radius-md);
    margin-bottom: 0;
    background: #e8f0fe;
    border-right: 3px solid var(--ee-info);
}
@media (min-width: 992px) {
    body.fixed-sn .ee-fixed-save-bar { left: var(--sidenav-width, 270px); }
    body.fixed-sn.sidenav-slim .ee-fixed-save-bar { left: var(--sidenav-slim-width, 60px); }
}

/* =============================================================================
   8b. BOOTSTRAP ALERT OVERRIDES - Solid backgrounds instead of transparent
   ============================================================================= */

.alert {
    border: none;
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-3) var(--ee-space-4);
    font-size: var(--ee-text-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--ee-space-3);
}

.alert i { margin-top: 2px; font-size: 1rem; }

/* Under md a flex .alert splits inline content (an icon, <b>Tip:</b>, a link,
   loose text) into separate flex items: a 3-column word grid at 390. Let the
   content flow as text there; the leading icon keeps a gap. Alerts that are
   deliberately laid out with .d-flex (text + button) keep their flex row. */
@media (max-width: 767.98px) {
    .alert:not(.d-flex) { display: block; }
    .alert:not(.d-flex) > i:first-child { margin-right: var(--ee-space-2); }
    .alert-dismissible:not(.d-flex) { padding-right: var(--ee-space-10); }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: #e8eaf6;
    color: #303f9f;
    border-left: 4px solid var(--ee-indigo);
}

/* =============================================================================
   8c. NOTIFICATION TOAST (data-notify) - Light background with side border
   ============================================================================= */

[data-notify="container"] {
    z-index: 9999999 !important;
    border: none !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    padding: 1rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    min-width: 320px !important;
    max-width: 450px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    overflow: hidden !important;
}

/* Success - White to light green with solid border */
[data-notify="container"].alert-success {
    background: linear-gradient(135deg, #ffffff 0%, #d1fae5 100%) !important;
    color: #065f46 !important;
    border-left: 4px solid #10b981 !important;
}

/* Danger/Error - White to light red with solid border */
[data-notify="container"].alert-danger,
[data-notify="container"].alert-error {
    background: linear-gradient(135deg, #ffffff 0%, #fee2e2 100%) !important;
    color: #991b1b !important;
    border-left: 4px solid #ef4444 !important;
}

/* Warning - White to light amber with solid border */
[data-notify="container"].alert-warning {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%) !important;
    color: #92400e !important;
    border-left: 4px solid #f59e0b !important;
}

/* Info - White to light indigo with solid border */
[data-notify="container"].alert-info {
    background: linear-gradient(135deg, #ffffff 0%, #e8eaf6 100%) !important;
    color: #303f9f !important;
    border-left: 4px solid #3f51b5 !important;
}

[data-notify="container"] .close {
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0.6;
    text-shadow: none;
    font-size: 1.25rem;
    font-weight: 300;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: inherit !important;
    line-height: 1;
    transition: opacity 0.2s ease;
}

[data-notify="container"] .close:hover { opacity: 1; }
[data-notify="container"] [data-notify="icon"] { font-size: 1.1rem; }
[data-notify="container"] [data-notify="message"] { flex: 1; font-weight: 500; }
[data-notify="container"] .progress { display: none !important; }

/* Offset notification for sidebar on desktop - center in content area */
@media (min-width: 993px) {
    body.fixed-sn [data-notify="container"] {
        left: calc(var(--sidenav-width, 270px) + ((100vw - var(--sidenav-width, 270px)) / 2)) !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
    body.fixed-sn.sidenav-slim [data-notify="container"] {
        left: calc(var(--sidenav-slim-width, 60px) + ((100vw - var(--sidenav-slim-width, 60px)) / 2)) !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
}

/* =============================================================================
   9. BADGES
   ============================================================================= */

.ee-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0.1875rem var(--ee-space-3);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--ee-tracking-wide);
    border-radius: var(--ee-radius-full);
    background: var(--ee-bg-hover);
    color: var(--ee-text-muted);
    vertical-align: middle;
}

.ee-badge-success { background: var(--ee-success-bg); color: var(--ee-success-on-bg, var(--ee-success)); }
.ee-badge-warning { background: var(--ee-warning-bg); color: var(--ee-warning-on-bg, var(--ee-warning-dark)); }
.ee-badge-danger { background: var(--ee-danger-bg); color: var(--ee-danger-on-bg, var(--ee-danger)); }
.ee-badge-danger-solid { background: var(--ee-danger); color: var(--ee-text-inverse); }
.ee-badge-info { background: var(--ee-info-bg); color: var(--ee-info); }
.ee-badge-indigo { background: var(--ee-indigo-bg); color: var(--ee-indigo); }

/* Management-fee live preview readout (recurring + one-time AP forms).
   Auto-hides when empty so blank lines show nothing; calculator icon is a
   pseudo-element so JS .text() updates never clobber it. */
.ee-fee-preview {
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-2);
    margin-top: var(--ee-space-2);
    padding: 0.1875rem var(--ee-space-3);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    border-radius: var(--ee-radius-full);
    background: var(--ee-success-bg);
    color: var(--ee-success);
}
.ee-fee-preview:empty { display: none; }
.ee-fee-preview::before {
    content: "\f1ec";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}
#fee_preview_total {
    font-weight: 600;
    color: var(--ee-success);
}
#fee_preview_total:empty { display: none; }
button:hover .ee-badge-indigo,
.ee-btn:hover .ee-badge-indigo {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.ee-badge-indigo-solid { background: var(--ee-indigo); color: var(--ee-text-inverse); }
.ee-badge-white { background: #fff; color: var(--ee-indigo); }
.ee-badge-indigo-tab { background: var(--ee-indigo); color: #fff; }
.ee-btn.ee-btn-indigo .ee-badge-indigo-tab,
.ee-btn:hover .ee-badge-indigo-tab { background: rgba(255,255,255,.9); color: var(--ee-indigo); }
/* Count badge for ee-btn-outline-indigo: solid indigo+white default, frosted white on hover */
.ee-badge-outline-tab { background: var(--ee-indigo); color: #fff; }
.ee-btn-outline-indigo:hover .ee-badge-outline-tab { background: rgba(255,255,255,0.22); color: #fff; }
/* Opaque indigo count badge — solid indigo on outline buttons, frosted white on hover */
.ee-btn-outline-indigo:hover{ background: rgba(255,255,255,0.25); color: #fff; }
.ee-badge-teal { background: var(--ee-teal-bg); color: var(--ee-teal-dark); }

/* DocuSign Status Badges */
.ee-docusign-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--ee-radius-sm);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all var(--ee-transition-fast);
}
.ee-docusign-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--ee-shadow-sm);
}
.ee-docusign-badge i { margin-right: 0.25rem; }

.ee-docusign-badge-created { background: var(--ee-info-bg); color: #1565c0; }
.ee-docusign-badge-sent { background: #fff3e0; color: #ef6c00; }
.ee-docusign-badge-delivered { background: var(--ee-success-bg); color: #2e7d32; }
.ee-docusign-badge-pending { background: #fce4ec; color: #c2185b; }
.ee-docusign-badge-completed { background: var(--ee-success-bg); color: var(--ee-success); }
.ee-docusign-badge-declined { background: var(--ee-danger-bg); color: var(--ee-danger); }
.ee-docusign-badge-voided { background: #eceff1; color: #546e7a; }

/* DocuSign Details Card */
.ee-docusign-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ee-border-light);
}
.ee-docusign-detail-item:last-child { border-bottom: none; }
.ee-docusign-detail-label { font-weight: 500; color: var(--ee-text-muted); }
.ee-docusign-detail-value { font-weight: 600; color: var(--ee-text-primary); }

/* DocuSign Info Grid */
.ee-docusign-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.ee-docusign-info-item {
    background: var(--ee-bg-hover);
    border-radius: var(--ee-radius-md);
    padding: 0.75rem 1rem;
}

.ee-docusign-info-label {
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ee-text-muted);
    margin-bottom: 0.25rem;
}

.ee-docusign-info-value {
    font-weight: 600;
    color: var(--ee-text-primary);
}

.ee-docusign-envelope-id {
    background: var(--ee-bg-hover);
    border-radius: var(--ee-radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ee-docusign-envelope-id code {
    background: var(--ee-bg-card);
    padding: 0.25rem 0.5rem;
    border-radius: var(--ee-radius-sm);
    font-size: var(--ee-text-xs);
    word-break: break-all;
}

/* DocuSign Recipient Groups */
.ee-docusign-recipient-group {
    margin-bottom: 1.5rem;
}

.ee-docusign-recipient-group:last-child {
    margin-bottom: 0;
}

.ee-docusign-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: var(--ee-text-sm);
    color: var(--ee-text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ee-indigo);
}

.ee-docusign-group-header i {
    color: var(--ee-indigo);
}

.ee-docusign-group-recipients {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* DocuSign Recipient Card */
.ee-docusign-recipient-card {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    padding: 1rem;
    transition: all var(--ee-transition-fast);
}

.ee-docusign-recipient-card:hover {
    border-color: var(--ee-indigo);
    box-shadow: var(--ee-shadow-sm);
}

.ee-docusign-recipient-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.ee-docusign-recipient-info {
    flex: 1;
    min-width: 0;
}

.ee-docusign-recipient-name {
    font-weight: 600;
    color: var(--ee-text-primary);
    margin-bottom: 0.125rem;
}

.ee-docusign-recipient-email {
    font-size: var(--ee-text-sm);
    color: var(--ee-text-muted);
    word-break: break-all;
}

.ee-docusign-recipient-status {
    flex-shrink: 0;
}

/* DocuSign Timeline */
.ee-docusign-timeline {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ee-border-light);
}

.ee-docusign-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: var(--ee-text-xs);
    padding: 0.375rem 0;
}

.ee-docusign-timeline-item i {
    width: 14px;
    text-align: center;
    margin-top: 2px;
}

.ee-docusign-timeline-viewed {
    color: var(--ee-info);
}

.ee-docusign-timeline-viewed i {
    color: var(--ee-info);
}

.ee-docusign-timeline-signed {
    color: var(--ee-success);
}

.ee-docusign-timeline-signed i {
    color: var(--ee-success);
}

.ee-docusign-timeline-declined {
    color: var(--ee-danger);
}

.ee-docusign-timeline-declined i {
    color: var(--ee-danger);
}

.ee-docusign-decline-reason {
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: var(--ee-danger-bg);
    border-radius: var(--ee-radius-sm);
    font-style: italic;
}

/* ===== TABS ===== */
/* .ee-tabs / .ee-tab are defined ONCE, under "Standalone EE Tabs" further down
   (merged 2026-10-20, ui_polish 0.2 — this used to be a competing first copy
   that the later one partly overrode). Only the panels live here. */
.ee-tab-panel {
    display: none;
}
.ee-tab-panel.active {
    display: block;
}

/* ===== TIMELINE ===== */
.ee-timeline {
    position: relative;
    padding-left: 1.5rem;
}
.ee-timeline::before {
    content: '';
    position: absolute;
    left: 0.4375rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 2px;
    background: var(--ee-gray-200);
    border-radius: 1px;
}
.ee-timeline-item {
    position: relative;
    padding-bottom: 1rem;
}
.ee-timeline-item:last-child {
    padding-bottom: 0;
}
.ee-timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.125rem;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--ee-indigo);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--ee-gray-200);
}
.ee-timeline-dot-success { background: var(--ee-success); box-shadow: 0 0 0 2px var(--ee-success-bg, rgba(40,167,69,0.15)); }
.ee-timeline-dot-warning { background: var(--ee-warning); box-shadow: 0 0 0 2px var(--ee-warning-bg, rgba(255,193,7,0.15)); }
.ee-timeline-dot-danger  { background: var(--ee-danger);  box-shadow: 0 0 0 2px var(--ee-danger-bg, rgba(220,53,69,0.15)); }
.ee-timeline-dot-info    { background: var(--ee-info);    box-shadow: 0 0 0 2px rgba(23,162,184,0.15); }
.ee-timeline-dot-gray    { background: var(--ee-gray-400); box-shadow: 0 0 0 2px var(--ee-gray-100); }
.ee-timeline-dot-indigo  { background: var(--ee-indigo);  box-shadow: 0 0 0 2px rgba(63,81,181,0.15); }
.ee-timeline-dot-muted   { background: var(--ee-gray-400); box-shadow: 0 0 0 2px var(--ee-gray-100); }

/* Timeline content sub-elements (used by application_activity.html). */
.ee-timeline-content { padding-left: var(--ee-space-3); }
.ee-timeline-meta {
    display: flex;
    gap: var(--ee-space-2);
    align-items: center;
    flex-wrap: wrap;
}
.ee-timeline-time {
    font-size: var(--ee-text-xs, 0.75rem);
    color: var(--ee-text-muted, #64748b);
    font-variant-numeric: tabular-nums;
}
.ee-timeline-summary {
    color: var(--ee-text-primary, #1e293b);
    margin-top: var(--ee-space-1);
}
.ee-timeline-details { margin-top: var(--ee-space-2); }
.ee-timeline-details summary {
    cursor: pointer;
    color: var(--ee-text-muted, #64748b);
    font-size: var(--ee-text-xs, 0.75rem);
}

/* Chips */
.ee-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-1);
    padding: var(--ee-space-1) var(--ee-space-3);
    font-size: var(--ee-text-xs);
    font-weight: 500;
    background: var(--ee-bg-hover);
    color: var(--ee-text-secondary);
    border-radius: var(--ee-radius-full);
    border: 1px solid var(--ee-border-light);
}
.ee-chip-indigo { background: var(--ee-indigo-bg); color: var(--ee-indigo); border-color: transparent; }
.ee-chip-teal { background: var(--ee-teal-bg); color: var(--ee-teal-dark); border-color: transparent; }
.ee-chip-success { background: var(--ee-success-bg); color: var(--ee-success-on-bg, var(--ee-success-dark)); border-color: transparent; }
.ee-chip-warning { background: var(--ee-warning-bg); color: var(--ee-warning-on-bg, var(--ee-warning-dark)); border-color: transparent; }
.ee-chip-danger { background: var(--ee-danger-bg); color: var(--ee-danger-on-bg, var(--ee-danger)); border-color: transparent; }

.ee-chip-removable { padding-right: var(--ee-space-1); }
.ee-chip-remove {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--ee-text-base);
    transition: all var(--ee-transition-fast);
}
.ee-chip-remove:hover { opacity: 1; background: rgba(0, 0, 0, 0.1); }

/* =============================================================================
   10. MODALS (BASE)
   ============================================================================= */

.ee-modal .modal-content {
    border: none;
    border-radius: var(--ee-radius-lg);
    overflow: hidden;
    box-shadow: var(--ee-shadow-lg);
}

.ee-modal-header {
    padding: var(--ee-space-4) var(--ee-space-5);
    border: none;
    background: var(--ee-indigo);
    color: var(--ee-text-inverse);
}

.ee-modal-header .modal-title {
    font-size: var(--ee-text-xl);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    margin: 0;
    color: var(--ee-text-inverse);
}
.ee-modal-header .modal-title i { font-size: var(--ee-text-lg); }

.ee-modal-header-actions { display: flex; align-items: center; gap: var(--ee-space-2); }

.ee-modal-btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--ee-text-inverse);
    width: 32px; height: 32px;
    border-radius: var(--ee-radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--ee-transition-fast);
    font-size: 1.25rem;
}
.ee-modal-btn-close:hover { background: rgba(255, 255, 255, 0.3); }

.ee-modal-body { padding: var(--ee-space-5); background: var(--ee-bg-page); }

.ee-modal-footer {
    padding: var(--ee-space-4) var(--ee-space-5);
    background: var(--ee-bg-card);
    border-top: 1px solid var(--ee-border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--ee-space-3);
}

/* Bootstrap .modal-header default (2026-10-22): a legacy Bootstrap/MDB modal
   whose header carries no colour of its own renders the EE standard — indigo
   header, white title, white close. :where() keeps the specificity at zero, so
   every deliberate colour (MDB .indigo / .cyan / .bg-* classes, .modal-notify
   .modal-danger, .ee-*-header variants, page <style> rules, inline style="")
   still wins. Titles inherit the header colour, so a light header that sets a
   dark colour keeps dark text. */
:where(.modal-header) {
    background-color: var(--ee-indigo);
    color: var(--ee-text-inverse);
}
:where(.modal-header) .modal-title,
:where(.modal-header) .heading { color: inherit; }
:where(.modal-header) .close,
:where(.modal-header) .close:hover {
    color: inherit;
    text-shadow: none;
    opacity: 0.9;
}

.ee-modal-header-success { background: var(--ee-success); }
.ee-modal-header-warning { background: var(--ee-warning); color: var(--ee-text-primary); }
.ee-modal-header-danger { background: var(--ee-danger); }
.ee-modal-header-info { background: var(--ee-info); }
.ee-modal-header-teal { background: var(--ee-teal); }

/* =============================================================================
   10b. MODAL OPTIONS SEARCH
   Universal search component for options modals
   ============================================================================= */

.modal-options-search {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    border: 1px solid var(--ee-border-default, #e0e0e0);
    border-radius: var(--ee-radius-md, 6px);
    background: #fff;
    padding: 0 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.modal-options-search:focus-within {
    border-color: var(--ee-indigo, #3f51b5);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}
.modal-options-search .search-icon {
    color: var(--ee-text-muted, #9e9e9e);
    font-size: 0.875rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.modal-options-search input {
    flex: 1;
    padding: 10px 10px;
    border: none !important;
    font-size: 0.875rem;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}
.modal-options-search input::placeholder {
    color: var(--ee-text-muted, #9e9e9e);
}
.modal-options-search .search-clear {
    color: var(--ee-border-default, #bdbdbd);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}
.modal-options-search .search-clear:hover {
    color: var(--ee-text-secondary, #757575);
    background: var(--ee-bg-hover, #f5f5f5);
}
.modal-options-search.has-value .search-clear {
    display: flex;
}
.modal-options .list-group-item.search-hidden {
    display: none !important;
}
.modal-options .no-results-message {
    text-align: center;
    padding: 20px;
    color: var(--ee-text-muted, #9e9e9e);
    font-size: 0.875rem;
    display: none;
}
.modal-options .no-results-message.visible {
    display: block;
}

/* =============================================================================
   11. DROPDOWNS
   ============================================================================= */

.ee-dropdown {
    border-radius: var(--ee-radius-md);
    box-shadow: var(--ee-shadow-lg);
    border: 1px solid var(--ee-border-light);
    padding: var(--ee-space-2) 0;
    min-width: 200px;
}

.ee-dropdown .dropdown-item {
    padding: var(--ee-space-2) var(--ee-space-4);
    font-size: var(--ee-text-sm);
    color: var(--ee-text-primary);
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
    transition: all var(--ee-transition-fast);
}
.ee-dropdown .dropdown-item:hover { background: var(--ee-indigo); color: var(--ee-text-inverse); }

.ee-dropdown .dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--ee-indigo);
    transition: all var(--ee-transition-fast);
}
.ee-dropdown .dropdown-item:hover i { color: var(--ee-text-inverse); }

.ee-dropdown .dropdown-item-danger { color: var(--ee-danger); }
.ee-dropdown .dropdown-item-danger:hover { background: var(--ee-danger); color: var(--ee-text-inverse); }
.ee-dropdown .dropdown-item-danger i { color: var(--ee-danger); }
.ee-dropdown .dropdown-item-danger:hover i { color: var(--ee-text-inverse); }

.ee-dropdown .dropdown-divider { margin: var(--ee-space-1) 0; border-color: var(--ee-border-light); }

/* Bootstrap Dropdown Override - Force Indigo Hover */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: var(--ee-indigo) !important;
    color: var(--ee-text-inverse) !important;
}

.dropdown-menu .dropdown-item:hover i,
.dropdown-menu .dropdown-item:focus i {
    color: var(--ee-text-inverse) !important;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: var(--ee-indigo-dark) !important;
    color: var(--ee-text-inverse) !important;
}

.dropdown-menu .dropdown-item.active i,
.dropdown-menu .dropdown-item:active i {
    color: var(--ee-text-inverse) !important;
}

/* Preserve danger item styling */
.dropdown-menu .dropdown-item.dropdown-item-danger:hover,
.dropdown-menu .dropdown-item.dropdown-item-danger:focus {
    background-color: var(--ee-danger) !important;
    color: var(--ee-text-inverse) !important;
}

/* -----------------------------------------------------------------------------
   EE Action Dropdown - Standalone dropdown component (Bootstrap-independent)
   ----------------------------------------------------------------------------- */

.ee-action-dropdown {
    position: relative;
    display: inline-block;
}

.ee-action-dropdown-toggle {
    background: none;
    border: none;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ee-text-muted, #6c757d);
    font-size: 1rem;
    border-radius: var(--ee-radius-sm, 0.25rem);
    transition: all var(--ee-transition-fast, 0.15s ease);
}

/* Universal icon glyph — change --ee-action-icon to swap site-wide.
   "\f013" = cog, "\f142" = ellipsis-v, "\f141" = ellipsis-h, "\f0d7" = caret-down.
   Only renders for an EMPTY toggle (no inline children), so legacy templates
   that embed their own <i class="fas ..."> keep their hand-set icon unchanged.
   :empty is used instead of :has() so it works on older browsers too. */
:root { --ee-action-icon: "\f142"; }
.ee-action-dropdown-toggle:empty::before {
    content: var(--ee-action-icon);
    /* This codebase uses Font Awesome Pro (5 + 6). Free isn't loaded — would
       render as a Private-Use-Area tofu box. List Pro first, then Free, then
       generic "FontAwesome" fallback so the rule is environment-agnostic. */
    font-family: "Font Awesome 6 Pro", "Font Awesome 5 Pro", "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    line-height: 1;
}

.ee-action-dropdown-toggle:hover {
    color: var(--ee-indigo, #3f51b5);
    background: var(--ee-bg-hover, #f8f9fa);
}

.ee-action-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 180px;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    background-color: #fff;
    border: 1px solid var(--ee-border-light, rgba(0, 0, 0, 0.15));
    border-radius: var(--ee-radius-md, 0.375rem);
    box-shadow: var(--ee-shadow-lg, 0 0.5rem 1rem rgba(0, 0, 0, 0.175));
}

.ee-action-dropdown-menu.ee-show {
    display: block;
}

.ee-action-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    font-size: var(--ee-text-sm, 0.875rem);
    color: var(--ee-text-primary, #212529);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    transition: all var(--ee-transition-fast, 0.15s ease);
}

.ee-action-dropdown-item:hover {
    color: var(--ee-text-inverse, #fff);
    text-decoration: none;
    background-color: var(--ee-indigo, #3f51b5);
}

.ee-action-dropdown-item i {
    width: 1.25rem;
    text-align: center;
    margin-right: 0.5rem;
    color: var(--ee-indigo, #3f51b5);
    transition: all var(--ee-transition-fast, 0.15s ease);
}

.ee-action-dropdown-item:hover i {
    color: var(--ee-text-inverse, #fff);
}

.ee-action-dropdown-item.ee-action-dropdown-item-danger {
    color: var(--ee-danger, #dc3545);
}

.ee-action-dropdown-item.ee-action-dropdown-item-danger i {
    color: var(--ee-danger, #dc3545);
}

.ee-action-dropdown-item.ee-action-dropdown-item-danger:hover {
    background-color: var(--ee-danger, #dc3545);
    color: var(--ee-text-inverse, #fff);
}

.ee-action-dropdown-item.ee-action-dropdown-item-danger:hover i {
    color: var(--ee-text-inverse, #fff);
}

.ee-action-dropdown-item.ee-action-dropdown-item-disabled,
.ee-action-dropdown-item.ee-action-dropdown-item-disabled:hover {
    color: var(--ee-text-muted, #adb5bd);
    background: transparent;
    cursor: not-allowed;
    pointer-events: none;
}
.ee-action-dropdown-item.ee-action-dropdown-item-disabled i {
    color: var(--ee-text-muted, #adb5bd);
}

.ee-action-dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid var(--ee-border-light, #e9ecef);
}

/* Action Dropdown Toggle Highlight - same pattern as help-highlight */
.ee-action-dropdown-toggle.action-highlight {
    position: relative;
    animation: actionTogglePulse 2s ease-in-out infinite, actionToggleBounce 1s ease-in-out;
    z-index: 100;
}

@keyframes actionTogglePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(63, 81, 181, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(63, 81, 181, 0);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(63, 81, 181, 0);
        transform: scale(1);
    }
}

@keyframes actionToggleBounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

.ee-action-dropdown-toggle.action-highlight::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border-radius: 50%;
    border: 2px solid #fff;
    animation: actionToggleDotPulse 1.5s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes actionToggleDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* =============================================================================
   12. LOADING STATES
   ============================================================================= */

.ee-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--ee-border-light);
    border-top-color: var(--ee-indigo);
    border-radius: 50%;
    animation: ee-spin 0.8s linear infinite;
}
.ee-spinner-lg { width: 48px; height: 48px; }
.ee-spinner-sm { width: 24px; height: 24px; border-width: 2px; }

@keyframes ee-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .ee-spinner { animation: none; }
}

.ee-loading {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: var(--ee-space-12) var(--ee-space-8);
    gap: var(--ee-space-4);
}

.ee-loading-text { font-size: var(--ee-text-base); color: var(--ee-text-muted); }

.ee-loading-host { position: relative; }

.ee-loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--ee-radius-lg);
    z-index: 10;
}
.ee-loading-overlay.active { display: flex; }

/* Skeleton Loaders */
.ee-skeleton {
    background: linear-gradient(90deg, var(--ee-bg-hover) 25%, var(--ee-border-light) 50%, var(--ee-bg-hover) 75%);
    background-size: 200% 100%;
    animation: ee-skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--ee-radius-sm);
}
@keyframes ee-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ee-skeleton-text { height: 1rem; margin-bottom: var(--ee-space-2); }
.ee-skeleton-text-sm { height: 0.75rem; width: 60%; }
.ee-skeleton-title { height: 1.5rem; width: 40%; margin-bottom: var(--ee-space-4); }
.ee-skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
/* Institution logo avatar (bank / card issuer mark in feed + transaction rows). */
.ee-inst-logo {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: var(--ee-radius-full);
    border: 1px solid var(--ee-border-light);
    background: var(--ee-bg-card);
    object-fit: contain;
}
.ee-skeleton-button { height: 36px; width: 100px; }
.ee-skeleton-card { height: 200px; }

/* =============================================================================
   13. EMPTY STATES
   ============================================================================= */

.ee-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--ee-space-12) var(--ee-space-8);
    text-align: center;
    /* Indigo tint, no border: owner 2026-11-06 "Gray is poor use colors for cards", "Zero
       borders" (C15 photos: applicant messages, letters, emergency contacts, vehicles). */
    background: var(--ee-indigo-bg);
    border-radius: var(--ee-radius-lg);
    border: none;
}

/* Breadcrumbs sit on the indigo tint, not Bootstrap's grey (owner 2026-11-06 "Gray is poor
   use colors for cards"; C15 photo 08_compliance_issues). */
ol.breadcrumb {
    background-color: var(--ee-indigo-bg);
}

/* An empty state in a table row (`<td colspan>`) of a .table-responsive: on a
   phone the table is wider than the screen, so the state was centred across
   the whole table and clipped at the right edge. Pin it to the visible width
   of the scroll box instead (lead addresses, lead source health, utility accounts).
   Covers the Bootstrap .table-responsive and the ee .ee-table-wrapper scroll boxes. */
@media (max-width: 767.98px) {
    :is(.table-responsive, .ee-table-wrapper, .ee-overflow-x-auto):has(td .ee-empty-state) { container-type: inline-size; }
    :is(.table-responsive, .ee-table-wrapper, .ee-overflow-x-auto) td .ee-empty-state {
        position: sticky;
        left: 0;
        box-sizing: border-box;
        max-width: calc(100cqw - var(--ee-space-4));
        padding-left: var(--ee-space-4);
        padding-right: var(--ee-space-4);
    }
}

.ee-empty-state-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--ee-indigo-bg);
    color: var(--ee-indigo);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--ee-space-4);
}

.ee-empty-state-title {
    font-size: var(--ee-text-lg);
    font-weight: 600;
    color: var(--ee-text-primary);
    margin: 0 0 var(--ee-space-2) 0;
}

.ee-empty-state-text {
    font-size: var(--ee-text-base);
    color: var(--ee-text-muted);
    margin: 0 0 var(--ee-space-4) 0;
    max-width: 300px;
}

/* =============================================================================
   14. UTILITIES
   ============================================================================= */

/* Background Colors */
.ee-bg-indigo { background-color: var(--ee-indigo) !important; }
.ee-bg-indigo-light { background-color: var(--ee-indigo-bg) !important; }
.ee-bg-teal { background-color: var(--ee-teal) !important; }
.ee-bg-teal-light { background-color: var(--ee-teal-bg) !important; }
.ee-bg-success { background-color: var(--ee-success) !important; }
.ee-bg-success-light { background-color: var(--ee-success-bg) !important; }
.ee-bg-warning { background-color: var(--ee-warning) !important; }
.ee-bg-warning-light { background-color: var(--ee-warning-bg) !important; }
.ee-bg-danger { background-color: var(--ee-danger) !important; }
.ee-bg-danger-light { background-color: var(--ee-danger-bg) !important; }
.ee-bg-info { background-color: var(--ee-info) !important; }
.ee-bg-info-light { background-color: var(--ee-info-bg) !important; }
.ee-bg-page { background-color: var(--ee-bg-page) !important; }
.ee-bg-card { background-color: var(--ee-bg-card) !important; }
.ee-bg-hover { background-color: var(--ee-bg-hover) !important; }

.ee-bg-gradient-indigo-teal { background: linear-gradient(90deg, var(--ee-indigo) 0%, var(--ee-teal) 100%) !important; }
.ee-bg-gradient-teal-indigo { background: linear-gradient(90deg, var(--ee-teal) 0%, var(--ee-indigo) 100%) !important; }

/* Hero Header — decorative circle overlay for indigo gradient headers */
.ee-hero {
    position: relative;
    overflow: hidden;
}
.ee-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    padding-bottom: 40%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

/* Border Utilities */
.ee-border { border: 1px solid var(--ee-border-light); }
.ee-border-0 { border: none; }
.ee-border-t { border-top: 1px solid var(--ee-border-light); }
.ee-border-b { border-bottom: 1px solid var(--ee-border-light); }
.ee-border-l { border-left: 1px solid var(--ee-border-light); }
.ee-border-r { border-right: 1px solid var(--ee-border-light); }

.ee-border-gradient-top { position: relative; }
.ee-border-gradient-top::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ee-indigo) 0%, var(--ee-teal) 100%);
    border-radius: var(--ee-radius-md) var(--ee-radius-md) 0 0;
    z-index: 10;
}

.ee-border-gradient-bottom { position: relative; }
.ee-border-gradient-bottom::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ee-indigo) 0%, var(--ee-teal) 100%);
    z-index: 10;
}

.ee-border-left-indigo { border-left: 4px solid var(--ee-indigo) !important; }
.ee-border-left-teal { border-left: 4px solid var(--ee-teal) !important; }
.ee-border-left-success { border-left: 4px solid var(--ee-success) !important; }
.ee-border-left-warning { border-left: 4px solid var(--ee-warning) !important; }
.ee-border-left-danger { border-left: 4px solid var(--ee-danger) !important; }
.ee-border-left-info { border-left: 4px solid var(--ee-info) !important; }

/* Rounded */
.ee-rounded-none { border-radius: 0; }
.ee-rounded-sm { border-radius: var(--ee-radius-sm); }
.ee-rounded { border-radius: var(--ee-radius-md); }
.ee-rounded-lg { border-radius: var(--ee-radius-lg); }
.ee-rounded-full { border-radius: var(--ee-radius-full); }

/* Shadow */
.ee-shadow-none { box-shadow: none; }
.ee-shadow-sm { box-shadow: var(--ee-shadow-sm); }
.ee-shadow { box-shadow: var(--ee-shadow-md); }
.ee-shadow-lg { box-shadow: var(--ee-shadow-lg); }

/* Display */
.ee-d-none { display: none !important; }
.ee-d-block { display: block !important; }
.ee-d-inline { display: inline !important; }
.ee-d-inline-block { display: inline-block !important; }
.ee-d-flex { display: flex !important; }
.ee-d-inline-flex { display: inline-flex !important; }
.ee-d-grid { display: grid !important; }

/* Flexbox */
.ee-flex { display: flex; }
.ee-inline-flex { display: inline-flex; }
.ee-flex-row { flex-direction: row; }
.ee-flex-col { flex-direction: column; }
.ee-flex-wrap { flex-wrap: wrap; }
.ee-flex-nowrap { flex-wrap: nowrap; }
.ee-items-start { align-items: flex-start; }
.ee-items-center { align-items: center; }
.ee-items-end { align-items: flex-end; }
.ee-items-stretch { align-items: stretch; }
.ee-justify-start { justify-content: flex-start; }
.ee-justify-center { justify-content: center; }
.ee-justify-end { justify-content: flex-end; }
.ee-justify-between { justify-content: space-between; }
.ee-justify-around { justify-content: space-around; }

.ee-align-center { align-items: center; }
.ee-align-start { align-items: flex-start; }
.ee-align-end { align-items: flex-end; }
.ee-flex-1 { flex: 1 1 0%; }
.ee-flex-auto { flex: 1 1 auto; }
.ee-flex-none { flex: none; }
.ee-flex-shrink-0 { flex-shrink: 0; }
.ee-flex-grow { flex-grow: 1; }

/* Gap */
.ee-gap-0 { gap: 0; }
.ee-gap-1 { gap: var(--ee-space-1); }
.ee-gap-2 { gap: var(--ee-space-2); }
.ee-gap-3 { gap: var(--ee-space-3); }
.ee-gap-4 { gap: var(--ee-space-4); }
.ee-gap-5 { gap: var(--ee-space-5); }
.ee-gap-6 { gap: var(--ee-space-6); }
.ee-gap-8 { gap: var(--ee-space-8); }

/* Grid */
.ee-grid { display: grid; gap: var(--ee-space-4); }
.ee-grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.ee-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ee-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ee-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ee-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.ee-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Spacing - Margin */
.ee-m-0 { margin: 0; }
.ee-m-1 { margin: var(--ee-space-1); }
.ee-m-2 { margin: var(--ee-space-2); }
.ee-m-3 { margin: var(--ee-space-3); }
.ee-m-4 { margin: var(--ee-space-4); }
.ee-m-auto { margin: auto; }

.ee-mx-0 { margin-left: 0; margin-right: 0; }
.ee-mx-2 { margin-left: var(--ee-space-2); margin-right: var(--ee-space-2); }
.ee-mx-4 { margin-left: var(--ee-space-4); margin-right: var(--ee-space-4); }
.ee-mx-auto { margin-left: auto; margin-right: auto; }

.ee-my-0 { margin-top: 0; margin-bottom: 0; }
.ee-my-2 { margin-top: var(--ee-space-2); margin-bottom: var(--ee-space-2); }
.ee-my-4 { margin-top: var(--ee-space-4); margin-bottom: var(--ee-space-4); }

.ee-mt-0 { margin-top: 0; }
.ee-mt-1 { margin-top: var(--ee-space-1); }
.ee-mt-2 { margin-top: var(--ee-space-2); }
.ee-mt-3 { margin-top: var(--ee-space-3); }
.ee-mt-4 { margin-top: var(--ee-space-4); }
.ee-mt-5 { margin-top: var(--ee-space-5); }
.ee-mt-6 { margin-top: var(--ee-space-6); }
.ee-mt-8 { margin-top: var(--ee-space-8); }

.ee-mb-0 { margin-bottom: 0; }
.ee-mb-1 { margin-bottom: var(--ee-space-1); }
.ee-mb-2 { margin-bottom: var(--ee-space-2); }
.ee-mb-3 { margin-bottom: var(--ee-space-3); }
.ee-mb-4 { margin-bottom: var(--ee-space-4); }
.ee-mb-5 { margin-bottom: var(--ee-space-5); }
.ee-mb-6 { margin-bottom: var(--ee-space-6); }

.ee-ml-0 { margin-left: 0; }
.ee-ml-2 { margin-left: var(--ee-space-2); }
.ee-ml-4 { margin-left: var(--ee-space-4); }
.ee-ml-auto { margin-left: auto; }

.ee-mr-0 { margin-right: 0; }
.ee-mr-1 { margin-right: var(--ee-space-1); }
.ee-mr-2 { margin-right: var(--ee-space-2); }
.ee-mr-4 { margin-right: var(--ee-space-4); }
.ee-mr-auto { margin-right: auto; }

.ee-me-1 { margin-inline-end: var(--ee-space-1); }
.ee-me-2 { margin-inline-end: var(--ee-space-2); }
.ee-ms-1 { margin-inline-start: var(--ee-space-1); }

/* Spacing - Padding */
.ee-p-0 { padding: 0; }
.ee-p-1 { padding: var(--ee-space-1); }
.ee-p-2 { padding: var(--ee-space-2); }
.ee-p-3 { padding: var(--ee-space-3); }
.ee-p-4 { padding: var(--ee-space-4); }
.ee-p-5 { padding: var(--ee-space-5); }
.ee-p-6 { padding: var(--ee-space-6); }

.ee-px-0 { padding-left: 0; padding-right: 0; }
.ee-px-2 { padding-left: var(--ee-space-2); padding-right: var(--ee-space-2); }
.ee-px-4 { padding-left: var(--ee-space-4); padding-right: var(--ee-space-4); }
.ee-px-6 { padding-left: var(--ee-space-6); padding-right: var(--ee-space-6); }

.ee-py-0 { padding-top: 0; padding-bottom: 0; }
.ee-py-2 { padding-top: var(--ee-space-2); padding-bottom: var(--ee-space-2); }
.ee-py-4 { padding-top: var(--ee-space-4); padding-bottom: var(--ee-space-4); }
.ee-py-6 { padding-top: var(--ee-space-6); padding-bottom: var(--ee-space-6); }

.ee-pt-0 { padding-top: 0; }
.ee-pt-4 { padding-top: var(--ee-space-4); }
.ee-pb-0 { padding-bottom: 0; }
.ee-pb-4 { padding-bottom: var(--ee-space-4); }
.ee-pl-0 { padding-left: 0; }
.ee-pl-4 { padding-left: var(--ee-space-4); }
.ee-pr-0 { padding-right: 0; }
.ee-pr-4 { padding-right: var(--ee-space-4); }

/* Width & Height */
.ee-w-full { width: 100%; }
.ee-w-auto { width: auto; }
.ee-h-full { height: 100%; }
.ee-h-auto { height: auto; }
.ee-min-h-screen { min-height: 100vh; }

/* Position */
.ee-relative { position: relative; }
.ee-absolute { position: absolute; }
.ee-fixed { position: fixed; }
.ee-sticky { position: sticky; }

/* Z-index */
.ee-z-0 { z-index: 0; }
.ee-z-10 { z-index: 10; }
.ee-z-50 { z-index: 50; }
.ee-z-100 { z-index: 100; }

/* Overflow */
.ee-overflow-hidden { overflow: hidden; }
.ee-overflow-auto { overflow: auto; }
.ee-overflow-x-auto { overflow-x: auto; }
.ee-overflow-y-auto { overflow-y: auto; }

/* Cursor */
.ee-cursor-pointer { cursor: pointer; }
.ee-cursor-not-allowed { cursor: not-allowed; }

/* User Select */
.ee-select-none { user-select: none; }

/* Opacity */
.ee-opacity-0 { opacity: 0; }
.ee-opacity-50 { opacity: 0.5; }
.ee-opacity-80 { opacity: 0.8; }
.ee-opacity-100 { opacity: 1; }

/* Visibility */
.ee-hidden { display: none !important; }
.ee-visible { visibility: visible; }
.ee-invisible { visibility: hidden; }
.ee-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Icon Boxes */
.ee-icon-box {
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border-radius: var(--ee-radius-md);
}
.ee-icon-box-sm { width: 28px; height: 28px; font-size: var(--ee-text-xs); }
.ee-icon-box-md { width: 36px; height: 36px; font-size: var(--ee-text-base); }
.ee-icon-box-lg { width: 44px; height: 44px; font-size: var(--ee-text-xl); }
.ee-icon-box-xl { width: 56px; height: 56px; font-size: var(--ee-text-2xl); }

.ee-icon-box-indigo { background: var(--ee-indigo); color: var(--ee-text-inverse); }
.ee-icon-box-indigo-light { background: var(--ee-indigo-bg); color: var(--ee-indigo); }
.ee-icon-box-teal { background: var(--ee-teal); color: var(--ee-text-inverse); }
.ee-icon-box-teal-light { background: var(--ee-teal-bg); color: var(--ee-teal); }
.ee-icon-box-success { background: var(--ee-success); color: var(--ee-text-inverse); }
.ee-icon-box-warning { background: var(--ee-warning); color: var(--ee-text-inverse); }
.ee-icon-box-danger { background: var(--ee-danger); color: var(--ee-text-inverse); }
.ee-icon-box-info { background: var(--ee-info); color: var(--ee-text-inverse); }
.ee-icon-box-white { background: rgba(255, 255, 255, 0.2); color: var(--ee-text-inverse); }
.ee-icon-box-circle { border-radius: 50%; }

/* Hover Effects */
.ee-hover-lift { transition: transform var(--ee-transition-fast), box-shadow var(--ee-transition-fast); }
.ee-hover-lift:hover { transform: translateY(-2px); box-shadow: var(--ee-shadow-md); }

/* Preserve existing card/tab styling when its control becomes a native button. */
.ee-button-reset { appearance: none; background: transparent; border: 0; padding: 0; color: inherit; font: inherit; }

/* Focus Ring */
.ee-focus-ring:focus { outline: none; box-shadow: 0 0 0 3px var(--ee-indigo-bg); }
.ee-focus-ring:focus:not(:focus-visible) { box-shadow: none; }
.ee-focus-ring:focus-visible { box-shadow: 0 0 0 3px var(--ee-indigo-bg); }
/* Opt-in solid focus indicator for dense controls and high-contrast modes. */
.ee-focus-ring.ee-focus-outline:focus-visible { outline: 2px solid var(--ee-text-primary); outline-offset: 2px; }

/* Scrollbar */
.ee-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.ee-scrollbar::-webkit-scrollbar-track { background: var(--ee-bg-hover); border-radius: 3px; }
.ee-scrollbar::-webkit-scrollbar-thumb { background: var(--ee-border-default); border-radius: 3px; }
.ee-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--ee-text-dim); }

/* Animations */
.ee-fade-in { animation: ee-fadeIn 0.3s ease-out; }
@keyframes ee-fadeIn { from { opacity: 0; } to { opacity: 1; } }

.ee-slide-up { animation: ee-slideUp 0.3s ease-out; }
@keyframes ee-slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.ee-scale-in { animation: ee-scaleIn 0.2s ease-out; }
@keyframes ee-scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.ee-pulse { animation: ee-pulse 2s infinite; }
@keyframes ee-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.ee-pulse-ring { animation: ee-pulse-ring 1.5s ease-in-out infinite; }
@keyframes ee-pulse-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--ee-indigo-rgb, 63,81,181), 0.4); } 50% { box-shadow: 0 0 0 6px rgba(var(--ee-indigo-rgb, 63,81,181), 0); } }

.ee-pulse-glow { animation: ee-pulse-glow 3.5s ease-in-out infinite; }
@keyframes ee-pulse-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--ee-indigo-rgb, 63,81,181), 0.6); } 50% { box-shadow: 0 0 0 8px rgba(var(--ee-indigo-rgb, 63,81,181), 0); } }

mark.ee-search-mark { background: rgba(var(--ee-warning-rgb, 245,158,11), 0.35); color: inherit; padding: 0.05em 0.15em; border-radius: 2px; }
.ee-search-hit { outline: 2px solid var(--ee-indigo); outline-offset: 2px; border-radius: var(--ee-radius-lg); }

/* New-tab toggle bar — sits inside .ee-panel-body to let users choose link target per card */
.ee-newtab-bar { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.4rem var(--ee-space-5); border-bottom: 1px solid var(--ee-border-light); background: var(--ee-bg-hover); cursor: pointer; transition: background var(--ee-transition-fast); user-select: none; }
.ee-newtab-bar:hover { background: var(--ee-bg-card); }
.ee-newtab-bar .ee-newtab-icon { display: flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--ee-border-default); color: var(--ee-text-dim); font-size: 0.55rem; transition: all var(--ee-transition-fast); flex-shrink: 0; }
.ee-newtab-bar.active .ee-newtab-icon { background: var(--ee-indigo); color: #fff; }
.ee-newtab-bar .ee-newtab-label { font-size: var(--ee-text-xs); color: var(--ee-text-dim); font-weight: 500; }
.ee-newtab-bar.active .ee-newtab-label { color: var(--ee-indigo); }
.ee-newtab-bar.ee-newtab-intro { animation: ee-newtab-fadein 0.6s ease-out; }
@keyframes ee-newtab-fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.ee-newtab-toggle { display: inline-flex; align-items: center; justify-content: center; gap: var(--ee-space-1); width: auto; padding: var(--ee-space-1) var(--ee-space-2); border-radius: var(--ee-radius-full); background: var(--ee-bg-hover); color: var(--ee-text-dim); border: 1px solid var(--ee-border-light); cursor: pointer; font-size: 0.6rem; transition: all var(--ee-transition-fast); margin-bottom: var(--ee-space-2); float: right; }
.ee-newtab-toggle:hover { background: var(--ee-indigo-bg); color: var(--ee-indigo); border-color: var(--ee-indigo); }
.ee-newtab-toggle.active { background: var(--ee-indigo); color: var(--ee-text-inverse); border-color: var(--ee-indigo); }

/* Search wrap with icon, clear button */
.ee-search-wrap { position: relative; }
.ee-search-wrap .ee-search-icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--ee-text-dim); }
.ee-search-wrap .ee-input { padding-left: 2.75rem; }
.ee-search-clear { position: absolute; right: 0.625rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--ee-text-dim); cursor: pointer; padding: 0.25rem; line-height: 1; font-size: var(--ee-text-sm); display: none; border-radius: var(--ee-radius-sm); }
.ee-search-clear:hover { color: var(--ee-text-primary); background: var(--ee-bg-hover); }
.ee-search-wrap.has-value .ee-search-clear { display: block; }
.ee-search-wrap.has-value .ee-input { padding-right: 2rem; }

/* Floating quick-nav dock — auto-inits on any page with .ee-quicknav + .ee-panel[data-module] */
.ee-quicknav { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(1rem); z-index: 900; display: flex; flex-direction: column; align-items: stretch; gap: 0; background: var(--ee-bg-card); border: 1px solid var(--ee-border-light); border-radius: var(--ee-radius-xl); padding: 0; box-shadow: var(--ee-shadow-lg); opacity: 0; pointer-events: none; transition: opacity var(--ee-transition-slow), transform var(--ee-transition-slow); overflow: hidden; }
.ee-quicknav::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--ee-indigo), var(--ee-teal)); border-radius: var(--ee-radius-xl) var(--ee-radius-xl) 0 0; }
.ee-quicknav.visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.ee-quicknav-buttons { display: flex; align-items: center; gap: var(--ee-space-1); padding: var(--ee-space-2) var(--ee-space-2) var(--ee-space-1); }
.ee-quicknav-btn { display: flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--ee-text-muted); cursor: pointer; border-radius: var(--ee-radius-full); padding: 0.25rem 0.625rem; font-size: 0.6875rem; font-weight: 500; white-space: nowrap; transition: all var(--ee-transition-fast); position: relative; }
.ee-quicknav-btn:hover { background: var(--ee-indigo-bg); color: var(--ee-indigo); transform: translateY(-1px); }
.ee-quicknav-btn.active { background: var(--ee-indigo); color: var(--ee-text-inverse); box-shadow: 0 2px 8px rgba(63,81,181,0.35); }
.ee-quicknav-btn.ee-search-match { background: var(--ee-teal-bg); color: var(--ee-teal-dark); }
.ee-quicknav-btn.ee-search-match.active { background: linear-gradient(135deg, var(--ee-indigo), var(--ee-teal)); color: var(--ee-text-inverse); box-shadow: 0 2px 8px rgba(20,184,166,0.35); }
.ee-quicknav-btn.ee-search-no-match { opacity: 0.3; }
.ee-quicknav-btn::after { display: none; }
.ee-quicknav-search { display: flex; align-items: center; gap: var(--ee-space-2); padding: var(--ee-space-1) var(--ee-space-3); border-top: 1px solid var(--ee-border-light); background: var(--ee-bg-page); width: 100%; }
.ee-quicknav-search input { flex: 1; border: none; background: transparent; font-size: var(--ee-text-xs); color: var(--ee-text-primary); outline: none; padding: var(--ee-space-1) 0; }
.ee-quicknav-search input::placeholder { color: var(--ee-text-dim); }
.ee-quicknav-search i { color: var(--ee-text-dim); font-size: 0.7rem; flex-shrink: 0; }
.ee-quicknav-search .ee-quicknav-search-clear { background: none; border: none; color: var(--ee-text-dim); cursor: pointer; font-size: 0.65rem; padding: var(--ee-space-1); line-height: 1; display: none; border-radius: var(--ee-radius-sm); transition: color var(--ee-transition-fast); }
.ee-quicknav-search .ee-quicknav-search-clear:hover { color: var(--ee-danger); }
.ee-quicknav-search.has-value .ee-quicknav-search-clear { display: block; }
/* Offset quicknav for sidebar on desktop — center in content area */
@media (min-width: 993px) {
    body.fixed-sn .ee-quicknav { left: calc(var(--sidenav-width, 270px) + ((100vw - var(--sidenav-width, 270px)) / 2)); }
    body.fixed-sn.sidenav-slim .ee-quicknav { left: calc(var(--sidenav-slim-width, 60px) + ((100vw - var(--sidenav-slim-width, 60px)) / 2)); }
}

/* Dividers */
.ee-divider { height: 1px; background: var(--ee-border-light); margin: var(--ee-space-4) 0; }
.ee-divider-lg { margin: var(--ee-space-6) 0; }

.ee-divider-text {
    display: flex; align-items: center; gap: var(--ee-space-4);
    color: var(--ee-text-muted);
    font-size: var(--ee-text-xs);
    text-transform: uppercase;
    letter-spacing: var(--ee-tracking-wide);
}
.ee-divider-text::before, .ee-divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ee-border-light);
}

/* Stats Box */
.ee-stats-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ee-space-3);
    padding: var(--ee-space-4);
    background: var(--ee-bg-hover);
    border-radius: var(--ee-radius-md);
}

.ee-stat-item { text-align: center; }
.ee-stat-value { font-size: var(--ee-text-xl); font-weight: 700; color: var(--ee-indigo); }
.ee-stat-value-success { color: var(--ee-success); }
.ee-stat-value-warning { color: var(--ee-warning); }
.ee-stat-value-danger { color: var(--ee-danger); }
.ee-stat-label { font-size: var(--ee-text-xs); color: var(--ee-text-muted); text-transform: uppercase; letter-spacing: var(--ee-tracking-wide); }

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

@media (max-width: 992px) {
    .ee-grid-cols-md-2 { grid-template-columns: repeat(2, 1fr); }
    .ee-grid-cols-md-1 { grid-template-columns: repeat(1, 1fr); }
    .ee-d-md-none { display: none !important; }
    .ee-d-md-block { display: block !important; }
}

@media (max-width: 768px) {
    .ee-page { padding: var(--ee-space-4); }

    .ee-page-header { flex-direction: column; gap: var(--ee-space-3); align-items: stretch; }
    .ee-page-header h1 { font-size: var(--ee-text-xl); }

    .ee-back-link { padding: var(--ee-space-1) var(--ee-space-3); font-size: var(--ee-text-xs); }

    .ee-grid-cols-sm-1 { grid-template-columns: repeat(1, 1fr); }
    .ee-d-sm-none { display: none !important; }
    .ee-d-sm-block { display: block !important; }

    .container-fluid { padding-left: var(--ee-space-4); padding-right: var(--ee-space-4); }

    #main.container-fluid, main.container-fluid {
        padding-top: var(--ee-space-4);
        padding-bottom: var(--ee-space-4);
    }

    .ee-stats-box { grid-template-columns: 1fr; }

    .ee-modal-footer { flex-direction: column; }
    .ee-modal-footer .ee-btn { width: 100%; justify-content: center; }
}

@media (max-width: 576px) {
    .container-fluid { padding-left: var(--ee-space-3); padding-right: var(--ee-space-3); }
    /* Bootstrap's row pulls out its 15px gutter; with the narrower phone padding a
       row straight inside the page reached 3px past the screen and the page scrolled
       sideways (HUD-52670 voucher at 390px). Row and columns take the same gutter. */
    .container-fluid > .row { margin-left: calc(-1 * var(--ee-space-3)); margin-right: calc(-1 * var(--ee-space-3)); }
    .container-fluid > .row > [class*="col"] { padding-left: var(--ee-space-3); padding-right: var(--ee-space-3); }
}

/* Print */
@media print {
    .ee-print-hidden { display: none !important; }
    .ee-print-only { display: block !important; }
}

/* =============================================================================
   1. CARD HEADERS
   ============================================================================= */

.ee-card-header {
    padding: var(--ee-space-4) var(--ee-space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ee-space-3);
}

.ee-card-header-indigo {
    background: var(--ee-indigo);
    color: #fff;
}

.ee-card-header-teal {
    background: var(--ee-teal);
    color: #fff;
}

.ee-card-header-success {
    background: var(--ee-success);
    color: #fff;
}

.ee-card-header-warning {
    background: var(--ee-warning);
    color: #fff;
}

.ee-card-header-danger {
    background: var(--ee-danger);
    color: #fff;
}

.ee-card-header-info {
    background: var(--ee-info);
}

.ee-card-title {
    margin: 0;
    font-size: var(--ee-text-xl);
    font-weight: 700;
    color: var(--ee-text-inverse);
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}

.ee-card-title i {
    font-size: var(--ee-text-lg);
}

.ee-card-header-warning .ee-card-title {
    color: var(--ee-text-primary);
}

.ee-card-body {
    padding: var(--ee-space-6);
}

.ee-card-body-sm {
    padding: var(--ee-space-4);
}

.ee-card-body-lg {
    padding: var(--ee-space-8);
}

.ee-card-footer {
    padding: var(--ee-space-4) var(--ee-space-5);
    background: var(--ee-bg-hover);
    border-top: 1px solid var(--ee-border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ee-space-3);
}

/* =============================================================================
   COLLAPSIBLE SECTION CARDS
   ============================================================================= */

.section-card {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    margin-bottom: var(--ee-space-4);
    overflow: hidden;
    box-shadow: var(--ee-shadow-sm);
}

.section-header {
    background: linear-gradient(135deg, var(--ee-indigo) 0%, var(--ee-indigo-dark) 100%);
    color: var(--ee-text-inverse);
    padding: var(--ee-space-3) var(--ee-space-4);
    font-weight: 600;
    font-size: var(--ee-text-base);
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    cursor: pointer;
}

.section-header:hover {
    background: linear-gradient(135deg, var(--ee-indigo-dark) 0%, var(--ee-indigo) 100%);
}

.section-header i.section-icon {
    font-size: var(--ee-text-lg);
}

.section-header .collapse-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.section-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.section-header-auto {
    background: linear-gradient(135deg, var(--ee-teal) 0%, var(--ee-teal-dark) 100%);
}

.section-header-auto:hover {
    background: linear-gradient(135deg, var(--ee-teal-dark) 0%, var(--ee-teal) 100%);
}

.section-body {
    padding: var(--ee-space-4);
}

.section-body-manual {
    background: var(--ee-indigo-bg);
    border-left: 3px solid var(--ee-indigo);
}

/* =============================================================================
   2. FILE UPLOAD DROPZONE
   ============================================================================= */

.ee-upload-zone {
    min-height: 180px;
    border: 2px dashed var(--ee-border-default);
    border-radius: var(--ee-radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--ee-bg-hover);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ee-upload-zone:hover {
    border-color: var(--ee-indigo);
    background: var(--ee-indigo-bg);
}

.ee-upload-zone.drag-over {
    border-color: var(--ee-indigo);
    background: var(--ee-indigo-bg-hover);
    transform: scale(1.01);
}

.ee-upload-zone.has-file {
    border-color: var(--ee-success);
    background: var(--ee-success-bg);
}

.ee-upload-zone.ee-upload-zone-error {
    border-color: var(--ee-danger);
    background: var(--ee-danger-bg);
}

.ee-upload-zone-sm {
    min-height: 120px;
    padding: 1.25rem 1rem;
}

.ee-upload-zone-lg {
    min-height: 240px;
    padding: 3rem 2rem;
}

.ee-upload-zone-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--ee-indigo-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ee-upload-zone-sm .ee-upload-zone-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
}

.ee-upload-zone-lg .ee-upload-zone-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 1.25rem;
}

.ee-upload-zone-icon i {
    font-size: 1.5rem;
    color: var(--ee-indigo);
}

.ee-upload-zone-sm .ee-upload-zone-icon i {
    font-size: 1.125rem;
}

.ee-upload-zone-lg .ee-upload-zone-icon i {
    font-size: 2rem;
}

.ee-upload-zone.has-file .ee-upload-zone-icon {
    background: var(--ee-success-bg);
}

.ee-upload-zone.has-file .ee-upload-zone-icon i {
    color: var(--ee-success);
}

.ee-upload-zone.ee-upload-zone-error .ee-upload-zone-icon {
    background: var(--ee-danger-bg);
}

.ee-upload-zone.ee-upload-zone-error .ee-upload-zone-icon i {
    color: var(--ee-danger);
}

.ee-upload-zone-title {
    font-size: var(--ee-text-base);
    font-weight: 600;
    color: var(--ee-text-primary);
    margin-bottom: 0.25rem;
}

.ee-upload-zone-sm .ee-upload-zone-title {
    font-size: var(--ee-text-sm);
}

.ee-upload-zone-subtitle {
    font-size: var(--ee-text-sm);
    color: var(--ee-text-muted);
}

.ee-upload-zone-sm .ee-upload-zone-subtitle {
    font-size: var(--ee-text-xs);
}

.ee-upload-zone-filename {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--ee-bg-card);
    border-radius: var(--ee-radius-md);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-success-dark);
    display: none;
    word-break: break-all;
    max-width: 100%;
}

.ee-upload-zone.has-file .ee-upload-zone-filename {
    display: inline-block;
}

.ee-upload-zone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
.ee-upload-zone.drag-over input[type="file"] {
    pointer-events: none;
}

/* Upload zone loading state */
.ee-upload-zone-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--ee-radius-lg);
    z-index: 10;
}

.ee-upload-zone-loader.active {
    display: flex;
}

.ee-upload-zone-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ee-border-light);
    border-top-color: var(--ee-indigo);
    border-radius: 50%;
    animation: ee-spin 0.8s linear infinite;
}

@keyframes ee-spin {
    to { transform: rotate(360deg); }
}

.ee-upload-zone-loader-text {
    margin-top: 0.5rem;
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-indigo);
}

/* =============================================================================
   3. EXISTING FILE DISPLAY
   ============================================================================= */

.ee-file-display {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
    padding: var(--ee-space-3) var(--ee-space-4);
    background: var(--ee-info-bg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--ee-radius-md);
}

.ee-file-display-success {
    background: var(--ee-success-bg);
    border-color: rgba(16, 185, 129, 0.2);
}

.ee-file-display-warning {
    background: var(--ee-warning-bg);
    border-color: rgba(245, 158, 11, 0.2);
}

.ee-file-display-icon {
    width: 40px;
    height: 40px;
    background: var(--ee-info);
    border-radius: var(--ee-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ee-file-display-success .ee-file-display-icon {
    background: var(--ee-success);
}

.ee-file-display-warning .ee-file-display-icon {
    background: var(--ee-warning);
}

.ee-file-display-icon i {
    color: var(--ee-text-inverse);
    font-size: var(--ee-text-lg);
}

.ee-file-display-content {
    flex: 1;
    min-width: 0;
}

.ee-file-display-label {
    font-size: var(--ee-text-xs);
    color: var(--ee-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.125rem;
}

.ee-file-display-name {
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ee-file-display-text {
    font-size: var(--ee-text-sm);
    color: var(--ee-text-secondary);
}

.ee-file-display-actions {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    flex-shrink: 0;
}

/* =============================================================================
   4. FORM SECTION DIVIDERS
   ============================================================================= */

.ee-form-section {
    margin-top: var(--ee-space-5);
    padding-top: var(--ee-space-5);
    border-top: 1px solid var(--ee-border-light);
}

.ee-form-section-title {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    font-size: var(--ee-text-base);
    font-weight: 600;
    color: var(--ee-text-primary);
    margin-bottom: var(--ee-space-4);
}

.ee-form-section-title i {
    color: var(--ee-indigo);
}

.ee-form-actions {
    margin-top: var(--ee-space-6);
    padding-top: var(--ee-space-5);
    border-top: 1px solid var(--ee-border-light);
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
}

.ee-form-actions-right {
    justify-content: flex-end;
}

.ee-form-actions-between {
    justify-content: space-between;
}

/* =============================================================================
   5. FORM STYLING WITHIN CARDS (for Django forms)
   ============================================================================= */

.ee-card-body .form-group {
    margin-bottom: var(--ee-space-4);
}

.ee-card-body .form-group label {
    display: block;
    margin-bottom: var(--ee-space-1);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-primary);
}

.ee-card-body .form-control,
.ee-card-body input[type="text"],
.ee-card-body input[type="date"],
.ee-card-body input[type="datetime-local"],
.ee-card-body input[type="email"],
.ee-card-body input[type="number"],
.ee-card-body input[type="password"],
.ee-card-body input[type="tel"],
.ee-card-body input[type="url"],
.ee-card-body textarea,
.ee-card-body select {
    display: block;
    width: 100%;
    padding: var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-base);
    line-height: 1.5;
    color: var(--ee-text-primary);
    background-color: var(--ee-bg-card);
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ee-card-body .form-control:focus,
.ee-card-body input:focus,
.ee-card-body textarea:focus,
.ee-card-body select:focus {
    border-color: var(--ee-indigo);
    outline: 0;
    box-shadow: 0 0 0 3px var(--ee-indigo-bg);
}

.ee-card-body .form-control:disabled,
.ee-card-body input:disabled,
.ee-card-body textarea:disabled,
.ee-card-body select:disabled {
    background-color: var(--ee-bg-hover);
    opacity: 0.7;
    cursor: not-allowed;
}


/* Preserve MDB styling for magic_render fields inside ee-card-body.
   Without this, the .ee-card-body .form-control rules above replace
   MDB bottom-border inputs with full-bordered inputs. */
.ee-card-body .md-form .form-control,
.ee-card-body .md-form input[type="text"],
.ee-card-body .md-form input[type="number"],
.ee-card-body .md-form input[type="email"],
.ee-card-body .md-form input[type="password"],
.ee-card-body .md-form input[type="tel"],
.ee-card-body .md-form input[type="url"],
.ee-card-body .md-form textarea,
.ee-card-body .md-form select:not(.new-select) {
    padding: .3rem 0 .55rem 0;
    border: none;
    border-bottom: 1px solid #ced4da;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}

.ee-card-body .md-form .form-control:focus,
.ee-card-body .md-form input:focus,
.ee-card-body .md-form textarea:focus,
.ee-card-body .md-form select:focus {
    border-color: transparent;
    border-bottom-color: var(--ee-indigo);
    box-shadow: 0 1px 0 0 var(--ee-indigo);
}

.ee-card-body .md-form label {
    font-size: inherit;
    font-weight: inherit;
    margin-bottom: inherit;
}
/* Select2 styling within cards */
.ee-card-body .select2-container--default .select2-selection--single,
.ee-card-body .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
    min-height: 38px;
}

.ee-card-body .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: var(--ee-space-3);
    color: var(--ee-text-primary);
}

.ee-card-body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.ee-card-body .select2-container--default.select2-container--focus .select2-selection--single,
.ee-card-body .select2-container--default.select2-container--focus .select2-selection--multiple,
.ee-card-body .select2-container--default.select2-container--open .select2-selection--single,
.ee-card-body .select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--ee-indigo);
    box-shadow: 0 0 0 3px var(--ee-indigo-bg);
}

/* Note/Alert styling within cards */
.ee-card-body .note,
.ee-card-body .note-info {
    background: var(--ee-info-bg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-left: 4px solid var(--ee-info);
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-3) var(--ee-space-4);
    margin-bottom: var(--ee-space-4);
    font-size: var(--ee-text-sm);
    color: var(--ee-text-secondary);
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}

.ee-card-body .note i,
.ee-card-body .note-info i {
    color: var(--ee-info);
    flex-shrink: 0;
}

.ee-card-body .note-warning {
    background: var(--ee-warning-bg);
    border-color: rgba(245, 158, 11, 0.2);
    border-left-color: var(--ee-warning);
}

.ee-card-body .note-warning i {
    color: var(--ee-warning);
}

.ee-card-body .note-success {
    background: var(--ee-success-bg);
    border-color: rgba(16, 185, 129, 0.2);
    border-left-color: var(--ee-success);
}

.ee-card-body .note-success i {
    color: var(--ee-success);
}

.ee-card-body .note-danger {
    background: var(--ee-danger-bg);
    border-color: rgba(239, 68, 68, 0.2);
    border-left-color: var(--ee-danger);
}

.ee-card-body .note-danger i {
    color: var(--ee-danger);
}

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

@media (max-width: 768px) {
    .ee-card-header {
        padding: var(--ee-space-3) var(--ee-space-4);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ee-space-2);
    }

    .ee-card-title {
        font-size: var(--ee-text-lg);
    }

    .ee-card-body {
        padding: var(--ee-space-4);
    }

    .ee-upload-zone {
        min-height: 150px;
        padding: 1.5rem 1rem;
    }

    .ee-upload-zone-icon {
        width: 48px;
        height: 48px;
    }

    .ee-upload-zone-icon i {
        font-size: 1.25rem;
    }

    .ee-file-display {
        flex-direction: column;
        text-align: center;
        gap: var(--ee-space-2);
    }

    .ee-file-display-actions {
        width: 100%;
        justify-content: center;
    }

    .ee-form-actions {
        flex-direction: column;
    }

    .ee-form-actions .ee-btn {
        width: 100%;
        justify-content: center;
    }
}
/* Hide file inputs that aren't inside our upload zone */
.ee-card-body input[type="file"]:not(.ee-upload-zone input) {
    display: none !important;
}

/* Hide form groups containing only file inputs (for form_internals compatibility) */
.ee-card-body .form-group:has(> input[type="file"]:not(.ee-upload-zone input)) {
    display: none !important;
}

/* =============================================================================
   1. CARD HEADERS — defined ONCE, in the "1. CARD HEADERS" section above the
   collapsible section cards. This used to be a byte-identical second copy;
   it was removed 2026-10-20 (ui_polish 0.2). Edit the first copy only.
   ============================================================================= */

/* =============================================================================
   2. FILE UPLOAD DROPZONE
   ============================================================================= */

.ee-upload-zone {
    min-height: 180px;
    border: 2px dashed var(--ee-border-default);
    border-radius: var(--ee-radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--ee-bg-hover);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ee-upload-zone:hover {
    border-color: var(--ee-indigo);
    background: var(--ee-indigo-bg);
}

.ee-upload-zone.drag-over {
    border-color: var(--ee-indigo);
    background: var(--ee-indigo-bg-hover);
    transform: scale(1.01);
}

.ee-upload-zone.has-file {
    border-color: var(--ee-success);
    background: var(--ee-success-bg);
}

.ee-upload-zone.ee-upload-zone-error {
    border-color: var(--ee-danger);
    background: var(--ee-danger-bg);
}

.ee-upload-zone-sm {
    min-height: 120px;
    padding: 1.25rem 1rem;
}

.ee-upload-zone-lg {
    min-height: 240px;
    padding: 3rem 2rem;
}

.ee-upload-zone-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--ee-indigo-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ee-upload-zone-sm .ee-upload-zone-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
}

.ee-upload-zone-lg .ee-upload-zone-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 1.25rem;
}

.ee-upload-zone-icon i {
    font-size: 1.5rem;
    color: var(--ee-indigo);
}

.ee-upload-zone-sm .ee-upload-zone-icon i {
    font-size: 1.125rem;
}

.ee-upload-zone-lg .ee-upload-zone-icon i {
    font-size: 2rem;
}

.ee-upload-zone.has-file .ee-upload-zone-icon {
    background: var(--ee-success-bg);
}

.ee-upload-zone.has-file .ee-upload-zone-icon i {
    color: var(--ee-success);
}

.ee-upload-zone.ee-upload-zone-error .ee-upload-zone-icon {
    background: var(--ee-danger-bg);
}

.ee-upload-zone.ee-upload-zone-error .ee-upload-zone-icon i {
    color: var(--ee-danger);
}

.ee-upload-zone-title {
    font-size: var(--ee-text-base);
    font-weight: 600;
    color: var(--ee-text-primary);
    margin-bottom: 0.25rem;
}

.ee-upload-zone-sm .ee-upload-zone-title {
    font-size: var(--ee-text-sm);
}

.ee-upload-zone-subtitle {
    font-size: var(--ee-text-sm);
    color: var(--ee-text-muted);
}

.ee-upload-zone-sm .ee-upload-zone-subtitle {
    font-size: var(--ee-text-xs);
}

.ee-upload-zone-filename {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--ee-bg-card);
    border-radius: var(--ee-radius-md);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-success-dark);
    display: none;
    word-break: break-all;
    max-width: 100%;
}

.ee-upload-zone.has-file .ee-upload-zone-filename {
    display: inline-block;
}

/* THE ZONE MUST STOP ASKING FOR A FILE IT ALREADY HAS.
   Measured on staging (unit 170, Unit Files card): after a real pick the widget
   turns the border green, shows the filename chip and renders a PDF preview
   tile -- and the copy above all three still reads "Select a File / or click to
   browse". The card instructs the user to do the thing they have just done,
   directly above the evidence that they did it, which reads as the pick having
   silently failed.
   Fixed here rather than in the widget script because the widget already
   publishes the state as a class; only the words were wrong. The original text
   stays in the DOM -- assistive tech that already announced the label is not
   re-announced at a different string -- and is swapped visually through the
   same `.has-file` hook that turns the border green.
   Collapsed to zero TYPE SIZE rather than positioned out of the way: hiding the
   original with color:transparent and laying the replacement over it absolutely
   reserves the ORIGINAL string height, one line, and "File ready to upload"
   wraps to two lines in the 680px card -- the second line landed on top of the
   subtitle. Zeroing the font size lets the element size to whatever the
   replacement needs, so the 360px phone card is safe for the same reason.
   NOTE: the .ee-upload-zone rules appear TWICE in this file (~3053 and ~3685),
   identical. These overrides sit after the SECOND copy deliberately, because
   the later duplicate is the one that wins the cascade. */
.ee-upload-zone.has-file .ee-upload-zone-title,
.ee-upload-zone.has-file .ee-upload-zone-subtitle {
    font-size: 0;
    line-height: 1.35;
}

.ee-upload-zone.has-file .ee-upload-zone-title::after {
    content: "File ready to upload";
    display: block;
    font-size: var(--ee-text-base);
    font-weight: 600;
    color: var(--ee-success-dark);
}

.ee-upload-zone-sm.has-file .ee-upload-zone-title::after {
    font-size: var(--ee-text-sm);
}

.ee-upload-zone.has-file .ee-upload-zone-subtitle::after {
    content: "Click to choose a different file";
    display: block;
    font-size: var(--ee-text-sm);
    color: var(--ee-text-muted);
}

.ee-upload-zone-sm.has-file .ee-upload-zone-subtitle::after {
    font-size: var(--ee-text-xs);
}
/* END has-file copy override */

.ee-upload-zone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
.ee-upload-zone.drag-over input[type="file"] {
    pointer-events: none;
}

/* Upload zone loading state */
.ee-upload-zone-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--ee-radius-lg);
    z-index: 10;
}

.ee-upload-zone-loader.active {
    display: flex;
}

.ee-upload-zone-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ee-border-light);
    border-top-color: var(--ee-indigo);
    border-radius: 50%;
    animation: ee-spin 0.8s linear infinite;
}

@keyframes ee-spin {
    to { transform: rotate(360deg); }
}

.ee-upload-zone-loader-text {
    margin-top: 0.5rem;
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-indigo);
}

/* =============================================================================
   3. EXISTING FILE DISPLAY
   ============================================================================= */

.ee-file-display {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
    padding: var(--ee-space-3) var(--ee-space-4);
    background: var(--ee-info-bg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--ee-radius-md);
}

.ee-file-display-success {
    background: var(--ee-success-bg);
    border-color: rgba(16, 185, 129, 0.2);
}

.ee-file-display-warning {
    background: var(--ee-warning-bg);
    border-color: rgba(245, 158, 11, 0.2);
}

.ee-file-display-icon {
    width: 40px;
    height: 40px;
    background: var(--ee-info);
    border-radius: var(--ee-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ee-file-display-success .ee-file-display-icon {
    background: var(--ee-success);
}

.ee-file-display-warning .ee-file-display-icon {
    background: var(--ee-warning);
}

.ee-file-display-icon i {
    color: var(--ee-text-inverse);
    font-size: var(--ee-text-lg);
}

.ee-file-display-content {
    flex: 1;
    min-width: 0;
}

.ee-file-display-label {
    font-size: var(--ee-text-xs);
    color: var(--ee-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.125rem;
}

.ee-file-display-name {
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ee-file-display-text {
    font-size: var(--ee-text-sm);
    color: var(--ee-text-secondary);
}

.ee-file-display-actions {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    flex-shrink: 0;
}

/* =============================================================================
   4. FORM SECTION DIVIDERS
   ============================================================================= */

.ee-form-section {
    margin-top: var(--ee-space-5);
    padding-top: var(--ee-space-5);
    border-top: 1px solid var(--ee-border-light);
}

.ee-form-section-title {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    font-size: var(--ee-text-base);
    font-weight: 600;
    color: var(--ee-text-primary);
    margin-bottom: var(--ee-space-4);
}

.ee-form-section-title i {
    color: var(--ee-indigo);
}

.ee-form-actions {
    margin-top: var(--ee-space-6);
    padding-top: var(--ee-space-5);
    border-top: 1px solid var(--ee-border-light);
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
}

.ee-form-actions-right {
    justify-content: flex-end;
}

.ee-form-actions-between {
    justify-content: space-between;
}

/* Keeps the actions reachable on a long form (eg the denial letter stacked
   editors) without scrolling to the bottom to save. Sticky, not fixed: the bar
   stays inside the content column, so it never needs to know how wide the side
   nav is, and it releases naturally at the end of the form. */
.ee-form-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    /* Bleed to the card-body edges so the bar reads as the card's own footer
       (the -1.25rem cancels the default .card-body padding), rather than a strip
       floating over unrelated content below the card. */
    margin: var(--ee-space-5) -1.25rem -1.25rem;
    padding: var(--ee-space-3) var(--ee-space-4);
    /* Extra right padding keeps the last action clear of the floating chat FAB. */
    padding-right: 5rem;
    background: var(--ee-bg-card, #fff);
    border-top: 1px solid var(--ee-border-light);
    border-radius: 0 0 var(--ee-radius-lg, 0.75rem) var(--ee-radius-lg, 0.75rem);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

/* =============================================================================
   5. FORM STYLING WITHIN CARDS (for Django forms)
   ============================================================================= */

.ee-card-body .form-group {
    margin-bottom: var(--ee-space-4);
}

.ee-card-body .form-group label {
    display: block;
    margin-bottom: var(--ee-space-1);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-primary);
}

.ee-card-body .form-control,
.ee-card-body input[type="text"],
.ee-card-body input[type="date"],
.ee-card-body input[type="datetime-local"],
.ee-card-body input[type="email"],
.ee-card-body input[type="number"],
.ee-card-body input[type="password"],
.ee-card-body input[type="tel"],
.ee-card-body input[type="url"],
.ee-card-body textarea,
.ee-card-body select {
    display: block;
    width: 100%;
    padding: var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-base);
    line-height: 1.5;
    color: var(--ee-text-primary);
    background-color: var(--ee-bg-card);
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ee-card-body .form-control:focus,
.ee-card-body input:focus,
.ee-card-body textarea:focus,
.ee-card-body select:focus {
    border-color: var(--ee-indigo);
    outline: 0;
    box-shadow: 0 0 0 3px var(--ee-indigo-bg);
}

.ee-card-body .form-control:disabled,
.ee-card-body input:disabled,
.ee-card-body textarea:disabled,
.ee-card-body select:disabled {
    background-color: var(--ee-bg-hover);
    opacity: 0.7;
    cursor: not-allowed;
}

/* A select in a card is sized by the padding and line-height above, not by Bootstrap's
   fixed .form-control height: with .form-control-sm that height (31px) left a 13px
   content box for 14px text and cut the bottom of "All properties" / "Open" (Revenue
   Audit filters, owner review 2026-11-02). The small variant keeps a small size. */
.ee-card-body select.form-control {
    height: auto;
}
.ee-card-body select.form-control-sm {
    padding: var(--ee-space-1) var(--ee-space-2);
    font-size: var(--ee-text-sm);
}

/* Select2 styling within cards */
.ee-card-body .select2-container--default .select2-selection--single,
.ee-card-body .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
    min-height: 38px;
}

.ee-card-body .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: var(--ee-space-3);
    color: var(--ee-text-primary);
}

.ee-card-body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.ee-card-body .select2-container--default.select2-container--focus .select2-selection--single,
.ee-card-body .select2-container--default.select2-container--focus .select2-selection--multiple,
.ee-card-body .select2-container--default.select2-container--open .select2-selection--single,
.ee-card-body .select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--ee-indigo);
    box-shadow: 0 0 0 3px var(--ee-indigo-bg);
}

/* Note/Alert styling within cards */
.ee-card-body .note,
.ee-card-body .note-info {
    background: var(--ee-info-bg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-left: 4px solid var(--ee-info);
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-3) var(--ee-space-4);
    margin-bottom: var(--ee-space-4);
    font-size: var(--ee-text-sm);
    color: var(--ee-text-secondary);
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}

.ee-card-body .note i,
.ee-card-body .note-info i {
    color: var(--ee-info);
    flex-shrink: 0;
}

.ee-card-body .note-warning {
    background: var(--ee-warning-bg);
    border-color: rgba(245, 158, 11, 0.2);
    border-left-color: var(--ee-warning);
}

.ee-card-body .note-warning i {
    color: var(--ee-warning);
}

.ee-card-body .note-success {
    background: var(--ee-success-bg);
    border-color: rgba(16, 185, 129, 0.2);
    border-left-color: var(--ee-success);
}

.ee-card-body .note-success i {
    color: var(--ee-success);
}

.ee-card-body .note-danger {
    background: var(--ee-danger-bg);
    border-color: rgba(239, 68, 68, 0.2);
    border-left-color: var(--ee-danger);
}

.ee-card-body .note-danger i {
    color: var(--ee-danger);
}

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

@media (max-width: 768px) {
    .ee-card-header {
        padding: var(--ee-space-3) var(--ee-space-4);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ee-space-2);
    }

    .ee-card-title {
        font-size: var(--ee-text-lg);
    }

    .ee-card-body {
        padding: var(--ee-space-4);
    }

    .ee-upload-zone {
        min-height: 150px;
        padding: 1.5rem 1rem;
    }

    .ee-upload-zone-icon {
        width: 48px;
        height: 48px;
    }

    .ee-upload-zone-icon i {
        font-size: 1.25rem;
    }

    .ee-file-display {
        flex-direction: column;
        text-align: center;
        gap: var(--ee-space-2);
    }

    .ee-file-display-actions {
        width: 100%;
        justify-content: center;
    }

    .ee-form-actions {
        flex-direction: column;
    }

    .ee-form-actions .ee-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Hide file input label */
.ee-card-body label[for="id_file"],
label[for="id_file"] {
    display: none !important;
}

/* Hide the actual file input visually but keep it functional for form submission */
.ee-card-body input#id_file,
.ee-card-body input[name="file"]:not(.ee-upload-zone input),
input#id_file {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Hide the form-group container that wraps the file input */
.ee-card-body .form-group:has(label[for="id_file"]),
.ee-card-body .form-group:has(input#id_file),
.form-group:has(label[for="id_file"]) {
    display: none !important;
}

/* Fallback for browsers without :has() support - use JS to add this class */
.ee-file-field-hidden {
    display: none !important;
}

/* =============================================================================
   TOAST NOTIFICATIONS
   ============================================================================= */

.ee-toast-container {
    position: fixed;
    top: var(--ee-space-4);
    right: var(--ee-space-4);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--ee-space-2);
}

.ee-toast {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
    padding: var(--ee-space-3) var(--ee-space-4);
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    box-shadow: var(--ee-shadow-md);
    animation: ee-toast-slide-in 0.3s ease;
    opacity: 1;
    transition: opacity 0.3s ease;
    max-width: 320px;
    min-width: 260px;
}

@keyframes ee-toast-slide-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.ee-toast-success { border-left: 3px solid var(--ee-success); }
.ee-toast-error, .ee-toast-danger { border-left: 3px solid var(--ee-danger); }
.ee-toast-warning { border-left: 3px solid var(--ee-warning); }
.ee-toast-info { border-left: 3px solid var(--ee-info); }

.ee-toast-icon {
    font-size: var(--ee-text-base);
    flex-shrink: 0;
}

.ee-toast-success .ee-toast-icon { color: var(--ee-success); }
.ee-toast-error .ee-toast-icon, .ee-toast-danger .ee-toast-icon { color: var(--ee-danger); }
.ee-toast-warning .ee-toast-icon { color: var(--ee-warning); }
.ee-toast-info .ee-toast-icon { color: var(--ee-info); }

.ee-toast-message {
    flex: 1;
    font-size: var(--ee-text-sm);
    color: var(--ee-text-primary);
}

.ee-toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--ee-radius-sm);
    color: var(--ee-text-dim);
    font-size: 0.625rem;
    cursor: pointer;
    transition: all var(--ee-transition-fast);
    padding: 0;
}

.ee-toast-close:hover {
    background: var(--ee-bg-hover);
    color: var(--ee-text-secondary);
}

/* =============================================================================
   EQUAL-HEIGHT CARD ROWS
   ============================================================================= */

.ee-row-equal { display: flex; flex-wrap: wrap; }
.ee-row-equal > [class*="col-"] { display: flex; }
.ee-row-equal > [class*="col-"] > .ee-panel { flex: 1; }

/* =============================================================================
   PANEL CARDS (Builder Interfaces)
   ============================================================================= */

.ee-panel {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    overflow: hidden;
    box-shadow: var(--ee-shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 300px;
    max-height: 400px;
    transition: all 0.3s ease;
}

.ee-panel-sm { min-height: 200px; max-height: 300px; }
.ee-panel-lg { min-height: 350px; max-height: 500px; }
.ee-panel-auto { min-height: auto; max-height: none; }

.ee-panel.collapsed {
    min-height: auto;
    max-height: none;
}

.ee-panel.collapsed .ee-panel-search,
.ee-panel.collapsed .ee-panel-body {
    display: none !important;
}

.ee-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ee-space-3) var(--ee-space-4);
    background: var(--ee-indigo);
}

/* Any badge rendered inside a panel header reads as a white pill so the
   canonical danger/warning/info colors don't fight the indigo bg. */
.ee-panel-header .ee-badge {
    background: #fff !important;
    color: var(--ee-indigo) !important;
}

.ee-panel-header-teal { background: var(--ee-teal);!important; }
.ee-panel-header-success { background: var(--ee-success);!important; }
.ee-panel-header-warning { background: var(--ee-warning);!important; }
.ee-panel-header-info { background: var(--ee-info);!important; }
.ee-panel-header-danger { background: var(--ee-danger);!important; }

.ee-panel-header-left {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}

/* Right-hand action group in a panel header (promoted from admin_settings /
   system_setup, ui_polish 0.3; income_verification_card used it unstyled). */
.ee-panel-header-right {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
}

.ee-panel-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--ee-radius-sm);
    color: var(--ee-text-inverse);
    font-size: var(--ee-text-xs);
}

.ee-panel-title {
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-inverse);
    margin: 0;
}

.ee-panel-description {
    font-size: var(--ee-text-xs);
    color: rgba(255, 255, 255, 0.75);
    margin: 0.125rem 0 0 0;
    font-weight: 400;
}

.ee-panel-header-warning .ee-panel-title,
.ee-panel-header-warning .ee-panel-description {
    color: var(--ee-text-primary);
}

.ee-panel-header-warning .ee-panel-description {
    color: var(--ee-text-secondary);
}

.ee-panel-badge {
    padding: 0.125rem var(--ee-space-2);
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--ee-radius-full);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    color: var(--ee-text-inverse);
}

.ee-panel-collapse-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--ee-radius-sm);
    color: var(--ee-text-inverse);
    font-size: 0.625rem;
    cursor: pointer;
    transition: all var(--ee-transition-fast);
    margin-left: var(--ee-space-2);
}

.ee-panel-collapse-btn:hover { background: rgba(255, 255, 255, 0.25); }

.ee-panel.collapsed .ee-panel-collapse-btn i { transform: rotate(-90deg); }

.ee-panel-search {
    padding: var(--ee-space-2) var(--ee-space-3);
    border-bottom: 1px solid var(--ee-border-light);
    background: var(--ee-bg-hover);
}

.ee-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--ee-space-2);
    min-height: 0;
}

/* Settings pages (work_orders/settings.html, 2026-10-22): full-width grid of
   panels, each a list of rows — label + help on the left, the EE standard
   magic_render switch on the right. */
.ee-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ee-space-4);
    align-items: start;
}
@media (min-width: 1200px) {
    .ee-settings-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .ee-settings-grid-single { grid-template-columns: minmax(0, 1fr); }
}
.ee-panel-body.ee-setting-body { padding: var(--ee-space-2) var(--ee-space-4) var(--ee-space-3); overflow: visible; }
.ee-setting-group-title {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    margin: var(--ee-space-3) 0 var(--ee-space-1);
    font-size: var(--ee-text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ee-text-muted);
}
.ee-setting-group-title i { color: var(--ee-indigo); }
.ee-setting-list { display: flex; flex-direction: column; }
.ee-setting-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ee-space-4);
    padding: var(--ee-space-3) 0;
    border-bottom: 1px solid var(--ee-border-light);
}
.ee-setting-list .ee-setting-row:last-child { border-bottom: 0; }
.ee-setting-row-nested { padding-left: var(--ee-space-5); }
.ee-setting-text { min-width: 0; flex: 1; }
.ee-setting-label {
    display: block;
    margin: 0;
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-primary);
    cursor: pointer;
}
.ee-setting-help {
    margin: var(--ee-space-1) 0 0;
    font-size: var(--ee-text-xs);
    line-height: 1.5;
    color: var(--ee-text-muted);
}
.ee-setting-control { flex-shrink: 0; padding-top: 0.125rem; }
.ee-setting-control .md-form { margin: 0; }
.ee-settings-grid .ee-panel-icon { flex-shrink: 0; }
.ee-setting-stats {
    margin-top: var(--ee-space-3);
    padding: var(--ee-space-2) var(--ee-space-3);
    border-radius: var(--ee-radius-md);
    background: var(--ee-bg-hover);
    font-size: var(--ee-text-xs);
    color: var(--ee-text-secondary);
}
.ee-setting-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--ee-space-2);
    padding: var(--ee-space-3) var(--ee-space-4);
    border-top: 1px solid var(--ee-border-light);
    background: var(--ee-bg-hover);
}

.ee-panel-body::-webkit-scrollbar { width: 5px; }
.ee-panel-body::-webkit-scrollbar-track { background: transparent; }
.ee-panel-body::-webkit-scrollbar-thumb { background: var(--ee-border-default); border-radius: 3px; }

.ee-panel-collapsed-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--ee-space-2);
    padding: var(--ee-space-5);
    color: var(--ee-text-dim);
    font-size: var(--ee-text-sm);
    background: var(--ee-bg-page);
    cursor: pointer;
    transition: all var(--ee-transition-fast);
}

.ee-panel-collapsed-hint:hover {
    background: var(--ee-bg-hover);
    color: var(--ee-text-secondary);
}

.ee-panel.collapsed .ee-panel-collapsed-hint { display: flex; flex: 1; }

/* =============================================================================
   STATISTICS CARDS
   ============================================================================= */

.ee-stat-card {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
    padding: var(--ee-space-4);
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    box-shadow: var(--ee-shadow-sm);
    transition: all var(--ee-transition-fast);
    cursor: pointer;
}

.ee-stat-card:hover {
    box-shadow: var(--ee-shadow-md);
    transform: translateY(-2px);
}

.ee-stat-card.active {
    border-color: var(--ee-indigo);
    background: var(--ee-indigo-bg);
}

.ee-stat-card-compact {
    padding: var(--ee-space-3);
    gap: var(--ee-space-2);
}

.ee-stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ee-radius-md);
    font-size: var(--ee-text-base);
    flex-shrink: 0;
}

.ee-stat-card-compact .ee-stat-icon {
    width: 32px;
    height: 32px;
    font-size: var(--ee-text-sm);
}

.ee-stat-icon.indigo { background: var(--ee-indigo-bg); color: var(--ee-indigo); }
.ee-stat-icon.teal { background: var(--ee-teal-bg); color: var(--ee-teal); }
.ee-stat-icon.success { background: var(--ee-success-bg); color: var(--ee-success); }
.ee-stat-icon.warning { background: var(--ee-warning-bg); color: var(--ee-warning); }
.ee-stat-icon.danger { background: var(--ee-danger-bg); color: var(--ee-danger); }
.ee-stat-icon.info { background: var(--ee-info-bg); color: var(--ee-info); }

.ee-stat-content { display: flex; flex-direction: column; }

.ee-stat-number {
    font-size: var(--ee-text-xl);
    font-weight: 700;
    color: var(--ee-text-primary);
    line-height: 1.2;
}

.ee-stat-card-compact .ee-stat-number {
    font-size: var(--ee-text-lg);
}

.ee-stat-label-text {
    font-size: var(--ee-text-xs);
    color: var(--ee-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--ee-tracking-wide);
}

/* =============================================================================
   COLLAPSIBLE HEADERS
   ============================================================================= */

.ee-collapsible {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    overflow: hidden;
    box-shadow: var(--ee-shadow-sm);
}

.ee-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ee-space-3) var(--ee-space-4);
    background: var(--ee-indigo);
    color: var(--ee-text-inverse);
    cursor: pointer;
    transition: background var(--ee-transition-fast);
}

.ee-collapsible-header:hover { background: var(--ee-indigo-dark); }

.ee-collapsible-header-teal { background: var(--ee-teal); }
.ee-collapsible-header-teal:hover { background: var(--ee-teal-dark); }

.ee-collapsible-header-left {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
}

.ee-collapsible-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--ee-radius-sm);
    font-size: var(--ee-text-sm);
}

.ee-collapsible-title {
    font-size: var(--ee-text-base);
    font-weight: 600;
    margin: 0;
}

.ee-collapsible-toggle {
    font-size: var(--ee-text-sm);
    transition: transform 0.2s ease;
}

.ee-collapsible-header.collapsed .ee-collapsible-toggle {
    transform: rotate(-90deg);
}

.ee-collapsible-body {
    padding: var(--ee-space-4);
    border-top: 1px solid var(--ee-border-light);
}

/* The collapsed state has to be expressible in CSS, not only in JS. The header rotated its
   chevron on .collapsed while the body stayed open until script ran, so a section rendered
   collapsed still flashed its contents on every load. Server-rendered initial state is the
   common case — a page decides up front which sections are open — and it must be right in
   the first paint. jQuery .slideToggle() still drives the transition on click; it sets an
   inline display that wins over this rule, so the two do not fight. */
.ee-collapsible-header.collapsed + .ee-collapsible-body {
    display: none;
}

/* =============================================================================
   SEARCH INPUT WRAPPER
   ============================================================================= */

.ee-search-wrapper {
    position: relative;
}

.ee-search-wrapper .ee-search-icon {
    position: absolute;
    left: var(--ee-space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--ee-text-dim);
    font-size: var(--ee-text-xs);
    pointer-events: none;
}

.ee-search-input {
    width: 100%;
    height: 36px;
    padding: 0 var(--ee-space-8) 0 2.25rem;
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    color: var(--ee-text-primary);
    font-size: var(--ee-text-sm);
    transition: all var(--ee-transition-fast);
}

.ee-search-input:focus {
    outline: none;
    border-color: var(--ee-indigo);
    box-shadow: 0 0 0 3px var(--ee-indigo-bg);
}

.ee-search-input::placeholder { color: var(--ee-text-dim); }

.ee-search-input-sm { height: 32px; font-size: var(--ee-text-xs); }
.ee-search-input-lg { height: 42px; font-size: var(--ee-text-base); }

.ee-search-clear {
    position: absolute;
    right: var(--ee-space-2);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--ee-bg-hover);
    border: none;
    border-radius: 50%;
    color: var(--ee-text-dim);
    font-size: 0.5625rem;
    cursor: pointer;
    transition: all var(--ee-transition-fast);
}

.ee-search-clear:hover {
    background: var(--ee-danger-bg);
    color: var(--ee-danger);
}

.ee-search-input:not(:placeholder-shown) + .ee-search-clear { display: flex; }

/* =============================================================================
   LIGHT SEARCH - Generic search input with icon
   ============================================================================= */

.light-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
}

.light-search input {
    width: 100%;
    height: 38px;
    padding: 0 var(--ee-space-3, 0.75rem) 0 2.5rem;
    background: var(--ee-bg-card, #fff);
    border: 1px solid var(--ee-border-light, #dee2e6);
    border-radius: var(--ee-radius-md, 0.375rem);
    color: var(--ee-text-primary, #212529);
    font-size: var(--ee-text-sm, 0.875rem);
    transition: all 0.15s ease;
}

.light-search input:focus {
    outline: none;
    border-color: var(--ee-indigo, #3f51b5);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

.light-search input::placeholder {
    color: var(--ee-text-dim, #9e9e9e);
}

.light-search .light-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ee-text-dim, #9e9e9e);
    font-size: 0.875rem;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-search .light-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--ee-bg-hover, #f5f5f5);
    border: none;
    border-radius: 50%;
    color: var(--ee-text-dim, #9e9e9e);
    font-size: 0.625rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.light-search .light-search-clear:hover {
    background: var(--ee-danger-bg, #ffebee);
    color: var(--ee-danger, #dc3545);
}

.light-search input:not(:placeholder-shown) ~ .light-search-clear {
    display: flex;
}

/* Light search size variants */
.light-search.light-search-sm input { height: 32px; font-size: 0.8125rem; }
.light-search.light-search-sm .light-search-icon { font-size: 0.75rem; }

.light-search.light-search-lg input { height: 44px; font-size: 1rem; }
.light-search.light-search-lg .light-search-icon { font-size: 1rem; left: 1rem; }
.light-search.light-search-lg input { padding-left: 2.75rem; }

/* =============================================================================
   LIST ITEMS
   ============================================================================= */

.ee-list-group-header {
    padding: var(--ee-space-2) var(--ee-space-2) var(--ee-space-1);
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ee-text-dim);
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}

.ee-list-group-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ee-border-light);
}

.ee-list-item {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    padding: var(--ee-space-2);
    margin: 2px 0;
    border-radius: var(--ee-radius-sm);
    cursor: pointer;
    transition: all 0.1s ease;
    border: 1px solid transparent;
}

.ee-list-item:hover {
    background: var(--ee-bg-hover);
    border-color: var(--ee-border-light);
}

.ee-list-item.selected {
    background: var(--ee-indigo-bg);
    border-color: rgba(63, 81, 181, 0.25);
    position: relative;
}

.ee-list-item.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--ee-indigo);
    border-radius: 0 3px 3px 0;
}

.ee-list-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ee-bg-hover);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-sm);
    color: var(--ee-text-muted);
    font-size: 0.625rem;
    flex-shrink: 0;
}

.ee-list-item.selected .ee-list-item-icon {
    background: var(--ee-indigo);
    border-color: var(--ee-indigo);
    color: var(--ee-text-inverse);
}

.ee-list-item-content {
    flex: 1;
    min-width: 0;
}

.ee-list-item-name {
    font-size: var(--ee-text-sm);
    font-weight: 500;
    color: var(--ee-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ee-list-item-meta {
    font-size: var(--ee-text-xs);
    color: var(--ee-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ee-list-item-tag {
    padding: 0.125rem var(--ee-space-2);
    background: var(--ee-bg-hover);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-sm);
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--ee-text-muted);
    text-transform: uppercase;
    flex-shrink: 0;
}

/* List item variants */
.ee-list-item.success {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.15);
}

.ee-list-item.success:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}

.ee-list-item.success .ee-list-item-icon {
    background: var(--ee-success);
    border-color: var(--ee-success);
    color: var(--ee-text-inverse);
}

.ee-list-item-tag.success {
    background: var(--ee-success-bg);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--ee-success-dark);
}

/* =============================================================================
   EE Button Variants - Gradient Styles
   ============================================================================= */

/* Emerald Button - matches approve/success modal headers */
.btn-ee-emerald,
.ee-btn-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.btn-ee-emerald:hover,
.ee-btn-emerald:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.btn-ee-emerald:focus,
.ee-btn-emerald:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-ee-emerald:active,
.ee-btn-emerald:active {
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Danger Button - matches deny/danger modal headers */
.btn-ee-danger,
.ee-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid transparent;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    transition: all 0.2s ease;
}

.btn-ee-danger:hover,
.ee-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

.btn-ee-danger:focus,
.ee-btn-danger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
    color: white;
}

.btn-ee-danger:active,
.ee-btn-danger:active {
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Primary Indigo Button - solid indigo gradient */
.ee-btn-primary {
    background: linear-gradient(135deg, var(--ee-indigo) 0%, var(--ee-indigo-dark) 100%) !important;
    border: 2px solid transparent !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ee-btn-primary:hover {
    background: linear-gradient(135deg, var(--ee-indigo-dark) 0%, #283593 100%) !important;
    color: white !important;
}

.ee-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
    color: white !important;
}

.ee-btn-primary:active {
    background: linear-gradient(135deg, #283593 0%, #1a237e 100%) !important;
    color: white !important;
}

/* Outline Indigo Button - white background with indigo border, fills indigo on hover */
.ee-btn-indigo-outline {
    background: white !important;
    border: 1px solid var(--ee-indigo) !important;
    color: var(--ee-indigo) !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ee-btn-indigo-outline:hover {
    background: var(--ee-indigo) !important;
    border-color: var(--ee-indigo) !important;
    color: white !important;
}

.ee-btn-indigo-outline:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
    color: var(--ee-indigo);
}

.ee-btn-indigo-outline:active {
    background: var(--ee-indigo-dark) !important;
    border-color: var(--ee-indigo-dark) !important;
    color: white !important;
}

/* =============================================================================
   DASHBOARD STATUS CARDS
   ============================================================================= */

/* Status Card - Material Design Elevation */
.ee-status-card {
    width: 100%;
    border-radius: var(--ee-radius-lg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ee-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.ee-status-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.ee-status-card.active {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Card Variants - Pending/Warning */
.ee-status-card-pending,
.ee-status-card-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
}
.ee-status-card-pending::before,
.ee-status-card-warning::before {
    background: linear-gradient(90deg, #ff9800, #ffc107);
}
.ee-status-card-pending .ee-status-card-icon,
.ee-status-card-warning .ee-status-card-icon {
    background: linear-gradient(135deg, #ff9800, #ffc107);
}
.ee-status-card-pending.active,
.ee-status-card-warning.active {
    background: linear-gradient(135deg, #fff3cd 0%, #fff8e1 100%);
}

/* Card Variants - Success/Approved */
.ee-status-card-success,
.ee-status-card-approved {
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
}
.ee-status-card-success::before,
.ee-status-card-approved::before {
    background: linear-gradient(90deg, #4caf50, #81c784);
}
.ee-status-card-success .ee-status-card-icon,
.ee-status-card-approved .ee-status-card-icon {
    background: linear-gradient(135deg, #4caf50, #81c784);
}
.ee-status-card-success.active,
.ee-status-card-approved.active {
    background: linear-gradient(135deg, #c8e6c9 0%, #e8f5e9 100%);
}

/* Card Variants - Danger/Denied */
.ee-status-card-danger,
.ee-status-card-denied {
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
}
.ee-status-card-danger::before,
.ee-status-card-denied::before {
    background: linear-gradient(90deg, #f44336, #e57373);
}
.ee-status-card-danger .ee-status-card-icon,
.ee-status-card-denied .ee-status-card-icon {
    background: linear-gradient(135deg, #f44336, #e57373);
}
.ee-status-card-danger.active,
.ee-status-card-denied.active {
    background: linear-gradient(135deg, #ffcdd2 0%, #ffebee 100%);
}

/* Card Variants - Info/Total */
.ee-status-card-info,
.ee-status-card-total {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}
.ee-status-card-info::before,
.ee-status-card-total::before {
    background: linear-gradient(90deg, #2196f3, #64b5f6);
}
.ee-status-card-info .ee-status-card-icon,
.ee-status-card-total .ee-status-card-icon {
    background: linear-gradient(135deg, #2196f3, #64b5f6);
}
.ee-status-card-info.active,
.ee-status-card-total.active {
    background: linear-gradient(135deg, #bbdefb 0%, #e3f2fd 100%);
}

/* Card Variants - Indigo */
.ee-status-card-indigo {
    background: linear-gradient(135deg, var(--ee-indigo-bg) 0%, #ffffff 100%);
}
.ee-status-card-indigo::before {
    background: linear-gradient(90deg, var(--ee-indigo), var(--ee-indigo-light));
}
.ee-status-card-indigo .ee-status-card-icon {
    background: linear-gradient(135deg, var(--ee-indigo), var(--ee-indigo-light));
}
.ee-status-card-indigo.active {
    background: linear-gradient(135deg, var(--ee-indigo-bg) 0%, var(--ee-indigo-bg) 100%);
}

/* Status Card Content Layout */
.ee-status-card-body {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ee-status-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--ee-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ee-status-card-content {
    flex: 1;
    min-width: 0;
}

.ee-status-card-label {
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ee-text-muted);
    margin-bottom: 0.25rem;
}

.ee-status-card-count {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ee-text-primary);
}

/* A narrow status card stacks its icon above the text. Side by side, the 56px
   icon plus padding left the label about 56px on a phone (two cards per row on
   the Compliance Hub), so RECERTIFICATION broke one syllable per line. The
   query reads the CARD's width, not the viewport, so a full-width card on a
   phone keeps its row layout and a crowded desktop row stacks too. */
.ee-status-card {
    container-type: inline-size;
}

/* An inline-flex link sizes itself from its content; inline-size containment
   would give the card no content width there and collapse it. */
.ee-link-btn > .ee-status-card {
    container-type: normal;
}

@container (max-width: 260px) {
    .ee-status-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .ee-status-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* =============================================================================
   FILTER PILLS
   ============================================================================= */

.ee-filter-section {
    background: var(--ee-bg-card);
    border-radius: var(--ee-radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    position: sticky;
    /* Bottom edge of the fixed top bar, measured and published by the sticky
       script at the end of this file (ui_polish 1.6). */
    top: var(--ee-sticky-top, 0px);
    z-index: 100;
    transition: box-shadow 0.2s ease, padding 0.2s ease;
}
.ee-filter-section.is-stuck {
    box-shadow: var(--ee-shadow-md);
    border-radius: 0;
    padding: 0.5rem 1rem;
    background: var(--ee-bg-hover);
}
.ee-filter-section.is-stuck .ee-filter-label,
.ee-filter-section.is-stuck > p {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.15s ease, margin 0.2s ease;
}
.ee-filter-section .ee-filter-label,
.ee-filter-section > p {
    max-height: 3rem;
    opacity: 1;
    transition: max-height 0.2s ease, opacity 0.15s ease, margin 0.2s ease;
}
.ee-filter-section.is-stuck .ee-filter-pills {
    justify-content: space-between;
}
/* 1px in flow, exactly like the sentinel the previous script inserted, so the
   page below does not move by a pixel. */
.ee-sticky-sentinel { height: 1px; visibility: hidden; pointer-events: none; }
.ee-sticky-spacer { height: 0; pointer-events: none; }

.ee-filter-label {
    font-size: var(--ee-text-xs);
    font-weight: 600;
    color: var(--ee-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ee-filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ee-filter-pill {
    padding: 0.375rem 0.875rem;
    border-radius: var(--ee-radius-full);
    font-size: var(--ee-text-xs);
    font-weight: 500;
    border: 1px solid var(--ee-border-light);
    background: var(--ee-bg-card);
    color: var(--ee-text-muted);
    transition: all 0.15s ease;
    text-decoration: none;
}

.ee-filter-pill:hover {
    background: var(--ee-bg-hover);
    border-color: var(--ee-border-default);
    color: var(--ee-text-primary);
    text-decoration: none;
}

.ee-filter-pill.active {
    background: var(--ee-indigo);
    border-color: var(--ee-indigo);
    color: var(--ee-text-inverse);
}

.ee-filter-pill.active:hover {
    background: var(--ee-indigo-dark);
    border-color: var(--ee-indigo-dark);
    color: var(--ee-text-inverse);
}

/* Hidden states (used by search/filter in dashboard nav) */
.ee-link-btn.hidden, .ee-url-block.hidden, .ee-dashboard-section.hidden, .ee-panel.hidden { display: none; }

@media (max-width: 768px) {
    .ee-filter-pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--ee-space-1); scrollbar-width: none; }
    .ee-filter-pills::-webkit-scrollbar { display: none; }
    .ee-filter-pill { flex-shrink: 0; }
    .ee-link-btn { white-space: normal; }
}

/* =============================================================================
   SECTION LABELS
   ============================================================================= */

.ee-section-label {
    font-size: var(--ee-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--ee-space-2);
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
}
.ee-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ee-border-light);
}
/* The label's icon sits in a round indigo-tint chip on the white card (owner,
   MINC page 2026-11-01: "what is empty behind the $"): a bare glyph read as a
   stray character. The card stays white; indigo is the accent, never the fill. */
.ee-section-label > i:first-child,
.ee-section-label > span:first-child > i:first-child {
    align-items: center;
    background: var(--ee-indigo-bg);
    border-radius: var(--ee-radius-full);
    color: var(--ee-indigo);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.75rem;
    height: 1.75rem;
    justify-content: center;
    margin-right: var(--ee-space-2) !important;
    padding: 0 !important;
    width: 1.75rem;
}
/* Filing-record status form (tic/includes/_status_update_form.html): the status
   select and a solid indigo "Update status" on one baseline, wrapping on a phone. */
.ee-status-update { flex: 1 1 auto; min-width: 0; }
.ee-status-update-row { align-items: flex-end; display: flex; flex-wrap: wrap; gap: var(--ee-space-2) var(--ee-space-3); }
.ee-status-update-field { flex: 1 1 16rem; min-width: 0; max-width: 28rem; }
.ee-status-update-field .md-form { margin-bottom: 0; }
.ee-status-update-extra { flex: 0 1 12rem; width: auto; }
.ee-status-update-submit { flex: 0 0 auto; margin-bottom: var(--ee-space-1); }
@media (max-width: 575.98px) {
    .ee-status-update-field, .ee-status-update-extra, .ee-status-update-submit { flex-basis: 100%; max-width: none; }
}
.ee-section-label.text-danger > i:first-child { background: var(--ee-danger-bg); color: var(--ee-danger); }
.ee-section-label.text-warning > i:first-child { background: var(--ee-warning-bg); color: var(--ee-warning-dark, var(--ee-warning)); }

/* =============================================================================
   DASHBOARD SECTIONS (used inside .ee-panel-body)
   ============================================================================= */

.ee-dashboard-section { padding: var(--ee-space-4) var(--ee-space-5); border-bottom: 1px solid var(--ee-border-light); }
.ee-dashboard-section:last-child { border-bottom: none; }

/* =============================================================================
   LINK BUTTONS (Dashboard navigation pills)
   ============================================================================= */

.ee-link-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-2);
    padding: var(--ee-space-2) var(--ee-space-3);
    border-radius: var(--ee-radius-md);
    text-decoration: none;
    font-size: var(--ee-text-sm);
    font-weight: 500;
    background: var(--ee-bg-hover);
    border: 1px solid var(--ee-border-light);
    white-space: nowrap;
    /* Not 'all': a colour transition passes through light-indigo-on-light-grey
       mid-way (the "Vista Grand" frame, demo review N8). Background/text
       switch together; only the border and shadow ease. */
    transition: border-color var(--ee-transition-fast), box-shadow var(--ee-transition-fast);
    color: var(--ee-text-primary);
}
.ee-link-btn:hover {
    background: var(--ee-indigo);
    color: var(--ee-text-inverse);
    border-color: var(--ee-indigo);
    text-decoration: none;
}
.ee-link-btn .ee-link-btn-icon {
    width: 22px;
    height: 22px;
    border-radius: var(--ee-radius-xs);
    background: var(--ee-bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ee-indigo);
    flex-shrink: 0;
}
.ee-link-btn:hover .ee-link-btn-icon {
    background: rgba(255, 255, 255, 0.25);
    color: var(--ee-text-inverse);
}
.ee-link-btn:hover .ee-badge { background: rgba(255,255,255,0.3); color: var(--ee-text-inverse); }
.ee-link-btn:focus-visible { outline: 2px solid var(--ee-indigo); outline-offset: 2px; }
.ee-link-btn mark { background: var(--ee-warning-bg); color: var(--ee-text-primary); padding: 0 2px; border-radius: 2px; }
.ee-frequent-row { display: flex; align-items: center; gap: var(--ee-space-2); padding: var(--ee-space-3) var(--ee-space-4); background: linear-gradient(135deg, var(--ee-indigo) 0%, var(--ee-indigo-dark) 100%); border-radius: var(--ee-radius-lg); margin-bottom: var(--ee-space-4); flex-wrap: wrap; position: relative; overflow: hidden; }
.ee-frequent-row::after { content: ''; position: absolute; top: -50%; right: -10%; width: 40%; padding-bottom: 40%; border-radius: 50%; background: rgba(255,255,255,0.06); pointer-events: none; }
.ee-frequent-label { font-size: var(--ee-text-xs); font-weight: 600; color: rgba(255,255,255,0.85); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.ee-frequent-row .ee-link-btn { font-size: var(--ee-text-xs); padding: var(--ee-space-1) var(--ee-space-2); background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.ee-frequent-row .ee-link-btn:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.7); color: #fff; text-decoration: none; }
.ee-frequent-row .ee-link-btn .ee-link-btn-icon { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }

/* =============================================================================
   DRILL-DOWN LINKS (Report tables)
   Use .ee-drilldown on <td> or <span> elements that open a modal or navigate
   to a detail view when clicked. Gives a consistent interactive-link appearance
   across all report tables.
   ============================================================================= */

.ee-drilldown {
    color: var(--ee-indigo);
    cursor: pointer;
    font-weight: 500;
}

.ee-transaction-drilldown,
.ee-transaction-drilldown.btn-link {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--ee-indigo) !important;
    cursor: pointer;
    display: inline;
    font: inherit;
    font-size: inherit !important;
    font-weight: 700 !important;
    line-height: inherit;
    margin: 0;
    padding: 0;
    text-align: inherit;
    text-decoration: none;
    vertical-align: baseline;
}

.ee-drilldown:hover,
.ee-transaction-drilldown:hover {
    text-decoration: underline;
    color: var(--ee-indigo-dark, #283593) !important;
}

.ee-drilldown-modal-overlay .confirm-modal-drilldown {
    width: min(1320px, 96vw);
    max-width: min(1320px, 96vw);
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    margin: 2rem auto;
}

.ee-drilldown-modal-overlay .ee-drilldown-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
}

.ee-drilldown-modal-overlay .confirm-modal-header,
.ee-drilldown-modal-overlay .confirm-modal-footer {
    flex-shrink: 0;
}

.ee-drilldown-modal-overlay .confirm-modal-close {
    min-width: 44px;
    min-height: 44px;
}

.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th,
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td {
    box-sizing: border-box;
    vertical-align: top;
}

.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(4),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(4) {
    width: var(--ee-drilldown-account-column-width, 10rem);
    max-width: var(--ee-drilldown-account-column-max-width, 16rem);
    overflow-wrap: anywhere;
    white-space: normal !important;
}

.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(5),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(5),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(6),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(6),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(10),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(10) {
    width: var(--ee-drilldown-detail-column-width, 9rem);
    max-width: var(--ee-drilldown-detail-column-max-width, 14rem);
    overflow-wrap: anywhere;
    white-space: normal !important;
}

.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(7),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(7) {
    width: var(--ee-drilldown-description-column-width, 13rem);
    max-width: var(--ee-drilldown-description-column-max-width, 20rem);
    overflow-wrap: anywhere;
    white-space: normal !important;
}

.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(8),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(8) {
    min-width: var(--ee-drilldown-source-column-min-width, 3.75rem);
    white-space: nowrap !important;
}

.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(9),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(9) {
    min-width: var(--ee-drilldown-journal-column-min-width, 4.5rem);
    white-space: nowrap !important;
}

.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(11),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(11),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table th:nth-child(12),
.ee-drilldown-modal-overlay .ee-drilldown-transaction-table td:nth-child(12) {
    min-width: var(--ee-drilldown-amount-column-min-width, 6rem);
    white-space: nowrap !important;
}

.ee-drilldown-modal-overlay .ee-drilldown-journal-link {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .ee-drilldown-modal-overlay .confirm-modal {
        animation: none !important;
    }

    tr.regular-account-line-entry:hover {
        transition: none;
    }
}

.ee-drilldown-summary .ee-drilldown-stat {
    --ee-drilldown-card-color: var(--ee-indigo);
    --ee-drilldown-card-bg: var(--ee-indigo-bg);
    --ee-drilldown-card-shadow: rgba(var(--ee-indigo-rgb), .18);
    position: relative;
    width: 100%;
    appearance: none;
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value";
    align-items: center;
    column-gap: .875rem;
    row-gap: .15rem;
    min-height: 6rem;
    border: 1px solid #dbe3f0;
    border-top: 4px solid var(--ee-drilldown-card-color);
    background: linear-gradient(180deg, var(--ee-drilldown-card-bg) 0%, #ffffff 100%);
    color: var(--ee-text-primary);
    overflow: hidden;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--ee-drilldown-card-shadow);
}

.ee-drilldown-summary .ee-drilldown-quick-card[data-bucket="charged"] {
    --ee-drilldown-card-color: var(--ee-warning);
    --ee-drilldown-card-bg: var(--ee-warning-bg);
    --ee-drilldown-card-shadow: rgba(245, 158, 11, .16);
}

.ee-drilldown-summary .ee-drilldown-quick-card[data-bucket="collected"] {
    --ee-drilldown-card-color: var(--ee-success);
    --ee-drilldown-card-bg: var(--ee-success-bg);
    --ee-drilldown-card-shadow: rgba(16, 185, 129, .16);
}

.ee-drilldown-summary .ee-drilldown-quick-card[data-bucket="returned"] {
    --ee-drilldown-card-color: var(--ee-danger);
    --ee-drilldown-card-bg: var(--ee-danger-bg);
    --ee-drilldown-card-shadow: rgba(239, 68, 68, .16);
}

.ee-drilldown-summary .ee-drilldown-quick-card[data-bucket="total"] {
    --ee-drilldown-card-color: var(--ee-info);
    --ee-drilldown-card-bg: var(--ee-info-bg);
    --ee-drilldown-card-shadow: rgba(59, 130, 246, .16);
}

.ee-drilldown-summary .ee-drilldown-stat:hover,
.ee-drilldown-summary .ee-drilldown-stat.active {
    border-color: var(--ee-drilldown-card-color);
    background: linear-gradient(180deg, var(--ee-drilldown-card-bg) 0%, #ffffff 100%);
    box-shadow: 0 8px 18px var(--ee-drilldown-card-shadow);
    transform: translateY(-1px);
}

.ee-drilldown-summary .ee-drilldown-stat-icon {
    grid-area: icon;
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: var(--ee-radius-md);
    background: var(--ee-drilldown-card-color);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 16px var(--ee-drilldown-card-shadow);
}

.ee-drilldown-summary .ee-drilldown-stat-label {
    grid-area: label;
    color: var(--ee-text-secondary);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.1;
    text-transform: uppercase;
}

.ee-drilldown-summary .ee-drilldown-stat-value {
    grid-area: value;
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--ee-text-primary);
    font-variant-numeric: tabular-nums;
}

.ee-drilldown-controls {
    padding: .875rem 1rem;
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    background: #f8fafc;
}

.ee-drilldown-filter-grid {
    display: grid;
    grid-template-columns: minmax(430px, 1.5fr) minmax(150px, .65fr) minmax(150px, .65fr) auto;
    gap: .75rem;
    align-items: end;
}

.ee-drilldown-filter-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin: 0;
}

.ee-drilldown-filter-field span {
    color: var(--ee-text-muted);
    font-size: .78rem;
    font-weight: 600;
}

.ee-drilldown-filter-field .form-control {
    height: 38px;
    font-size: .875rem;
    background: #fff;
}

.ee-drilldown-filter-field .md-form {
    margin: 0;
}

.ee-drilldown-filter-field .md-form .md-form {
    margin: 0;
}

.ee-drilldown-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .35rem;
}

.ee-drilldown-quick-links button {
    border: 1px solid #c7d2fe;
    border-radius: var(--ee-radius-sm);
    background: #fff;
    color: var(--ee-indigo);
    font-size: .82rem;
    font-weight: 700;
    padding: .35rem .65rem;
}

.ee-drilldown-quick-links button:hover,
.ee-drilldown-quick-links button.active {
    background: var(--ee-indigo);
    border-color: var(--ee-indigo);
    color: #fff;
}

.ee-drilldown-modal-overlay .dataTables_wrapper,
.ee-drilldown-modal-overlay .dataTables_wrapper .dataTables_scroll,
.ee-drilldown-modal-overlay .dataTables_wrapper .dataTables_scrollHead,
.ee-drilldown-modal-overlay .dataTables_wrapper .dataTables_scrollBody,
.ee-drilldown-modal-overlay .dataTables_wrapper [id^="datatables_container_card"],
.ee-drilldown-modal-overlay .dataTables_wrapper [class^="toolbar"] {
    width: 100% !important;
}

.ee-drilldown-modal-overlay .dataTables_wrapper [id^="datatables_container_card"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.ee-drilldown-modal-overlay [id^="datatable_nav"] h3 {
    font-size: 1.05rem;
    line-height: 1.2;
}

.ee-drilldown-modal-overlay [id^="datatable_nav"] {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ee-drilldown-modal-overlay [id^="navbarSupportedContent"] {
    gap: .5rem;
    padding-left: .75rem !important;
    padding-right: .75rem !important;
}

.ee-drilldown-modal-overlay [id^="datatable-topright"] {
    flex-shrink: 0;
}

.ee-drilldown-table-wrap table.dataTable thead th,
.ee-drilldown-table-wrap table.dataTable tbody td,
.ee-drilldown-table-wrap table.dataTable tfoot th,
.ee-drilldown-modal-overlay .dataTables_scroll table.dataTable thead th,
.ee-drilldown-modal-overlay .dataTables_scroll table.dataTable tbody td,
.ee-drilldown-modal-overlay .dataTables_scroll table.dataTable tfoot th {
    box-sizing: border-box;
    font-size: .875rem !important;
    line-height: 1.35;
    padding: .65rem .5rem !important;
    color: var(--ee-text-primary, #1e293b);
}

.ee-drilldown-table-wrap table.dataTable thead th,
.ee-drilldown-modal-overlay .dataTables_scroll table.dataTable thead th {
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3f0;
}

.ee-drilldown-modal-overlay .dataTables_scrollBody table.dataTable thead,
.ee-drilldown-modal-overlay .dataTables_scrollBody table.dataTable thead tr,
.ee-drilldown-modal-overlay .dataTables_scrollBody table.dataTable thead th {
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 0 !important;
}

.ee-drilldown-table-wrap table.dataTable tbody td.text-right,
.ee-drilldown-modal-overlay .dataTables_scroll table.dataTable tbody td.text-right {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
    .ee-drilldown-modal-overlay .confirm-modal-drilldown {
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }

    .ee-drilldown-summary {
        margin-left: -.25rem;
        margin-right: -.25rem;
    }

    .ee-drilldown-summary .col-6 {
        padding-left: .25rem;
        padding-right: .25rem;
    }

    .ee-drilldown-summary .ee-drilldown-stat {
        grid-template-columns: 2.35rem minmax(0, 1fr);
        min-height: 4.75rem;
        padding: .65rem;
        column-gap: .6rem;
    }

    .ee-drilldown-summary .ee-drilldown-stat-icon {
        width: 2.35rem;
        height: 2.35rem;
        font-size: .92rem;
    }

    .ee-drilldown-summary .ee-drilldown-stat-label {
        font-size: .64rem;
        line-height: 1.15;
    }

    .ee-drilldown-summary .ee-drilldown-stat-value {
        font-size: .92rem;
    }

    .ee-drilldown-modal-overlay [id^="datatable_nav"] h3 {
        display: none !important;
    }

    .ee-drilldown-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   STATUS BADGES (Table)
   ============================================================================= */

.ee-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--ee-radius-sm);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ee-status-badge-draft {
    background: var(--ee-warning-bg);
    color: #856404;
}

.ee-status-badge-approved {
    background: var(--ee-success-bg);
    color: #155724;
}

.ee-status-badge-denied {
    background: var(--ee-danger-bg);
    color: #721c24;
}

.ee-status-badge-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.ee-status-badge-active {
    background: var(--ee-success-bg);
    color: var(--ee-success);
}

.ee-status-badge-inactive {
    background: var(--ee-bg-hover);
    color: var(--ee-text-muted);
}

/* Certification Type Badges */
.ee-cert-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: var(--ee-radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ee-cert-type-initial {
    background: var(--ee-info-bg);
    color: #1565c0;
}

.ee-cert-type-recertification {
    background: var(--ee-lx-tint);
    color: var(--ee-lx-action-deep);
}

.ee-cert-type-interim {
    background: #fff3e0;
    color: #ef6c00;
}

/* =============================================================================
   ACTIONS BUTTON & DROPDOWN
   ============================================================================= */

.ee-actions-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ee-radius-md);
    background: var(--ee-bg-secondary, #f8f9fa);
    border: 1px solid var(--ee-border-light);
    color: var(--ee-text-muted);
    transition: all 0.15s ease;
}

.ee-actions-btn:hover {
    background: var(--ee-indigo);
    border-color: var(--ee-indigo);
    color: white;
}

.ee-actions-btn:focus {
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.25);
}

/* =============================================================================
   MODAL HEADER VARIANTS (Approve/Deny)
   ============================================================================= */

.ee-modal-header-approve {
    background: linear-gradient(135deg, #4caf50, #81c784);
    color: white;
}

.ee-modal-header-deny {
    background: linear-gradient(135deg, #f44336, #e57373);
    color: white;
}

.ee-modal-header-approve .btn-close,
.ee-modal-header-deny .btn-close {
    filter: brightness(0) invert(1);
}

/* =============================================================================
   TABLE ROW STATES
   ============================================================================= */

.table-warning-light {
    background-color: rgba(255, 193, 7, 0.08) !important;
}

.table-success-light {
    background-color: rgba(40, 167, 69, 0.08) !important;
}

.table-danger-light {
    background-color: rgba(220, 53, 69, 0.08) !important;
}

/* =============================================================================
   TABS - Bootstrap Nav Tabs with EE Styling
   ============================================================================= */

/* EE Indigo Tabs - use with nav-tabs */
.nav-tabs.ee-indigo {
    background: var(--ee-indigo);
    border-bottom: none;
    border-radius: var(--ee-radius-md) var(--ee-radius-md) 0 0;
}

.nav-tabs.ee-indigo .nav-item {
    margin-bottom: 0;
}

.nav-tabs.ee-indigo .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all var(--ee-transition-fast);
}

.nav-tabs.ee-indigo .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

.nav-tabs.ee-indigo .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: var(--ee-teal);
}

.nav-tabs.ee-indigo .nav-link i {
    color: #ffffff;
}

/* EE Teal Tabs variant */
.nav-tabs.ee-teal {
    background: var(--ee-teal);
    border-bottom: none;
    border-radius: var(--ee-radius-md) var(--ee-radius-md) 0 0;
}

.nav-tabs.ee-teal .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all var(--ee-transition-fast);
}

.nav-tabs.ee-teal .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

.nav-tabs.ee-teal .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: var(--ee-indigo);
}

.nav-tabs.ee-teal .nav-link i {
    color: #ffffff;
}

/* Standalone EE Tabs (not Bootstrap) — the ONE definition.
   Merged 2026-10-20 (ui_polish 0.2) from two competing copies; every property
   below is the value pages already rendered with (the later copy won on
   padding/size/colour/border, the earlier one supplied the tinted strip,
   inline-flex icon gap and nowrap), so existing tabs look the same.
   Markup: <div class="ee-tabs"><a class="ee-tab active">…</a>…</div>
   Panels: .ee-tab-panel / .ee-tab-panel.active (defined with the TABS banner). */
.ee-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--ee-border-light);
    background: var(--ee-bg-secondary, var(--ee-gray-50));
    padding: 0 var(--ee-space-2);
    margin-bottom: 1rem;
}

.ee-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1.25rem;
    font-size: var(--ee-text-sm);
    font-weight: 500;
    color: var(--ee-text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all var(--ee-transition-fast);
    white-space: nowrap;
}

.ee-tab:hover {
    color: var(--ee-indigo);
    background: var(--ee-indigo-bg);
}

.ee-tab.active {
    color: var(--ee-indigo);
    border-bottom-color: var(--ee-indigo);
    font-weight: 600;
}

.ee-tab i {
    font-size: 0.75rem;
}

/* Pill Tabs variant */
.ee-tabs-pills {
    display: flex;
    gap: 0.5rem;
    border-bottom: none;
    background: var(--ee-bg-hover);
    padding: 0.25rem;
    border-radius: var(--ee-radius-md);
    width: fit-content;
}

.ee-tabs-pills .ee-tab {
    padding: 0.5rem 1rem;
    border-radius: var(--ee-radius-sm);
    margin-bottom: 0;
    border-bottom: none;
}

.ee-tabs-pills .ee-tab.active {
    background: var(--ee-indigo);
    color: white;
    border-bottom-color: transparent;
}

/* =============================================================================
   INSPECTION THUMBNAIL GALLERY
   ============================================================================= */

.ee-thumb-card {
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    overflow: hidden;
    display: inline-block;
    width: auto !important;
    max-width: 100%;
    background: var(--ee-bg-card);
    transition: all var(--ee-transition-fast);
}

.ee-thumb-card:hover {
    box-shadow: var(--ee-shadow-md);
    border-color: var(--ee-indigo);
}

.ee-thumb-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
}

.ee-thumb-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Fixed-height variant for consistent grids */
.ee-thumb-frame-fixed {
    height: 120px;
    background: var(--ee-bg-page);
}

.ee-thumb-frame-fixed .ee-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Empty state for no photos */
.ee-thumb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--ee-space-4);
    background: var(--ee-bg-page);
    border: 2px dashed var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    color: var(--ee-text-dim);
    text-align: center;
}

.ee-thumb-empty i {
    font-size: var(--ee-text-2xl);
    margin-bottom: var(--ee-space-2);
    opacity: 0.5;
}

.ee-thumb-empty span {
    font-size: var(--ee-text-sm);
    color: var(--ee-text-muted);
}

/* Inspection Card Status Alignment */
.inspection-status-col .md-form {
    margin-bottom: 0;
}

.inspection-status-col .md-form .mt-4 {
    margin-top: 0 !important;
    display: none;
}

.inspection-status-col .select2-container,
.inspection-status-col .new-select-label .select2-container,
.inspection-status-col .new-select-search-label .select2-container {
    margin-top: 0 !important;
}

/* Show Signature Field Alignment - Remove margin-top: 6px */
.inspection-signature-field .select2-container,
.inspection-signature-field .new-select-label .select2-container,
.inspection-signature-field .new-select-search-label .select2-container {
    margin-top: 0 !important;
}

.inspection-signature-field .md-form {
    margin-bottom: 0;
}

.inspection-signature-field .md-form .mt-4 {
    margin-top: 0 !important;
    display: none;
}

/* Signature Canvas Styles */
.ee-signature-canvas {
    width: 100%;
    max-width: 500px;
    min-height: 150px;
    border: 2px solid var(--ee-border);
    border-radius: var(--ee-radius-md);
    background: #fff;
    cursor: crosshair;
}

.ee-signature-canvas canvas {
    border-radius: var(--ee-radius-md);
}

/* Existing Signature Display */
.ee-signature-display {
    max-height: 150px;
    border: 1px solid var(--ee-border);
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-2);
    background: var(--ee-bg-secondary);
}

/* =============================================================================
   QUICK ACTION GROUPS
   Used for organizing action buttons into logical categories
   ============================================================================= */

.ee-quick-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ee-border-light);
    width: 100%;
}

.ee-quick-action-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ee-quick-action-group:first-of-type {
    padding-top: 0;
}

.ee-quick-action-group-label {
    font-size: var(--ee-text-xs);
    font-weight: 600;
    color: var(--ee-indigo);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
    min-width: 80px;
}

.ee-quick-action-group-label i {
    margin-right: 0.25rem;
}

/* =============================================================================
   INDIGO TOOLTIPS
   Bootstrap tooltip override with indigo styling
   ============================================================================= */

.tooltip-indigo .tooltip-inner {
    background-color: var(--ee-indigo);
    color: #fff;
    font-size: var(--ee-text-xs);
    padding: 0.5rem 0.75rem;
    border-radius: var(--ee-radius-md);
    max-width: 250px;
}

.tooltip-indigo .arrow::before {
    border-top-color: var(--ee-indigo);
}

.tooltip-indigo.bs-tooltip-bottom .arrow::before {
    border-bottom-color: var(--ee-indigo);
}

.tooltip-indigo.bs-tooltip-left .arrow::before {
    border-left-color: var(--ee-indigo);
}

.tooltip-indigo.bs-tooltip-right .arrow::before {
    border-right-color: var(--ee-indigo);
}

/* =============================================================================
   GOOGLE TRANSLATE - UNIVERSAL MODERN STYLING
   ============================================================================= */

/* Trigger button */
.goog-te-gadget-simple {
    background: white !important;
    border: 1px solid var(--ee-border-default, #d1d5db) !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 0.875rem !important;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
}

.goog-te-gadget-simple:hover {
    border-color: var(--ee-indigo, #3f51b5) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Text inside trigger */
.goog-te-gadget-simple .goog-te-menu-value {
    color: var(--ee-text-primary, #1e293b) !important;
    font-size: 0.875rem !important;
    border: none !important;
}

.goog-te-gadget-simple .goog-te-menu-value span {
    color: var(--ee-text-primary, #1e293b) !important;
    border: none !important;
}

/* Dropdown arrow / separator pipe */
.goog-te-gadget-simple .goog-te-menu-value span[style*="border-left"],
.goog-te-gadget-simple .goog-te-menu-value span[style*="border"],
.goog-te-gadget-simple span[style*="border-left"],
.goog-te-gadget-simple span[style*="border"] {
    border-left: none !important;
    border-right: none !important;
}

/* Hide the Google icon */
.goog-te-gadget-simple img {
    display: none !important;
}

/* Wrapper cleanup */
.goog-te-gadget {
    font-size: 0 !important;
    color: transparent !important;
}

/* Popup dropdown frame */
.goog-te-menu-frame {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid var(--ee-border-default, #d1d5db) !important;
    border-radius: 10px !important;
    max-height: 300px !important;
}

/* Top banner after translation */
.goog-te-banner-frame {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Dark footer override - keeps white text when inside dark footers */
.rp-footer .goog-te-gadget-simple,
.ap-footer .goog-te-gadget-simple,
.vp-footer .goog-te-gadget-simple,
.footer-navigation .goog-te-gadget-simple {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.rp-footer .goog-te-gadget-simple:hover,
.ap-footer .goog-te-gadget-simple:hover,
.vp-footer .goog-te-gadget-simple:hover,
.footer-navigation .goog-te-gadget-simple:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.rp-footer .goog-te-gadget-simple .goog-te-menu-value span,
.ap-footer .goog-te-gadget-simple .goog-te-menu-value span,
.vp-footer .goog-te-gadget-simple .goog-te-menu-value span,
.footer-navigation .goog-te-gadget-simple .goog-te-menu-value span {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* All text/links inside the widget on dark footers (covers SIMPLE layout structure) */
.rp-footer .goog-te-gadget-simple span,
.ap-footer .goog-te-gadget-simple span,
.vp-footer .goog-te-gadget-simple span,
.footer-navigation .goog-te-gadget-simple span,
.rp-footer .goog-te-gadget-simple a,
.ap-footer .goog-te-gadget-simple a,
.vp-footer .goog-te-gadget-simple a,
.footer-navigation .goog-te-gadget-simple a {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* =============================================================================
   15. Notify Modal (global reusable notification modal)
   ============================================================================= */
.ee-notify-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}
.ee-notify-overlay.show {
    display: flex;
}
.ee-notify-modal {
    background: var(--ee-bg-card, #fff);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 420px;
    width: 90%;
    overflow: hidden;
    animation: eeNotifySlideIn 0.2s ease;
}
@keyframes eeNotifySlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ee-notify-header {
    padding: 1.25rem 1.5rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ee-notify-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
}
.ee-notify-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ee-notify-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.ee-notify-body {
    padding: 1.5rem;
}
.ee-notify-body p {
    margin: 0;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}
.ee-notify-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
}
.ee-notify-btn-close {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--ee-indigo, #3f51b5);
    color: var(--ee-indigo, #3f51b5);
    background: #fff;
}
.ee-notify-btn-close:hover {
    background: var(--ee-indigo-bg, #eef2ff);
}
.ee-notify-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    color: #fff;
}
.ee-notify-btn:hover {
    filter: brightness(0.9);
}

/* =============================================================================
   26. Confirm Modal (overlay-based, avoids Bootstrap scroll-jump)
   =============================================================================
   Usage:
     <div class="confirm-modal-overlay" id="my-modal">
       <div class="confirm-modal">
         <div class="confirm-modal-header indigo">
           <h4><i class="fas fa-icon"></i> Title</h4>
           <button class="confirm-modal-close"><i class="fas fa-times"></i></button>
         </div>
         <div class="confirm-modal-body"><p>Content</p></div>
         <div class="confirm-modal-footer">
           <button class="ee-btn ee-btn-outline-indigo">Cancel</button>
           <button class="ee-btn ee-btn-indigo">Confirm</button>
         </div>
       </div>
     </div>

   Show/hide via JS:
     $('#my-modal').addClass('show');
     $('#my-modal').removeClass('show');
   =========================================================================== */
.confirm-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.confirm-modal-overlay.show,
.confirm-modal-overlay.active {
    display: flex;
}
.select2-container--open { z-index: 999999999 !important; }
.confirm-modal {
    background: #fff;
    border-radius: var(--ee-radius-lg, 12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 75%;
    overflow: hidden;
    animation: confirmModalSlideIn 0.2s ease;
}
.confirm-modal-sm { max-width: 480px; }
.confirm-modal-md { max-width: 580px; }
.confirm-modal-lg { max-width: 760px; }
.confirm-modal-xl { max-width: 96vw; max-height: 90vh; overflow-y: auto; }
/* PHONES GET THE WHOLE WIDTH. `width: 75%` above has no breakpoint, so on a
   phone the modal keeps three quarters of a viewport that is already narrow:
   MEASURED on /demo/home/ at 360x780 dpr3, #eeSupportModal rendered 248.3px
   wide inside a 363px viewport (68.4%), offset to x=57.4, with roughly 57px of
   the live dashboard bleeding down BOTH sides carrying mid-word-clipped text.
   Its four capture buttons wrapped onto four separate rows.
   With this rule the same modal measures 339px (93.4%) and the buttons
   collapse to two rows.
   575.98px is Bootstrap's xs ceiling, which this stylesheet already uses
   elsewhere, so the breakpoint is the sheet's own convention rather than a
   new one. Above it nothing changes -- desktop and tablet already measured
   clean and are untouched. */
@media (max-width: 575.98px) {
    .confirm-modal { width: 100%; }
}
.confirm-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: var(--ee-radius-lg, 12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 520px;
    padding: 1.75rem 1.5rem 1.5rem;
    animation: confirmModalSlideIn 0.2s ease;
}
.confirm-modal-dialog .confirm-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.05);
    color: var(--ee-text-secondary, #475569);
}
.confirm-modal-dialog .confirm-modal-close:hover {
    background: rgba(0,0,0,0.12);
    color: var(--ee-text, #1e293b);
}
@keyframes confirmModalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.confirm-modal-header {
    padding: 1.25rem 1.5rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Brand default — ee-indigo gradient. Opt out per modal with .teal /
       .danger modifiers below (their two-class selectors win specificity).
       Set 2026-06-20 after the preflight modal shipped with a missing
       background; modals without explicit color were rendering as white
       text on a white card. ee-indigo is the canonical brand accent. */
    background: linear-gradient(135deg, var(--ee-indigo, #3f51b5), #303f9f);
}
.confirm-modal-header.indigo {
    background: linear-gradient(135deg, var(--ee-indigo, #3f51b5), #303f9f);
}
.confirm-modal-header.teal {
    background: linear-gradient(135deg, var(--ee-teal, #00897b), #00695c);
}
.confirm-modal-header.danger {
    background: linear-gradient(135deg, #e53935, #c62828);
}
/* amber (a caution step): the amber tile with dark ink, since white on amber
   fails contrast (2.23:1); lane EE-GAP, 2026-11-08 */
.confirm-modal-header.warning {
    background: var(--ee-lx-amber-tile);
    color: var(--ee-lx-amber-glyph);
}
.confirm-modal-header.warning h4,
.confirm-modal-header.warning h5,
.confirm-modal-header.warning .close { color: var(--ee-lx-amber-glyph); }
.confirm-modal-header h4,
.confirm-modal-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
}
.confirm-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.confirm-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.confirm-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}
.confirm-modal-body p {
    margin: 0;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}
.confirm-modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}
.confirm-modal-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}
.confirm-modal-btn-cancel {
    background: #e5e7eb;
    color: #374151;
}
.confirm-modal-btn-cancel:hover {
    background: #d1d5db;
}
.confirm-modal-btn-confirm.indigo {
    background: var(--ee-indigo, #3f51b5);
    color: #fff;
}
.confirm-modal-btn-confirm.indigo:hover {
    background: #303f9f;
}
.confirm-modal-btn-confirm.teal {
    background: var(--ee-teal, #00897b);
    color: #fff;
}
.confirm-modal-btn-confirm.teal:hover {
    background: #00695c;
}
.confirm-modal-btn-confirm.danger {
    background: #e53935;
    color: #fff;
}
.confirm-modal-btn-confirm.danger:hover {
    background: #c62828;
}

/* =============================================================================
   14b. OFF-CANVAS DRAWER (mobile sidebar — slides in from left)

   Usage:
     <div class="ee-drawer-overlay" id="my-drawer">
       <aside class="ee-drawer">
         <div class="ee-drawer-header">
           <h5 class="mb-0">Title</h5>
           <button class="ee-drawer-close"><i class="fas fa-times"></i></button>
         </div>
         <div class="ee-drawer-body">...content...</div>
       </aside>
     </div>

   Show/hide:  $('#my-drawer').addClass('show'); / removeClass('show');
   ============================================================================= */
.ee-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
}
.ee-drawer-overlay.show {
    display: block;
}
.ee-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 360px;
    background: #fff;
    box-shadow: 2px 0 20px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    overflow: hidden;
}
.ee-drawer-overlay.show .ee-drawer {
    transform: translateX(0);
}
.ee-drawer-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--ee-indigo, #3f51b5), #303f9f);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.ee-drawer-header h5,
.ee-drawer-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
}
.ee-drawer-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ee-drawer-close:hover {
    background: rgba(255,255,255,0.3);
}
.ee-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0;
}

/* Generic max-width 100% utility (Bootstrap 4 ships `mw-100`, but we expose
   an ee-prefixed alias so components don't depend on Bootstrap class order.) */
.ee-mw-100 { max-width: 100% !important; }

/* =============================================================================
   15. WIZARD COMPONENTS
   THE ONE STEPPER (owner 2026-11-08: "wizards ... one shared stepper style").
   Every multi-step flow draws its progress with these names; a page carries no
   stepper CSS of its own. Staff pages add the layered paint in section 17.
     <div class="wiz-stepper" role="navigation" aria-label="...">
       <div class="wiz-step completed"><span class="wiz-step-num"><span>1</span></span> Terms</div>
       <div class="wiz-step-connector"></div>
       <div class="wiz-step active" aria-current="step"><span class="wiz-step-num"><span>2</span></span> Review</div>
     </div>
   States: .active (the current step), .completed, .reachable (a step you may
   go back to). A step with two lines wraps them in .wiz-step-text (.wiz-step-kicker
   above the value). On a dark band (a hero): .wiz-stepper--on-band.
   A numbered SECTION of a one-page wizard: .wiz-section-head > .wiz-section-num.
   ============================================================================= */

.wiz-steps,
.wiz-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: var(--ee-space-4);
    padding: var(--ee-space-4);
}
.wiz-step {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    padding: var(--ee-space-2) var(--ee-space-4);
    border-radius: var(--ee-radius-md);
    font-size: 0.85rem;
    color: var(--ee-text-muted);
    position: relative;
    transition: all var(--ee-transition-fast);
}
.wiz-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--ee-bg-hover);
    color: var(--ee-text-muted);
    border: 2px solid var(--ee-border-light);
    transition: all var(--ee-transition-fast);
}
.wiz-step.active { color: var(--ee-indigo); font-weight: 600; }
.wiz-step.active .wiz-step-num {
    background: var(--ee-indigo);
    color: var(--ee-bg-card);
    border-color: var(--ee-indigo);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2);
}
/* Text-safe green (#047857, 5.48:1): --ee-success (#10b981) is 2.53:1 on white. */
.wiz-step.completed { color: var(--ee-success-text); cursor: pointer; }
.wiz-step.completed .wiz-step-num {
    background: var(--ee-success-text);
    color: var(--ee-text-inverse);
    border-color: var(--ee-success-text);
}
.wiz-step.completed:hover { opacity: 0.8; }
.wiz-step.reachable { cursor: pointer; }
.wiz-step.reachable:hover { color: var(--ee-indigo); opacity: 0.8; }
.wiz-step-connector {
    flex: 0 0 24px;
    height: 2px;
    background: var(--ee-border-light);
    transition: background var(--ee-transition-fast);
}
.wiz-step.completed + .wiz-step-connector { background: var(--ee-success-text); }
.wiz-step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.wiz-step-kicker {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.8;
}

.wiz-panel { display: none; }
.wiz-panel.active { display: block; }

/* Phones: the numbered discs carry the order, so the connectors go and the
   steps sit two to a row (a band stepper scrolls sideways instead, below). */
@media (max-width: 767px) {
    .wiz-stepper { padding: var(--ee-space-2); gap: var(--ee-space-1); }
    .wiz-stepper .wiz-step-connector { display: none; }
    .wiz-stepper .wiz-step {
        flex: 1 1 45%;
        justify-content: flex-start;
        padding: var(--ee-space-2);
        font-size: 0.78rem;
        min-height: 44px;
    }
}

/* On a dark band (a hero): white discs and words, never wrapped; the row
   scrolls sideways when it runs out of room. */
.wiz-stepper.wiz-stepper--on-band {
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: var(--ee-space-1);
    margin: var(--ee-space-3) 0 0;
    padding: 0;
}
.wiz-stepper--on-band::-webkit-scrollbar { display: none; }
.wiz-stepper.wiz-stepper--on-band .wiz-step {
    flex: 0 0 auto;
    min-height: 0;
    white-space: nowrap;
    padding: var(--ee-space-1) var(--ee-space-3) var(--ee-space-1) var(--ee-space-1);
    font-size: var(--ee-text-sm);
    color: rgba(255, 255, 255, 0.82);
}
.wiz-stepper--on-band .wiz-step-num {
    background: transparent;
    color: var(--ee-text-inverse);
    border-color: rgba(255, 255, 255, 0.55);
}
.wiz-stepper--on-band .wiz-step.active,
.wiz-stepper--on-band .wiz-step.completed { color: var(--ee-text-inverse); }
.wiz-stepper--on-band .wiz-step.active .wiz-step-num {
    background: var(--ee-text-inverse);
    color: var(--ee-indigo-dark);
    border-color: var(--ee-text-inverse);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
.wiz-stepper--on-band .wiz-step.completed .wiz-step-num {
    background: var(--ee-success-text);
    color: var(--ee-text-inverse);
    border-color: var(--ee-text-inverse);
}
.wiz-stepper.wiz-stepper--on-band .wiz-step-connector {
    display: block;
    flex: 0 0 16px;
    background: rgba(255, 255, 255, 0.35);
}

/* A numbered section of a one-page wizard (its card header carries the number). */
.wiz-section-head {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    font-weight: var(--ee-font-weight-semibold);
    font-size: var(--ee-text-lg);
}
.wiz-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--ee-icon-size-lg);
    height: var(--ee-icon-size-lg);
    border-radius: var(--ee-radius-full);
    background: var(--ee-text-inverse);
    color: var(--ee-indigo);
    font-size: var(--ee-text-sm);
    font-weight: var(--ee-font-weight-bold);
}

/* File cards */
.file-card {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-3);
    margin-bottom: var(--ee-space-2);
}
.file-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.file-card .file-meta {
    font-size: 0.8rem;
    color: var(--ee-text-muted);
    margin-top: var(--ee-space-1);
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    padding: var(--ee-space-6);
    text-align: center;
    color: var(--ee-text-muted);
    transition: all var(--ee-transition-fast);
    cursor: pointer;
}
.drop-zone.drag-over {
    border-color: var(--ee-indigo);
    background: var(--ee-indigo-bg);
    color: var(--ee-indigo);
}

/* Column mapping */
.mapping-row {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    padding: var(--ee-space-2) 0;
    border-bottom: 1px solid var(--ee-border-light);
}
.mapping-row:last-child { border-bottom: none; }
.mapping-field-name {
    flex: 0 0 35%;
    font-weight: 500;
    font-size: 0.85rem;
}
.mapping-field-name .required-star { color: var(--ee-danger); }
.mapping-select-wrap { flex: 1; }
.mapping-transform { flex: 0 0 120px; }

.mapping-sheet-section {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-3);
    margin-bottom: var(--ee-space-3);
}
.mapping-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--ee-space-2);
    cursor: pointer;
}
.mapping-sheet-body { display: none; }
.mapping-sheet-body.open { display: block; }

/* Sheet selection */
.sheet-select-card {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-3);
    margin-bottom: var(--ee-space-3);
}
.sheet-select-card h6 { margin-bottom: var(--ee-space-2); }

.sheet-check-item {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    padding: var(--ee-space-1) 0;
}
.sheet-check-item label { cursor: pointer; margin: 0; font-size: 0.85rem; }
.sheet-check-item input[type="checkbox"] { cursor: pointer; }

/* Validation results */
.validation-sheet-result {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-md);
    padding: var(--ee-space-3);
    margin-bottom: var(--ee-space-3);
}
.val-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--ee-space-2);
}
.val-issue-list {
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
}
.val-issue { padding: 2px 0; }
.val-issue.error { color: var(--ee-danger); }
.val-issue.warning { color: var(--ee-warning-dark); }

/* Preview table */
.preview-table-wrap {
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.8rem;
}
.preview-table-wrap table { white-space: nowrap; }


/* =============================================================================
   UI POLISH PHASE 0 COMPONENTS (2026-10-20, .claude/plans/ui_polish 0.2-0.5)

   Each component below has a documented partial under templates/ee/. Pages
   include the partial; they do not re-type the markup. Read the partial's
   header comment for its parameters.

     KPI tile ........ ee-status-card (canonical) + ee-stat-card colour aliases
                       partial: templates/ee/stat_tiles.html
     Hero meta row ... ee-hero-body / -main / -title / -meta / -pill / -actions
                       partial: templates/ee/hero.html
     Empty state ..... ee-empty-state (+ -action)   partial: ee/empty_state.html
     Drill-down ...... ee-drill / ee-drill-table / tr.ee-drill-child
                       partial: templates/ee/drill_row.html
     Filter card ..... ee-filter-card / -header / -title / -body / -actions
                       partial: templates/ee/filter_card.html
     Key/value ....... ee-kv (dl) / ee-kv-table (table)  partial: ee/kv.html
     Overlay modal ... confirm-modal-overlay > ee-modal-dialog
                       partial: templates/ee/modal.html
   ============================================================================= */

/* ---- KPI tile: ONE component ------------------------------------------------
   The canonical tile is .ee-status-card (colored, accent bar, hover lift,
   .active state — ap_aging_report.html "aging bucket" cards). .ee-stat-card is
   kept as its compact alias: existing pages render exactly as before, and a
   colour modifier now gives a compact tile the same accent bar + tint as the
   canonical one instead of a page-local style. .ee-stats-box is NOT a tile —
   it is an inline summary strip inside a card and stays as it is. */
.ee-stat-card-success,
.ee-stat-card-warning,
.ee-stat-card-danger,
.ee-stat-card-info,
.ee-stat-card-indigo {
    position: relative;
    overflow: hidden;
}
.ee-stat-card-success::before,
.ee-stat-card-warning::before,
.ee-stat-card-danger::before,
.ee-stat-card-info::before,
.ee-stat-card-indigo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.ee-stat-card-success { background: linear-gradient(135deg, var(--ee-success-bg) 0%, var(--ee-bg-card) 100%); }
.ee-stat-card-success::before { background: var(--ee-success); }
.ee-stat-card-warning { background: linear-gradient(135deg, var(--ee-warning-bg) 0%, var(--ee-bg-card) 100%); }
.ee-stat-card-warning::before { background: var(--ee-warning); }
.ee-stat-card-danger { background: linear-gradient(135deg, var(--ee-danger-bg) 0%, var(--ee-bg-card) 100%); }
.ee-stat-card-danger::before { background: var(--ee-danger); }
.ee-stat-card-info { background: linear-gradient(135deg, var(--ee-info-bg) 0%, var(--ee-bg-card) 100%); }
.ee-stat-card-info::before { background: var(--ee-info); }
.ee-stat-card-indigo { background: linear-gradient(135deg, var(--ee-indigo-bg) 0%, var(--ee-bg-card) 100%); }
.ee-stat-card-indigo::before { background: var(--ee-indigo); }
/* A tile that filters the table below it is a button; say so to the keyboard. */
.ee-status-card[role="button"]:focus-visible,
.ee-stat-card:focus-visible {
    outline: 2px solid var(--ee-indigo);
    outline-offset: 2px;
}
/* The figure on a canonical tile (the aging cards put the amount in a second
   label line; new tiles use this). */
.ee-status-card-value {
    font-size: var(--ee-text-xl);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ee-text-primary);
    font-variant-numeric: tabular-nums;
}

/* ---- Hero header contract ---------------------------------------------------
   Row 1: icon + page title.  Row 2: community-name pill, then the program pills
   (LIHTC / HUD / USDA …) on the SAME line.  Actions right-aligned.  No program
   pill on the action side.  Sits inside `ee-card ee-bg-indigo ee-rounded-lg
   ee-hero` (the existing decorative-circle header). */
.ee-hero-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--ee-space-3);
    padding: var(--ee-space-4);
}
.ee-hero-main {
    display: flex;
    flex-direction: column;
    gap: var(--ee-space-2);
    min-width: 0;
}
.ee-hero-main .ee-hero-title {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    margin: 0;
    font-weight: 600;
    color: inherit;
}
.ee-hero-main .ee-hero-subtitle {
    margin: 0;
    font-size: var(--ee-text-sm);
    opacity: 0.8;
    color: inherit;
}
.ee-bg-indigo .ee-hero-main .ee-hero-title,
.ee-bg-indigo .ee-hero-main .ee-hero-subtitle {
    color: var(--ee-text-inverse);
}
.ee-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ee-space-1) var(--ee-space-2);
}
.ee-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--ee-space-1);
    padding: var(--ee-space-1) var(--ee-space-3);
    border-radius: var(--ee-radius-full);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
/* Community and program pills share one glass look on the hero. */
.ee-hero-pill-community,
.ee-hero-pill-program {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--ee-text-inverse);
}
.ee-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ee-space-2);
    margin-left: auto;
}
/* Under md the actions drop BELOW the title instead of jamming beside it —
   for ee/hero.html and for the ~135 hand-written heroes whose first row is a
   `d-flex justify-content-between` (close_period, reconciliation, plaid connect …). */
@media (max-width: 767.98px) {
    .ee-hero-actions { margin-left: 0; width: 100%; }
    .ee-hero > .d-flex.justify-content-between,
    .ee-hero > .ee-p-4 > .d-flex.justify-content-between,
    .ee-hero > .ee-card-body > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--ee-space-3);
    }
}

/* ---- Empty state: primary action slot --------------------------------------- */
.ee-empty-state-action {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ee-space-2);
}

/* ---- Drill-down (child rows) ------------------------------------------------
   Two shapes, both carrying the PARENT table's grid, type scale and zebra — no
   nested indigo card headers:
   1. tr.ee-drill-child — column-aligned child <tr>s handed to DataTables
      `row.child([trs])` (AP Workbench pattern): cells line up under the parent
      columns; an indigo inset rule on the first cell marks the group.
   2. .ee-drill > .ee-drill-table — a compact sub-table inside one full-width
      child cell, for children with different columns than the parent. */
tr.ee-drill-child > td {
    background: var(--ee-bg-hover);
    border-top: 0;
    font-size: inherit;
}
tr.ee-drill-child > td:first-child {
    box-shadow: inset 3px 0 0 var(--ee-indigo);
}
tr.ee-drill-child:nth-child(even) > td {
    background: var(--ee-bg-card);
}
.ee-drill {
    background: var(--ee-bg-card);
    border-left: 3px solid var(--ee-indigo);
    padding: var(--ee-space-2) 0;
}
.ee-drill-title {
    margin: 0;
    padding: var(--ee-space-1) var(--ee-space-3) var(--ee-space-2);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--ee-tracking-wide);
    color: var(--ee-text-muted);
}
.ee-drill-table {
    width: 100%;
    border-collapse: collapse;
    font-size: inherit;
}
.ee-drill-table th {
    padding: var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--ee-tracking-wide);
    color: var(--ee-text-muted);
    background: transparent;
    border-bottom: 1px solid var(--ee-border-light);
    text-align: left;
}
.ee-drill-table td {
    padding: var(--ee-space-2) var(--ee-space-3);
    border-bottom: 1px solid var(--ee-border-light);
    color: var(--ee-text-primary);
    vertical-align: top;
}
.ee-drill-table tbody tr:nth-child(even) td { background: var(--ee-bg-hover); }
.ee-drill-table tbody tr:last-child td { border-bottom: none; }
.ee-drill-table .ee-drill-num,
.ee-drill-table tfoot td.ee-drill-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ee-drill-table tfoot td {
    font-weight: 600;
    border-top: 1px solid var(--ee-border-light);
    border-bottom: none;
}
.ee-drill-empty {
    padding: var(--ee-space-3);
    color: var(--ee-text-muted);
    font-size: var(--ee-text-sm);
}
.ee-drill-negative { color: var(--ee-danger); }
.ee-drill-positive { color: var(--ee-success); }

/* ---- Filter card (journal_workbench.html "Filters" card, promoted) ---------- */
.ee-filter-card {
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-light);
    border-radius: var(--ee-radius-lg);
    box-shadow: var(--ee-shadow-sm);
    margin-bottom: var(--ee-space-4);
    overflow: hidden;
}
.ee-filter-card-header {
    display: flex;
    align-items: center;
    gap: var(--ee-space-3);
    padding: var(--ee-space-3) var(--ee-space-4);
    background: var(--ee-indigo);
    color: var(--ee-text-inverse);
    font-weight: 600;
}
.ee-filter-card-title {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    margin: 0;
    font-size: var(--ee-text-base);
    font-weight: 600;
    color: inherit;
}
.ee-filter-card-body {
    padding: var(--ee-space-4);
}
.ee-filter-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--ee-space-2);
    margin-top: var(--ee-space-2);
}

/* ---- Key / value detail list ------------------------------------------------
   <dl class="ee-kv"> label/value pairs; .ee-kv-table for tabular limits/figures
   (money right-aligned, zebra). Stacks to one column on phones. */
.ee-kv {
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    gap: var(--ee-space-2) var(--ee-space-4);
    margin: 0;
    font-size: var(--ee-text-sm);
}
.ee-kv > dt {
    margin: 0;
    font-weight: 500;
    color: var(--ee-text-muted);
}
.ee-kv > dd {
    margin: 0;
    min-width: 0;
    font-weight: 500;
    color: var(--ee-text-primary);
    overflow-wrap: anywhere;
}
.ee-kv > dd.ee-kv-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 575.98px) {
    .ee-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .ee-kv > dd { margin-bottom: var(--ee-space-2); }
}
.ee-kv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--ee-text-sm);
}
.ee-kv-table th,
.ee-kv-table td {
    padding: var(--ee-space-2) var(--ee-space-3);
    border-bottom: 1px solid var(--ee-border-light);
}
.ee-kv-table thead th {
    font-size: var(--ee-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--ee-tracking-wide);
    color: var(--ee-text-muted);
}
.ee-kv-table tbody th {
    font-weight: 500;
    color: var(--ee-text-muted);
    text-align: left;
}
.ee-kv-table tbody tr:nth-child(even) { background: var(--ee-bg-hover); }
.ee-kv-table .ee-kv-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- Overlay modal (built on .confirm-modal-overlay) ------------------------
   EE standard header (owner rule 2026-10-22): indigo header, white title,
   white square close — the same look as .ee-modal-header, .ee-item-modal-header
   and .confirm-modal-header. Scrolling body, right-aligned footer. Open/close with $('#id').addClass('show') / .removeClass('show') —
   never the Bootstrap modal show call (it scroll-jumps the page). The existing .ee-modal-* names
   skin Bootstrap modals and keep their indigo header; this shell is
   .ee-modal-dialog so the two never collide. */
.ee-modal-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 580px;
    max-height: calc(100vh - 4rem);
    background: var(--ee-bg-card);
    border-radius: var(--ee-radius-lg);
    box-shadow: var(--ee-shadow-lg);
    overflow: hidden;
    animation: confirmModalSlideIn 0.2s ease;
}
.ee-modal-dialog-sm { max-width: 480px; }
.ee-modal-dialog-lg { max-width: 760px; }
.ee-modal-dialog-xl { max-width: 96vw; }
.ee-modal-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ee-space-3);
    padding: var(--ee-space-4) var(--ee-space-5);
    background: var(--ee-indigo);
    color: var(--ee-text-inverse);
    border-bottom: none;
}
.ee-modal-dialog-title {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
    margin: 0;
    font-size: var(--ee-text-lg);
    font-weight: 600;
    color: var(--ee-text-inverse);
}
.ee-modal-dialog-title i { color: var(--ee-text-inverse); }
/* Secondary text a page puts in the header (a one-line description, <small>)
   stays readable on indigo instead of the grey meant for white surfaces. */
.ee-modal-dialog-header p,
.ee-modal-dialog-header small,
.ee-modal-dialog-header .ee-text-muted,
.ee-modal-dialog-header .ee-text-secondary { color: rgba(255, 255, 255, 0.85); }
/* Two-class selectors so the white close wins over .ee-btn-close-muted
   (defined later in this file) when a page put the muted variant here. */
.ee-modal-dialog-header .ee-btn-close,
.ee-modal-dialog-header .ee-btn-close.ee-btn-close-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--ee-radius-sm);
    background: rgba(255, 255, 255, 0.15);
    color: var(--ee-text-inverse);
    cursor: pointer;
    transition: background var(--ee-transition-fast), color var(--ee-transition-fast);
}
.ee-modal-dialog-header .ee-btn-close:hover,
.ee-modal-dialog-header .ee-btn-close.ee-btn-close-muted:hover {
    background: rgba(255, 255, 255, 0.28);
    color: var(--ee-text-inverse);
}
.ee-modal-dialog-header .ee-btn-close:focus-visible,
.ee-modal-dialog-header .ee-btn-close.ee-btn-close-muted:focus-visible {
    outline: 2px solid var(--ee-text-inverse);
    outline-offset: 2px;
    box-shadow: none;
}
.ee-modal-dialog-body {
    flex: 1 1 auto;
    padding: var(--ee-space-5);
    overflow-y: auto;
    color: var(--ee-text-primary);
}
.ee-modal-dialog-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--ee-space-2);
    padding: var(--ee-space-3) var(--ee-space-5);
    background: var(--ee-bg-hover);
    border-top: 1px solid var(--ee-border-light);
}
@media (max-width: 575.98px) {
    .ee-modal-dialog { max-height: calc(100vh - 2rem); }
    .ee-modal-dialog-footer .ee-btn { flex: 1 1 auto; justify-content: center; }
}

/* =============================================================================
   RECONCILED CLASSES (2026-10-20, ui_polish 0.3)
   Classes that templates already use but that had NO rule in any stylesheet the
   staff base loads (evidence/PAGE_MATRIX.md "Correction", and
   evidence/ee_old_styles_only_used_classes.txt — ee_old_styles.html had been
   commented out of base.html since 2026-01, so its rules stopped applying; the
   file itself was deleted with this change). Each is either a
   Bootstrap-shaped utility name mapped to its ee equivalent, a rule ported
   token-for-token from ee_old_styles.html, or a small component rule matching
   how the markup uses it. Page/portal-local definitions load later and still
   win, so portal pages are unchanged.
   ============================================================================= */

/* ---- Layout / spacing utilities (Bootstrap-shaped ee-* names) --------------- */
.ee-align-items-center { align-items: center; }
.ee-justify-content-between { justify-content: space-between; }
.ee-justify-content-end { justify-content: flex-end; }
.ee-flex-column { flex-direction: column; }
.ee-mt-auto { margin-top: auto; }
.ee-ml-1 { margin-left: var(--ee-space-1); }
.ee-ms-2 { margin-left: var(--ee-space-2); }
.ee-me-3, .ee-mr-3 { margin-right: var(--ee-space-3); }
.ee-ps-3 { padding-left: var(--ee-space-3); }
.ee-pe-3 { padding-right: var(--ee-space-3); }
.ee-pb-2 { padding-bottom: var(--ee-space-2); }
.ee-px-3 { padding-left: var(--ee-space-3); padding-right: var(--ee-space-3); }
.ee-py-1 { padding-top: var(--ee-space-1); padding-bottom: var(--ee-space-1); }
.ee-py-3 { padding-top: var(--ee-space-3); padding-bottom: var(--ee-space-3); }
.ee-py-5 { padding-top: var(--ee-space-5); padding-bottom: var(--ee-space-5); }
.ee-w-100 { width: 100%; }
@media (min-width: 768px) {
    .ee-mb-md-0 { margin-bottom: 0 !important; }
}
.ee-rounded-md { border-radius: var(--ee-radius-md); }
.ee-border-bottom { border-bottom: 1px solid var(--ee-border-light); }

/* ---- Type / colour utilities ------------------------------------------------- */
.ee-fs-sm { font-size: var(--ee-text-sm); }
.ee-text-3xl { font-size: var(--ee-text-3xl); line-height: 1.2; }
.ee-opacity-70 { opacity: 0.7; }
.ee-opacity-90 { opacity: 0.9; }
.ee-text-white-70 { color: rgba(255, 255, 255, 0.7); }
.ee-bg-light { background-color: var(--ee-bg-hover) !important; }
.ee-bg-subtle { background-color: var(--ee-bg-hover); color: var(--ee-text-primary); }

/* ---- Section / item titles --------------------------------------------------- */
.ee-section-title {
    margin: 0 0 var(--ee-space-3) 0;
    font-size: var(--ee-text-lg);
    font-weight: 600;
    color: var(--ee-text-primary);
}
.ee-item-section-title {
    margin: 0 0 var(--ee-space-3) 0;
    font-size: var(--ee-text-base);
    font-weight: 600;
    color: var(--ee-text-primary);
}
.ee-item-subtitle {
    font-size: var(--ee-text-xs);
    color: var(--ee-text-muted);
}
/* Panel header internals used by the accounting create pages. */
.ee-panel-title-row {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}
.ee-panel-header-description { min-width: 0; }
/* The Compliance Hub recert pipeline wrapper (its caption is .ee-metric-caption). */
.ee-metric { min-width: 0; }

/* ---- Badges ------------------------------------------------------------------ */
.ee-badge-sm { padding: 0.125rem var(--ee-space-2); font-size: var(--ee-text-xs); }
/* Grey = the bare .ee-badge look; these Bootstrap-shaped names map to it. */
.ee-badge-secondary,
.ee-badge-gray,
.ee-badge-default { background: var(--ee-bg-hover); color: var(--ee-text-secondary); }
.ee-badge-primary { background: var(--ee-indigo-bg); color: var(--ee-indigo); }

/* ---- Buttons ----------------------------------------------------------------- */
.ee-btn-block { display: flex; width: 100%; }
.ee-btn-xs {
    padding: 0.125rem var(--ee-space-2);
    font-size: var(--ee-text-xs);
    gap: var(--ee-space-1);
}
.ee-btn-xs i { font-size: var(--ee-text-xs); }
/* Neutral secondary / back buttons on staff pages: the staff outline-secondary
   look (portal style includes keep their own, later-loading versions). */
.ee-btn-secondary,
.ee-btn-back,
.ee-btn-outline,
.ee-btn-outline-dark {
    background: transparent;
    color: var(--ee-text-secondary);
    border-color: var(--ee-border-default);
}
.ee-btn-secondary:hover:not(:disabled),
.ee-btn-back:hover:not(:disabled),
.ee-btn-outline:hover:not(:disabled),
.ee-btn-outline-dark:hover:not(:disabled) {
    background: var(--ee-bg-hover);
    color: var(--ee-text-primary);
    border-color: var(--ee-border-dark);
    text-decoration: none;
}
.ee-btn-outline-primary {
    background: transparent;
    color: var(--ee-indigo);
    border-color: var(--ee-indigo);
}
.ee-btn-outline-primary:hover:not(:disabled) {
    background: var(--ee-indigo);
    color: var(--ee-text-inverse);
    text-decoration: none;
}
.ee-btn-white {
    background: var(--ee-bg-card);
    color: var(--ee-indigo);
    border-color: var(--ee-bg-card);
}
.ee-btn-white:hover:not(:disabled) {
    background: var(--ee-bg-hover);
    color: var(--ee-indigo-dark);
    text-decoration: none;
}
.ee-btn-outline-light {
    background: transparent;
    color: var(--ee-text-inverse);
    border-color: rgba(255, 255, 255, 0.6);
}
.ee-btn-outline-light:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: var(--ee-text-inverse);
    text-decoration: none;
}
.ee-link-btn-primary { color: var(--ee-indigo); font-weight: 600; }
.ee-link {
    color: var(--ee-indigo);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.ee-link:hover { color: var(--ee-indigo-dark); text-decoration: underline; }
.ee-notice-action { white-space: nowrap; }
.ee-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- Page title (plain header pages) ----------------------------------------- */
.ee-page-title {
    margin: 0 0 var(--ee-space-1) 0;
    font-size: var(--ee-text-2xl);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ee-text-primary);
}
.ee-page-subtitle {
    margin: 0 0 var(--ee-space-4) 0;
    font-size: var(--ee-text-sm);
    color: var(--ee-text-muted);
}

/* ---- Cards / alerts / boxes -------------------------------------------------- */
.ee-card-warning { border-left: 4px solid var(--ee-warning); background: var(--ee-warning-bg); }
.ee-alert-indigo {
    background: var(--ee-indigo-bg);
    border: 1px solid var(--ee-indigo-bg);
    border-left: 3px solid var(--ee-indigo);
}
.ee-icon-box-primary { background: var(--ee-indigo); color: var(--ee-text-inverse); }
.ee-modal-header-indigo {
    background: linear-gradient(135deg, var(--ee-indigo) 0%, var(--ee-indigo-dark) 100%);
    color: var(--ee-text-inverse);
}

/* ---- Tables ------------------------------------------------------------------ */
.ee-table-sm th,
.ee-table-sm td { padding: var(--ee-space-2) var(--ee-space-3); font-size: var(--ee-text-sm); }

/* ---- Forms ------------------------------------------------------------------- */
.ee-field-label,
.ee-form-label {
    display: block;
    margin-bottom: var(--ee-space-1);
    font-size: var(--ee-text-sm);
    font-weight: 600;
    color: var(--ee-text-secondary);
}
.ee-required-indicator { margin-left: 0.125rem; color: var(--ee-danger); font-weight: 600; }
.ee-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--ee-space-3);
}
.ee-form-check {
    display: flex;
    align-items: center;
    gap: var(--ee-space-2);
}
.ee-radio-group .form-check { margin-bottom: var(--ee-space-1); }
.ee-form-control {
    display: block;
    width: 100%;
    padding: var(--ee-space-2) var(--ee-space-3);
    font-size: var(--ee-text-sm);
    color: var(--ee-text-primary);
    background: var(--ee-bg-card);
    border: 1px solid var(--ee-border-default);
    border-radius: var(--ee-radius-md);
}
.ee-form-control:focus { outline: none; border-color: var(--ee-indigo); box-shadow: 0 0 0 3px var(--ee-indigo-bg); }
.ee-form-control-sm { padding: var(--ee-space-1) var(--ee-space-2); font-size: var(--ee-text-xs); }

/* ---- Tabs: the approval inbox uses link/active-class names ------------------- */
.ee-tab-link { color: inherit; text-decoration: none; }
.ee-tab-link:hover { color: inherit; text-decoration: none; }
.ee-tab.ee-tab-active,
.ee-tab-active {
    color: var(--ee-indigo);
    border-bottom-color: var(--ee-indigo);
    font-weight: 600;
}

/* ---- Feedback ---------------------------------------------------------------- */
/* Ported from ee_old_styles.html (no longer loaded): a form error block shakes once. */
.ee-shake { animation: ee-shake 0.5s ease-in-out; }
@keyframes ee-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
    .ee-shake { animation: none; }
}

/* ---- Ghost button + light-surface square close (2026-10-20) ------------------
   .ee-btn-ghost: a quiet secondary action ("Not now", "Skip") — no fill, no
   border until hover. Use with .ee-btn (and .ee-btn-sm).
   .ee-btn-close: the square close button. Its base rule lives in
   ee_item_modal.html (loaded globally by ee_styles.html, AFTER this file) and
   is styled for DARK (indigo) headers: translucent white square. On a LIGHT
   surface (tour cards, white overlay headers, toasts) add .ee-btn-close-muted
   for a grey square. The two-class selector outranks the base rule regardless
   of load order. Inside .ee-modal-dialog-header (indigo) the close is always the
   white square, muted or not. */
.ee-btn-ghost {
    background: transparent;
    color: var(--ee-text-secondary);
    border-color: transparent;
}
.ee-btn-ghost:hover:not(:disabled) {
    background: var(--ee-bg-hover);
    color: var(--ee-text-primary);
    text-decoration: none;
}
.ee-btn-ghost:focus-visible {
    outline: 2px solid var(--ee-indigo);
    outline-offset: 2px;
}
.ee-btn-close.ee-btn-close-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--ee-radius-sm);
    background: var(--ee-bg-hover);
    color: var(--ee-text-secondary);
    cursor: pointer;
}
.ee-btn-close.ee-btn-close-muted:hover {
    background: var(--ee-border-light);
    color: var(--ee-text-primary);
}
.ee-btn-close.ee-btn-close-muted:focus-visible {
    outline: 2px solid var(--ee-indigo);
    outline-offset: 2px;
    box-shadow: none;
}

/* ---- Selected / current state (demo review N8, 2026-10-20) -------------------
   One token pair for "this tile is selected / current": indigo fill, white
   text — 6.9:1, passes WCAG AA for any text size. Hover on .ee-link-btn
   already uses exactly these values; .active / aria-current / aria-pressed
   give pickers and filter tiles the same, readable, selected state. */
:root {
    --ee-selected-bg: var(--ee-indigo);
    --ee-selected-text: var(--ee-text-inverse);
    --ee-selected-border: var(--ee-indigo);
}
/* EEva DEEPLINK ARRIVAL (lane Q4, 2026-11-08): the element a deeplink card
   named (data-eeva-record="<kind>:<id>", else the page heading) is flashed
   once by the page hook (includes/eeva_page_hook.html). */
[data-eeva-arrival] {
    outline: 2px solid var(--ee-selected-border);
    outline-offset: 2px;
    border-radius: 6px;
    transition: outline-color .6s ease;
}
@media (prefers-reduced-motion: reduce) { [data-eeva-arrival] { transition: none; } }
.ee-link-btn.active,
.ee-link-btn[aria-current="page"],
.ee-link-btn[aria-current="true"],
.ee-link-btn[aria-pressed="true"] {
    background: var(--ee-selected-bg);
    color: var(--ee-selected-text);
    border-color: var(--ee-selected-border);
}
.ee-link-btn.active .ee-link-btn-icon,
.ee-link-btn[aria-current="page"] .ee-link-btn-icon,
.ee-link-btn[aria-current="true"] .ee-link-btn-icon,
.ee-link-btn[aria-pressed="true"] .ee-link-btn-icon {
    background: rgba(255, 255, 255, 0.25);
    color: var(--ee-selected-text);
}

/* ---- Warning text on the warning tint (2026-10-20) ---------------------------
   --ee-warning-dark (#d97706) on --ee-warning-bg measured ~2.95:1 — below
   WCAG AA (4.5:1) for badge/chip text. Light themes use --ee-warning-text
   (#92400e, ~7:1); dark themes keep an amber that reads on the dark card. */
:root { --ee-warning-on-bg: var(--ee-warning-text); }
.ee-dark { --ee-warning-on-bg: var(--ee-warning-light); }
@media (prefers-color-scheme: dark) {
    .ee-auto-dark { --ee-warning-on-bg: var(--ee-warning-light); }
}

/* ---- Success and danger text on their tints (2026-11-18) -------------
   Composited over the white card the tints are #e7f8f2 / #fdecec. Badge text
   measured before: #10b981 2.31:1, #059669 (chip) 3.43:1, #ef4444 3.29:1.
   After: --ee-success-text #047857 4.99:1, --ee-danger-text #b91c1c 5.66:1
   (4.80:1 / 5.45:1 over the #f8fafc page). Dark themes keep the light inks. */
:root { --ee-success-on-bg: var(--ee-success-text); --ee-danger-on-bg: var(--ee-danger-text); }
.ee-dark { --ee-success-on-bg: var(--ee-success-light); --ee-danger-on-bg: var(--ee-danger-light); }
@media (prefers-color-scheme: dark) {
    .ee-auto-dark { --ee-success-on-bg: var(--ee-success-light); --ee-danger-on-bg: var(--ee-danger-light); }
}
