@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ══════════════════════════════════════════════════════════════════
   GLOBAL UNIFIED DESIGN SYSTEM — PHOTOGRAPHER SAAS PLATFORM
   Aesthetic: Clean, Subtle, Human-Crafted Modern SaaS (Stripe / Linear Inspired)
   Palette: Crisp White (var(--theme-bg-card)), Warm Slate Canvas (var(--theme-bg-body)), Deep Charcoal (var(--theme-text-title)), Refined Indigo (#2563eb)
   Font Family: Poppins, -apple-system, sans-serif
   ══════════════════════════════════════════════════════════════════ */

:root {
    --theme-font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Refined Primary Accents */
    --theme-primary: #2563eb;
    --theme-primary-hover: #1d4ed8;
    --theme-primary-dark: #1e40af;
    --theme-primary-deep: #1e3a8a;
    --theme-primary-subtle: #eff6ff;
    --theme-primary-border: #bfdbfe;
    
    /* Clean Solid Bases (No Loud Gradients) */
    --theme-gradient-primary: #2563eb;
    --theme-gradient-hero: var(--theme-bg-card);
    --theme-gradient-subtle: var(--theme-bg-body);

    /* Crisp Neutral Canvas */
    --theme-bg-body: #f8fafc;
    --theme-bg-card: #ffffff;
    --theme-bg-subtle: #f8fafc;
    
    /* Delicate Borders */
    --theme-border-card: #e2e8f0;
    --theme-border-light: #f1f5f9;
    --theme-border-input: #cbd5e1;
    
    /* High-Contrast Readable Typography */
    --theme-text-title: #0f172a;
    --theme-text-body: #334155;
    --theme-text-muted: #64748b;
    --theme-text-subtle: #94a3b8;
    
    /* Refined Human Proportions */
    --theme-radius-xs: 4px;
    --theme-radius-sm: 6px;
    --theme-radius-md: 8px;
    --theme-radius-lg: 12px;
    --theme-radius-xl: 16px;
    
    /* Soft Natural Elevation */
    --theme-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --theme-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --theme-shadow-dropdown: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --theme-shadow-modal: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

/* ── Global Typography & Font Family ─────────────────────────── */
html, body {
    font-family: var(--theme-font-family);
    background-color: var(--theme-bg-body);
    color: var(--theme-text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, input, optgroup, select, textarea, .btn, .form-control, .form-select {
    font-family: inherit;
}

h1, h2, h3, h4, h5, h6, p, label, table, th, td, .badge, .nav-link, .breadcrumb-item {
    font-family: var(--theme-font-family);
}

/* ── Crucial: Protect Icon Fonts & Pseudo-element Icons from Font Overrides ── */
[class^="ri-"], [class*=" ri-"], 
.iconify, iconify-icon, [class^="fa-"], [class*=" fa-"] {
    font-family: inherit !important;
}

/* ── Global Primary Color Overrides ────────────────────────────── */
.text-primary, .text-primary-light {
    color: var(--theme-primary) !important;
}
.bg-primary {
    background-color: var(--theme-primary) !important;
}
.bg-primary-subtle {
    background-color: var(--theme-primary-subtle) !important;
}
.border-primary {
    border-color: var(--theme-primary) !important;
}
[class^="ri-"]::before, [class*=" ri-"]::before,
[class^="ri-"]::after, [class*=" ri-"]::after,
i[class*="ri-"], i[class*="ri-"]::before, i[class*="ri-"]::after,
.remixicon, .remixicon::before, .remixicon::after,
.sidebar-menu li.dropdown > a::after,
[data-theme-toggle]::after,
.form-check.style-check .form-check-input::after,
.accordion .accordion-button::after,
.toggle-icon::before,
.toggle-icon::after {
    font-family: "remixicon" !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[class^="fa-"], [class*=" fa-"], .fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands,
[class^="fa-"]::before, [class*=" fa-"]::before, [class^="fa-"]::after, [class*=" fa-"]::after,
.fa::before, .fas::before, .far::before, .fab::before, .fa-solid::before, .fa-regular::before, .fa-brands::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", sans-serif;
}

.dashboard-main-body {
    padding: 20px 24px 36px !important;
    min-height: calc(100vh - 120px);
}

/* ── Inline Iconify Alignment Across ALL Pages ─────────────────── */
iconify-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.btn iconify-icon, 
.badge iconify-icon, 
.nav-link iconify-icon, 
h1 iconify-icon, 
h2 iconify-icon, 
h3 iconify-icon, 
h4 iconify-icon, 
h5 iconify-icon, 
h6 iconify-icon, 
th iconify-icon, 
td iconify-icon, 
label iconify-icon {
    vertical-align: -0.12em;
}

/* ══════════════════════════════════════════════════════════════════
   REFINED HUMAN-CRAFTED PAGE HEADERS (NO LOUD GRADIENTS)
   ══════════════════════════════════════════════════════════════════ */
.hero-banner, .team-hero, .proj-hero, .hd-hero {
    background: var(--theme-bg-card) !important;
    border: 1px solid var(--theme-border-card) !important;
    border-radius: var(--theme-radius-lg) !important;
    padding: 16px 24px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    position: relative !important;
    box-shadow: var(--theme-shadow-card) !important;
}

.hero-banner .hero-copy, .team-hero .hero-copy, .proj-hero .hero-copy, .hd-hero .hero-copy {
    flex: 1 1 auto !important;
    margin: 0 !important;
}

.hero-banner h2, .team-hero h2, .proj-hero h2, .hd-hero h2,
.hero-banner h4, .team-hero h4, .proj-hero h4, .hd-hero h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 2px !important;
    color: var(--theme-text-title) !important;
    letter-spacing: -0.01em !important;
}

.hero-banner p, .team-hero p, .proj-hero p, .hd-hero p {
    font-size: 13px !important;
    margin: 0 !important;
    color: var(--theme-text-muted) !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

.hero-banner p br, .team-hero p br, .proj-hero p br {
    display: none !important;
}

.hero-icon-box {
    width: 44px !important;
    height: 44px !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    color: #2563eb !important;
    flex-shrink: 0 !important;
}

.hero-stats {
    margin-left: auto !important;
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.hero-stat {
    background: var(--theme-bg-body) !important;
    border: 1px solid var(--theme-border-card) !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    color: var(--theme-text-title) !important;
    text-align: left !important;
    min-width: 100px;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: var(--theme-shadow-sm) !important;
    transition: all 0.15s ease !important;
}

.hero-stat:hover {
    border-color: var(--theme-border-input) !important;
    background: var(--theme-bg-card) !important;
}

.hero-stat-icon {
    font-size: 20px !important;
    color: #2563eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.hero-stat-info {
    display: flex !important;
    flex-direction: column !important;
}

.hero-stat .stat-val, .hero-stat-num {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--theme-text-title) !important;
    line-height: 1.2 !important;
}

.hero-stat .stat-lbl, .hero-stat-label {
    font-size: 11px !important;
    color: var(--theme-text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    font-weight: 600 !important;
    margin-top: 1px !important;
}

/* ══════════════════════════════════════════════════════════════════
   UNIFIED CARDS & TABLE CONTAINERS
   ══════════════════════════════════════════════════════════════════ */
.card, .theme-table-card, .proj-card, .inv-card {
    background: var(--theme-bg-card) !important;
    border-radius: var(--theme-radius-lg) !important;
    border: 1px solid var(--theme-border-card) !important;
    box-shadow: var(--theme-shadow-card) !important;
    overflow: hidden !important;
}

.card-header, .proj-card-head {
    background: var(--theme-bg-card) !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--theme-border-light) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.card-header h5, .card-header h6, .proj-card-head h5 {
    font-weight: 600 !important;
    font-size: 15.5px !important;
    color: var(--theme-text-title) !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    letter-spacing: -0.01em !important;
}

/* ── Clean Toolbar (Search, Filter, Showing text, Add Button) ── */
.table-toolbar, .proj-controls, .inv-toolbar, .hd-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    background: var(--theme-bg-card) !important;
    border-bottom: 1px solid var(--theme-border-card) !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.theme-search-box, .proj-search input, .navbar-search input, .inv-search-input {
    height: 38px !important;
    border-radius: var(--theme-radius-md) !important;
    border: 1px solid var(--theme-border-input) !important;
    background: var(--theme-bg-card) !important;
    padding: 6px 12px 6px 36px !important;
    font-size: 13.5px !important;
    color: var(--theme-text-title) !important;
    transition: all 0.15s ease !important;
    outline: none !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

.theme-search-box:focus, .proj-search input:focus, .navbar-search input:focus, .inv-search-input:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    background: var(--theme-bg-card) !important;
}

.theme-filter-select, .proj-length select, select.form-select-sm, .inv-filter-select {
    height: 38px !important;
    border-radius: var(--theme-radius-md) !important;
    border: 1px solid var(--theme-border-input) !important;
    background-color: var(--theme-bg-card) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--theme-text-body) !important;
    padding: 6px 30px 6px 12px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    appearance: none !important;
    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='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 11px 11px !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

.theme-filter-select:focus, select.form-select-sm:focus, .inv-filter-select:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none !important;
}

/* ── Primary Action Button (Refined Human Proportions) ─────────── */
.btn-primary, .btn-add-proj, .btn-theme-primary, .inv-btn-primary, .btn-save, .btn-update {
    background: var(--theme-primary) !important;
    border: 1px solid var(--theme-primary) !important;
    color: var(--theme-bg-card) !important;
    border-radius: var(--theme-radius-md) !important;
    padding: 8px 16px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: var(--theme-shadow-sm) !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.btn-primary:hover, .btn-add-proj:hover, .btn-theme-primary:hover, .inv-btn-primary:hover, .btn-save:hover, .btn-update:hover {
    background: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
    color: var(--theme-bg-card) !important;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08) !important;
    transform: none !important;
}

.btn-primary:active, .btn-add-proj:active, .btn-save:active, .btn-update:active {
    background: var(--theme-primary-dark) !important;
}

.btn-cancel {
    background: var(--theme-bg-card) !important;
    border: 1px solid var(--theme-border-input) !important;
    color: var(--theme-text-body) !important;
    border-radius: var(--theme-radius-md) !important;
    padding: 8px 16px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

.btn-cancel:hover {
    background: var(--theme-bg-body) !important;
    color: var(--theme-text-title) !important;
    border-color: var(--theme-text-subtle) !important;
}

/* ══════════════════════════════════════════════════════════════════
   HIGH-LEGIBILITY CLEAN TABLE UI
   ══════════════════════════════════════════════════════════════════ */
.theme-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: var(--theme-bg-card) !important;
}

table.table, table.theme-table, table.dataTable, table.inv-table {
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

table.table thead th, table.theme-table thead th, table.dataTable thead th, table.inv-table thead th {
    background-color: var(--theme-bg-body) !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 12px 18px !important;
    border-top: none !important;
    border-bottom: 1px solid var(--theme-border-card) !important;
    vertical-align: middle !important;
    text-align: left !important;
    white-space: nowrap !important;
}

/* Serial Number Column (#) - Strict Compact Width across all tables */
table.table thead th:first-child,
table.theme-table thead th:first-child,
table.dataTable thead th:first-child,
table.inv-table thead th:first-child,
table.table tbody td:first-child,
table.theme-table tbody td:first-child,
table.dataTable tbody td:first-child,
table.inv-table tbody td:first-child,
th.th-sr, td.td-sr, .col-sr, .th-serial, .td-serial {
    width: 60px !important;
    min-width: 50px !important;
    max-width: 70px !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    white-space: nowrap !important;
}

/* Action Column (Last column) - Compact & Pinned Right */
table.table thead th:last-child,
table.theme-table thead th:last-child,
table.dataTable thead th:last-child,
table.inv-table thead th:last-child,
table.table tbody td:last-child,
table.theme-table tbody td:last-child,
table.dataTable tbody td:last-child,
table.inv-table tbody td:last-child,
th.th-action, td.td-action, .col-actions {
    width: 110px !important;
    min-width: 90px !important;
    max-width: 140px !important;
    text-align: right !important;
    white-space: nowrap !important;
    padding-right: 20px !important;
}

.action-group, td:last-child .action-group {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: 100% !important;
}

table.table tbody td, table.theme-table tbody td, table.dataTable tbody td, table.inv-table tbody td {
    padding: 16px 18px !important;
    font-size: 13.5px !important;
    color: var(--theme-text-body) !important;
    font-weight: 400 !important;
    border-bottom: 1px solid var(--theme-border-light) !important;
    vertical-align: top !important;
    background-color: var(--theme-bg-card);
    transition: background-color 0.15s ease;
}

table.table tbody tr:hover td, table.theme-table tbody tr:hover td, table.dataTable tbody tr:hover td, table.inv-table tbody tr:hover td {
    background-color: var(--theme-bg-body) !important;
}

/* Project Table Title & Description */
.proj-title-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    cursor: pointer !important;
}

.proj-title {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: var(--theme-text-title) !important;
}
.proj-title-row:hover .proj-title {
    color: var(--theme-primary) !important;
}

.proj-desc {
    font-weight: 400 !important;
    font-size: 12.5px !important;
    color: var(--theme-text-muted) !important;
    max-width: 300px;
    white-space: normal;
}

/* ══════════════════════════════════════════════════════════════════
   SOPHISTICATED MINIMALIST STATUS BADGES
   ══════════════════════════════════════════════════════════════════ */
.badge-status-active, .badge-status-paid, .badge-status-completed, .badge-status-done, .badge-active,
.bg-success-focus, .bg-success-subtle, .cat-badge {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    border-radius: 9999px !important;
    font-weight: 500 !important;
    font-size: 11.5px !important;
    padding: 3px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.badge-status-pending, .badge-status-progress, .badge-status-review,
.bg-warning-focus, .bg-warning-subtle {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    border-radius: 9999px !important;
    font-weight: 500 !important;
    font-size: 11.5px !important;
    padding: 3px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.badge-status-sent, .badge-status-upcoming, .city-badge,
.bg-info-focus, .bg-info-subtle {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 9999px !important;
    font-weight: 500 !important;
    font-size: 11.5px !important;
    padding: 3px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.badge-status-danger, .badge-status-cancelled, .badge-status-overdue,
.bg-danger-focus, .bg-danger-subtle {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    border-radius: 9999px !important;
    font-weight: 500 !important;
    font-size: 11.5px !important;
    padding: 3px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* ══════════════════════════════════════════════════════════════════
   STANDARDIZED HIGH-VISIBILITY ACTION BUTTONS ACROSS THE ENTIRE WEBSITE
   ══════════════════════════════════════════════════════════════════ */
.action-group, .act-btn-group, .d-flex.align-items-center.gap-2 {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.act-btn, .btn-action, .btn-edit-row, .btn-del-row, .btn-view-row, .action-btn-circle {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--theme-radius-sm) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    border: 1px solid var(--theme-border-card) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    background: var(--theme-bg-card) !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

.act-btn iconify-icon, .btn-action iconify-icon, .btn-edit-row iconify-icon, .btn-del-row iconify-icon, .btn-view-row iconify-icon {
    font-size: 17px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.act-btn:hover, .btn-action:hover, .btn-edit-row:hover, .btn-del-row:hover, .btn-view-row:hover, .action-btn-circle:hover {
    transform: none !important;
}

/* View button: Clean Sky/Blue (High Visibility) */
.act-btn.act-view, .btn-view-row, .act-view, a.act-view, button.act-view {
    color: #2563eb !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}
.act-btn.act-view:hover, .btn-view-row:hover, .act-view:hover {
    background: #2563eb !important;
    color: var(--theme-bg-card) !important;
    border-color: #2563eb !important;
}

/* Edit button: Clean Indigo (High Visibility) */
.act-btn.act-edit, .btn-edit-row, .act-edit, .action-btn-edit, a.act-edit, button.act-edit {
    color: #4f46e5 !important;
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
}
.act-btn.act-edit:hover, .btn-edit-row:hover, .act-edit:hover, .action-btn-edit:hover {
    background: #4f46e5 !important;
    color: var(--theme-bg-card) !important;
    border-color: #4f46e5 !important;
}

/* Delete button: Clean Rose/Crimson (High Visibility) */
.act-btn.act-delete, .btn-del-row, .act-delete, .remove-item-btn, .action-btn-del, a.act-delete, button.act-delete {
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}
.act-btn.act-delete:hover, .btn-del-row:hover, .act-delete:hover, .remove-item-btn:hover, .action-btn-del:hover {
    background: #dc2626 !important;
    color: var(--theme-bg-card) !important;
    border-color: #dc2626 !important;
}

/* Download / Print button: Clean Emerald (High Visibility) */
.act-btn.act-download, .act-download, a.act-download, button.act-download {
    color: #059669 !important;
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
}
.act-btn.act-download:hover, .act-download:hover {
    background: #059669 !important;
    color: var(--theme-bg-card) !important;
    border-color: #059669 !important;
}

/* ══════════════════════════════════════════════════════════════════
   STANDARDIZED FORMS & INPUTS (100% WIDTH, CRISP ALIGNMENT & ICONS)
   ══════════════════════════════════════════════════════════════════ */
.form-control, .form-select, .form-input, .form-select-custom,
input.form-input, select.form-select-custom,
.modal input[type="text"], .modal input[type="email"], .modal input[type="password"],
.modal input[type="number"], .modal input[type="date"], .modal input[type="time"],
.modal select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: 42px !important;
    border-radius: var(--theme-radius-md) !important;
    border: 1px solid var(--theme-border-input) !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    color: var(--theme-text-title) !important;
    background-color: var(--theme-bg-card) !important;
    padding: 8px 14px !important;
    transition: all 0.15s ease !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

textarea.form-control, textarea.form-textarea, textarea.form-input, .modal textarea {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 90px !important;
    border-radius: var(--theme-radius-md) !important;
    border: 1px solid var(--theme-border-input) !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    color: var(--theme-text-title) !important;
    background-color: var(--theme-bg-card) !important;
    padding: 10px 14px !important;
    resize: vertical !important;
    transition: all 0.15s ease !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

.form-select, .form-select-custom, select.form-select-custom, .modal select {
    appearance: none !important;
    background-color: #fff !important;
    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='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px 12px !important;
    padding-right: 36px !important;
    cursor: pointer !important;
}

select[multiple].form-select, .modal select[multiple]:not(.select2-hidden-accessible) {
    appearance: auto !important;
    background-image: none !important;
    padding-right: 16px !important;
    height: auto !important;
    min-height: 90px !important;
}

/* Ensure Select2 hidden original elements are strictly hidden and not overridden by modal styles */
.modal select.select2-hidden-accessible, select.select2-hidden-accessible {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    position: absolute !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
}

.form-control:focus, .form-select:focus, .form-input:focus, .form-textarea:focus, .form-select-custom:focus,
.modal input:focus, .modal select:focus, .modal textarea:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
    outline: none !important;
    background-color: var(--theme-bg-card) !important;
}

.form-label, .form-label-custom {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: var(--theme-text-title) !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.form-label .req-star, .form-label-custom .req-star {
    color: #ef4444 !important;
    font-weight: 700;
}

/* Universal Inputs & Selects with Left Icons */
.field-wrap, .input-icon-wrap {
    position: relative !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    display: block !important;
}

.table-toolbar .field-wrap {
    margin-bottom: 0 !important;
    width: auto !important;
    display: inline-block !important;
}

.field-wrap .field-icon, .input-icon-wrap .field-icon {
    position: absolute !important;
    left: 13px !important;
    top: 21px !important; /* Center of 42px input */
    transform: translateY(-50%) !important;
    color: var(--theme-text-muted) !important;
    font-size: 18px !important;
    pointer-events: none !important;
    transition: color 0.15s ease !important;
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.field-wrap .field-icon-top {
    position: absolute !important;
    left: 13px !important;
    top: 12px !important;
    transform: none !important;
    color: var(--theme-text-muted) !important;
    font-size: 18px !important;
    pointer-events: none !important;
    transition: color 0.15s ease !important;
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.field-wrap:focus-within .field-icon,
.field-wrap:focus-within .field-icon-top,
.input-icon-wrap:focus-within .field-icon {
    color: var(--theme-primary) !important;
}

.field-wrap .form-input,
.field-wrap input.form-control,
.field-wrap select.form-select,
.field-wrap .form-select-custom,
.input-icon-wrap input,
.input-icon-wrap select,
.modal .field-wrap .form-input,
.modal .field-wrap input,
.modal .field-wrap select {
    padding-left: 40px !important;
}

.field-wrap textarea,
.field-wrap .form-textarea,
.modal .field-wrap textarea,
.modal .field-wrap .form-textarea {
    padding-left: 40px !important;
    padding-top: 11px !important;
}

/* ══════════════════════════════════════════════════════════════════
   STANDARDIZED MODALS (CRISP HIGH-CONTRAST WHITE SAAS DIALOGUES)
   ══════════════════════════════════════════════════════════════════ */
.modal {
    --bs-modal-border-radius: var(--theme-radius-lg);
}

.modal-dialog {
    margin: 1.75rem auto;
}

.modal-content, [id*="Modal"] .modal-content {
    border-radius: var(--theme-radius-lg) !important;
    border: 1px solid var(--theme-border-card) !important;
    box-shadow: var(--theme-shadow-modal) !important;
    overflow: hidden !important;
    background: var(--theme-bg-card) !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100vh - 3.5rem) !important;
}

.modal-header, .modal-header-custom, [id*="Modal"] .modal-header, [id*="Modal"] .modal-header-custom {
    background: linear-gradient(120deg, #eff6ff 0%, var(--theme-bg-card) 100%) !important;
    color: var(--theme-text-title) !important;
    padding: 18px 24px !important;
    border-bottom: 1px solid var(--theme-border-card) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    flex-shrink: 0 !important;
    z-index: 10;
}

.modal-header::after, .modal-header-custom::after, [id*="Modal"] .modal-header::after, [id*="Modal"] .modal-header-custom::after {
    display: none !important;
}

/* High contrast for all modal titles regardless of legacy text-white class */
.modal-header .modal-title, 
.modal-header h5, 
.modal-header h6, 
.modal-title-text,
.modal-header .text-white,
[id*="Modal"] .modal-title,
[id*="Modal"] .modal-title-text,
[id*="Modal"] h5,
[id*="Modal"] h6,
[id*="Modal"] .modal-header-custom h5,
[id*="Modal"] .modal-header-custom h6 {
    color: var(--theme-text-title) !important;
    font-weight: 600 !important;
    font-size: 16.5px !important;
    letter-spacing: -0.01em;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.modal-header small, 
.modal-header .modal-subtitle, 
.modal-subtitle-text,
[id*="Modal"] .modal-subtitle,
[id*="Modal"] .modal-subtitle-text,
[id*="Modal"] small.modal-subtitle-text,
[id*="Modal"] .modal-header small {
    font-size: 12.5px !important;
    color: var(--theme-text-muted) !important;
    display: block !important;
    margin-top: 2px !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

.modal-icon-box, [id*="Modal"] .modal-icon-box {
    width: 38px !important;
    height: 38px !important;
    background: var(--theme-bg-card) !important;
    border-radius: var(--theme-radius-md) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 19px !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1) !important;
    flex-shrink: 0 !important;
    backdrop-filter: none !important;
}

.modal-icon-box iconify-icon, [id*="Modal"] .modal-icon-box iconify-icon {
    color: #2563eb !important;
}

.modal-header .btn-close, .modal-header-custom .btn-close, [id*="Modal"] .btn-close, .btn-close-white {
    filter: none !important;
    opacity: 0.65 !important;
    transition: all 0.15s ease !important;
    border: 0 !important;
    width: 0.9em !important;
    height: 0.9em !important;
    padding: .25em !important;
    cursor: pointer !important;
    z-index: 5 !important;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23334155'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
}

.modal-header .btn-close:hover, .modal-header-custom .btn-close:hover, [id*="Modal"] .btn-close:hover, .btn-close-white:hover {
    opacity: 1 !important;
    transform: none !important;
}

/* Modal Body with Fixed Max-Height & Clean Scrollbar */
.modal-body {
    padding: 20px 22px !important;
    background-color: var(--theme-bg-card) !important;
    max-height: calc(85vh - 130px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 1 auto !important;
}

/* Custom Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
    width: 5px !important;
}
.modal-body::-webkit-scrollbar-track {
    background: var(--theme-bg-body) !important;
    border-radius: 4px !important;
}
.modal-body::-webkit-scrollbar-thumb {
    background: var(--theme-border-input) !important;
    border-radius: 4px !important;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-subtle) !important;
}

/* Section Dividers inside Modals */
.modal-section-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e40af !important;
    background: #eff6ff !important;
    padding: 5px 12px !important;
    border-radius: var(--theme-radius-sm) !important;
    margin-bottom: 14px !important;
    border: 1px solid #dbeafe !important;
}

.modal-section-badge iconify-icon {
    font-size: 16px !important;
    color: #2563eb !important;
}

/* Standardized Buttons inside Modals & Forms */
.btn-save, .btn-custom-primary {
    background: #2563eb !important;
    border: 1px solid #2563eb !important;
    color: var(--theme-bg-card) !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    padding: 8px 18px !important;
    border-radius: var(--theme-radius-md) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: var(--theme-shadow-sm) !important;
}
.btn-save:hover, .btn-custom-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: var(--theme-bg-card) !important;
}

.btn-cancel, .btn-custom-secondary {
    background: var(--theme-bg-card) !important;
    border: 1px solid var(--theme-border-input) !important;
    color: var(--theme-text-body) !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    padding: 8px 18px !important;
    border-radius: var(--theme-radius-md) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: var(--theme-shadow-sm) !important;
}
.btn-cancel:hover, .btn-custom-secondary:hover {
    background: var(--theme-bg-body) !important;
    border-color: var(--theme-text-subtle) !important;
    color: var(--theme-text-title) !important;
}

/* Modal Footer */
.modal-footer, .modal-footer-custom {
    padding: 12px 22px !important;
    background-color: var(--theme-bg-body) !important;
    border-top: 1px solid var(--theme-border-card) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    z-index: 10;
}

/* ══════════════════════════════════════════════════════════════════
   STANDARDIZED PAGINATION / FOOTERS
   ══════════════════════════════════════════════════════════════════ */
.table-footer, .team-footer, .proj-footer, .inv-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    border-top: 1px solid var(--theme-border-card) !important;
    font-size: 13px !important;
    color: var(--theme-text-muted) !important;
    background: var(--theme-bg-card) !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.pg-wrap, .pagination {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
}

.pg-btn, .page-link {
    min-width: 32px !important;
    height: 32px !important;
    border-radius: var(--theme-radius-sm) !important;
    border: 1px solid var(--theme-border-card) !important;
    background: var(--theme-bg-card) !important;
    color: var(--theme-text-body) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
}

.pg-btn:hover, .page-link:hover {
    background: var(--theme-bg-body) !important;
    color: var(--theme-text-title) !important;
    border-color: var(--theme-border-input) !important;
}

.pg-btn.pg-active, .page-item.active .page-link {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-bg-card) !important;
    box-shadow: none !important;
}

/* ══════════════════════════════════════════════════════════════════
   REFINED SWEETALERT2 STYLING
   ══════════════════════════════════════════════════════════════════ */
.swal2-popup {
    border-radius: var(--theme-radius-lg) !important;
    padding: 24px 20px !important;
    font-family: var(--theme-font-family) !important;
    box-shadow: var(--theme-shadow-modal) !important;
    border: 1px solid var(--theme-border-card) !important;
    background: var(--theme-bg-card) !important;
}

.swal2-backdrop-show {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(2px) !important;
}

body.swal2-toast-shown .swal2-backdrop-show {
    backdrop-filter: none !important;
    background: transparent !important;
}

.swal2-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--theme-text-title) !important;
    margin-top: 12px !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
}

.swal2-html-container {
    font-size: 13.5px !important;
    color: var(--theme-text-muted) !important;
    line-height: 1.5 !important;
    margin-top: 4px !important;
}

.swal2-icon {
    margin: 8px auto 0 !important;
    border-width: 2.5px !important;
    transform: scale(0.85);
}

.swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
}
.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10b981 !important;
}
.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.25) !important;
}

.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}
.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ef4444 !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-icon.swal2-question {
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

.swal2-actions {
    gap: 10px !important;
    margin-top: 18px !important;
    width: 100% !important;
    justify-content: center !important;
}

.swal2-confirm {
    background: var(--theme-primary) !important;
    border-radius: var(--theme-radius-md) !important;
    padding: 8px 18px !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    box-shadow: var(--theme-shadow-sm) !important;
    border: none !important;
    transition: all 0.15s ease !important;
}

.swal2-confirm:hover {
    background: var(--theme-primary-hover) !important;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.swal2-deny {
    background: #3b82f6 !important;
    border-radius: var(--theme-radius-md) !important;
    padding: 8px 18px !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    border: none !important;
    transition: all 0.15s ease !important;
}

.swal2-deny:hover {
    background: #2563eb !important;
}

.swal2-cancel {
    background: var(--theme-bg-card) !important;
    color: var(--theme-text-body) !important;
    border-radius: var(--theme-radius-md) !important;
    padding: 8px 18px !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    border: 1px solid var(--theme-border-input) !important;
    transition: all 0.15s ease !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

.swal2-cancel:hover {
    background: var(--theme-bg-body) !important;
    color: var(--theme-text-title) !important;
    border-color: var(--theme-text-subtle) !important;
}

.swal2-input, .swal2-textarea {
    border-radius: var(--theme-radius-md) !important;
    border: 1px solid var(--theme-border-input) !important;
    font-size: 13.5px !important;
    padding: 8px 12px !important;
    box-shadow: var(--theme-shadow-sm) !important;
    font-family: inherit !important;
}
.swal2-input:focus, .swal2-textarea:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* Toast SweetAlert */
.swal2-toast, .swal2-toast-unified {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
    padding: 10px 16px !important;
    background: var(--theme-bg-card) !important;
    border: 1px solid var(--theme-border-card) !important;
}

.swal2-toast .swal2-title, .swal2-toast-unified .swal2-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: var(--theme-text-title) !important;
    margin: 0 !important;
}
.swal2-toast .swal2-icon, .swal2-toast-unified .swal2-icon {
    margin: 0 10px 0 0 !important;
    transform: scale(0.8);
}

/* ════════════════════════════════════════════════════════
   UNIFIED STATUS TOGGLE SWITCH
   ════════════════════════════════════════════════════════ */
.theme-switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--theme-border-input);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-switch .slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--theme-bg-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-switch input:checked + .slider {
    background: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.theme-switch input:checked + .slider::before {
    transform: translateX(20px);
}

.theme-switch input:focus-visible + .slider {
    outline: 2px solid #487FFF;
    outline-offset: 2px;
}

.theme-switch.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.switch-status-label {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.switch-status-label.status-active {
    color: #065f46;
    background: #d1fae5;
}

.switch-status-label.status-inactive {
    color: #475569;
    background: var(--theme-border-light);
}

/* ════════════════════════════════════════════════════════
   MODAL / FORM STATUS TOGGLE CARD
   ════════════════════════════════════════════════════════ */
.status-toggle-card {
    background: var(--theme-bg-body);
    border: 1.5px solid var(--theme-border-card);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.25s ease;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-toggle-card:hover {
    border-color: var(--theme-border-input);
    background: var(--theme-bg-card);
}

.status-toggle-card.active-state {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.status-toggle-card .status-state-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
    line-height: 1.2;
}

.status-toggle-card.active-state .status-state-title {
    color: #065f46;
}

.status-toggle-card .status-state-desc {
    font-size: 12px;
    color: var(--theme-text-muted);
    line-height: 1.3;
}

.status-toggle-card.active-state .status-state-desc {
    color: #047857;
}

/* ══════════════════════════════════════════════════════════════════
   HIGH-END FULLCALENDAR UNIFIED DESIGN SYSTEM
   ══════════════════════════════════════════════════════════════════ */
#calendar {
    font-family: var(--theme-font-family) !important;
}

#calendar .fc-header-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 22px !important;
    padding: 0 !important;
}

#calendar .fc-toolbar-chunk {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#calendar .fc-toolbar-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--theme-text-title) !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -0.01em !important;
}

/* Nav & Today Buttons */
#calendar .fc-button {
    height: 36px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 1px solid var(--theme-border-card) !important;
    background: var(--theme-bg-card) !important;
    color: var(--theme-text-body) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.15s ease !important;
    text-transform: capitalize !important;
}

#calendar .fc-button:hover {
    background: var(--theme-bg-body) !important;
    color: var(--theme-text-title) !important;
    border-color: var(--theme-border-input) !important;
}

#calendar .fc-button:focus {
    box-shadow: 0 0 0 3px rgba(72, 127, 255, 0.15) !important;
    outline: none !important;
}

/* View Switcher Button Group (Month / Week / List) */
#calendar .fc-button-group {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--theme-border-light) !important;
    border: 1px solid var(--theme-border-card) !important;
    border-radius: 9px !important;
    padding: 3px !important;
    gap: 2px !important;
}

#calendar .fc-button-group .fc-button {
    border: none !important;
    background: transparent !important;
    color: var(--theme-text-muted) !important;
    height: 30px !important;
    padding: 0 13px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
}

#calendar .fc-button-group .fc-button:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #1e293b !important;
}

#calendar .fc-button-group .fc-button-active,
#calendar .fc-button-group .fc-button.fc-button-active,
#calendar .fc-button-group .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--theme-primary) !important;
    color: var(--theme-bg-card) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(72, 127, 255, 0.28) !important;
}

/* Table Header (Mon, Tue, Wed...) */
#calendar .fc-col-header-cell {
    background: var(--theme-bg-body) !important;
    padding: 10px 0 !important;
    border-color: var(--theme-border-light) !important;
}

#calendar .fc-col-header-cell-cushion {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: var(--theme-text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

/* Day Grid & Cells */
#calendar .fc-theme-standard td,
#calendar .fc-theme-standard th {
    border-color: var(--theme-border-light) !important;
}

#calendar .fc-daygrid-day {
    min-height: 105px;
    transition: background 0.15s ease;
    cursor: pointer;
}

#calendar .fc-daygrid-day:hover {
    background: #f8fbff !important;
}

#calendar .fc-daygrid-day-top {
    padding: 6px 8px !important;
}

#calendar .fc-daygrid-day-number {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    padding: 2px 6px !important;
    border-radius: 6px;
}

#calendar .fc-day-today {
    background: rgba(72, 127, 255, 0.03) !important;
}

#calendar .fc-day-today .fc-daygrid-day-number {
    background: var(--theme-primary) !important;
    color: var(--theme-bg-card) !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    box-shadow: 0 2px 6px rgba(72, 127, 255, 0.25) !important;
}

#calendar .fc-custom-event-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    margin: 2px 4px;
}

#calendar .fc-custom-event-bar:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* ── Unified Toolbar Filter Extras ── */
.theme-filter-date {
    height: 38px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--theme-border-card) !important;
    background-color: var(--theme-bg-card) !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: var(--theme-text-body) !important;
    padding: 6px 10px !important;
    transition: all 0.2s ease !important;
    max-width: 140px;
}
.theme-filter-date:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(72, 127, 255, 0.15) !important;
    outline: none !important;
}
.theme-btn-reset {
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1.5px solid var(--theme-border-card);
    background: var(--theme-bg-card);
    color: var(--theme-text-muted);
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.theme-btn-reset:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}
.date-range-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--theme-border-light);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11.5px;
    color: #475569;
    font-weight: 600;
}

/* ── Unified Placeholder Styling ── */
.form-input::placeholder,
.form-control::placeholder,
.form-select::placeholder,
.form-textarea::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--theme-text-subtle) !important;
    opacity: 0.7 !important;
    font-weight: 400 !important;
}

.form-input:focus::placeholder,
.form-control:focus::placeholder,
.form-select:focus::placeholder,
.form-textarea:focus::placeholder,
textarea:focus::placeholder,
input:focus::placeholder {
    opacity: 0.4 !important;
}


/* -- DARK MODE OVERRIDES --------------------------- */
[data-theme="dark"] {
    --theme-bg-body: #0f172a;
    --theme-bg-card: #1e293b;
    --theme-bg-subtle: #0f172a;
    --theme-border-card: #334155;
    --theme-border-light: #1e293b;
    --theme-border-input: #475569;
    --theme-text-title: #f8fafc;
    --theme-text-body: #cbd5e1;
    --theme-text-muted: #94a3b8;
    --theme-text-subtle: #64748b;
    --theme-primary: #3b82f6;
    --theme-primary-hover: #60a5fa;
    --theme-primary-dark: #2563eb;
    --theme-primary-deep: #1d4ed8;
    --theme-primary-subtle: rgba(59, 130, 246, 0.15);
    --theme-primary-border: rgba(59, 130, 246, 0.3);
}

/* Ensure text colors are applied globally in dark mode */
[data-theme="dark"] body,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] a,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] label {
    color: var(--theme-text-body);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .h1,
[data-theme="dark"] .h2,
[data-theme="dark"] .h3,
[data-theme="dark"] .h4,
[data-theme="dark"] .h5,
[data-theme="dark"] .h6,
[data-theme="dark"] strong,
[data-theme="dark"] b {
    color: var(--theme-text-title);
}

/* Force override any hardcoded text colors in dark mode */
[data-theme="dark"] .text-neutral-900,
[data-theme="dark"] .text-neutral-800,
[data-theme="dark"] .text-neutral-700,
[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-black {
    color: var(--theme-text-title) !important;
}

[data-theme="dark"] .text-neutral-600,
[data-theme="dark"] .text-neutral-500,
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
    color: var(--theme-text-body) !important;
}


