/* =========================================================
   Global Theme Overrides
   ========================================================= */

:root {
    --wo-theme-header-bg: linear-gradient(135deg, #2C649B 0%, #6EA4C1 100%);
    --wo-theme-header-text: #ffffff;
    --wo-theme-header-muted: rgba(255, 255, 255, 0.9);
    --wo-theme-header-pill: rgba(255, 255, 255, 0.16);
}

/* 1. PANEL HEADER & PRIMARY HEADERS: Colored Theme (Blue Gradient) */
.wo-ply-panel-intro,
.wo-ply-form-intro,

.wo-dw-panel-intro,
.wo-dw-form-intro,


.wo-fs-panel-intro,
.wo-fs-form-intro,
.wo-keu-panel-intro,
.wo-keu-form-intro,
.wo-pg-panel-intro,
.wo-pg-form-intro,
.wo-rd-panel-intro,
.wo-rd-form-intro,
.wo-tk-panel-intro,
.wo-tk-form-intro,
.wo-wl-panel-intro,
.wo-wl-form-intro,
.profile-content-card .content-header,
.wo-cctv-admin-intro,
.wo-cctv-form-intro,
.vt-section-head,
.fs-app-section-head,
.bg-primary.card-header,
.card-header.bg-primary {
    background: var(--wo-theme-header-bg) !important;
    color: #ffffff !important;
    border-bottom: none !important;
}

.wo-ply-panel-eyebrow,
.wo-ply-form-eyebrow,

.wo-dw-panel-eyebrow,
.wo-dw-form-eyebrow,


.wo-fs-panel-eyebrow,
.wo-fs-form-eyebrow,
.wo-keu-panel-eyebrow,
.wo-keu-form-eyebrow,
.wo-pg-panel-eyebrow,
.wo-pg-form-eyebrow,
.wo-rd-panel-eyebrow,
.wo-rd-form-eyebrow,
.wo-tk-panel-eyebrow,
.wo-tk-form-eyebrow,
.wo-wl-panel-eyebrow,
.wo-wl-form-eyebrow,
.profile-content-card .content-header-copy span,
.wo-cctv-admin-eyebrow,
.wo-cctv-form-eyebrow,
.vt-eyebrow,
.vt-detail-eyebrow,
.fs-app-section-label {
    color: rgba(255, 255, 255, 0.85) !important;
}

.wo-ply-panel-intro h2,
.wo-ply-panel-intro h3,
.wo-ply-form-intro h2,
.wo-ply-form-intro h3,
.wo-dw-panel-intro h2, .wo-dw-panel-intro h3, .wo-dw-form-intro h2, .wo-dw-form-intro h3,
.wo-dns-panel-intro h2, .wo-dns-panel-intro h3, .wo-dns-form-intro h2, .wo-dns-form-intro h3,
.wo-fs-panel-intro h2, .wo-fs-panel-intro h3, .wo-fs-form-intro h2, .wo-fs-form-intro h3,
.wo-keu-panel-intro h2, .wo-keu-panel-intro h3, .wo-keu-form-intro h2, .wo-keu-form-intro h3,
.wo-pg-panel-intro h2, .wo-pg-panel-intro h3, .wo-pg-form-intro h2, .wo-pg-form-intro h3,
.wo-rd-panel-intro h2, .wo-rd-panel-intro h3, .wo-rd-form-intro h2, .wo-rd-form-intro h3,
.wo-tk-panel-intro h2, .wo-tk-panel-intro h3, .wo-tk-form-intro h2, .wo-tk-form-intro h3,
.wo-wl-panel-intro h2, .wo-wl-panel-intro h3, .wo-wl-form-intro h2, .wo-wl-form-intro h3,
.profile-content-card .content-header h2,
.profile-content-card .content-header .content-title,
.wo-cctv-admin-intro h3,
.wo-cctv-form-intro h3,
.vt-section-title h3,
.vt-section-head h3,
.fs-app-section-head h3,
.bg-primary.card-header .card-title,
.card-header.bg-primary .card-title {
    color: #ffffff !important;
}

.wo-ply-panel-intro p,
.wo-ply-form-intro p,
.wo-dw-panel-intro p, .wo-dw-form-intro p,
.wo-dns-panel-intro p, .wo-dns-form-intro p,
.wo-fs-panel-intro p, .wo-fs-form-intro p,
.wo-keu-panel-intro p, .wo-keu-form-intro p,
.wo-pg-panel-intro p, .wo-pg-form-intro p,
.wo-rd-panel-intro p, .wo-rd-form-intro p,
.wo-tk-panel-intro p, .wo-tk-form-intro p,
.wo-wl-panel-intro p, .wo-wl-form-intro p,
.profile-content-card .content-header p,
.wo-cctv-admin-intro p,
.wo-cctv-form-intro p,
.vt-section-title p,
.vt-section-head p,
.fs-app-section-head p {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Button overrides for Panel Headers: Distinct Emerald Green (Not blue, white, or dark) */
.wo-ply-panel-intro .btn,
.wo-ply-form-intro .btn,
.wo-dw-panel-intro .btn, .wo-dw-form-intro .btn,
.wo-dns-panel-intro .btn, .wo-dns-form-intro .btn,
.wo-fs-panel-intro .btn, .wo-fs-form-intro .btn,
.wo-keu-panel-intro .btn, .wo-keu-form-intro .btn,
.wo-pg-panel-intro .btn, .wo-pg-form-intro .btn,
.wo-rd-panel-intro .btn, .wo-rd-form-intro .btn,
.wo-tk-panel-intro .btn, .wo-tk-form-intro .btn,
.wo-wl-panel-intro .btn, .wo-wl-form-intro .btn,
.profile-content-card .content-header .btn,
.wo-cctv-admin-intro .btn,
.wo-cctv-form-intro .btn,
.vt-section-head .vt-head-btn,
.fs-app-section-head .btn,
.fs-app-section-head .vt-head-btn {
    background-color: #10b981 !important; /* Emerald Green */
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease-in-out !important;
}

.wo-ply-panel-intro .btn:hover,
.wo-ply-form-intro .btn:hover,
.wo-dw-panel-intro .btn:hover, .wo-dw-form-intro .btn:hover,
.wo-dns-panel-intro .btn:hover, .wo-dns-form-intro .btn:hover,
.wo-fs-panel-intro .btn:hover, .wo-fs-form-intro .btn:hover,
.wo-keu-panel-intro .btn:hover, .wo-keu-form-intro .btn:hover,
.wo-pg-panel-intro .btn:hover, .wo-pg-form-intro .btn:hover,
.wo-rd-panel-intro .btn:hover, .wo-rd-form-intro .btn:hover,
.wo-tk-panel-intro .btn:hover, .wo-tk-form-intro .btn:hover,
.wo-wl-panel-intro .btn:hover, .wo-wl-form-intro .btn:hover,
.profile-content-card .content-header .btn:hover,
.wo-cctv-admin-intro .btn:hover,
.wo-cctv-form-intro .btn:hover,
.vt-section-head .vt-head-btn:hover,
.fs-app-section-head .btn:hover,
.fs-app-section-head .vt-head-btn:hover {
    background-color: #059669 !important; /* Darker Emerald */
    border-color: #059669 !important;
    color: #ffffff !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 8px rgba(0,0,0,0.15) !important;
}


/* 2. TABLE & FORM HEADERS: Soft Clean Theme (Not Blue) */
.card-header,
.table thead th,
table.dataTable thead th,
#datatables thead th,
.dw-admin-dashboard table.table thead th,
.wo-dns-dt-wrapper table.dataTable thead th,
.wo-fs-table thead th,
.wo-keu-table thead th,
.wo-dw-table thead th,
.wo-ply-table thead th,
.wo-pg-table thead th,
.wo-rd-table thead th,
.wo-tk-table thead th,
.wo-wl-table thead th {
    background: #f8fafc !important; /* Soft clean light slate */
    color: #475569 !important; /* Dark slate text */
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
    text-shadow: none !important;
}

.table thead th,
table.dataTable thead th,
#datatables thead th,
.dw-admin-dashboard table.table thead th,
.wo-dns-dt-wrapper table.dataTable thead th,
.wo-fs-table thead th,
.wo-keu-table thead th,
.wo-dw-table thead th,
.wo-ply-table thead th,
.wo-pg-table thead th,
.wo-rd-table thead th,
.wo-tk-table thead th,
.wo-wl-table thead th {
    border-bottom: 2px solid #e2e8f0 !important;
    font-weight: 600;
}

/* Ensure title text inside standard headers is dark slate */
.card-header .card-title,
.card-header .content-title {
    color: #334155 !important;
    font-weight: 600;
}

/* Restore DataTables Sorting Icons for light background */
table.dataTable thead .sorting:before, 
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before, 
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before, 
table.dataTable thead .sorting_desc:after {
    opacity: 0.3;
    color: #475569 !important;
}

table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:after {
    opacity: 1;
    color: #0f172a !important;
}

/* Dark Mode overrides */
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .bg-primary.card-header,
[data-bs-theme="dark"] .card-header.bg-primary,
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] table.dataTable thead th,
[data-bs-theme="dark"] #datatables thead th,
[data-bs-theme="dark"] .dw-admin-dashboard table.table thead th,
[data-bs-theme="dark"] .wo-fs-table thead th,
[data-bs-theme="dark"] .wo-keu-table thead th,
[data-bs-theme="dark"] .wo-dw-table thead th,
[data-bs-theme="dark"] .wo-ply-table thead th,
[data-bs-theme="dark"] .wo-pg-table thead th,
[data-bs-theme="dark"] .wo-rd-table thead th,
[data-bs-theme="dark"] .wo-tk-table thead th,
[data-bs-theme="dark"] .wo-wl-table thead th {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .card-header .card-title,
[data-bs-theme="dark"] .card-header.text-white,
[data-bs-theme="dark"] .bg-primary.card-header {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .wo-ply-panel-intro,
[data-bs-theme="dark"] .wo-ply-form-intro, 
[data-bs-theme="dark"] .wo-dw-panel-intro, [data-bs-theme="dark"] .wo-dw-form-intro,
[data-bs-theme="dark"] .wo-fs-panel-intro, [data-bs-theme="dark"] .wo-fs-form-intro,
[data-bs-theme="dark"] .wo-keu-panel-intro, [data-bs-theme="dark"] .wo-keu-form-intro,
[data-bs-theme="dark"] .wo-pg-panel-intro, [data-bs-theme="dark"] .wo-pg-form-intro,
[data-bs-theme="dark"] .wo-rd-panel-intro, [data-bs-theme="dark"] .wo-rd-form-intro,
[data-bs-theme="dark"] .wo-tk-panel-intro, [data-bs-theme="dark"] .wo-tk-form-intro,
[data-bs-theme="dark"] .wo-wl-panel-intro, [data-bs-theme="dark"] .wo-wl-form-intro,
[data-bs-theme="dark"] .profile-content-card .content-header,
[data-bs-theme="dark"] .wo-cctv-admin-intro,
[data-bs-theme="dark"] .wo-cctv-form-intro {
    background: var(--wo-theme-header-bg) !important;
}

[data-bs-theme="dark"] {
    --wo-theme-header-bg: linear-gradient(135deg, #1e4b7a 0%, #4a809d 100%);
    --wo-theme-header-text: #f8fafc;
    --wo-theme-header-muted: rgba(226, 232, 240, 0.9);
    --wo-theme-header-pill: rgba(15, 23, 42, 0.24);
}

[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] table.dataTable thead th,
[data-bs-theme="dark"] #datatables thead th,
[data-bs-theme="dark"] .dw-admin-dashboard table.table thead th,
[data-bs-theme="dark"] .wo-fs-table thead th,
[data-bs-theme="dark"] .wo-keu-table thead th,
[data-bs-theme="dark"] .wo-dw-table thead th,
[data-bs-theme="dark"] .wo-ply-table thead th,
[data-bs-theme="dark"] .wo-pg-table thead th,
[data-bs-theme="dark"] .wo-rd-table thead th,
[data-bs-theme="dark"] .wo-tk-table thead th,
[data-bs-theme="dark"] .wo-wl-table thead th {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border-bottom: 2px solid #334155 !important;
}

[data-bs-theme="dark"] table.dataTable thead .sorting:before, 
[data-bs-theme="dark"] table.dataTable thead .sorting:after,
[data-bs-theme="dark"] table.dataTable thead .sorting_asc:before, 
[data-bs-theme="dark"] table.dataTable thead .sorting_asc:after,
[data-bs-theme="dark"] table.dataTable thead .sorting_desc:before, 
[data-bs-theme="dark"] table.dataTable thead .sorting_desc:after {
    color: #cbd5e1 !important;
}

/* Dark Mode DataTables Body / Controls */
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] table.dataTable,
[data-bs-theme="dark"] .dataTables_wrapper {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .table tbody td,
[data-bs-theme="dark"] .table tbody th,
[data-bs-theme="dark"] table.dataTable tbody td,
[data-bs-theme="dark"] table.dataTable tbody th,
[data-bs-theme="dark"] .wo-fs-table tbody td,
[data-bs-theme="dark"] .wo-keu-table tbody td,
[data-bs-theme="dark"] .wo-dw-table tbody td,
[data-bs-theme="dark"] .wo-ply-table tbody td,
[data-bs-theme="dark"] .wo-pg-table tbody td,
[data-bs-theme="dark"] .wo-rd-table tbody td,
[data-bs-theme="dark"] .wo-tk-table tbody td,
[data-bs-theme="dark"] .wo-wl-table tbody td {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .table tbody tr:nth-child(even) td,
[data-bs-theme="dark"] table.dataTable.stripe tbody tr.odd td,
[data-bs-theme="dark"] table.dataTable.display tbody tr.odd td {
    background: #111c31 !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover td,
[data-bs-theme="dark"] table.dataTable.hover tbody tr:hover td,
[data-bs-theme="dark"] table.dataTable.display tbody tr:hover td {
    background: #1e293b !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_processing {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select:focus,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.18) !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #cbd5e1 !important;
    border: 1px solid transparent !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #f8fafc !important;
    border-color: #334155 !important;
    background: #1e293b !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
    border-color: #2563eb !important;
    background: #2563eb !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #64748b !important;
    border-color: transparent !important;
    background: transparent !important;
}

[data-bs-theme="dark"] table.dataTable.no-footer,
[data-bs-theme="dark"] .dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #334155 !important;
}

/* 3. GLOBAL TABLE ALIGNMENT */
.table td, .table th, 
table.dataTable tbody td, table.dataTable tbody th,
table.dataTable thead th, table.dataTable thead td {
    text-align: center !important;
    vertical-align: middle !important;
}
