/* CWR Desktop Theme: Harmonize with Logo Colors */
:root {
  --cwr-blue: #005EB8;
  --cwr-green: #2ECC71;
  --cwr-sidebar: #1B2A3A;
  --cwr-sidebar-accent: #005EB8;
  --cwr-sidebar-active: #2ECC71;
  --cwr-alert: #E74C3C;
  --cwr-bg: #f4f8fb;
  --cwr-bg-gradient: linear-gradient(135deg, #005EB8 0%, #2ECC71 100%);
  --cwr-font: 'Inter', Arial, sans-serif;
  --cwr-radius: 8px;
  --cwr-shadow: 0 2px 12px rgba(44,62,80,0.07);
  --cwr-spacing: 2rem;
  --cwr-header: #222;
  --cwr-section-header: #fff;
  --cwr-link: #005EB8;
  --cwr-link-active: #2ECC71;
  --cwr-link-inactive: #b0c4de;
  --cwr-content-bg: #f4f8fb;
  --cwr-sidebar-width: 260px;
}

html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  font-family: var(--cwr-font);
  background: var(--cwr-bg);
  color: var(--cwr-header);
  font-size: 16px;
  line-height: 1.6;
}

*, *::before, *::after {
  box-sizing: border-box;
}
/* .cwr-btn is the CWR legacy standalone button — does NOT override Bootstrap btn variants */
.cwr-btn {
  background: var(--cwr-blue);
  color: #fff;
  border: none;
  border-radius: var(--cwr-radius);
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.cwr-btn:hover {
  background: #004a93;
  box-shadow: 0 4px 12px rgba(0,94,184,0.25);
}
input, select, textarea {
  font-family: var(--cwr-font);
  border: 1px solid #d0d7de;
  border-radius: var(--cwr-radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: #1a2332;
}
select, .form-select {
  background-color: #ffffff;
  color: #1a2332;
  appearance: auto;
}
select option, .form-select option {
  background-color: #ffffff;
  color: #1a2332;
  padding: 0.35rem 0.5rem;
}
datalist {
  background-color: #ffffff;
  color: #1a2332;
}
datalist option {
  background-color: #ffffff;
  color: #1a2332;
  padding: 0.35rem 0.5rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cwr-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,94,184,0.12);
  background-color: #ffffff;
}
.cwr-sidebar {
  background: var(--cwr-sidebar);
  color: #fff;
  min-width: var(--cwr-sidebar-width);
  width: var(--cwr-sidebar-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: var(--cwr-shadow);
  z-index: 10;
  padding: var(--cwr-spacing) 0;
  border-right: 4px solid var(--cwr-sidebar-accent);
}
.cwr-nav-link {
  color: var(--cwr-link-inactive);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--cwr-radius);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: 0.02em;
}
.cwr-nav-link.active {
  color: var(--cwr-link-active);
  background: rgba(46,204,113,0.12);
  font-weight: bold;
  border-left: 4px solid var(--cwr-link-active);
}
.cwr-header {
  background: var(--cwr-sidebar);
  color: #fff;
  box-shadow: 0 2px 8px rgba(44,62,80,0.07);
}
.cwr-header-logo-large {
  filter: drop-shadow(0 0 8px #005EB8);
}
.cwr-company-name {
  color: var(--cwr-blue);
}
.cwr-system-desc {
  color: var(--cwr-green);
}
.cwr-return-btn {
  background: var(--cwr-blue);
  color: #fff;
  border: none;
  border-radius: var(--cwr-radius);
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 2rem;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 1px 4px rgba(44,62,80,0.07);
}
.cwr-return-btn:hover {
  background: var(--cwr-green);
}

/* ═══════════════════════════════════════════════════════════
   MODAL & BANNER FIXES - February 2026
   ═══════════════════════════════════════════════════════════
   Fixes for modal content display and banner text readability
   ─────────────────────────────────────────────────────────── */

/* ── Larger modal widths for better content visibility ───── */
.modal-dialog,
.modal-container {
    max-width: 720px !important;  /* Increased from 620px */
}
.modal-dialog.modal-lg,
.modal-dialog-custom.modal-lg {
    max-width: 920px !important;  /* Increased from 820px */
}
.modal-dialog.modal-xl {
    max-width: 1200px !important;  /* Increased from 1040px */
}
.modal-dialog.large {
    max-width: 980px !important;  /* Increased from 900px */
}

/* ── Modal body scrolling improvements ───────────────────── */
.modal-body {
    max-height: 65vh !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
}

/* ──  Modal header text contrast fixes ──────────────────────
   Ensure ALL text in colored/gradient headers is white and bold */
.modal-header[style*="background:"] *,
.modal-header[style*="background-color"] *,
.modal-header[style*="linear-gradient"] * {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.modal-header[style*="background:"] h1,
.modal-header[style*="background:"] h2,
.modal-header[style*="background:"] h3,
.modal-header[style*="background:"] h4,
.modal-header[style*="background:"] h5,
.modal-header[style*="background:"] h6,
.modal-header[style*="background:"] .modal-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

/* ── Fix for .bg-white card/modal headers - ensure dark text ── */
.card-header.bg-white,
.card-header.bg-white *,
.modal-header.bg-white,
.modal-header.bg-white * {
    color: #1a2332 !important;
    text-shadow: none !important;
}

/* ── Fix for .card-header with Bootstrap color classes ── */
.card-header.bg-primary,
.card-header.bg-secondary,
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-warning,
.card-header.bg-info,
.card-header.bg-dark {
    color: #ffffff !important;
}

.card-header.bg-primary *,
.card-header.bg-secondary *,
.card-header.bg-success *,
.card-header.bg-danger *,
.card-header.bg-info *,
.card-header.bg-dark * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Warning background should have dark text for readability */
.card-header.bg-warning,
.card-header.bg-warning * {
    color: #1a2332 !important;
    text-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL MODAL CLOSE BUTTON FIX
   Makes the × clearly visible on every coloured modal header
   regardless of whether the colour comes from a Bootstrap
   utility class (bg-primary, bg-dark …) or an inline style.
   ═══════════════════════════════════════════════════════════ */

/* Base: every .btn-close inside any modal header variant */
.modal-header .btn-close,
.cwr-modal-header .btn-close,
.ac-modal-header .btn-close,
.area-modal-header .btn-close,
.ss-modal-header .btn-close,
.video-modal-header .btn-close,
[class*="modal-header"] .btn-close {
    /* Larger, easier to tap */
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.15s, background-color 0.15s, transform 0.1s;
    background-size: 0.85em;
}

/* Hover state for all headers */
.modal-header .btn-close:hover,
.cwr-modal-header .btn-close:hover,
.ac-modal-header .btn-close:hover,
.area-modal-header .btn-close:hover,
.ss-modal-header .btn-close:hover,
.video-modal-header .btn-close:hover,
[class*="modal-header"] .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ── White × for Bootstrap bg-* utility colour classes ─────*/
.modal-header.bg-primary   .btn-close,
.modal-header.bg-secondary .btn-close,
.modal-header.bg-success   .btn-close,
.modal-header.bg-danger    .btn-close,
.modal-header.bg-warning   .btn-close,  /* warning uses dark text below */
.modal-header.bg-info      .btn-close,
.modal-header.bg-dark      .btn-close,
.modal-header.bg-black     .btn-close {
    filter: brightness(0) invert(1);
    background-color: rgba(255,255,255,0.15);
}
.modal-header.bg-primary   .btn-close:hover,
.modal-header.bg-secondary .btn-close:hover,
.modal-header.bg-success   .btn-close:hover,
.modal-header.bg-danger    .btn-close:hover,
.modal-header.bg-info      .btn-close:hover,
.modal-header.bg-dark      .btn-close:hover,
.modal-header.bg-black     .btn-close:hover {
    background-color: rgba(255,255,255,0.3);
}

/* bg-warning keeps dark text — dark × with visible backing */
.modal-header.bg-warning .btn-close {
    filter: none;
    background-color: rgba(0,0,0,0.12);
}
.modal-header.bg-warning .btn-close:hover {
    background-color: rgba(0,0,0,0.22);
}

/* ── White × for inline-style gradient/coloured headers ────*/
.modal-header[style*="background"] .btn-close,
.cwr-modal-header[style*="background"] .btn-close,
.ac-modal-header[style*="background"] .btn-close,
.ac-modal-header.danger .btn-close,
[class*="modal-header"][style*="background"] .btn-close,
.modal-header.text-white .btn-close {
    filter: brightness(0) invert(1);
    background-color: rgba(255,255,255,0.15);
}
.modal-header[style*="background"] .btn-close:hover,
.cwr-modal-header[style*="background"] .btn-close:hover,
.ac-modal-header[style*="background"] .btn-close:hover,
.ac-modal-header.danger .btn-close:hover,
[class*="modal-header"][style*="background"] .btn-close:hover,
.modal-header.text-white .btn-close:hover {
    background-color: rgba(255,255,255,0.3);
}

/* ── Fallback: plain (white bg) headers — dark × is fine ──*/
/* Nothing needed — Bootstrap default is already adequate     */

/* ── Page header banners with background colors ──────────── */
.page-header[style*="background"],
.section-header[style*="background"],
.card-header[style*="background"] {
    color: #ffffff !important;
}

/* Protect inline gradient backgrounds from being overridden */
.card-header[style*="background"] {
    display: block !important;
    background-image: unset;
}
.card-header[style*="background"] > .row {
    width: 100%;
}

.page-header[style*="background"] *,
.section-header[style*="background"] *,
.card-header[style*="background"] * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ── Specific fix for modal-content containers ─────────────*/
.modal-content {
    display: flex !important;
    flex-direction: column !important;
    max-height: 90vh !important;
}

/* ── Badge visibility on colored backgrounds ───────────────*/
.modal-header .badge,
div[style*="background"] .badge {
    text-shadow: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 700 !important;
    padding: 0.35em 0.65em !important;
}

/* ── High contrast for white text on dark blue (#005EB8) ──*/
[style*="background:#005EB8"],
[style*="background: #005EB8"],
[style*="background-color:#005EB8"],
[style*="background-color: #005EB8"] {
    color: #ffffff !important;
}

[style*="background:#005EB8"] *,
[style*="background: #005EB8"] *,
[style*="background-color:#005EB8"] *,
[style*="background-color: #005EB8"] * {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ── Ensure form labels remain readable in modal body ───── */
.modal-body label,
.modal-body .form-label {
    color: #1a2332 !important;
    text-shadow: none !important;
}

/* ── Ensure modal body text is always dark on white bg ──── */
.modal-body,
.modal-body p,
.modal-body span,
.modal-body div,
.modal-body h1, .modal-body h2, .modal-body h3,
.modal-body h4, .modal-body h5, .modal-body h6,
.modal-body strong, .modal-body small {
    color: #1a2332;
    text-shadow: none;
}

/* Allow alert colors to override inside modal body */

/* ── SI Map Pin Placement Animation ──────────────────────── */
@keyframes pulse-pin {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.placement-pin-pulse {
    animation: pulse-pin 1.5s ease-in-out infinite;
}

/* SI Map controls */
.si-map-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 10px;
    align-items: center;
}

.si-map-mode-indicator {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 6px;
}

.si-map-mode-indicator i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.modal-body .alert,
.modal-body .alert * {
    text-shadow: none !important;
}

.modal-body .text-white,
.modal-body .text-white * {
    color: #ffffff !important;
}

/* ── Table within modals - better scrolling ───────────────*/
.modal-body .table-responsive {
    max-height: 50vh;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════
   TEXT CONTAINMENT & OVERFLOW FIXES - March 2026
   ═══════════════════════════════════════════════════════════
   Balance readable content with sensible containment.
   Tables scroll horizontally when needed; badges and buttons
   remain fully readable at all viewport sizes.
   ─────────────────────────────────────────────────────────── */

/* ── Buttons: readable, proportional sizing ─────────────── */
.btn, button[class*="btn"] {
    white-space: nowrap;
    max-width: 100%;
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
}

/* Preserve Bootstrap btn-lg for pages that explicitly use it */
.btn.btn-lg, .btn-lg {
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
}

/* Override for buttons that need wrapping */
.btn.text-wrap,
.btn-group .btn {
    white-space: normal !important;
}

/* ── Button groups ───────────────────────────────────────── */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.btn-group .btn {
    flex: 1 1 auto;
    min-width: fit-content;
}

/* ── Table cells: allow wrapping, sensible padding ──────── */
td, th {
    padding: 0.5rem 0.5rem;
    font-size: 0.85rem;
    vertical-align: middle;
}

th {
    font-weight: 600;
    padding: 0.55rem 0.5rem;
    background: #f8f9fa;
}

/* Allow actions column to wrap vertically */
td .d-flex.flex-column {
    white-space: normal;
}

/* ── Compact action button columns ─────────────────────── */
td .d-flex.flex-column {
    width: 100%;
    max-width: 100%;
    gap: 0.25rem;
}

td .d-flex.flex-column .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    width: 100%;
    white-space: nowrap;
}

td .d-flex.flex-column .btn i {
    margin-right: 0.25rem;
}

/* ── Badges: fully readable, high contrast ─────────────── */
.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}

/* ── HIGH CONTRAST badge colours ─────────────────────────
   All status badges must have WCAG AA contrast (4.5:1+).
   Darken green, ensure white text is visible.
   ────────────────────────────────────────────────────────── */
.badge.bg-success,
.bg-success.badge,
span.badge.bg-success,
.status-badge.compliant {
    background-color: #0d6832 !important; /* Darker green for white text contrast */
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.badge.bg-warning,
.bg-warning.badge {
    background-color: #c27803 !important; /* Darker amber */
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.badge.bg-warning.text-dark {
    background-color: #ffc107 !important; /* Standard yellow */
    color: #1a1a1a !important;
    text-shadow: none;
}

.badge.bg-danger,
.bg-danger.badge {
    background-color: #b02a37 !important; /* Slightly darker red */
    color: #ffffff !important;
}

.badge.bg-info,
.bg-info.badge {
    background-color: #0a6ebd !important;
    color: #ffffff !important;
}

.badge.bg-secondary,
.bg-secondary.badge {
    background-color: #4a5568 !important;
    color: #ffffff !important;
}

.badge.bg-primary,
.bg-primary.badge {
    background-color: #004a93 !important;
    color: #ffffff !important;
}

/* Card headers with bg-success also need darker green */
.card-header.bg-success,
.card.bg-success .card-body,
div.bg-success.text-white,
.modal-header.bg-success {
    background-color: #0d6832 !important;
    color: #ffffff !important;
}

/* Table row backgrounds (table-success, table-warning, table-danger) */
.table-success {
    --bs-table-bg: #d4edda;
    color: #1a2332;
}

/* Toast headers */
.toast-header.bg-success {
    background-color: #0d6832 !important;
    color: #ffffff !important;
}

/* ── Card and panel text overflow ─────────────────────────*/
.card-body, .card-header, .card-footer {
    overflow: visible;
}

/* Allow card-body with tables to scroll horizontally */
.card-body:has(.table),
.card-body:has(.table-responsive) {
    overflow-x: auto;
    overflow-y: visible;
}

.card-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── List items and navigation links ──────────────────────*/
.nav-link, .list-group-item, .dropdown-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Alert messages ───────────────────────────────────────*/
.alert {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ── Flex containers with text ────────────────────────────*/
.d-flex > * {
    min-width: 0; /* Allows flex items to shrink below content size */
}

/* ── Tables: allow horizontal scroll when content is wide ──*/
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Card body with tables */
.card-body:has(.table-responsive) {
    padding: 0;
}

.card:has(.table-responsive) .card-body {
    padding: 0;
}

.table {
    table-layout: auto;
    width: 100%;
    margin-bottom: 0;
    font-size: 0.85rem;
}

/* Force table to fit container when possible */
.table-responsive .table {
    min-width: 600px; /* Ensures scroll appears only when truly needed */
}

/* Sticky header */
.table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

/* ── Truncate long text with ellipsis utility ─────────────*/
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

/* ── Small text in buttons ────────────────────────────────*/
.btn small, .btn .badge {
    font-size: 0.75em;
}

/* ── Force all containers to fit viewport ──────────────────*/
.container-fluid {
    max-width: 100%;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

.container-fluid .row {
    margin-left: -12px;
    margin-right: -12px;
}

.container-fluid .col,
.container-fluid [class*="col-"] {
    padding-left: 12px;
    padding-right: 12px;
}

/* Main content area */
.content,
main,
.main-content {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

/* Cards fit container */
.card {
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
}

/* All forms fit viewport */
form, .form {
    max-width: 100%;
    overflow-x: hidden;
}

.form-control, .form-select {
    max-width: 100%;
}

/* ── Responsive adjustments ──────────────────────────────
   Instead of hiding columns (which breaks different table
   structures), rely on the table-responsive horizontal
   scroll and just reduce padding/font at smaller screens.
   ──────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    td, th {
        padding: 0.4rem 0.35rem;
        font-size: 0.82rem;
    }

    td .d-flex.flex-column .btn {
        font-size: 0.72rem;
        padding: 0.22rem 0.35rem;
    }
}

@media (max-width: 992px) {
    td, th {
        padding: 0.35rem 0.3rem;
        font-size: 0.78rem;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.55rem;
    }

    td .d-flex.flex-column .btn {
        font-size: 0.68rem;
        padding: 0.2rem 0.3rem;
    }
}

@media (max-width: 768px) {
    td, th {
        padding: 0.3rem 0.25rem;
        font-size: 0.75rem;
    }

    .btn-group {
        flex-direction: column;
    }

    td .d-flex.flex-column .btn {
        font-size: 0.65rem;
        padding: 0.18rem 0.25rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.45rem;
    }

    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL CWR MODAL OVERLAY — March 2026
   Replace Bootstrap backdrop+modal with a flex-centered overlay
   that respects the sidebar layout and positions correctly.
   Usage: wrap modal-content in .cwr-overlay > .cwr-dialog
   ═══════════════════════════════════════════════════════════ */
.cwr-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10002 !important;
    background: rgba(10, 15, 30, 0.88) !important;
    backdrop-filter: blur(2px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem !important;
    overflow-y: auto !important;
}
.cwr-dialog {
    width: 94%;
    max-width: 880px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    animation: cwrSlideIn .18s ease-out;
    background: transparent;
}
.cwr-dialog.cwr-dialog-sm  { max-width: 480px; }
.cwr-dialog.cwr-dialog-lg  { max-width: 980px; }
.cwr-dialog.cwr-dialog-xl  { max-width: 1200px; }
.cwr-dialog .modal-content  { border: none; border-radius: 12px; max-height: none !important; }
.cwr-dialog .modal-header   { border-radius: 12px 12px 0 0; }
.cwr-dialog .modal-body     { max-height: none !important; overflow-y: visible !important; }
@keyframes cwrSlideIn {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   SOFT DROPDOWN & SELECT STYLING — March 2026
   Replace black/dark native dropdowns with soft, light theme
   ═══════════════════════════════════════════════════════════ */

/* Native select elements — soft white background */
select,
.form-select,
select.form-control {
    background-color: #ffffff !important;
    color: #1a2332 !important;
    border: 1.5px solid #d0d7de !important;
    border-radius: 8px !important;
    appearance: auto;
}

select:focus,
.form-select:focus,
select.form-control:focus {
    border-color: #005EB8 !important;
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.12) !important;
    outline: none;
}

/* Option elements inside selects — soft light backgrounds */
select option,
.form-select option,
select.form-control option {
    background-color: #ffffff !important;
    color: #1a2332 !important;
    padding: 0.5rem 0.75rem !important;
}

select option:hover,
select option:checked,
.form-select option:hover,
.form-select option:checked {
    background-color: #e8f2fb !important;
    color: #005EB8 !important;
}

/* Datalist dropdown — soft styling */
input[list]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
}

/* Ensure all dropdowns in modals also get soft styling */
.modal-body select,
.modal-body .form-select,
.cwr-dialog select,
.cwr-dialog .form-select {
    background-color: #ffffff !important;
    color: #1a2332 !important;
    border: 1.5px solid #d0d7de !important;
}

/* Bootstrap dropdown menus — soft light theme */
.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    padding: 0.35rem 0 !important;
}

.dropdown-item {
    color: #1a2332 !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.88rem !important;
    transition: background 150ms ease !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #e8f2fb !important;
    color: #005EB8 !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #005EB8 !important;
    color: #ffffff !important;
}

.dropdown-divider {
    border-top-color: #e2e8f0 !important;
}
