.text-responsive {
    font-size: calc(80% + 1vw + 1vh);
}

.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_wrapper .dataTables_filter label {
    margin-bottom: 0;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

table.dataTable thead tr th.sorting_asc,
table.dataTable thead tr th.sorting_desc {
    background-color: rgba(90, 185, 126, 0.733);
    color: white;
}

table.dataTable tbody tr td.sorting_1 {
    border-color: rgb(161, 231, 189) !important;
    color: rgb(92, 91, 91);
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar {
    background: #293f46;
}

.sidebar .nav-dropdown-items .nav-item {
    padding-left: 10px;
}

.sidebar .nav-item {
    cursor: pointer;
}

.sidebar .nav-dropdown.open {
    background: #1c2c31;
}

.sidebar .nav-link.active {
    background: #20a8d8;
}

.sidebar .nav-dropdown.open .nav-dropdown-toggle {
    color: #fff;
    background: #23353c;
}

.sidebar .nav-dropdown.open .nav-dropdown-toggle .nav-icon {
    color: #6fc7e6;
}

.sidebar .nav-link.active .nav-icon {
    color: #f1f7f6;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}

.searchable-fields {
    padding-left: 5px;
}

.searchable-link {
    padding: 0 5px 0 5px;
}

.searchable-link:hover {
    cursor: pointer;
    background: #eaeaea;
}

.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.verified {
    background-color: rgb(54, 121, 34);
    color: white;
}

/* Loading style. Converted from Laravel asset() syntax to a Django/static-safe style. */
.overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.8);
}

.overlay::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    margin-left: -21px;
    margin-top: -21px;
    border: 4px solid #d9e1e6;
    border-top-color: #20a8d8;
    border-radius: 50%;
    animation: nts-spin .8s linear infinite;
}

@keyframes nts-spin {
    to { transform: rotate(360deg); }
}

body.loading {
    overflow: hidden;
}

body.loading .overlay {
    display: block;
}

body {
    background-color: #eef1f4 !important;
}

/* Small app polish for the starter pages. */
.card {
    border-color: #c8ced3;
}

.breadcrumb {
    font-size: .85rem;
}

.table thead th {
    color: #2b5663;
    background: #d9f0f6;
    white-space: nowrap;
}

.table td,
.table th {
    vertical-align: middle;
}

/* Responsive operational shell added for the wired TMS pages. */
.ops-page {
    padding-top: 1rem;
    padding-bottom: 5rem;
}
.ops-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ops-page-header h1 {
    margin: 0;
    font-size: 1.35rem;
    color: #203a43;
    font-weight: 700;
}
.ops-page-header p {
    margin: .15rem 0 0;
    color: #6c757d;
    text-transform: none;
}
.ops-kpis .card,
.ops-link-card,
.ops-person,
.ops-trip,
.driver-stop {
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border: 1px solid #d8e1e6;
}
.ops-kpi {
    padding: 1rem;
    margin-bottom: 1rem;
}
.ops-kpi span,
.ops-link-card span {
    color: #6c757d;
    font-size: .8rem;
    font-weight: 700;
}
.ops-kpi strong {
    font-size: 1.8rem;
    color: #203a43;
}
.ops-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #203a43;
    text-decoration: none;
}
.ops-link-card:hover { text-decoration: none; color: #20a8d8; }
.ops-link-card i { font-size: 1.6rem; }
.ops-link-card strong { margin-left: auto; font-size: 1.4rem; }
.ops-filter { margin-bottom: 1rem; }
.ops-board { display: grid; gap: .75rem; }
.ops-trip {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 210px;
    gap: 1rem;
    padding: 1rem;
}
.ops-trip-time strong { display: block; font-size: 1.2rem; color: #203a43; }
.ops-trip-time span { color: #6c757d; font-weight: 700; }
.ops-trip-main h5 { margin-bottom: .35rem; }
.ops-trip-main p { margin: 0 0 .2rem; text-transform: none; }
.ops-trip-meta { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.ops-person {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ops-person i { font-size: 2rem; color: #9aa8af; }
.driver-shell { max-width: 860px; }
.driver-stop { padding: 1rem; margin-bottom: .75rem; }
.driver-stop-time { font-weight: 800; color: #20a8d8; }
.driver-stop-body p { text-transform: none; margin-bottom: .35rem; }
.table-responsive { width: 100%; }

@media (max-width: 991.98px) {
    body.app { overflow-x: hidden; }
    .app-header .navbar-brand-full { font-size: 18px; }
    .app-header .nav.navbar-nav.float-left { display: none; }
    .main { margin-left: 0 !important; }
    .ops-page-header { align-items: stretch; flex-direction: column; }
    .ops-page-header .btn { width: 100%; }
    .ops-trip { grid-template-columns: 1fr; }
    .ops-trip-meta { flex-direction: row; flex-wrap: wrap; }
    .dataTables_wrapper .row,
    .form-group.row { margin-left: 0; margin-right: 0; }
}

@media (max-width: 575.98px) {
    .container-fluid { padding-left: .65rem; padding-right: .65rem; }
    .card-body { padding: .8rem; }
    .ops-kpi { padding: .8rem; }
    .ops-kpi strong { font-size: 1.45rem; }
    .btn-group { display: flex; flex-wrap: wrap; }
    .btn-group .btn { margin-bottom: .25rem; }
    .table { font-size: .78rem; }
    .driver-stop .btn-group { width: 100%; }
    .driver-stop .btn { flex: 1 0 auto; }
}

/* Trips page toolbar and sortable DataTables header matching the NTS operational grid. */
.trips-page {
    padding-top: 20px;
    padding-bottom: 4rem;
}
.trips-topbar {
    margin-bottom: 3.25rem;
}
.trips-filter-line .form-control-sm {
    width: 145px;
}
.trips-status-line {
    font-size: .74rem;
}
.trips-card {
    border: 1px solid #c8ced3;
}
.nts-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem 1rem .55rem;
    background: #fff;
    border-bottom: 1px solid #c8ced3;
    font-size: .78rem;
}
.nts-toolbar-left,
.nts-toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
}
.nts-table-toolbar .form-control-sm {
    height: calc(1.5em + .35rem + 2px);
    font-size: .76rem;
}
.nts-table-toolbar .btn-sm {
    text-transform: uppercase;
    font-size: .68rem;
    border-radius: 0;
}
.dropdown-menu-scroll {
    max-height: 320px;
    overflow-y: auto;
    min-width: 220px;
}
.trips-data-table {
    margin-bottom: 0 !important;
    font-size: .74rem;
}
.trips-data-table thead th {
    color: #2f6672;
    background: #d9f0f6 !important;
    border-color: #a8d6dd !important;
    text-transform: uppercase;
    font-weight: 700;
    position: relative;
    padding-right: 18px !important;
}
.trips-data-table thead th.sorting::after,
.trips-data-table thead th.sorting_asc::after,
.trips-data-table thead th.sorting_desc::after {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #74aeb8;
    font-size: .75rem;
}
.trips-data-table thead th.sorting::after { content: "↕"; }
.trips-data-table thead th.sorting_asc::after { content: "↑"; color: #2b5663; }
.trips-data-table thead th.sorting_desc::after { content: "↓"; color: #2b5663; }
.trips-data-table thead th.select-col::after,
.trips-data-table thead th.actions-col::after {
    content: "" !important;
}
.trips-data-table tbody td {
    border-color: #d6dce1;
    background: #f8f8f8;
}
.trips-data-table tbody tr:nth-child(even) td {
    background: #eeeeee;
}
.trip-status-cell {
    color: #fff;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
}
.trip-status-entered { background: #20a8d8 !important; }
.trip-status-verified { background: #4dbd74 !important; }
.trip-status-onhold { background: #ffc107 !important; color: #23282c; }
.trip-status-canceled { background: #f86c6b !important; }
.trip-row-actions {
    text-align: center;
    white-space: nowrap;
}
.trips-page .dataTables_wrapper .dt-buttons {
    display: none;
}
@media (max-width: 991.98px) {
    .trips-topbar { margin-bottom: 1rem; }
    .nts-table-toolbar { align-items: stretch; flex-direction: column; }
    .nts-toolbar-left, .nts-toolbar-right { width: 100%; }
    .nts-toolbar-right label, .nts-toolbar-right input { width: 100%; }
    .trips-filter-line .form-control-sm { width: 125px; margin-bottom: .35rem; }
}
@media (max-width: 575.98px) {
    .nts-table-toolbar .btn-group,
    .nts-table-toolbar .btn,
    .nts-table-toolbar select {
        margin-bottom: .25rem;
    }
    .trips-filter-line { justify-content: flex-start !important; }
    .trips-filter-line .form-control-sm { width: 100%; margin-right: 0 !important; }
    .trips-filter-line label { width: 100%; margin-top: .25rem; }
}

/* Trips page fixes */
.trips-page .dropdown-menu-scroll { max-height: 420px; overflow-y: auto; z-index: 2050; min-width: 220px; }
.trips-page .btn-group.show > .dropdown-menu, .trips-page .dropdown-menu.show { display: block; }
.trips-page .trips-column-toggle { cursor: pointer; white-space: nowrap; text-transform: none; }

/* Professional polish pass for the wired TMS UI. */
.app-header {
    border-bottom: 1px solid #dde5ea;
    box-shadow: 0 1px 3px rgba(32, 58, 67, .08);
}
.app-header .navbar-brand-full {
    color: #607d8b !important;
    font-weight: 600;
}
.main.text-uppercase {
    letter-spacing: .01em;
}
.card {
    border: 1px solid #d7e1e7;
    box-shadow: 0 1px 2px rgba(32, 58, 67, .05);
}
.card-header {
    background: #f7fafc;
    border-bottom-color: #d7e1e7;
}
.table.table-sm td,
.table.table-sm th {
    padding: .38rem .5rem;
}
.table tbody tr:hover {
    background: #f7fbfd;
}
.table thead th {
    border-top: 0;
    font-size: .76rem;
    letter-spacing: .025em;
}
.badge {
    letter-spacing: .02em;
}
.btn {
    border-radius: .2rem;
}
.btn-sm,
.form-control-sm {
    font-size: .78rem;
}
.nts-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .85rem 1rem;
    border-bottom: 1px solid #d7e1e7;
    background: #fff;
}
.nts-toolbar-left,
.nts-toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}
.dropdown-menu-scroll {
    max-height: 360px;
    overflow-y: auto;
}
.trip-status-cell,
.status-cell {
    font-weight: 600;
}
.trip-status-verified,
.status-verified {
    background: #34c98a !important;
    color: #fff !important;
}
.trip-status-entered {
    background: #eef3f6;
    color: #263f49;
}
.trip-status-onhold {
    background: #fff3cd;
    color: #856404;
}
.trip-status-canceled {
    background: #f8d7da;
    color: #721c24;
}
.status-ready {
    background: #fff3cd !important;
    color: #856404 !important;
}
.status-arrived {
    background: #ffe8a1 !important;
    color: #674d00 !important;
}
.status-onboard {
    background: #d4edda !important;
    color: #155724 !important;
}
.status-no-show,
.status-no-driver {
    background: #f8d7da !important;
    color: #721c24 !important;
}
@media (max-width: 768px) {
    .app-header .navbar-nav.ml-auto {
        flex-direction: row;
        align-items: center;
    }
    .nts-table-toolbar,
    .trips-filter-line,
    .trips-status-line {
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    .nts-toolbar-left,
    .nts-toolbar-right {
        width: 100%;
    }
    .ops-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* DispatchPro-style dashboard */
.dashboard-page {
  padding-top: 20px;
}
.dashboard-action-row {
  align-items: stretch;
}
.dashboard-action-card {
  width: 100%;
  min-height: 88px;
  margin-bottom: 24px;
  border: 1px solid #d8e0e6;
  border-radius: 2px;
  background: #fff;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  text-decoration: none !important;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.dashboard-action-card:hover {
  color: inherit;
  border-color: #b8ccd8;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.dashboard-card-icon {
  min-width: 76px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.dashboard-action-card .text-value-sm {
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 700;
}
@media (max-width: 575.98px) {
  .dashboard-page { padding-top: 12px; }
  .dashboard-action-card { margin-bottom: 12px; }
  .dashboard-card-icon { min-width: 62px; padding: 1rem !important; }
}


/* ==========================================================
   NTS Professional Operations Polish
   Safe visual layer only: keeps the working Dispatch/Daily Trips logic intact.
   ========================================================== */
:root {
  --nts-ink: #183642;
  --nts-muted: #60727c;
  --nts-line: #d7e3ea;
  --nts-soft: #f6fafc;
  --nts-panel: #ffffff;
  --nts-teal: #1f8ea3;
  --nts-blue: #20a8d8;
  --nts-green: #4dbd74;
  --nts-red: #f86c6b;
  --nts-yellow: #ffc107;
  --nts-sidebar: #203940;
  --nts-sidebar-dark: #172b31;
}
body.app {
  color: var(--nts-ink);
  background-color: #eef4f7 !important;
  background-image:
    linear-gradient(rgba(255,255,255,.72), rgba(255,255,255,.72)),
    url(/static/img/asfalt-dark.png) !important;
}
.app-header.navbar {
  height: 58px;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--nts-line);
  box-shadow: 0 8px 24px rgba(24,54,66,.06);
}
.app-header .navbar-brand {
  background: transparent !important;
  border-right: 1px solid #edf2f5;
}
.app-header .navbar-brand-full {
  font-size: 25px !important;
  color: var(--nts-ink) !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
}
.app-header .btn,
.app-header .form-control-sm {
  border-radius: .45rem;
}
.sidebar {
  background: linear-gradient(180deg, var(--nts-sidebar) 0%, var(--nts-sidebar-dark) 100%) !important;
  box-shadow: 8px 0 22px rgba(20,45,53,.10);
}
.sidebar .nav-link {
  color: #d7e9ef;
  font-weight: 600;
  letter-spacing: .01em;
  border-left: 3px solid transparent;
}
.sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-left-color: rgba(32,168,216,.55);
}
.sidebar .nav-link.active {
  background: rgba(32,168,216,.18) !important;
  color: #fff !important;
  border-left-color: var(--nts-blue);
}
.sidebar .nav-link.active .nav-icon,
.sidebar .nav-link:hover .nav-icon { color: #8ddcf4 !important; }
.sidebar .nav-dropdown.open,
.sidebar .nav-dropdown-items {
  background: rgba(0,0,0,.08) !important;
}
.main.text-uppercase {
  letter-spacing: .012em;
}
.breadcrumb {
  padding: .75rem 1.25rem .25rem;
  font-size: .75rem;
  letter-spacing: .04em;
}
.breadcrumb a { color: var(--nts-blue); font-weight: 700; }
.card {
  border: 1px solid var(--nts-line) !important;
  border-radius: .55rem !important;
  box-shadow: 0 10px 26px rgba(24,54,66,.06) !important;
  overflow: hidden;
}
.card-header {
  background: linear-gradient(180deg, #ffffff 0%, var(--nts-soft) 100%) !important;
  border-bottom: 1px solid var(--nts-line) !important;
  color: var(--nts-ink);
  font-weight: 800;
  letter-spacing: .03em;
}
.btn {
  border-radius: .45rem !important;
  font-weight: 700;
  letter-spacing: .02em;
}
.btn-sm, .form-control-sm, .custom-select-sm { font-size: .78rem; }
.btn-default, .btn-light {
  background: #eef5f8 !important;
  border-color: #dce8ee !important;
  color: #263f49 !important;
}
.btn-default:hover, .btn-light:hover { background: #e2eef3 !important; }
.btn-primary { background: var(--nts-blue) !important; border-color: var(--nts-blue) !important; }
.btn-success { background: var(--nts-green) !important; border-color: var(--nts-green) !important; }
.btn-danger { background: var(--nts-red) !important; border-color: var(--nts-red) !important; }
.form-control, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
  border-color: #d4e0e7 !important;
  border-radius: .4rem !important;
}
.form-control:focus {
  border-color: var(--nts-blue) !important;
  box-shadow: 0 0 0 .15rem rgba(32,168,216,.16) !important;
}
.table thead th,
table.dataTable thead th {
  background: linear-gradient(180deg, #eefafd 0%, #d8f1f7 100%) !important;
  color: #245b66 !important;
  border-color: #b9dbe3 !important;
  font-weight: 800 !important;
}
.table tbody td { border-color: #dde6eb !important; }
.table-hover tbody tr:hover td, table.dataTable tbody tr:hover td {
  background: #f3fbfd !important;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dt-buttons {
  margin-bottom: .55rem;
}
.dataTables_wrapper .dt-buttons { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .dt-buttons .dt-button {
  border-radius: .25rem !important;
  margin-left: 0 !important;
  margin-right: .1rem !important;
}
.dataTables_filter input {
  border: 1px solid #d4e0e7 !important;
  border-radius: .45rem !important;
  padding: .32rem .55rem !important;
}
.dataTables_info { color: var(--nts-muted) !important; font-weight: 600; }
.dataTables_paginate .paginate_button,
.page-item .page-link {
  border-radius: .35rem !important;
  margin-left: .15rem;
}
.status-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: .85rem;
}
.status-summary-card {
  flex: 1 1 140px;
  min-width: 140px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--nts-line);
  border-radius: .55rem;
  box-shadow: 0 7px 18px rgba(24,54,66,.05);
  padding: .75rem .9rem;
}
.status-summary-card span {
  display: block;
  color: var(--nts-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .055em;
}
.status-summary-card strong {
  color: var(--nts-ink);
  font-size: 1.35rem;
  line-height: 1.2;
}
.dispatch-card .dataTables_wrapper .dt-buttons,
.daily-trips-page .dataTables_wrapper .dt-buttons {
  display: inline-flex !important;
}
.dispatch-title {
  color: var(--nts-ink);
}
.dispatch-date-accent {
  display: inline-block;
  padding: .2rem .45rem;
  margin-left: .25rem;
  background: #fff4d6;
  color: #8a6500;
  border: 1px solid #ffe3a1;
  border-radius: .35rem;
}
.dispatch-toolbar,
.daily-filter-panel {
  background: linear-gradient(180deg, #fff 0%, #f8fbfc 100%);
  border: 1px solid var(--nts-line);
  border-radius: .55rem;
  padding: .75rem;
  margin-bottom: .85rem;
}
.dispatch-equipment-select,
.equipment-action-select {
  border-radius: .35rem !important;
  border-color: #cbdce4;
  background-color: #fff;
  font-weight: 700;
}
.dispatch-status-pill,
.status-badge {
  border-radius: 999px !important;
  padding: .28rem .55rem !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.dispatch-status-pill.status-verified,
.status-badge.status-verified {
  background: transparent !important;
  border: 1px solid #d9e4ea !important;
  color: #263f49 !important;
}
.dispatch-status-pill.status-ready,
.status-badge.status-ready { background: #ffe3e3 !important; color: #9f2a2a !important; border: 1px solid #ffb9b9; }
.dispatch-status-pill.status-arrived,
.status-badge.status-arrived { background: #fff3cd !important; color: #7b5a00 !important; border: 1px solid #ffe08a; }
.dispatch-status-pill.status-onboard,
.status-badge.status-onboard { background: #dff7e8 !important; color: #166534 !important; border: 1px solid #ade4bf; }
.dispatch-status-pill.status-completed,
.status-badge.status-completed { background: #dff7e8 !important; color: #166534 !important; border: 1px solid #ade4bf; }
.dispatch-status-pill.status-canceled,
.dispatch-status-pill.status-no-show,
.dispatch-status-pill.status-no-driver,
.status-badge.status-canceled,
.status-badge.status-no_show,
.status-badge.status-no_driver { background: #fde2e2 !important; color: #9f2a2a !important; border: 1px solid #f7b6b6; }
.daily-filter-panel .form-check-inline {
  background: #fff;
  border: 1px solid #dde8ee;
  border-radius: 999px;
  padding: .18rem .55rem .18rem .35rem;
  margin: .18rem .15rem;
}
.daily-filter-panel .form-check-input { margin-top: .18rem; }
.modal-content {
  border: 0;
  border-radius: .65rem;
  box-shadow: 0 20px 60px rgba(24,54,66,.22);
  overflow: hidden;
}
.modal-header {
  background: linear-gradient(180deg, #ffffff 0%, #f3f9fb 100%);
  border-bottom: 1px solid var(--nts-line);
}
.alert {
  border-radius: .5rem;
  box-shadow: 0 5px 16px rgba(24,54,66,.07);
}
@media (max-width: 991.98px) {
  .status-summary-card { min-width: 130px; }
  .dispatch-toolbar, .daily-filter-panel { align-items: stretch; }
  .dispatch-toolbar-left, .dispatch-toolbar-right { width: 100%; }
}
@media (max-width: 575.98px) {
  .app-header .navbar-brand-full { font-size: 18px !important; }
  .status-summary-card { flex-basis: 46%; min-width: 0; }
  .dataTables_wrapper .dt-buttons { display: flex !important; }
  .dataTables_wrapper .dt-buttons .btn,
  .dataTables_wrapper .dt-buttons .dt-button { margin-bottom: .2rem; }
}


/* Timesheet module polish */
.text-transform-none { text-transform: none !important; }
.timesheet-page .timesheet-actions .btn { margin-left: .25rem; }
.timesheet-card .dataTables_wrapper .dt-buttons .btn { border-radius: .2rem; margin-right: .2rem; margin-left: 0; }
.timesheet-card table.dataTable tbody td.select-checkbox:before,
.timesheet-card table.dataTable tbody th.select-checkbox:before {
    margin-top: -6px;
}
.timesheet-card table.dataTable tbody tr.selected td {
    background: #e6f6fb !important;
}
.timesheet-card .badge { font-size: .78rem; }
@media (max-width: 575.98px) {
    .timesheet-page .timesheet-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .timesheet-page .timesheet-actions .btn { margin: .15rem 0; }
}

/* Final dashboard redesign: professional colored cards and cleaner action areas. */
.nts-dashboard-pro { padding-top: 18px; padding-bottom: 36px; text-transform: none; }
.nts-dashboard-pro .dashboard-hero {
  border: 0 !important;
  background: linear-gradient(135deg, #173e49 0%, #1f8ea3 58%, #20a8d8 100%) !important;
  color: #fff;
  box-shadow: 0 18px 40px rgba(23,62,73,.20) !important;
}
.nts-dashboard-pro .dashboard-hero .eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  opacity: .86;
  margin-bottom: .25rem;
}
.nts-dashboard-pro .dashboard-hero h1 { font-size: 1.75rem; font-weight: 850; letter-spacing: -.02em; }
.nts-dashboard-pro .dashboard-hero p { color: rgba(255,255,255,.86); font-size: .95rem; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dashboard-hero-actions .btn-light { background: rgba(255,255,255,.94) !important; color: #173e49 !important; }
.nts-dashboard-pro .dashboard-action-card {
  position: relative;
  min-height: 180px;
  margin-bottom: 24px;
  color: #fff !important;
  border: 0 !important;
  border-radius: 1rem !important;
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: 0 16px 34px rgba(24,54,66,.14) !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
.nts-dashboard-pro .dashboard-action-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
}
.nts-dashboard-pro .dashboard-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(24,54,66,.20) !important;
}
.nts-dashboard-pro .dashboard-action-card .card-body { position: relative; z-index: 1; padding: 1.15rem 1.2rem; }
.dashboard-card-blue { background: linear-gradient(135deg, #1572e8 0%, #20a8d8 100%) !important; }
.dashboard-card-green { background: linear-gradient(135deg, #1f9d65 0%, #4dbd74 100%) !important; }
.dashboard-card-purple { background: linear-gradient(135deg, #5b5bd6 0%, #8e63e7 100%) !important; }
.dashboard-card-orange { background: linear-gradient(135deg, #f08b24 0%, #f6b042 100%) !important; }
.dashboard-card-top { display: flex; justify-content: space-between; align-items: center; font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; opacity: .94; }
.dashboard-card-top i { font-size: 1.45rem; opacity: .9; }
.dashboard-card-value { margin-top: 1rem; font-size: 2.15rem; line-height: 1; font-weight: 900; letter-spacing: -.045em; }
.dashboard-card-caption { margin-top: .35rem; font-size: .88rem; opacity: .88; }
.dashboard-card-foot { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.22); font-size: .82rem; font-weight: 700; opacity: .92; }
.dashboard-panel { border-radius: 1rem !important; }
.dashboard-panel .card-header { padding: .9rem 1rem; font-size: .86rem; text-transform: uppercase; }
.dashboard-mini-stats strong { display: block; color: #173e49; font-size: 1.65rem; line-height: 1.1; font-weight: 900; }
.dashboard-mini-stats span { display: block; color: #657383; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; margin-top: .25rem; }
.dashboard-quick-actions .list-group-item { display: flex; align-items: center; gap: .65rem; color: #203a43; font-weight: 750; border-color: #e2edf2; }
.dashboard-quick-actions .list-group-item:hover { background: #f3fbfd; color: #1572e8; }
.dashboard-quick-actions i { width: 20px; color: #1f8ea3; text-align: center; }
@media (max-width: 575.98px) {
  .nts-dashboard-pro .dashboard-hero h1 { font-size: 1.35rem; }
  .nts-dashboard-pro .dashboard-action-card { min-height: 152px; margin-bottom: 14px; }
  .dashboard-card-value { font-size: 1.8rem; }
}

/* ==========================================================
   NTS shared professional cards
   Reusable card system used across dashboard, tables, forms,
   KPI rows, and driver/admin pages.
   ========================================================== */
:root {
    --nts-ink: #18323b;
    --nts-muted: #60727b;
    --nts-border: #dce7ec;
    --nts-blue: #1f8ea3;
    --nts-green: #36a269;
    --nts-purple: #6f5bd7;
    --nts-orange: #f09b35;
    --nts-red: #e85d5d;
    --nts-sky-soft: #e9f7fb;
    --nts-green-soft: #edf9f2;
    --nts-purple-soft: #f2efff;
    --nts-orange-soft: #fff5e8;
    --nts-red-soft: #fff0f0;
}

/* Base professional card behavior for every admin page */
.card,
.nts-card,
.ops-link-card,
.ops-person,
.ops-trip,
.driver-stop {
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 28px rgba(24, 50, 59, .08) !important;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f2f8fb 100%) !important;
    border-bottom: 1px solid var(--nts-border) !important;
    color: var(--nts-ink);
    font-weight: 800;
}

.card-body {
    background: #ffffff;
}

/* Reusable color helpers - apply these classes anywhere */
.nts-card-blue,
.dashboard-card-blue { background: linear-gradient(135deg, #1f8ea3 0%, #134e5e 100%) !important; color: #fff !important; }
.nts-card-green,
.dashboard-card-green { background: linear-gradient(135deg, #36a269 0%, #1f6f51 100%) !important; color: #fff !important; }
.nts-card-purple,
.dashboard-card-purple { background: linear-gradient(135deg, #6f5bd7 0%, #403391 100%) !important; color: #fff !important; }
.nts-card-orange,
.dashboard-card-orange { background: linear-gradient(135deg, #f09b35 0%, #c66a18 100%) !important; color: #fff !important; }
.nts-card-red { background: linear-gradient(135deg, #e85d5d 0%, #b83d48 100%) !important; color: #fff !important; }

.nts-card-blue .card-body,
.nts-card-green .card-body,
.nts-card-purple .card-body,
.nts-card-orange .card-body,
.nts-card-red .card-body,
.dashboard-action-card .card-body { background: transparent !important; color: inherit !important; }

.nts-card-blue .text-muted,
.nts-card-green .text-muted,
.nts-card-purple .text-muted,
.nts-card-orange .text-muted,
.nts-card-red .text-muted,
.dashboard-action-card .text-muted,
.dashboard-action-card span,
.dashboard-action-card small { color: rgba(255,255,255,.82) !important; }

/* Auto-color KPI/summary cards used on list/detail pages */
.row > [class*="col-"]:nth-child(4n+1) > .card.card-body,
.row > [class*="col-"]:nth-child(4n+1) > .card.ops-kpi,
.row > [class*="col-"]:nth-child(4n+1) > .card.metric-card,
.row > [class*="col-"]:nth-child(4n+1) > .card.ops-metric-card {
    background: linear-gradient(135deg, var(--nts-blue) 0%, #145969 100%) !important;
    color: #fff !important;
}
.row > [class*="col-"]:nth-child(4n+2) > .card.card-body,
.row > [class*="col-"]:nth-child(4n+2) > .card.ops-kpi,
.row > [class*="col-"]:nth-child(4n+2) > .card.metric-card,
.row > [class*="col-"]:nth-child(4n+2) > .card.ops-metric-card {
    background: linear-gradient(135deg, var(--nts-green) 0%, #206f4e 100%) !important;
    color: #fff !important;
}
.row > [class*="col-"]:nth-child(4n+3) > .card.card-body,
.row > [class*="col-"]:nth-child(4n+3) > .card.ops-kpi,
.row > [class*="col-"]:nth-child(4n+3) > .card.metric-card,
.row > [class*="col-"]:nth-child(4n+3) > .card.ops-metric-card {
    background: linear-gradient(135deg, var(--nts-purple) 0%, #45359b 100%) !important;
    color: #fff !important;
}
.row > [class*="col-"]:nth-child(4n+4) > .card.card-body,
.row > [class*="col-"]:nth-child(4n+4) > .card.ops-kpi,
.row > [class*="col-"]:nth-child(4n+4) > .card.metric-card,
.row > [class*="col-"]:nth-child(4n+4) > .card.ops-metric-card {
    background: linear-gradient(135deg, var(--nts-orange) 0%, #c86b19 100%) !important;
    color: #fff !important;
}

.row > [class*="col-"] > .card.card-body .text-muted,
.row > [class*="col-"] > .card.ops-kpi span,
.row > [class*="col-"] > .card.metric-card .metric-label,
.row > [class*="col-"] > .card.ops-metric-card .metric-label,
.row > [class*="col-"] > .card.metric-card small {
    color: rgba(255,255,255,.84) !important;
}
.row > [class*="col-"] > .card.card-body strong,
.row > [class*="col-"] > .card.ops-kpi strong,
.row > [class*="col-"] > .card.metric-card .metric-value,
.row > [class*="col-"] > .card.ops-metric-card .metric-value {
    color: #fff !important;
}

/* Main content cards keep clean white surface with colored accent */
.main .card:not(.dashboard-action-card):not(.metric-card):not(.ops-metric-card):not(.ops-kpi):not(.top-card) {
    position: relative;
}
.main .card:not(.dashboard-action-card):not(.metric-card):not(.ops-metric-card):not(.ops-kpi):not(.top-card)::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--nts-blue), var(--nts-green), var(--nts-purple), var(--nts-orange));
}

/* Quick/action cards across non-dashboard pages */
.ops-link-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--nts-sky-soft) 100%) !important;
    border-left: 5px solid var(--nts-blue) !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
.ops-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(24, 50, 59, .12) !important;
}
.ops-link-card:nth-of-type(4n+2) { border-left-color: var(--nts-green) !important; background: linear-gradient(135deg, #fff 0%, var(--nts-green-soft) 100%) !important; }
.ops-link-card:nth-of-type(4n+3) { border-left-color: var(--nts-purple) !important; background: linear-gradient(135deg, #fff 0%, var(--nts-purple-soft) 100%) !important; }
.ops-link-card:nth-of-type(4n+4) { border-left-color: var(--nts-orange) !important; background: linear-gradient(135deg, #fff 0%, var(--nts-orange-soft) 100%) !important; }

/* Lists/tables get softer headers to match dashboard */
.table thead th,
.trips-data-table thead th {
    background: linear-gradient(135deg, #e8f7fb 0%, #d8eef5 100%) !important;
    color: #174a58 !important;
}

@media (max-width: 575.98px) {
    .card, .nts-card, .ops-link-card, .ops-person, .ops-trip, .driver-stop {
        border-radius: 13px !important;
    }
}

/* NTS professional final polish: cleaner spacing, readable cards, and mobile-friendly admin shell. */
:root {
    --nts-navy: #203a43;
    --nts-blue: #20a8d8;
    --nts-green: #4dbd74;
    --nts-orange: #f9a03f;
    --nts-red: #f86c6b;
    --nts-bg: #eef3f6;
    --nts-border: #d7e1e7;
}
body.app {
    color: #243942;
    background: var(--nts-bg) !important;
}
.app-header {
    min-height: 56px;
    background: #fff;
}
.brand-icon {
    background: linear-gradient(135deg, #20a8d8, #1685ad) !important;
    box-shadow: 0 2px 8px rgba(32,168,216,.25);
}
.sidebar {
    background: linear-gradient(180deg, #203a43 0%, #1b3038 100%) !important;
}
.sidebar .nav-link {
    border-left: 3px solid transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sidebar .nav-link:hover {
    background: rgba(255,255,255,.08);
    border-left-color: rgba(32,168,216,.65);
}
.sidebar .nav-link.active {
    background: rgba(32,168,216,.18) !important;
    border-left-color: var(--nts-blue);
    color: #fff !important;
}
.card {
    border-radius: .45rem;
    border: 1px solid var(--nts-border) !important;
    box-shadow: 0 5px 18px rgba(32, 58, 67, .06) !important;
}
.card-header {
    font-weight: 700;
    color: var(--nts-navy);
}
.btn-primary, .btn-info {
    box-shadow: 0 2px 6px rgba(32,168,216,.2);
}
.btn-success {
    box-shadow: 0 2px 6px rgba(77,189,116,.18);
}
.table thead th {
    background: #e6f6fa !important;
    color: #245466 !important;
    border-bottom: 2px solid #b7dce6 !important;
    text-transform: uppercase;
}
.table-hover tbody tr:hover td {
    background: #f4fbfd !important;
}
.badge-status,
.trip-status-cell {
    border-radius: .25rem;
    padding: .25rem .45rem;
    font-weight: 700;
}
.expired-cell, .bg-danger-soft {
    background: #fde1e1 !important;
    color: #9b1c1c !important;
}
.expiring-cell, .bg-warning-soft {
    background: #fff3cd !important;
    color: #856404 !important;
}
.employee-timesheet-page .main-print {
    background: #fff;
    border-radius: .45rem;
    border: 1px solid var(--nts-border);
    padding: 1rem;
    box-shadow: 0 5px 18px rgba(32,58,67,.05);
}
.employee-timesheet-grid .btn-xs {
    min-width: 24px;
}
.employee-timesheet-grid td {
    background: #fff;
}
.employee-timesheet-grid .alert-dark,
.employee-timesheet-grid .alert-success {
    font-weight: 700;
}
.modal-content {
    border-radius: .5rem;
    border: 0;
    box-shadow: 0 18px 50px rgba(0,0,0,.25);
}
.modal-header {
    background: #f7fafc;
    border-bottom: 1px solid var(--nts-border);
}
@media (max-width: 767.98px) {
    .employee-timesheet-print .timesheet-title { font-size: 1.6rem; }
    .main .container-fluid { padding-left: .75rem; padding-right: .75rem; }
    .card-body { padding: .85rem; }
    .dataTables_wrapper .dt-buttons .btn { margin-bottom: .25rem; }
}

/* ==========================================================
   Admin dashboard: embedded operations-center preview
   ========================================================== */
.dashboard-map-panel .card-body { padding: 1rem; }
.ops-map-preview {
  position: relative;
  min-height: 260px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #edf7f8 0%, #dcebed 100%);
  border: 1px solid #d7e7eb;
}
.ops-map-preview .map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(24,50,59,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,50,59,.055) 1px, transparent 1px);
  background-size: 28px 28px;
}
.map-pin {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 14px 26px rgba(24,50,59,.20);
}
.pin-one { left: 18%; top: 35%; background: #1f8ea3; }
.pin-two { right: 24%; top: 26%; background: #36a269; }
.pin-three { right: 38%; bottom: 22%; background: #f09b35; }
.map-note {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  padding: .75rem .9rem;
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  color: #18323b;
  font-weight: 750;
  font-size: .86rem;
}
.dispatch-legend { display: flex; flex-wrap: wrap; gap: 1rem; color: #60727b; font-weight: 750; font-size: .82rem; }
.dispatch-legend b { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; }
.ready-dot { background: #f09b35; }
.active-dot { background: #36a269; }
.attention-dot { background: #e85d5d; }
.dashboard-live-feed .list-group-item { position: relative; padding: .85rem 1rem .85rem 1.25rem; border-color: #e2edf2; }
.dashboard-live-feed .list-group-item::before { content: ""; position: absolute; left: .65rem; top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: #1f8ea3; }
.dashboard-live-feed strong { display: block; color: #18323b; font-size: .9rem; }
.dashboard-live-feed span { display: block; color: #60727b; font-size: .8rem; margin-top: .15rem; }
.dashboard-live-feed small { display: block; color: #8a9aa3; font-weight: 750; margin-top: .25rem; }
.dashboard-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.dashboard-status-grid div { padding: .9rem; border-radius: 14px; background: #f6fbfd; border: 1px solid #e0edf2; }
.dashboard-status-grid strong { display: block; color: #173e49; font-size: 1.55rem; line-height: 1; font-weight: 900; }
.dashboard-status-grid span { display: block; color: #60727b; font-size: .76rem; font-weight: 800; margin-top: .35rem; text-transform: uppercase; letter-spacing: .05em; }
.dashboard-queue-table th { color: #60727b; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; border-top: 0; }
.dashboard-queue-table td { vertical-align: middle; color: #18323b; font-weight: 650; }
