/* ============================================
   Design System — Semantic Component Classes
   Light + dark mode handled centrally.
   Dark mode activated via body.dark-mode.
   ============================================ */

/* Card panel */
.card {
    background-color: #ffffff;
    border-color: #e5e7eb;
    border-style: solid;
    border-width: 1px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}
.card-hover:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Surface container (card with overflow hidden) */
.surface {
    background-color: #ffffff;
    border-color: #e5e7eb;
    border-style: solid;
    border-width: 1px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Card body (optional internal padding for cards that need it) */
.card-body {
    padding: 1.5rem;
}

/* Modal container (premium senior UI styling) */
.modal {
    background-color: #ffffff;
    border: 1px solid rgba(28, 30, 77, 0.08);
    box-shadow: 0 20px 25px -5px rgba(28, 30, 77, 0.12), 0 10px 10px -5px rgba(28, 30, 77, 0.08);
    border-radius: 1.25rem !important;
}

/* Dark mode cards/surfaces/modals */
body.dark-mode .card,
body.dark-mode .card-hover,
body.dark-mode .surface {
    background-color: var(--dark-card);
    border-color: var(--dark-border);
}
body.dark-mode .modal {
    background-color: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================
   Modal layout (header / body / footer)
   Padding handled per-section, NOT on .card or .modal.
   ============================================ */
.modal-header {
    background: linear-gradient(135deg, #1c1e4d 0%, #2a306b 100%) !important;
    border-bottom: 3px solid #d2d2d2 !important; /* Premium Silver divider! */
    padding: 1.25rem 1.5rem !important;
    color: #ffffff !important;
    flex-shrink: 0;
}
.modal-header h3, 
.modal-header [id*="Title"] {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-header button, 
.modal-header .fa-times {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease-in-out;
}
.modal-header button:hover, 
.modal-header .fa-times:hover {
    color: #ffffff !important;
    transform: scale(1.1);
}
.modal-body {
    padding: 1.75rem 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
}
.modal-footer {
    padding: 1.25rem 1.5rem !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem !important;
    background-color: rgba(28, 30, 77, 0.03) !important; /* Soft navy-tinted background */
    border-top: 1px solid rgba(28, 30, 77, 0.08) !important;
    flex-shrink: 0;
}
body.dark-mode .modal-header {
    background: linear-gradient(135deg, #121435 0%, #1c1e4d 100%) !important;
    border-bottom: 3px solid var(--secondary-color) !important;
}
body.dark-mode .modal-footer {
    background-color: rgba(0, 0, 0, 0.25) !important;
    border-top: 1px solid var(--dark-border) !important;
}

/* ============================================
   Buttons — Global Button System
   ============================================ */

/* Base: shared properties for all button variants */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.15s;
    cursor: pointer;
    outline: none;
}
.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* ============================================
   Table Action Dropdown
   ============================================ */
.table-action-container {
    position: relative;
    display: inline-flex;
}
.table-action-dropdown {
    display: none;
    min-width: 180px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.04);
    padding: 0.375rem;
    z-index: 1100;
    flex-direction: column;
}
.table-action-dropdown:not(.hidden) {
    animation: overflowFadeIn 0.15s ease-out;
}
.table-action-dropdown button,
.table-action-dropdown a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
    text-decoration: none;
}
.table-action-dropdown button:hover,
.table-action-dropdown a:hover {
    background: #f3f4f6;
}
.table-action-dropdown .menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.25rem 0.375rem;
}

/* Dark mode for table-action-dropdown */
body.dark-mode .table-action-dropdown {
    background: var(--dark-card);
    border-color: var(--dark-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}
body.dark-mode .table-action-dropdown button,
body.dark-mode .table-action-dropdown a {
    color: var(--text-light);
}
body.dark-mode .table-action-dropdown button:hover,
body.dark-mode .table-action-dropdown a:hover {
    background: var(--dark-hover);
}
body.dark-mode .table-action-dropdown .menu-divider {
    background: var(--dark-border);
}

@keyframes overflowFadeIn {
    from { opacity: 0; transform: translateY(-4px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .table-action-dropdown {
        min-width: 200px;
    }
    .table-action-dropdown button,
    .table-action-dropdown a {
        padding: 0.75rem 1rem;
    }
}

/* Primary action (solid deep navy, rounded-xl) */
.btn-primary {
    background-color: #1c1e4d !important;
    color: #ffffff !important;
    border: 1px solid #1c1e4d !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
}
.btn-primary:hover {
    background-color: #121435 !important;
    border-color: #121435 !important;
}
body.dark-mode .btn-primary {
    background-color: var(--secondary-color) !important; /* Silver `#d2d2d2` */
    color: #1c1e4d !important; /* Navy text */
    border-color: var(--secondary-color) !important;
}
body.dark-mode .btn-primary:hover {
    background-color: #ffffff !important;
    color: #121435 !important;
    border-color: #ffffff !important;
}

/* Secondary / cancel (ghost outline, rounded-xl) */
.btn-secondary {
    background-color: #ffffff !important;
    border: 1px solid #d2d2d2 !important; /* Silver contrast color! */
    color: #1c1e4d !important; /* MOPT Navy text */
    border-radius: 0.75rem !important;
    transition: all 0.2s ease-in-out !important;
}
.btn-secondary:hover {
    background-color: rgba(28, 30, 77, 0.04) !important;
    color: var(--primary-color) !important;
}
body.dark-mode .btn-secondary {
    background-color: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
    color: var(--text-light) !important;
}
body.dark-mode .btn-secondary:hover {
    background-color: var(--dark-hover) !important;
}

/* Danger (solid red, rounded-xl) */
.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-danger:hover {
    background-color: #b91c1c;
}

/* Success (solid green, rounded-xl) */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3) !important;
    transform: translateY(-1.5px) !important;
}

body.dark-mode .btn-success {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
    border-color: rgba(52, 211, 153, 0.2) !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3) !important;
}
body.dark-mode .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4) !important;
}

/* Indigo / Information / Export (solid indigo, rounded-xl) */
.btn-indigo {
    background-color: #4f46e5;
    color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-indigo:hover {
    background-color: #4338ca;
}

/* Warning / Caution / Alternative (solid amber, rounded-xl) */
.btn-warning {
    background-color: #d97706;
    color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-warning:hover {
    background-color: #b45309;
}

/* Icon-only action button for tables (compact 36×36, rounded-lg, visible default bg) */
.btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.25rem !important; /* Perfect 36px touch target square */
    height: 2.25rem !important;
    border-radius: 0.625rem !important; /* iOS-style elegant smooth curves */
    border: 1px solid transparent !important;
    font-size: 0.875rem !important; /* Crisp icon display */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
}
.btn-icon:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

/* Labeled compact action button for tables (rounded-lg, visible default bg) */
.btn-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    padding: 0.5rem 0.875rem !important; /* Elegant padding to let text labels breathe */
    min-height: 2.25rem !important; /* Height matching the icon-only sibling */
    border-radius: 0.625rem !important; /* Matching curves */
    border: 1px solid transparent !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
}
.btn-action:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

/* Unified Action Button Colors (Edit / Warning / Yellow) */
.btn-icon.bg-yellow-50, .btn-action.bg-yellow-50 {
    background-color: rgba(217, 119, 6, 0.06) !important; /* Soft Amber background */
    color: #d97706 !important; /* Rich Gold/Amber text */
    border: 1px solid rgba(217, 119, 6, 0.12) !important;
}
.btn-icon.bg-yellow-50:hover, .btn-action.bg-yellow-50:hover {
    background-color: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* Unified Action Button Colors (Delete / Destructive / Red) */
.btn-icon.bg-red-50, .btn-action.bg-red-50 {
    background-color: rgba(220, 38, 38, 0.06) !important; /* Soft Red background */
    color: #dc2626 !important; /* Crimson text */
    border: 1px solid rgba(220, 38, 38, 0.12) !important;
}
.btn-icon.bg-red-50:hover, .btn-action.bg-red-50:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* Unified Action Button Colors (View / Info / Blue) */
.btn-icon.bg-blue-50, .btn-action.bg-blue-50 {
    background-color: rgba(28, 30, 77, 0.06) !important; /* Soft Brand Navy background */
    color: #1c1e4d !important; /* Brand Navy text */
    border: 1px solid rgba(28, 30, 77, 0.12) !important;
}
.btn-icon.bg-blue-50:hover, .btn-action.bg-blue-50:hover {
    background-color: #1c1e4d !important;
    color: #ffffff !important;
    border-color: #1c1e4d !important;
    box-shadow: 0 4px 12px rgba(28, 30, 77, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* Dark Mode Overrides for Action Buttons */
body.dark-mode .btn-icon.bg-yellow-50, body.dark-mode .btn-action.bg-yellow-50 {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.15) !important;
}
body.dark-mode .btn-icon.bg-yellow-50:hover, body.dark-mode .btn-action.bg-yellow-50:hover {
    background-color: #f59e0b !important;
    color: #111827 !important;
}

body.dark-mode .btn-icon.bg-red-50, body.dark-mode .btn-action.bg-red-50 {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
}
body.dark-mode .btn-icon.bg-red-50:hover, body.dark-mode .btn-action.bg-red-50:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-icon.bg-blue-50, body.dark-mode .btn-action.bg-blue-50 {
    background-color: rgba(96, 165, 250, 0.08) !important;
    color: #60a5fa !important;
    border-color: rgba(96, 165, 250, 0.15) !important;
}
body.dark-mode .btn-icon.bg-blue-50:hover, body.dark-mode .btn-action.bg-blue-50:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* Pagination button (compact, white/gray outline, rounded-lg) */
.btn-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 0.5rem;
    transition: all 0.15s;
    cursor: pointer;
    outline: none;
}
.btn-page:hover {
    background-color: #f9fafb;
}
.btn-page:disabled {
    background-color: #f9fafb;
    color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-page:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Pagination active page (blue filled) */
.btn-page-active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: default;
    outline: none;
}

/* Prev/Next pagination (icon only, same size as .btn-page) */
.btn-page-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    padding: 0 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 0.5rem;
    transition: all 0.15s;
    cursor: pointer;
    outline: none;
}
.btn-page-nav:hover {
    background-color: #f9fafb;
}
.btn-page-nav:disabled {
    background-color: #f9fafb;
    color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-page-nav:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* ============================================
   Text colors
   ============================================ */
.text-primary { color: #111827; }
body.dark-mode .text-primary { color: var(--text-light); }

.text-muted { color: #6b7280; }
body.dark-mode .text-muted { color: var(--text-muted); }

/* ============================================
   Borders and dividers
   ============================================ */
.border-default { border-color: #e5e7eb; }
body.dark-mode .border-default { border-color: var(--dark-border); }

.divide-default > :not([hidden]) ~ :not([hidden]) { border-color: #e5e7eb; }
body.dark-mode .divide-default > :not([hidden]) ~ :not([hidden]) { border-color: var(--dark-border); }

/* ============================================
   Form elements
   ============================================ */
.form-input {
    background-color: #f9fafb;
    border: 1px solid #d2d2d2;
    transition: all 0.15s;
}
.form-input::placeholder {
    color: #9ca3af;
}
.form-input:focus {
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(28, 30, 77, 0.15);
}
body.dark-mode .form-input {
    background-color: #374151;
    border-color: #4b5563;
    color: var(--text-light);
}
body.dark-mode .form-input::placeholder {
    color: var(--text-muted);
}
body.dark-mode .form-input:focus {
    background-color: var(--dark-card);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(210, 210, 210, 0.15);
    outline: none;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #374151;
}
body.dark-mode .form-label { color: #d1d5db; }

/* ============================================
   Table
   ============================================ */
.table-header {
    background-color: #fbfbfc !important;
    color: #1c1e4d !important;
    font-weight: 700 !important;
    border-bottom: 3px solid #d2d2d2 !important; /* Premium Silver divider */
}
.table-header th, .table-header td {
    color: #1c1e4d !important;
}
body.dark-mode .table-header {
    background-color: #313945 !important; /* Slate Pizarra primary dark */
    color: #ffffff !important;
    border-bottom: 3px solid var(--secondary-color) !important;
}
body.dark-mode .table-header th, body.dark-mode .table-header td {
    color: #ffffff !important;
}

.table-row-hover:hover {
    background-color: rgba(249, 250, 251, 0.7);
}
body.dark-mode .table-row-hover:hover {
    background-color: var(--dark-hover);
}

/* ============================================
   Inline badges (dynamic, color-coded)
   ============================================ */
body.dark-mode .badge-blue { background-color: #1e3a5f; color: #93c5fd; border-color: #1e3a5f; }
body.dark-mode .badge-green { background-color: #064e3b; color: #6ee7b7; border-color: #064e3b; }
body.dark-mode .badge-red { background-color: #7f1d1d; color: #fca5a5; border-color: #7f1d1d; }
body.dark-mode .badge-yellow { background-color: #78350f; color: #fcd34d; border-color: #78350f; }
body.dark-mode .badge-purple { background-color: #4c1d95; color: #c4b5fd; border-color: #4c1d95; }
body.dark-mode .badge-gray,
body.dark-mode .badge-gray.text-gray-400 { background-color: var(--dark-hover); color: var(--text-muted); border-color: var(--dark-border); }

/* ============================================
   Fallback: scoped to main-content for any
   remaining utility classes not yet migrated
   ============================================ */
body.dark-mode .main-content .bg-white { background-color: var(--dark-card); }
body.dark-mode .main-content .bg-gray-50 { background-color: var(--dark-hover); }
body.dark-mode .main-content .text-gray-900 { color: var(--text-light); }
body.dark-mode .main-content .text-gray-700,
body.dark-mode .main-content .text-gray-600 { color: #d1d5db; }
body.dark-mode .main-content .text-gray-500,
body.dark-mode .main-content .text-gray-400,
body.dark-mode .main-content .text-gray-300 { color: var(--text-muted); }
body.dark-mode .main-content .border-gray-100,
body.dark-mode .main-content .border-gray-200 { border-color: var(--dark-border); }
body.dark-mode .main-content .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: var(--dark-border); }
body.dark-mode .badge-muted { color: var(--text-muted); }

/* ============================================
   TomSelect: ensure dropdown appears above
   all stacking contexts (cards, modals, etc.)
   ============================================ */
.ts-dropdown { z-index: 9999 !important; }

/* ============================================
   UX/UI Senior Premium Unified KPI Cards
   ============================================ */
.grid.mb-8 > .card.card-hover,
.grid.grid-cols-1 > .card.card-hover {
    background-color: #ffffff !important;
    border: 1px solid rgba(28, 30, 77, 0.06) !important;
    border-radius: 1.25rem !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01) !important;
}

/* Unified Card Hover */
.grid.mb-8 > .card.card-hover:hover,
.grid.grid-cols-1 > .card.card-hover:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 20px -3px rgba(28, 30, 77, 0.06), 0 4px 6px -2px rgba(28, 30, 77, 0.03) !important;
    border-color: rgba(28, 30, 77, 0.12) !important;
}

/* Unified Card Text Colors */
.grid.mb-8 > .card.card-hover p,
.grid.grid-cols-1 > .card.card-hover p {
    color: #6b7280 !important; /* Gray muted text label */
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.075em !important;
    text-transform: uppercase !important;
}
.grid.mb-8 > .card.card-hover h4,
.grid.grid-cols-1 > .card.card-hover h4 {
    color: #1c1e4d !important; /* Deep brand Navy */
    font-weight: 800 !important;
}

/* Unified Icon Container style (Using Primary brand Navy tint) */
.grid.mb-8 > .card.card-hover div[class*="bg-"],
.grid.grid-cols-1 > .card.card-hover div[class*="bg-"] {
    background-color: rgba(28, 30, 77, 0.06) !important;
    color: #1c1e4d !important;
}

/* Dark Mode Fine-Tuning */
body.dark-mode .grid.mb-8 > .card.card-hover,
body.dark-mode .grid.grid-cols-1 > .card.card-hover {
    background-color: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
}
body.dark-mode .grid.mb-8 > .card.card-hover h4,
body.dark-mode .grid.grid-cols-1 > .card.card-hover h4 {
    color: var(--text-light) !important;
}
body.dark-mode .grid.mb-8 > .card.card-hover p,
body.dark-mode .grid.grid-cols-1 > .card.card-hover p {
    color: var(--text-muted) !important;
}
body.dark-mode .grid.mb-8 > .card.card-hover div[class*="bg-"],
body.dark-mode .grid.grid-cols-1 > .card.card-hover div[class*="bg-"] {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: var(--secondary-color) !important;
}

/* ============================================
   UX/UI Senior Title Header Banner (Home Style)
   ============================================ */
.module-header-banner {
    background: var(--primary-color) !important; /* Brand Navy #1c1e4d to Slate #313945 */
    border-radius: 0.5rem !important; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; /* shadow-lg */
    padding: 1.5rem 2rem !important; /* p-6 */
    margin-bottom: 1.5rem !important; /* mb-6 */
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #d2d2d2 !important; /* Elegant brand contrast bottom border */
}

.module-header-banner .banner-icon-bg {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    opacity: 0.08 !important;
    transform: translate(25%, -25%) !important;
    font-size: 8rem !important;
    color: #ffffff !important;
    pointer-events: none;
    line-height: 1 !important;
}

.module-header-banner h2 {
    color: #ffffff !important;
    font-size: 1.875rem !important; /* text-3xl */
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.25 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.module-header-banner p {
    color: #d2d2d2 !important; /* Premium Silver contrast color */
    font-size: 1.125rem !important; /* text-lg */
    margin: 0 !important;
}

.module-header-banner a:not([class*="btn"]) {
    color: #d2d2d2 !important;
    text-decoration: underline;
    transition: color 0.2s ease;
}
.module-header-banner a:not([class*="btn"]):hover {
    color: #ffffff !important;
}

/* ========================================================
   Action Buttons inside Header Banner (Light & Dark Modes)
   ======================================================== */
.module-header-banner .btn-secondary,
.module-header-banner a.btn-secondary,
.module-header-banner button.btn-secondary {
    background-color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #1c1e4d !important; /* Deep navy text for crisp contrast */
    font-weight: 700 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.module-header-banner .btn-secondary:hover,
.module-header-banner a.btn-secondary:hover,
.module-header-banner button.btn-secondary:hover {
    background-color: #f8fafc !important;
    color: #121435 !important; /* Stays dark and crisp on hover */
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

.module-header-banner .btn-secondary:active,
.module-header-banner a.btn-secondary:active,
.module-header-banner button.btn-secondary:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Icons inside secondary button in header banner */
.module-header-banner .btn-secondary i,
.module-header-banner a.btn-secondary i,
.module-header-banner button.btn-secondary i {
    color: #2563eb !important; /* Vibrant MOPT Blue icon */
    font-size: 0.875rem !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

.module-header-banner .btn-secondary:hover i,
.module-header-banner a.btn-secondary:hover i,
.module-header-banner button.btn-secondary:hover i {
    transform: scale(1.1) !important;
    color: #1d4ed8 !important;
}

/* Dark Mode Banner Buttons */
body.dark-mode .module-header-banner .btn-secondary,
body.dark-mode .module-header-banner a.btn-secondary,
body.dark-mode .module-header-banner button.btn-secondary {
    background-color: #1e293b !important;
    border: 1px solid #475569 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .module-header-banner .btn-secondary:hover,
body.dark-mode .module-header-banner a.btn-secondary:hover,
body.dark-mode .module-header-banner button.btn-secondary:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
    border-color: #64748b !important;
}

body.dark-mode .module-header-banner .btn-secondary i,
body.dark-mode .module-header-banner a.btn-secondary i,
body.dark-mode .module-header-banner button.btn-secondary i {
    color: #60a5fa !important;
}

/* Primary / Success buttons in Banner */
.module-header-banner .btn-success,
.module-header-banner a.btn-success,
.module-header-banner button.btn-success,
.module-header-banner .btn-primary,
.module-header-banner a.btn-primary,
.module-header-banner button.btn-primary {
    color: #ffffff !important;
}
.module-header-banner .btn-success i,
.module-header-banner a.btn-success i,
.module-header-banner button.btn-success i,
.module-header-banner .btn-primary i,
.module-header-banner a.btn-primary i,
.module-header-banner button.btn-primary i {
    color: #ffffff !important;
}

/* Dark mode banner styling */
body.dark-mode .module-header-banner {
    background: #1f2937 !important; /* Elegant dark-mode gradient */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 3px solid var(--secondary-color) !important;
}

/* ========================================================
   Elite Dark Mode UI Adjustments for Cards & KPIs
   ======================================================== */

/* 1. Report Selection Cards (btn-rep-select) in Dark Mode */
body.dark-mode .btn-rep-select {
    background-color: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
    color: var(--text-light) !important;
}

body.dark-mode .btn-rep-select:hover {
    background-color: var(--dark-hover) !important;
    border-color: var(--secondary-color) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

body.dark-mode .btn-rep-select.active {
    background-color: rgba(99, 102, 241, 0.15) !important; /* Soft glowing indigo/blue bg */
    border-color: #6366f1 !important;
    color: #a5b4fc !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2) !important;
}

/* 2. Generic Card Standardizations in Dark Mode */
body.dark-mode .card {
    background-color: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
    color: var(--text-light) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .card-hover:hover {
    background-color: var(--dark-hover) !important;
    border-color: var(--secondary-color) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4) !important;
}

/* 3. KPI Shapes & Pastels Backgrounds Mitigation in Dark Mode */
body.dark-mode .bg-indigo-50 {
    background-color: rgba(99, 102, 241, 0.12) !important;
    color: #a5b4fc !important;
}
body.dark-mode .text-indigo-600 {
    color: #a5b4fc !important;
}

body.dark-mode .bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #93c5fd !important;
}
body.dark-mode .text-blue-600 {
    color: #93c5fd !important;
}

body.dark-mode .bg-yellow-50 {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #fde047 !important;
}
body.dark-mode .text-yellow-600 {
    color: #fde047 !important;
}

body.dark-mode .bg-green-50 {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #6ee7b7 !important;
}
body.dark-mode .text-green-600 {
    color: #6ee7b7 !important;
}

body.dark-mode .bg-red-50 {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
}
body.dark-mode .text-red-600 {
    color: #fca5a5 !important;
}

/* Delete Button inline (estilo Rare UI): bote -> desliza check/cross, sin modal */
.delete-confirm-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    color: #dc2626 !important;
    transition: background-color .2s ease, border-color .2s ease;
}
.delete-confirm-btn .dcb-icon-cross,
.delete-confirm-btn .dcb-icon-check {
    display: none;
}
.delete-confirm-btn.dcb-armed {
    gap: .6rem;
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
}
body.dark-mode .delete-confirm-btn.dcb-armed {
    background-color: rgba(220, 38, 38, 0.12) !important;
    border-color: rgba(220, 38, 38, 0.35) !important;
}
.delete-confirm-btn.dcb-armed .dcb-icon-trash { display: none; }
.delete-confirm-btn.dcb-armed .dcb-icon-cross,
.delete-confirm-btn.dcb-armed .dcb-icon-check { display: inline-flex; }
.delete-confirm-btn .dcb-icon-cross { color: #6b7280; }
.delete-confirm-btn .dcb-icon-check { color: #16a34a; }
.delete-confirm-btn.dcb-loading .dcb-icon-check i { animation: dcb-spin .6s linear infinite; }
.delete-confirm-btn.dcb-done { background-color: #f0fdf4 !important; border-color: #bbf7d0 !important; }
@keyframes dcb-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Lucide Icons (outline SVG, estilo Wigggle UI) - escala con font-size como Font Awesome */
.lucide-icon {
    width: 1em;
    height: 1em;
    stroke-width: 2;
    vertical-align: -0.125em;
    display: inline-block;
    flex-shrink: 0;
}

