/* ================================================
   Dark Mode Styles (applied when data-bs-theme="dark")
   ================================================= */
[data-bs-theme="dark"] body {
    color: #e2e2e2;
    background-color: #0f1115;
}

/* Borders / containers / backgrounds */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .btn-light {
    border-color: rgba(255, 255, 255, .15) !important;
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .btn-light {
    background-color: #1a1d24 !important;
    color: #e2e2e2 !important;
}

/* Breadcrumb links */
[data-bs-theme="dark"] .breadcrumb a {
    color: #9ecbff;
}

/* List group hover/active */
[data-bs-theme="dark"] .list-group-item {
    background-color: #151922;
    color: #d9d9d9;
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: #1c2230;
}

[data-bs-theme="dark"] .list-group-item.active {
    background-color: #2a3244;
    border-color: rgba(255, 255, 255, .2);
    color: #fff;
}

/* Table striping + hover */
[data-bs-theme="dark"] .table {
    --tbl-stripe: rgba(255, 255, 255, .04);
    color: #e2e2e2;
}

[data-bs-theme="dark"] .table tbody tr:nth-child(odd) {
    background-color: var(--tbl-stripe);
}

[data-bs-theme="dark"] .table thead th {
    background-color: #1c2230;
    color: #dfe7ff;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, .06);
}

/* Inputs */
[data-bs-theme="dark"] .form-control {
    background-color: #1a1f2b;
    color: #e2e2e2;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #9aa3b2;
}

/* Pagination buttons created by JS */
[data-bs-theme="dark"] .page-link {
    background: #1a1d24 !important;
    color: #e2e2e2 !important;
    border-color: rgba(255, 255, 255, .15) !important;
}

[data-bs-theme="dark"] img[alt="Optima by Insurasoft"] {
    filter: invert(1) hue-rotate(180deg);
}

/* Theme toggle button */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}


/*  Editable form */
[data-bs-theme="dark"] .editable-cell:hover{
  background: rgba(255,255,255,0.06) !important;
  outline: 2px dashed var(--bs-primary);
  outline-offset: -2px;
}

[data-bs-theme="dark"] .editable-cell.editing{
  background: rgba(255,193,7,0.15) !important;
}

[data-bs-theme="dark"] .editable-cell.editing input,
[data-bs-theme="dark"] .editable-cell.editing select{
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 2px solid var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), .25);
}

[data-bs-theme="dark"] .editable-cell.modified{
  background: rgba(25,135,84,0.25) !important; 
  color: #fff;
}

[data-bs-theme="dark"] .editable-cell{
  color: var(--bs-body-color);
}
