/*
 * OPTODEV Unified Dark Theme
 * Visual-only layer for the existing Operator, Shift Leader and Supervisor
 * interfaces. Loaded after each page's original styles. No workflow, data,
 * permissions, calculations, validation, or JavaScript behavior is changed.
 */

/* =========================================================
   1. DESIGN TOKENS + APP CANVAS
   ========================================================= */
body.opto-ui-v2 {
  --od-bg: #071321;
  --od-bg-deep: #050e1b;
  --od-surface: #0d1c2f;
  --od-surface-2: #12243a;
  --od-surface-3: #172c46;
  --od-surface-hover: #1a3554;
  --od-border: #263e5b;
  --od-border-soft: rgba(133, 164, 201, .17);
  --od-text: #e8f0fb;
  --od-text-soft: #c3d2e5;
  --od-muted: #91a6c1;
  --od-muted-2: #7188a6;
  --od-blue: #3678ed;
  --od-blue-2: #245ed0;
  --od-cyan: #27c6e6;
  --od-blue-glow: rgba(42, 117, 236, .2);
  --od-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  --od-shadow-soft: 0 5px 18px rgba(0, 0, 0, .16);
  --opto-blue: var(--od-blue);
  --opto-blue-dark: #1d4fae;
  --opto-blue-bright: #4b91ff;
  --opto-sky-tint: rgba(39, 198, 230, .12);
  --opto-surface: var(--od-surface);
  --opto-canvas: var(--od-bg);
  --opto-divider: var(--od-border);
  --opto-ink: var(--od-text);
  --opto-muted: var(--od-muted);
  --opto-soft-shadow: var(--od-shadow-soft);
  --opto-hover-shadow: var(--od-shadow);
  --opto-primary: var(--od-blue);
  --primary: var(--od-blue);
  --secondary: var(--od-cyan);
  --bg: var(--od-bg);
  --text: var(--od-text);
  --text-light: var(--od-muted);
  --border: var(--od-border);
  --shadow: var(--od-shadow-soft);
  --shadow-hover: var(--od-shadow);
  color-scheme: dark;
  background:
    radial-gradient(ellipse at 78% 0%, rgba(35, 91, 170, .16), transparent 38%),
    radial-gradient(ellipse at 0% 100%, rgba(17, 132, 166, .08), transparent 34%),
    var(--od-bg) !important;
  color: var(--od-text) !important;
  font-family: 'Inter', 'Poppins', system-ui, sans-serif !important;
}
body.opto-ui-v2,
body.opto-ui-v2 :is(main, section, article, aside, header, footer, nav, div, p, span, label, small, strong, em, li, td, th) {
  scrollbar-color: #345577 #0a1829;
}
body.opto-ui-v2 ::selection {
  background: rgba(54, 120, 237, .42);
  color: #fff;
}
body.opto-ui-v2 :is(.container, main, .main-content, .dashboard-container, .schedule-page, .reports-container, .barrel-page, .biweekly-page) {
  min-width: 0;
}
body.opto-ui-v2 :is(.dashboard-container, .main-content, main, .schedule-page, .reports-container, .barrel-page, .biweekly-page) {
  background: transparent !important;
  color: var(--od-text) !important;
}
body.opto-ui-v2 :is(.dashboard-container, .main-content, .reports-container, .barrel-page, .schedule-page) {
  isolation: isolate;
}

/* =========================================================
   2. TYPOGRAPHY + LINKS
   ========================================================= */
body.opto-ui-v2 :is(h1, h2, h3, h4, h5, h6, .page-title, .section-title, .section-heading) {
  color: var(--od-text) !important;
}
body.opto-ui-v2 :is(p, .page-subtitle, .page-heading p, .page-header p, .card-subtitle, .subtitle, .description, .helper-text) {
  color: var(--od-muted) !important;
}
body.opto-ui-v2 :is(label, .form-label, .filter-group label, .form-group label, .field label, .input-group label, .form-group-schedule label) {
  color: var(--od-text-soft) !important;
}
body.opto-ui-v2 :is(small, .muted, .text-muted, .hint, .helper, .meta, .subtext) {
  color: var(--od-muted) !important;
}
body.opto-ui-v2 a:not(.nav-link):not(.btn):not([class*="btn-"]) {
  color: #83b9ff;
}
body.opto-ui-v2 a:not(.nav-link):not(.btn):not([class*="btn-"]):hover {
  color: #58d8f1;
}
body.opto-ui-v2 hr {
  border-color: var(--od-border-soft) !important;
  background: var(--od-border-soft) !important;
}

/* =========================================================
   3. TOP BAR, PROFILE AND SIDEBAR
   ========================================================= */
body.opto-ui-v2 .dashboard-header {
  background: linear-gradient(110deg, #08172a 0%, #0c2039 62%, #102a49 100%) !important;
  color: var(--od-text) !important;
  border-bottom: 1px solid #294361 !important;
  box-shadow: 0 7px 24px rgba(0, 0, 0, .24) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.opto-ui-v2 :is(.header-title h2, .header-left > h2, .header-left h2) {
  color: #f2f7ff !important;
  font-weight: 750 !important;
  letter-spacing: -.035em;
}
body.opto-ui-v2 :is(.header-title p, .header-subtitle) {
  color: #9db2cd !important;
}
body.opto-ui-v2 .header-divider {
  background: #2a4260 !important;
}
body.opto-ui-v2 :is(.header-icon, .menu-toggle, .admin-menu-toggle, .superadmin-menu-toggle, .operator-menu-toggle) {
  background: #142b47 !important;
  color: #9cc9ff !important;
  border: 1px solid #2b4a6d !important;
  border-radius: 11px !important;
  box-shadow: none !important;
}
body.opto-ui-v2 :is(.header-icon, .menu-toggle, .admin-menu-toggle, .superadmin-menu-toggle, .operator-menu-toggle):hover {
  background: #1b3b61 !important;
  border-color: #3d77b7 !important;
}
body.opto-ui-v2 :is(.header-icon, .menu-toggle, .admin-menu-toggle, .superadmin-menu-toggle, .operator-menu-toggle) i {
  color: #9cc9ff !important;
}
body.opto-ui-v2 :is(.date-card, #user-profile) {
  background: rgba(17, 39, 64, .94) !important;
  border: 1px solid #2a4565 !important;
  border-radius: 12px !important;
  color: var(--od-text) !important;
  box-shadow: none !important;
}
body.opto-ui-v2 #user-profile:hover {
  background: #183554 !important;
  border-color: #4b83c0 !important;
}
body.opto-ui-v2 #user-profile img {
  border-color: #4d83c3 !important;
}
body.opto-ui-v2 :is(.user-info, .user-info .username, .user-info span, #user-profile > span) {
  color: #e7f0ff !important;
}
body.opto-ui-v2 :is(.user-info small, #user-profile .fa-chevron-down, .date-card span, .date-card i) {
  color: #9cb2ce !important;
}
body.opto-ui-v2 .container > nav,
body.opto-ui-v2 nav:has(.sidebar-logo) {
  background: linear-gradient(180deg, #081629 0%, #0a1a2e 58%, #0b2038 100%) !important;
  color: #dce9f8 !important;
  border-right: 1px solid #243d59 !important;
  box-shadow: 8px 0 26px rgba(0, 0, 0, .2) !important;
}
body.opto-ui-v2 nav .sidebar-logo {
  background: transparent !important;
  border-bottom: 1px solid rgba(140, 173, 211, .14) !important;
}
body.opto-ui-v2 nav .logo-circle {
  background: linear-gradient(135deg, #245ecb, #168cb9) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(34, 111, 220, .24) !important;
}
body.opto-ui-v2 nav .logo-text h3 {
  color: #f2f7ff !important;
}
body.opto-ui-v2 nav .logo-text span {
  color: #8fa8c6 !important;
}
body.opto-ui-v2 nav > ul {
  background: transparent !important;
}
body.opto-ui-v2 nav .nav-link {
  color: #aebfd5 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}
body.opto-ui-v2 nav .nav-link i {
  color: #7892b1 !important;
}
body.opto-ui-v2 nav .nav-link:hover:not(.active) {
  background: rgba(65, 132, 220, .13) !important;
  border-color: rgba(91, 155, 235, .16) !important;
  color: #e9f4ff !important;
}
body.opto-ui-v2 nav .nav-link:hover:not(.active) i {
  color: #75c8f4 !important;
}
body.opto-ui-v2 nav .nav-link.active,
body.opto-ui-v2 nav .nav-link[aria-current='page'] {
  background: linear-gradient(105deg, #1e55bb, #2479d6 72%, #168bb6) !important;
  color: #fff !important;
  border-color: rgba(135, 195, 255, .22) !important;
  box-shadow: 0 7px 18px rgba(20, 91, 194, .26) !important;
}
body.opto-ui-v2 nav .nav-link.active i,
body.opto-ui-v2 nav .nav-link[aria-current='page'] i {
  color: #fff !important;
}
body.opto-ui-v2 nav .sidebar-footer {
  background: #09182a !important;
  border-top: 1px solid rgba(140, 173, 211, .14) !important;
}
body.opto-ui-v2 nav .sidebar-footer p {
  color: #718aa8 !important;
}
body.opto-ui-v2 nav .sidebar-footer .logout {
  color: #f3a8ad !important;
}
body.opto-ui-v2 nav .sidebar-footer .logout:hover {
  background: rgba(190, 54, 65, .2) !important;
  color: #ffd9dc !important;
}

/* =========================================================
   4. PAGE HEADINGS, KPI AND CONTENT CARDS
   ========================================================= */
body.opto-ui-v2 :is(.page-heading, .page-header, .page-title, .page-title-row, .schedule-top-bar, .section-title, .dashboard-section-heading) {
  color: var(--od-text) !important;
}
body.opto-ui-v2 :is(.page-heading h1, .page-header h1, .page-title h1, .page-title, .schedule-title, .opto-page-intro h1) {
  color: #f0f6ff !important;
}
body.opto-ui-v2 :is(.page-label, .card-label, .opto-eyebrow, .eyebrow, .section-label) {
  color: #91caff !important;
  background: rgba(45, 119, 221, .16) !important;
  border: 1px solid rgba(83, 151, 235, .24) !important;
}
body.opto-ui-v2 :is(
  .stat-card, .stat-card-schedule, .attendance-table-card, .scanner-card, .today-shift-card,
  .filter-card, .notifications-card, .overview-item, .schedule-card, .station-card,
  .summary-item, .profile-card, .operator-performance-panel, .performance-kpi,
  .leader-card, .line, .monomer, .details, .inventory-card, .chart-card,
  .analytics-card, .report-card, .metric-card, .kpi-card, .latest-scan-card,
  .card, .weight-accounting, .history-card, .section-card, .module-card,
  .employee-table-card, .employee-toolbar, .score-metric-card, .insight-card,
  .insight-item, .review-entry, .performance-subsection, .attendance-summary,
  .top-performers, .operator-profiles, .filter-section, .panel
) {
  background: linear-gradient(155deg, rgba(19, 39, 63, .98), rgba(12, 28, 47, .98)) !important;
  color: var(--od-text) !important;
  border: 1px solid var(--od-border) !important;
  box-shadow: var(--od-shadow-soft) !important;
}
body.opto-ui-v2 :is(
  .stat-card, .stat-card-schedule, .attendance-table-card, .scanner-card, .today-shift-card,
  .filter-card, .notifications-card, .overview-item, .schedule-card, .station-card,
  .summary-item, .profile-card, .leader-card, .line, .monomer, .details,
  .chart-card, .analytics-card, .report-card, .metric-card, .kpi-card,
  .latest-scan-card, .card, .weight-accounting, .history-card, .section-card,
  .module-card, .employee-table-card, .score-metric-card, .insight-card, .panel
) {
  border-radius: 15px !important;
}
body.opto-ui-v2 :is(.stat-card, .stat-card-schedule, .profile-card, .schedule-card, .station-card, .leader-card, .module-card):hover {
  border-color: #3a6089 !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .24) !important;
}
body.opto-ui-v2 .stat-card::before {
  background: linear-gradient(90deg, #2869d8, #22c4e3) !important;
  height: 3px !important;
}
body.opto-ui-v2 :is(.stat-content h2, .stat-content h3, .stat-card-schedule h2, .stat-card-schedule h3, .kpi-content strong, .kpi-value) {
  color: #f3f8ff !important;
}
body.opto-ui-v2 :is(.stat-content h4, .stat-label, .stat-title, .stat-name, .kpi-label, .kpi-content span) {
  color: #9db1cb !important;
}
body.opto-ui-v2 :is(.stat-icon, .scanner-icon, .shift-icon, .kpi-icon) {
  background: linear-gradient(140deg, #1d55b3, #147da9) !important;
  color: #fff !important;
  box-shadow: 0 7px 18px rgba(15, 97, 182, .2) !important;
}
body.opto-ui-v2 :is(.card-header, .table-header, .profile-header, .chart-header, .performance-subsection-title) {
  border-color: var(--od-border-soft) !important;
}
body.opto-ui-v2 :is(.card-header h2, .card-header h3, .chart-header h3, .section-title h2, .section-title h3, .performance-subsection-title) {
  color: #e8f2ff !important;
}
body.opto-ui-v2 :is(.empty-state, .no-data-schedule, .empty-detail-state, .insight-empty) {
  background: rgba(10, 25, 43, .62) !important;
  color: #9cb1cb !important;
  border-color: var(--od-border) !important;
}

/* =========================================================
   5. TABLES AND TABLE WRAPPERS
   ========================================================= */
body.opto-ui-v2 :is(
  .schedule-filters, .opto-filter-panel, .opto-inventory-filter, .filter-panel,
  .filters-container, .table-responsive, .table-wrap, .table-scroll,
  .schedule-table-container, .archive-table-wrap, .detail-table-wrap,
  .analytics-table-wrap, .table-container, .schedule-table-wrap,
  .barrel-table-wrap, .performance-table-wrapper
) {
  background: #0b1a2d !important;
  border: 1px solid var(--od-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--od-shadow-soft) !important;
}
body.opto-ui-v2 table {
  color: var(--od-text-soft) !important;
  background: #0c1b2e !important;
  border-color: var(--od-border) !important;
  border-collapse: separate;
  border-spacing: 0;
}
body.opto-ui-v2 table :is(th, td) {
  border-color: rgba(132, 160, 194, .16) !important;
}
body.opto-ui-v2 table thead th {
  background: #142a44 !important;
  color: #b8cce5 !important;
  font-weight: 700 !important;
}
body.opto-ui-v2 table tbody td {
  color: #d5e1f0 !important;
  background: transparent;
}
body.opto-ui-v2 table tbody tr:nth-child(even) {
  background: rgba(22, 43, 68, .46);
}
body.opto-ui-v2 table tbody tr:hover {
  background: rgba(40, 91, 151, .22) !important;
}
body.opto-ui-v2 :is(.schedule-table, .attendance-table, .analytics-table, .detail-table, .archive-table, .employee-table, .barrel-comparison-table, .barrel-history-table, .notification-compact-table) {
  background: #0c1b2e !important;
}
body.opto-ui-v2 :is(.schedule-table, .attendance-table, .analytics-table, .detail-table, .archive-table, .employee-table, .barrel-comparison-table, .barrel-history-table, .notification-compact-table) thead th {
  background: #152c47 !important;
  color: #b9cee7 !important;
}
body.opto-ui-v2 :is(.schedule-table, .attendance-table, .analytics-table, .detail-table, .archive-table, .employee-table, .barrel-comparison-table, .barrel-history-table, .notification-compact-table) tbody td {
  color: #d7e3f2 !important;
}
body.opto-ui-v2 :is(.schedule-table, .attendance-table, .analytics-table, .detail-table, .archive-table, .employee-table, .barrel-comparison-table, .barrel-history-table, .notification-compact-table) tbody tr:hover {
  background: #17324f !important;
}
body.opto-ui-v2 :is(.table-wrap, .table-scroll, .table-responsive, .schedule-table-container, .analytics-table-wrap, .detail-table-wrap, .archive-table-wrap, .table-container)::-webkit-scrollbar {
  height: 9px;
  width: 9px;
}
body.opto-ui-v2 :is(.table-wrap, .table-scroll, .table-responsive, .schedule-table-container, .analytics-table-wrap, .detail-table-wrap, .archive-table-wrap, .table-container)::-webkit-scrollbar-track {
  background: #081526;
}
body.opto-ui-v2 :is(.table-wrap, .table-scroll, .table-responsive, .schedule-table-container, .analytics-table-wrap, .detail-table-wrap, .archive-table-wrap, .table-container)::-webkit-scrollbar-thumb {
  background: #345575;
  border-radius: 20px;
}

/* =========================================================
   6. INPUTS, TEXT AREAS, SELECTS AND FORM CONTROLS
   ========================================================= */
body.opto-ui-v2 :is(
  input:not([type='checkbox']):not([type='radio']):not([type='range']),
  select, textarea
) {
  background: #09192c !important;
  color: #e5effb !important;
  border: 1px solid #2c4665 !important;
  border-radius: 10px !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12) !important;
  caret-color: #58d5f0;
}
body.opto-ui-v2 :is(input, textarea)::placeholder {
  color: #7189a7 !important;
  opacity: 1;
}
body.opto-ui-v2 :is(input, select, textarea):focus {
  background: #0d2036 !important;
  border-color: #438de9 !important;
  box-shadow: 0 0 0 3px rgba(55, 128, 235, .17) !important;
  outline: none;
}
body.opto-ui-v2 select option,
body.opto-ui-v2 select optgroup {
  background: #10243b !important;
  color: #e3edf9 !important;
}
body.opto-ui-v2 :is(input[type='checkbox'], input[type='radio'], input[type='range']) {
  accent-color: #4388f2;
}
body.opto-ui-v2 input:disabled,
body.opto-ui-v2 select:disabled,
body.opto-ui-v2 textarea:disabled {
  background: #0a1625 !important;
  color: #71839b !important;
  border-color: #26384e !important;
  opacity: .8;
}
body.opto-ui-v2 input[type='file'] {
  background: #0a1a2d !important;
  color: #b8cbe2 !important;
  border: 1px dashed #3a5879 !important;
  padding: 8px !important;
}
body.opto-ui-v2 input[type='file']::file-selector-button {
  background: #1b477e;
  color: #edf6ff;
  border: 1px solid #35689f;
  border-radius: 7px;
  padding: 7px 11px;
  margin-right: 10px;
  cursor: pointer;
}
body.opto-ui-v2 input:-webkit-autofill,
body.opto-ui-v2 input:-webkit-autofill:hover,
body.opto-ui-v2 input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e5effb !important;
  box-shadow: 0 0 0 1000px #0d2036 inset !important;
  transition: background-color 99999s ease-in-out 0s;
}
body.opto-ui-v2 :is(.filter-group, .form-group, .field, .input-group, .form-group-schedule) {
  color: var(--od-text-soft);
}
body.opto-ui-v2 :is(.form-control, .form-select, .form-textarea) {
  background: #09192c !important;
  color: #e5effb !important;
  border-color: #2c4665 !important;
}

/* =========================================================
   7. BUTTON SYSTEM — PRIMARY, SECONDARY, DANGER AND ICON
   ========================================================= */
body.opto-ui-v2 button,
body.opto-ui-v2 input[type='button'],
body.opto-ui-v2 input[type='submit'],
body.opto-ui-v2 input[type='reset'] {
  background: #172d48;
  color: #dceaff;
  border: 1px solid #345273;
  border-radius: 10px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body.opto-ui-v2 button:hover:not(:disabled),
body.opto-ui-v2 input[type='button']:hover:not(:disabled),
body.opto-ui-v2 input[type='submit']:hover:not(:disabled),
body.opto-ui-v2 input[type='reset']:hover:not(:disabled) {
  background: #1d3b60;
  border-color: #4b78a8;
}
body.opto-ui-v2 :is(
  .btn-primary, .btn-add-schedule, .primary-btn, .open-btn, .scan-btn,
  .save-product-btn, .add-profile-btn, .login-btn, .generate-btn,
  .apply-performance-filter, .btn-export, .pdf-btn, .excel-btn,
  .camera-btn, .app-confirm-ok, .btn-edit, .page-btn.active, .sa-page-btn.active
) {
  background: linear-gradient(112deg, #225bc8 0%, #347fe9 65%, #168fb8 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(113, 178, 255, .28) !important;
  box-shadow: 0 6px 16px rgba(22, 93, 201, .2) !important;
}
body.opto-ui-v2 :is(
  .btn-primary, .btn-add-schedule, .primary-btn, .open-btn, .scan-btn,
  .save-product-btn, .add-profile-btn, .login-btn, .generate-btn,
  .apply-performance-filter, .btn-export, .pdf-btn, .excel-btn,
  .camera-btn, .app-confirm-ok, .btn-edit, .page-btn.active, .sa-page-btn.active
):hover:not(:disabled) {
  background: linear-gradient(112deg, #2d70e4 0%, #438df4 65%, #20a5ca 100%) !important;
  border-color: rgba(149, 205, 255, .5) !important;
  box-shadow: 0 9px 22px rgba(24, 104, 217, .28) !important;
  transform: translateY(-1px);
}
body.opto-ui-v2 :is(
  .btn-secondary, .back-btn, .secondary-btn, .btn-reset-filter, .opto-reset-btn,
  .refresh-btn, .operator-page-btn, .btn-reset, .cancel, .modal-close-btn,
  .page-btn, .sa-page-btn
) {
  background: #142a43 !important;
  color: #c8d9ee !important;
  border: 1px solid #304b69 !important;
  box-shadow: none !important;
}
body.opto-ui-v2 :is(
  .btn-secondary, .back-btn, .secondary-btn, .btn-reset-filter, .opto-reset-btn,
  .refresh-btn, .operator-page-btn, .btn-reset, .cancel, .modal-close-btn,
  .page-btn, .sa-page-btn
):hover:not(:disabled) {
  background: #1b3858 !important;
  color: #f0f7ff !important;
  border-color: #4b7099 !important;
}
body.opto-ui-v2 :is(.btn-danger, .btn-delete, .delete-btn, .danger-btn, .btn-action.delete) {
  background: linear-gradient(110deg, #8f2634, #bd3547) !important;
  color: #fff !important;
  border-color: #c04c59 !important;
}
body.opto-ui-v2 :is(.btn-danger, .btn-delete, .delete-btn, .danger-btn, .btn-action.delete):hover:not(:disabled) {
  background: linear-gradient(110deg, #a72b3c, #d34255) !important;
}
body.opto-ui-v2 button:disabled,
body.opto-ui-v2 input[type='button']:disabled,
body.opto-ui-v2 input[type='submit']:disabled {
  cursor: not-allowed !important;
  opacity: .48 !important;
  box-shadow: none !important;
}
body.opto-ui-v2 :is(button, input, select, textarea, a, [tabindex]):focus-visible {
  outline: 3px solid rgba(73, 158, 255, .38) !important;
  outline-offset: 2px;
}

/* =========================================================
   8. TABS, FILTERS, PAGINATION AND CUSTOM MENUS
   ========================================================= */
body.opto-ui-v2 :is(.operator-tabs, .login-methods, .tabs, .tab-list, .filter-actions) {
  background: #0b1a2c !important;
  border: 1px solid var(--od-border) !important;
  border-radius: 12px !important;
}
body.opto-ui-v2 :is(.operator-tabs a, .method-tab, .tab, .tab-button) {
  color: #a9bdd6 !important;
  background: transparent !important;
  border-color: transparent !important;
}
body.opto-ui-v2 :is(.operator-tabs a.active, .method-tab.active, .tab.active, .tab-button.active) {
  background: linear-gradient(110deg, #225bc8, #2779d4) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(28, 93, 190, .24) !important;
}
body.opto-ui-v2 :is(.filter-card, .schedule-filters, .opto-filter-panel, .opto-inventory-filter, .analytics-filter-card, .filter-section) {
  background: linear-gradient(155deg, #12263e, #0e1e32) !important;
  border: 1px solid var(--od-border) !important;
}
body.opto-ui-v2 :is(.filter-header, .filter-title, .filter-group label) {
  color: #b9cbe0 !important;
}
body.opto-ui-v2 :is(.dropdown-menu, .profile-menu, [role='menu'], .custom-dropdown-menu, .select-menu) {
  background: #10243b !important;
  color: #e5effb !important;
  border: 1px solid #345273 !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .4) !important;
}
body.opto-ui-v2 :is(.dropdown-menu, .profile-menu, [role='menu'], .custom-dropdown-menu, .select-menu) :is(a, button, li, span) {
  color: #cbdcf0 !important;
}
body.opto-ui-v2 :is(.dropdown-menu, .profile-menu, [role='menu'], .custom-dropdown-menu, .select-menu) :is(a, button, li):hover {
  background: #1b3a5d !important;
  color: #fff !important;
}
body.opto-ui-v2 :is(.profile-menu label, .dropdown-menu label) {
  color: #c0d0e4 !important;
}

/* =========================================================
   9. MODALS, CONFIRMATIONS, SCANNERS AND TOASTS
   ========================================================= */
body.opto-ui-v2 :is(.modal-overlay, .modal-backdrop, .scanner-modal, .product-modal, .modal) {
  background: rgba(2, 8, 17, .78) !important;
}
body.opto-ui-v2 :is(
  .modal-content, .modal-content-schedule, .modal-box, .product-modal-card,
  .confirm-card, .delete-confirm-dialog, .oir-dialog, .app-confirm-card,
  .scanner-modal .modal-box, .operator-performance-panel
) {
  background: linear-gradient(155deg, #142941, #0d1e32) !important;
  color: var(--od-text) !important;
  border: 1px solid #355171 !important;
  border-radius: 17px !important;
  box-shadow: 0 25px 75px rgba(0, 0, 0, .48) !important;
}
body.opto-ui-v2 :is(.modal-header, .modal-header-schedule, .modal-footer, .modal-footer-schedule, .modal-body-schedule, .modal-body) {
  border-color: var(--od-border-soft) !important;
  color: var(--od-text) !important;
}
body.opto-ui-v2 :is(.modal-header h2, .modal-header h3, .modal-header-schedule h2, .modal-header-schedule h3, .confirm-card h2, .app-confirm-card h2) {
  color: #eff6ff !important;
}
body.opto-ui-v2 :is(.modal-close-btn, .product-modal-close, .app-toast-close, .app-confirm-close) {
  background: #1a3552 !important;
  color: #c9d9ed !important;
  border: 1px solid #385879 !important;
}
body.opto-ui-v2 :is(.modal-close-btn, .product-modal-close, .app-toast-close, .app-confirm-close):hover {
  background: #274b72 !important;
  color: #fff !important;
}
body.opto-ui-v2 :is(.qr-scanner-card, .scanner-modal .modal-box, .face-camera-area, .face-enrollment-body, .qr-camera-shell, .face-preview-placeholder) {
  background: #091a2d !important;
  color: #dceaff !important;
  border-color: #315273 !important;
}
body.opto-ui-v2 :is(.app-toast, .toast, .toast-message) {
  background: #12263e !important;
  color: #e7f0fb !important;
  border: 1px solid #355171 !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .38) !important;
}
body.opto-ui-v2 .app-toast :is(.app-toast-title, .app-toast-message, .app-toast-content) {
  color: #e5effb !important;
}
body.opto-ui-v2 .app-toast.error { border-left-color: #f06a78 !important; }
body.opto-ui-v2 .app-toast.success { border-left-color: #39c58a !important; }
body.opto-ui-v2 .app-toast.warning { border-left-color: #e9b34f !important; }
body.opto-ui-v2 :is(.app-confirm-icon, .app-toast-icon) {
  color: #7ebcff !important;
}

/* =========================================================
   10. STATUS / ALERT COLORS — keep their existing meaning
   ========================================================= */
body.opto-ui-v2 :is(.success-note, .alert-success, .notice.success, .notification.success, .status.success, .badge.success) {
  background: rgba(23, 145, 100, .16) !important;
  color: #80e2b6 !important;
  border-color: rgba(55, 194, 140, .32) !important;
}
body.opto-ui-v2 :is(.warning, .alert-warning, .notice.warning, .notification.warning, .status.warning, .badge.warning) {
  background: rgba(190, 129, 32, .17) !important;
  color: #ffd17c !important;
  border-color: rgba(228, 171, 73, .34) !important;
}
body.opto-ui-v2 :is(.error, .alert-danger, .notice.error, .notification.error, .status.error, .badge.error, .danger) {
  color: #ff9ba5 !important;
}
body.opto-ui-v2 :is(.info, .alert-info, .notice.info, .notification.info, .status.info, .badge.info) {
  background: rgba(49, 121, 208, .16) !important;
  color: #9acbff !important;
  border-color: rgba(73, 149, 235, .3) !important;
}
body.opto-ui-v2 :is(.status, .badge, .pill, .shift-badge, .schedule-status, .performance-status) {
  border-color: rgba(130, 164, 205, .25);
}

/* =========================================================
   11. CHARTS, ANALYTICS AND SPECIAL WORKSPACE ELEMENTS
   ========================================================= */
body.opto-ui-v2 :is(.chart-card, .analytics-card, .report-card, .chart-container, .chart-wrapper, .chart-body, .chart-grid) {
  background-color: #102139 !important;
  border-color: var(--od-border) !important;
}
body.opto-ui-v2 :is(.chart-header h3, .chart-header h2, .analytics-card h2, .analytics-card h3, .report-card h2, .report-card h3) {
  color: #e8f2ff !important;
}
body.opto-ui-v2 :is(.chart-header span, .chart-header p, .chart-subtitle, .chart-caption) {
  color: #91a9c5 !important;
}
body.opto-ui-v2 :is(.chart-body, .chart-container, .chart-wrapper) canvas {
  background: transparent !important;
}
body.opto-ui-v2 :is(.hero-timer, .timer-card) {
  background: linear-gradient(125deg, #102e55, #18569d 68%, #11718e) !important;
  border: 1px solid #326b9d !important;
  color: #f2f8ff !important;
}
body.opto-ui-v2 :is(.card-timer, .weight-progress) {
  background: #173553 !important;
  color: #dcecff !important;
}
body.opto-ui-v2 :is(.weight-accounting-item, .weight-cell, .history-item, .history-info, .employee-info, .operator-info) {
  color: #d6e4f5 !important;
}
body.opto-ui-v2 :is(.weight-progress-bar, .progress-bar) {
  background: #1c3b5b !important;
}
body.opto-ui-v2 :is(.phase-hint, .phase-message, .notice, .note, .signal) {
  border-color: var(--od-border) !important;
}

/* =========================================================
   12. LOGIN — same navy / royal-blue / cyan language
   ========================================================= */
body.opto-login-v2 {
  --od-bg: #061222;
  --od-surface: #0e2036;
  --od-surface-2: #142b46;
  --od-border: #2a4565;
  --od-text: #eaf2ff;
  --od-muted: #9aafc9;
  color-scheme: dark;
  background:
    radial-gradient(ellipse at 12% 10%, rgba(34, 105, 208, .22), transparent 34%),
    radial-gradient(ellipse at 88% 88%, rgba(17, 160, 190, .16), transparent 32%),
    linear-gradient(135deg, #050e1b, #091a2e 52%, #07172a) !important;
  color: #eaf2ff !important;
}
body.opto-login-v2 .glow {
  opacity: .22 !important;
  filter: blur(125px);
}
body.opto-login-v2 .glow1 { background: #2563eb !important; }
body.opto-login-v2 .glow2 { background: #0e9fbd !important; }
body.opto-login-v2 .glow3 { background: #1e4f99 !important; }
body.opto-login-v2 .container {
  background: rgba(10, 25, 44, .92) !important;
  border: 1px solid rgba(103, 151, 204, .3) !important;
  border-radius: 27px !important;
  box-shadow: 0 28px 85px rgba(0, 0, 0, .48), 0 0 45px rgba(34, 103, 205, .1) !important;
  backdrop-filter: blur(22px);
}
body.opto-login-v2 .left-panel {
  background-color: #102e57 !important;
}
body.opto-login-v2 .overlay {
  background: linear-gradient(135deg, rgba(4, 19, 42, .91), rgba(18, 67, 133, .78) 58%, rgba(8, 119, 151, .65)) !important;
}
body.opto-login-v2 .brand h1,
body.opto-login-v2 .info-card h3 {
  color: #f5f9ff !important;
}
body.opto-login-v2 .brand p,
body.opto-login-v2 .info-card p {
  color: #c5d8ef !important;
}
body.opto-login-v2 .info-card {
  background: rgba(10, 31, 55, .54) !important;
  border: 1px solid rgba(151, 194, 239, .25) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
  backdrop-filter: blur(14px);
}
body.opto-login-v2 .info-card .icon {
  background: linear-gradient(140deg, rgba(48, 117, 223, .48), rgba(20, 163, 188, .28)) !important;
  color: #d9f5ff !important;
}
body.opto-login-v2 .right-panel {
  background: linear-gradient(145deg, rgba(15, 33, 55, .98), rgba(9, 24, 42, .98)) !important;
}
body.opto-login-v2 .login-section {
  color: #e9f2ff !important;
}
body.opto-login-v2 .login-header h2 {
  color: #f2f7ff !important;
}
body.opto-login-v2 .login-header p {
  color: #9fb4cf !important;
}
body.opto-login-v2 .login-methods {
  background: #0a1b2f !important;
  border: 1px solid #294462 !important;
}
body.opto-login-v2 .method-tab {
  color: #a6bad3 !important;
  background: transparent !important;
}
body.opto-login-v2 .method-tab.active {
  background: linear-gradient(110deg, #225bc8, #267bd3 72%, #118ba9) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(24, 91, 190, .28) !important;
}
body.opto-login-v2 :is(.input-box label, .remember, .form-options) {
  color: #c1d1e5 !important;
}
body.opto-login-v2 .input-field input,
body.opto-login-v2 .alternative-login-panel input,
body.opto-login-v2 :is(input, select, textarea) {
  background: #08182a !important;
  border: 1px solid #2b4868 !important;
  color: #edf5ff !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15) !important;
}
body.opto-login-v2 :is(input, textarea)::placeholder {
  color: #7189a7 !important;
}
body.opto-login-v2 .input-field input:focus,
body.opto-login-v2 .alternative-login-panel input:focus {
  background: #0d2037 !important;
  border-color: #4c99f4 !important;
  box-shadow: 0 0 0 3px rgba(56, 137, 241, .18) !important;
}
body.opto-login-v2 .input-field i,
body.opto-login-v2 .toggle-password,
body.opto-login-v2 .password-eye-btn {
  color: #83baff !important;
}
body.opto-login-v2 .toggle-password:hover,
body.opto-login-v2 .password-eye-btn:hover {
  background: #173554 !important;
  color: #b8eaff !important;
}
body.opto-login-v2 .remember input {
  accent-color: #3d8af0;
}
body.opto-login-v2 .form-options a {
  color: #78b5ff !important;
}
body.opto-login-v2 .form-options a:hover {
  color: #5bd9ef !important;
}
body.opto-login-v2 .login-btn {
  background: linear-gradient(110deg, #225bc8, #347fe9 62%, #12a0c1) !important;
  border: 1px solid rgba(127, 190, 255, .28) !important;
  color: #fff !important;
  box-shadow: 0 10px 25px rgba(24, 93, 195, .28) !important;
}
body.opto-login-v2 .login-btn:hover {
  background: linear-gradient(110deg, #2e70e1, #4693f4 62%, #1bb4d1) !important;
  box-shadow: 0 14px 30px rgba(24, 111, 218, .34) !important;
}
body.opto-login-v2 .divider::before {
  background: #294360 !important;
}
body.opto-login-v2 .divider span {
  background: #0d2036 !important;
  color: #8199b7 !important;
}
body.opto-login-v2 .social-btn {
  background: #132b46 !important;
  border: 1px solid #315171 !important;
  color: #9ccaff !important;
}
body.opto-login-v2 .social-btn:hover {
  background: #1b3c60 !important;
  border-color: #4b7db2 !important;
}
body.opto-login-v2 .alternative-login-panel {
  background: #0c1e33 !important;
  border: 1px solid #2a4564 !important;
  color: #dce9f8 !important;
}
body.opto-login-v2 .qr-camera-shell {
  background: #08192c !important;
  border-color: #315579 !important;
  color: #d9e9fa !important;
}
body.opto-login-v2 :is(.qr-camera-shell p, .qr-camera-shell span, .alternative-login-panel p, .alternative-login-panel label) {
  color: #a9bfd9 !important;
}
body.opto-login-v2 .app-toast {
  background: #12263e !important;
  color: #eaf2ff !important;
  border-color: #355171 !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .4) !important;
}
body.opto-login-v2 .app-toast :is(.app-toast-title, .app-toast-message, .app-toast-content) {
  color: #eaf2ff !important;
}
body.opto-login-v2 :is(.error, .login-error, .validation-error) {
  color: #ff9ca6 !important;
}
body.opto-login-v2 :is(button, input, select, textarea, a):focus-visible {
  outline: 3px solid rgba(72, 161, 255, .42) !important;
  outline-offset: 2px;
}

/* =========================================================
   13. TABLET / PHONE TOUCH STATES — visual only
   ========================================================= */
@media (hover: hover) {
  body.opto-ui-v2 :is(button, .nav-link, .profile-card, .schedule-card, .leader-card) {
    transition-duration: .18s;
  }
}
@media (max-width: 820px) {
  body.opto-ui-v2 :is(.modal-content, .modal-content-schedule, .modal-box, .product-modal-card, .confirm-card, .app-confirm-card) {
    background: linear-gradient(155deg, #142941, #0c1d31) !important;
  }
  body.opto-ui-v2 :is(.table-responsive, .table-wrap, .table-scroll, .schedule-table-container, .analytics-table-wrap, .detail-table-wrap) {
    background: #0a192b !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.opto-ui-v2 *,
  body.opto-login-v2 * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Additional existing OPTODEV action variants used by the current pages. */
body.opto-ui-v2 :is(.line-add-btn, .btn-modal-schedule.save, .save, .oir-trigger, .btn-view, .face-register-btn, .btn-action:not(.btn-delete):not(.btn-edit), .close-camera, .close-performance-btn, .employee-credential-close, .product-edit-chip, .confirm-cancel-btn, .delete-selection-cancel, .delete-confirm-cancel, .danger-outline) {
  background: #142b45 !important;
  color: #cfe0f4 !important;
  border: 1px solid #365575 !important;
  box-shadow: none !important;
}
body.opto-ui-v2 :is(.line-add-btn, .btn-modal-schedule.save, .save, .oir-trigger) {
  background: linear-gradient(112deg, #225bc8, #347fe9 65%, #168fb8) !important;
  color: #fff !important;
  border-color: rgba(113, 178, 255, .3) !important;
  box-shadow: 0 6px 16px rgba(22, 93, 201, .2) !important;
}
body.opto-ui-v2 :is(.line-add-btn, .btn-modal-schedule.save, .save, .oir-trigger):hover:not(:disabled) {
  background: linear-gradient(112deg, #2d70e4, #438df4 65%, #20a5ca) !important;
  color: #fff !important;
}
body.opto-ui-v2 :is(.btn-success, .success-btn, .delete-selection-confirm, .confirm-delete-btn, .delete-confirm-delete, .delete-selected-btn, .line-delete-btn, .delete-profile-btn, .danger-outline) {
  background: rgba(185, 46, 62, .18) !important;
  color: #ff9da8 !important;
  border: 1px solid rgba(232, 91, 108, .48) !important;
  box-shadow: none !important;
}
body.opto-ui-v2 :is(.btn-success, .success-btn) {
  background: linear-gradient(110deg, #137b62, #1a9a78) !important;
  color: #fff !important;
  border-color: rgba(82, 215, 170, .3) !important;
}
body.opto-ui-v2 :is(.btn-success, .success-btn):hover:not(:disabled) {
  background: linear-gradient(110deg, #168e70, #20ad88) !important;
}
body.opto-ui-v2 :is(.btn-delete, .btn-danger, .delete-btn, .danger-btn, .delete-selection-confirm, .confirm-delete-btn, .delete-confirm-delete, .delete-selected-btn, .line-delete-btn, .delete-profile-btn):hover:not(:disabled) {
  background: rgba(205, 54, 72, .3) !important;
  border-color: #df6471 !important;
  color: #ffe2e5 !important;
}
body.opto-ui-v2 :is(.btn-modal-schedule.cancel, .cancel, .confirm-cancel-btn, .delete-selection-cancel, .delete-confirm-cancel, .face-register-btn, .close-camera, .close-performance-btn, .employee-credential-close, .product-modal-close, .app-toast-close, .modal-close-btn) {
  background: #142b45 !important;
  color: #cfe0f4 !important;
  border: 1px solid #365575 !important;
}
body.opto-ui-v2 :is(.btn-modal-schedule.cancel, .cancel, .confirm-cancel-btn, .delete-selection-cancel, .delete-confirm-cancel, .face-register-btn, .close-camera, .close-performance-btn, .employee-credential-close, .product-modal-close, .app-toast-close, .modal-close-btn):hover:not(:disabled) {
  background: #1d3b5d !important;
  color: #fff !important;
  border-color: #4b7097 !important;
}
body.opto-ui-v2 .danger-outline {
  background: rgba(177, 48, 63, .12) !important;
  color: #ff9da8 !important;
  border-color: rgba(226, 91, 106, .48) !important;
}
body.opto-ui-v2 .product-edit-chip {
  background: #142b45 !important;
  color: #d6e7fa !important;
  border-color: #355575 !important;
}
body.opto-ui-v2 :is(.btn-view, .btn-action.btn-view) {
  background: #183554 !important;
  color: #a9d0ff !important;
  border-color: #345b80 !important;
}
body.opto-ui-v2 .btn-action {
  background: #142b45 !important;
  color: #dceaff !important;
  border-color: #365575 !important;
}
body.opto-ui-v2 .btn-action.btn-delete,
body.opto-ui-v2 .btn-action.delete {
  background: rgba(185, 46, 62, .18) !important;
  color: #ff9da8 !important;
  border-color: rgba(232, 91, 108, .48) !important;
}
body.opto-ui-v2 :is(.page-btn, .sa-page-btn):not(.active) {
  background: #142a43 !important;
  color: #c8d9ee !important;
  border-color: #304b69 !important;
}

/* Flatpickr is used by the existing scheduling forms. */
body.opto-ui-v2 .flatpickr-calendar {
  background: #10243b !important;
  border: 1px solid #365575 !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .42) !important;
}
body.opto-ui-v2 .flatpickr-calendar:before,
body.opto-ui-v2 .flatpickr-calendar:after {
  border-bottom-color: #10243b !important;
}
body.opto-ui-v2 .flatpickr-months,
body.opto-ui-v2 .flatpickr-weekdays,
body.opto-ui-v2 .flatpickr-time {
  background: #10243b !important;
  color: #dceaff !important;
}
body.opto-ui-v2 .flatpickr-current-month,
body.opto-ui-v2 .flatpickr-monthDropdown-months,
body.opto-ui-v2 .flatpickr-weekday {
  color: #dceaff !important;
  fill: #dceaff !important;
}
body.opto-ui-v2 .flatpickr-day {
  color: #c7d9ee !important;
}
body.opto-ui-v2 .flatpickr-day:hover,
body.opto-ui-v2 .flatpickr-day:focus {
  background: #1d3d60 !important;
  border-color: #3e6c9c !important;
}
body.opto-ui-v2 .flatpickr-day.today {
  border-color: #48a0ef !important;
}
body.opto-ui-v2 .flatpickr-day.selected,
body.opto-ui-v2 .flatpickr-day.startRange,
body.opto-ui-v2 .flatpickr-day.endRange {
  background: #2868d5 !important;
  border-color: #2868d5 !important;
  color: #fff !important;
}
body.opto-ui-v2 .flatpickr-time input,
body.opto-ui-v2 .flatpickr-time .flatpickr-am-pm {
  color: #e8f2ff !important;
  background: #0a1b2e !important;
}

/* Login-specific elements that were originally styled as pale blue callouts. */
body.opto-login-v2 .alt-login-title,
body.opto-login-v2 .alt-login-title h3 {
  color: #e6f2ff !important;
}
body.opto-login-v2 .alt-login-hint,
body.opto-login-v2 .scan-status {
  color: #9ab2ce !important;
}
body.opto-login-v2 .alt-action {
  background: linear-gradient(110deg, #173f70, #1d5d9c) !important;
  color: #e9f5ff !important;
  border: 1px solid #3b6e9e !important;
}
body.opto-login-v2 .alt-action:hover {
  background: linear-gradient(110deg, #20548f, #2478b8) !important;
  color: #fff !important;
}
body.opto-login-v2 .face-login-notice {
  background: rgba(177, 119, 27, .16) !important;
  border: 1px solid rgba(230, 179, 83, .34) !important;
  color: #f4d18b !important;
}
body.opto-login-v2 .face-login-notice :is(p, span, strong, i) {
  color: #f4d18b !important;
}
body.opto-login-v2 #qrCameraPlaceholder,
body.opto-login-v2 #qrCameraPlaceholder :is(p, span, i) {
  color: #a7c4e3 !important;
}
body.opto-login-v2 select option {
  background: #10243b !important;
  color: #e3edf9 !important;
}


/* Existing profile, notification, review and attendance surfaces. */
body.opto-ui-v2 :is(.notifications, .notification-list, .notification-panel, .notification-item, .latest-scan-card, .history-card) {
  background: linear-gradient(155deg, #142940, #0e1e31) !important;
  color: #e4eefb !important;
  border: 1px solid #2b4563 !important;
}
body.opto-ui-v2 .notification-item:hover {
  background: #18324f !important;
  border-color: #3a638b !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24) !important;
}
body.opto-ui-v2 .notification-item :is(h3, h4, strong, p, span) {
  color: inherit;
}
body.opto-ui-v2 .notification-item :is(p, small, .notification-time) {
  color: #9bb0ca !important;
}
body.opto-ui-v2 .notification {
  background: #142b45;
  color: #dceaff;
  border: 1px solid #304d6e;
}
body.opto-ui-v2 :is(.performance-loading, .loading-state) {
  background: rgba(41, 112, 202, .15) !important;
  color: #9bcaff !important;
  border: 1px solid rgba(76, 145, 224, .28) !important;
}
body.opto-ui-v2 :is(.performance-error, .error-state) {
  background: rgba(169, 42, 59, .16) !important;
  color: #ff9da8 !important;
  border: 1px solid rgba(224, 89, 105, .34) !important;
}
body.opto-ui-v2 .opto-result-summary {
  color: #a9bdd5 !important;
}
body.opto-ui-v2 .opto-result-summary::before {
  color: #48d2a1 !important;
}
body.opto-ui-v2 .opto-scope-note {
  background: rgba(40, 103, 173, .15) !important;
  border-left-color: #3f8ee7 !important;
  color: #b9d2ee !important;
}
body.opto-ui-v2 .opto-scope-note i {
  color: #79baff !important;
}
body.opto-ui-v2 :is(.opto-empty-filter, .opto-empty-state, .delete-empty-state) {
  background: #0d2035 !important;
  color: #9bb1cb !important;
  border-color: #365372 !important;
}
body.opto-ui-v2 .delete-selection-bar {
  background: rgba(150, 39, 54, .13) !important;
  border-color: rgba(222, 86, 103, .38) !important;
  color: #ffc1c7 !important;
}
body.opto-ui-v2 .delete-selection-info {
  color: #ffc1c7 !important;
}
body.opto-ui-v2 .delete-confirm-modal,
body.opto-ui-v2 .employee-credential-modal {
  background: rgba(2, 8, 17, .78) !important;
  backdrop-filter: blur(5px);
}
body.opto-ui-v2 :is(.delete-confirm-dialog, .employee-credential-dialog, .face-modal-box, .face-enrollment-box) {
  background: linear-gradient(155deg, #142941, #0c1d31) !important;
  color: #e8f0fb !important;
  border: 1px solid #355171 !important;
  box-shadow: 0 25px 75px rgba(0, 0, 0, .48) !important;
}
body.opto-ui-v2 :is(.employee-credential-top h2, .delete-confirm-dialog h2, .face-modal-box h2, .face-enrollment-box h2) {
  color: #eff6ff !important;
}
body.opto-ui-v2 :is(.employee-credential-top p, .employee-qr-privacy, .delete-confirm-dialog p) {
  color: #9bb0ca !important;
}
body.opto-ui-v2 #credentialStatus {
  color: #91d8f3 !important;
}
body.opto-ui-v2 .face-preview-placeholder {
  background: radial-gradient(circle at center, #163b59 0, #0d2035 70%) !important;
  border-color: #355575 !important;
}
body.opto-ui-v2 :is(.face-preview-placeholder, .face-preview-placeholder i, .face-preview-placeholder span, .face-preview-placeholder p) {
  color: #a9c5e2 !important;
}
body.opto-ui-v2 .face-camera-area {
  background: #061323 !important;
}
body.opto-ui-v2 .face-enrollment-body {
  background: #10243b !important;
  color: #dceaff !important;
}


/* Final pass for existing module-specific surfaces that use custom selectors. */
body.opto-ui-v2 :is(.schedule-wrapper, .overview-card, .performance-filter-bar, .reports-style-performance-filter, .total-performance-card, .performance-score-kpis .score-kpi, .performance-score-kpis .total-score-kpi, .total-score-kpi, .employee-toolbar, .employee-table-card, .detail-stats > div, .attendance-summary span, .previous-score, .schedule-state.pending, .notification-table-heading, .table-info, .delete-product-option, .empty-products, .no-operator-matches, .employee-photo-preview, .face-recognition-status, .employee-automatic-note) {
  background: #12263e !important;
  color: #d8e6f6 !important;
  border-color: #2d4968 !important;
}
body.opto-ui-v2 :is(.schedule-wrapper, .overview-card, .performance-filter-bar, .reports-style-performance-filter, .total-performance-card, .performance-score-kpis .score-kpi, .performance-score-kpis .total-score-kpi, .total-score-kpi, .employee-toolbar, .employee-table-card, .detail-stats > div, .attendance-summary span, .previous-score, .schedule-state.pending, .notification-table-heading, .table-info, .delete-product-option, .empty-products, .no-operator-matches, .employee-photo-preview, .face-recognition-status, .employee-automatic-note) :is(h1,h2,h3,h4,p,span,strong,label,small) {
  color: inherit !important;
}
body.opto-ui-v2 .schedule-wrapper {
  box-shadow: var(--od-shadow-soft) !important;
}
body.opto-ui-v2 .dispatcher-row {
  background: #10243a !important;
  color: #dce8f6 !important;
  border-color: #2a4562 !important;
}
body.opto-ui-v2 .dispatcher-row:nth-child(even) {
  background: #0e2035 !important;
}
body.opto-ui-v2 .dispatcher-row:hover,
body.opto-ui-v2 .day-cell.empty {
  background: #173452 !important;
  color: #e7f2ff !important;
}
body.opto-ui-v2 .empty-row:hover {
  background: #10243a !important;
}
body.opto-ui-v2 :is(.edit-btn, .camera-btn.secondary, .employee-credential-btn, .btn-reset, .barrel-link, .product-edit-chip) {
  background: #173451 !important;
  color: #b9d7f7 !important;
  border: 1px solid #345a7e !important;
}
body.opto-ui-v2 :is(.edit-btn, .camera-btn.secondary, .employee-credential-btn, .btn-reset, .barrel-link, .product-edit-chip):hover:not(:disabled) {
  background: #1e4369 !important;
  color: #fff !important;
  border-color: #4c7eac !important;
}
body.opto-ui-v2 .employee-credential-actions button {
  background: #142b45 !important;
  color: #cfe0f4 !important;
  border: 1px solid #365575 !important;
}
body.opto-ui-v2 .employee-credential-actions .danger-outline {
  background: rgba(177, 48, 63, .12) !important;
  color: #ff9da8 !important;
  border-color: rgba(226, 91, 106, .48) !important;
}
body.opto-ui-v2 .employee-automatic-note {
  background: rgba(42, 115, 195, .16) !important;
  color: #a9d1ff !important;
  border-color: rgba(78, 146, 218, .3) !important;
}
body.opto-ui-v2 .success-message {
  background: rgba(22, 139, 101, .16) !important;
  color: #88e1bb !important;
  border: 1px solid rgba(55, 194, 140, .3) !important;
}
body.opto-ui-v2 .delete-product-option:hover {
  background: #1a3858 !important;
}
body.opto-ui-v2 .profile-delete-checkmark {
  background: #183553 !important;
  border-color: #4775a3 !important;
  color: #d9ebff !important;
}
body.opto-ui-v2 .signal-observe {
  background: rgba(190, 129, 32, .17) !important;
  color: #ffd17c !important;
  border-color: rgba(228, 171, 73, .34) !important;
}
body.opto-ui-v2 :is(.signal-limited, .signal-none, .status-inactive) {
  background: rgba(111, 137, 169, .15) !important;
  color: #b3c3d8 !important;
  border-color: rgba(133, 160, 193, .26) !important;
}

/* The analytics pages have a few intentionally high-specificity light rules.
   These exact selectors ensure the dark layer wins without touching chart data. */
body.opto-ui-v2 .barrel-page .page-heading .btn-export {
  background: linear-gradient(112deg, #225bc8, #347fe9 65%, #168fb8) !important;
  color: #fff !important;
  border-color: rgba(113, 178, 255, .3) !important;
}
body.opto-ui-v2 .barrel-page .filter-card,
body.opto-ui-v2 .reports-container .analytics-filter-card {
  background: linear-gradient(155deg, #12263e, #0e1e32) !important;
  border-color: #2b4563 !important;
}
body.opto-ui-v2 .barrel-page .filter-group :is(input, select),
body.opto-ui-v2 .reports-container .analytics-filter-card .filter-group :is(input, select) {
  background: #09192c !important;
  color: #e5effb !important;
  border-color: #2c4665 !important;
}
body.opto-ui-v2 .barrel-page .filter-group :is(input, select):focus,
body.opto-ui-v2 .reports-container .analytics-filter-card .filter-group :is(input, select):focus {
  background: #0d2036 !important;
  border-color: #438de9 !important;
}
body.opto-ui-v2 .barrel-page .filter-actions .btn-reset,
body.opto-ui-v2 .reports-container .analytics-filter-card .opto-reset-btn {
  background: #142a43 !important;
  color: #c8d9ee !important;
  border-color: #304b69 !important;
}
body.opto-ui-v2 .reports-container .report-buttons :is(.pdf-btn, .excel-btn) {
  background: linear-gradient(112deg, #225bc8, #347fe9 65%, #168fb8) !important;
  color: #fff !important;
  border-color: rgba(113, 178, 255, .3) !important;
}
body.opto-ui-v2 .barrel-page .kpi-card,
body.opto-ui-v2 .reports-container .analytics-kpi-grid .kpi-card {
  background: linear-gradient(155deg, #142a43, #0d1e32) !important;
  border-color: #2b4563 !important;
}
body.opto-ui-v2 .reports-container .analytics-kpi-grid .kpi-icon {
  background: linear-gradient(140deg, #1d55b3, #147da9) !important;
  color: #fff !important;
}
body.opto-ui-v2 .reports-container .analytics-kpi-grid .kpi-content h4 {
  color: #9db1cb !important;
}
body.opto-ui-v2 .reports-container .analytics-kpi-grid .kpi-content h2 {
  color: #f3f8ff !important;
}
body.opto-ui-v2 .reports-container .analytics-kpi-grid .kpi-content span {
  color: #91a6c1 !important;
}
body.opto-ui-v2 .barrel-page .analytics-card,
body.opto-ui-v2 .reports-container .chart-card,
body.opto-ui-v2 .reports-container .analytics-eight-grid .chart-card {
  background: linear-gradient(155deg, #142a43, #0d1e32) !important;
  border-color: #2b4563 !important;
}
body.opto-ui-v2 .barrel-page .section-title,
body.opto-ui-v2 .reports-container .chart-header {
  background: #142941 !important;
  border-color: #2b4563 !important;
}
body.opto-ui-v2 .reports-container .chart-header h3 {
  color: #e8f2ff !important;
}
body.opto-ui-v2 .reports-container .chart-header span {
  color: #91a9c5 !important;
}
body.opto-ui-v2 .reports-container .chart-body {
  background: #102139 !important;
}
body.opto-ui-v2 .reports-container .chart-body.opto-chart-empty::after {
  background: #12263e !important;
  color: #9cb1cb !important;
}
body.opto-ui-v2 .barrel-page .detail-stats > div {
  background: #142b45 !important;
  border-color: #304d6e !important;
  color: #d7e5f5 !important;
}
body.opto-ui-v2 .barrel-page .bar-track {
  background: #1a3551 !important;
}
body.opto-ui-v2 .barrel-page .analytics-table {
  background: #0c1b2e !important;
}
body.opto-ui-v2 .barrel-page .analytics-table thead th {
  background: #152c47 !important;
  color: #b9cee7 !important;
}
body.opto-ui-v2 .barrel-page .analytics-table tbody td {
  background: transparent !important;
  color: #d7e3f2 !important;
}
body.opto-ui-v2 .barrel-page .analytics-table tbody tr:hover {
  background: #17324f !important;
}
body.opto-ui-v2 .barrel-page .barrel-link,
body.opto-ui-v2 .barrel-page .table-info {
  background: #173451 !important;
  color: #b9d7f7 !important;
  border-color: #345a7e !important;
}
body.opto-ui-v2 .barrel-page .review-form textarea,
body.opto-ui-v2 .barrel-page .review-form select {
  background: #09192c !important;
  color: #e5effb !important;
  border-color: #2c4665 !important;
}
body.opto-ui-v2 .barrel-page .review-entry {
  background: #12263e !important;
  color: #d8e6f6 !important;
  border-color: #2d4968 !important;
}
body.opto-ui-v2 .barrel-page .review-entry strong {
  color: #e8f2ff !important;
}
body.opto-ui-v2 .barrel-page .review-entry p {
  color: #a9bdd5 !important;
}
body.opto-ui-v2 .reports-container .analytics-eight-grid .chart-card::before {
  background: linear-gradient(90deg, #2869d8, #22c4e3) !important;
}

/* Other existing UI elements with high-specificity light styling. */
body.opto-ui-v2 .analytics-kpi-grid .kpi-card {
  background: linear-gradient(155deg, #142a43, #0d1e32) !important;
  border-color: #2b4563 !important;
}
body.opto-ui-v2 .analytics-kpi-grid .kpi-icon {
  background: linear-gradient(140deg, #1d55b3, #147da9) !important;
  color: #fff !important;
}
body.opto-ui-v2 .chart-card {
  background: linear-gradient(155deg, #142a43, #0d1e32) !important;
  border-color: #2b4563 !important;
}
body.opto-ui-v2 .chart-header {
  background: #142941 !important;
  border-color: #2b4563 !important;
}
body.opto-ui-v2 .chart-header h3 {
  color: #e8f2ff !important;
}
body.opto-ui-v2 .chart-header span {
  color: #91a9c5 !important;
}
body.opto-ui-v2 .performance-subsection-title h3 {
  color: #e8f2ff !important;
}
body.opto-ui-v2 .performance-subsection-title p {
  color: #91a9c5 !important;
}
body.opto-ui-v2 #shiftAttendanceMA {
  background: #12263e !important;
  border-color: #2b4563 !important;
  color: #b9cbe0 !important;
}
body.opto-ui-v2 .detail-pagination button {
  background: #142a43 !important;
  color: #c8d9ee !important;
  border-color: #304b69 !important;
}
body.opto-ui-v2 .app-confirm-card {
  background: linear-gradient(155deg, #142941, #0d1e32) !important;
  border-color: #355171 !important;
  color: #e8f0fb !important;
}
body.opto-ui-v2 .app-confirm-icon,
body.opto-ui-v2 .app-toast-icon {
  background: #173654 !important;
  color: #9ccaff !important;
}
body.opto-ui-v2 .app-confirm-cancel {
  background: #142b45 !important;
  color: #cfe0f4 !important;
  border: 1px solid #365575 !important;
}
body.opto-ui-v2 .employee-credential-btn {
  background: #142b45 !important;
  color: #cfe0f4 !important;
  border-color: #365575 !important;
}


/* Improve contrast for the existing Barrel Analytics / Reports typography. */
body.opto-ui-v2 .barrel-page .page-heading h1,
body.opto-ui-v2 .reports-container > .section-title h2 {
  color: #f1f7ff !important;
}
body.opto-ui-v2 .barrel-page .page-heading .eyebrow {
  background: rgba(47, 121, 221, .16) !important;
  color: #a6d2ff !important;
  border-color: rgba(91, 159, 235, .3) !important;
}
body.opto-ui-v2 .barrel-page .page-heading p {
  color: #9bb0ca !important;
}
body.opto-ui-v2 .barrel-page .filter-group label,
body.opto-ui-v2 .reports-container .analytics-filter-card .filter-group label {
  color: #b8cbe1 !important;
}
body.opto-ui-v2 .barrel-page .opto-result-summary {
  color: #a9bdd5 !important;
}
body.opto-ui-v2 .barrel-page .opto-scope-note {
  background: rgba(40, 103, 173, .15) !important;
  border-color: rgba(68, 137, 211, .32) !important;
  color: #b9d2ee !important;
}
body.opto-ui-v2 .barrel-page .opto-scope-note i {
  color: #79baff !important;
}
body.opto-ui-v2 .barrel-page .kpi-icon {
  background: linear-gradient(140deg, #1d55b3, #147da9) !important;
  color: #fff !important;
}
body.opto-ui-v2 .barrel-page .kpi-card span,
body.opto-ui-v2 .barrel-page .kpi-card small,
body.opto-ui-v2 .barrel-page .insight-item small,
body.opto-ui-v2 .barrel-page .comparison-bar small,
body.opto-ui-v2 .barrel-page .detail-stats small {
  color: #9bb1cb !important;
}
body.opto-ui-v2 .barrel-page .kpi-card strong,
body.opto-ui-v2 .barrel-page .detail-stats strong {
  color: #f0f6ff !important;
}
body.opto-ui-v2 .barrel-page .section-title h2,
body.opto-ui-v2 .reports-container .analytics-section .section-title h2 {
  color: #eaf3ff !important;
}
body.opto-ui-v2 .barrel-page .section-title p {
  color: #9bb0ca !important;
}
body.opto-ui-v2 .reports-container #reportStatus {
  color: #a9bdd5 !important;
}
