/* ==========================================================================
   VMS design system
   The single stylesheet for every admin screen. Loaded once from
   layouts/adminapp.blade.php — pages should not carry their own <style> block.

   Everything is namespaced under .vms so it cannot collide with the
   now-ui-dashboard theme or Bootstrap that the layout still loads.
   ========================================================================== */

.vms {
    /* ---- ink & surface ---- */
    --vms-ink: #1f2937;
    --vms-ink-soft: #4b5563;
    --vms-muted: #6b7280;
    --vms-line: #e5e7eb;
    --vms-line-soft: #f1f3f7;
    --vms-surface: #ffffff;
    --vms-bg: #f4f6fa;
    --vms-head: #eef2f7;

    /* ---- accents ---- */
    --vms-brand: #1d4ed8;
    --vms-brand-soft: #eef2ff;
    --vms-live: #059669;
    --vms-live-soft: #ecfdf5;
    --vms-warn: #b45309;
    --vms-warn-soft: #fffbeb;
    --vms-danger: #b91c1c;
    --vms-danger-soft: #fef2f2;
    --vms-info: #0369a1;
    --vms-info-soft: #f0f9ff;

    /* ---- shape ---- */
    --vms-radius: 12px;
    --vms-radius-sm: 8px;

    font-size: 13px;
    color: var(--vms-ink);
}

/* ==========================================================================
   1. Shell & page head
   ========================================================================== */

.vms .vms-shell {
    padding: 18px;
    background: var(--vms-bg);
    min-height: 70vh;
}

.vms .vms-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--vms-surface);
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.vms .vms-head h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -.2px;
    color: var(--vms-ink);
}

.vms .vms-head p {
    margin: 3px 0 0;
    color: var(--vms-muted);
    font-size: 12px;
}

.vms .vms-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.vms .vms-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--vms-muted);
    font-size: 12px;
    text-align: right;
}

/* ==========================================================================
   2. Buttons
   ========================================================================== */

.vms .vms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: var(--vms-radius-sm);
    padding: 10px 18px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s ease, background .15s ease;
    background: var(--vms-brand);
    color: #fff;
}

.vms .vms-btn:hover,
.vms .vms-btn:focus {
    opacity: .88;
    color: #fff;
    text-decoration: none;
}

.vms .vms-btn:disabled,
.vms .vms-btn.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}

.vms .vms-btn--success { background: var(--vms-live); }
.vms .vms-btn--danger  { background: var(--vms-danger); }
.vms .vms-btn--warn    { background: var(--vms-warn); }
.vms .vms-btn--dark    { background: #374151; }

.vms .vms-btn--ghost {
    background: transparent;
    border-color: var(--vms-line);
    color: var(--vms-ink-soft);
}

.vms .vms-btn--ghost:hover,
.vms .vms-btn--ghost:focus {
    background: var(--vms-bg);
    color: var(--vms-ink);
}

.vms .vms-btn--sm {
    padding: 6px 12px;
    font-size: 12px;
}

.vms .vms-btn--block {
    width: 100%;
}

/* ==========================================================================
   3. Stat tiles
   ========================================================================== */

.vms .vms-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.vms .vms-stat {
    background: var(--vms-surface);
    border: 1px solid var(--vms-line);
    border-left: 3px solid var(--vms-brand);
    border-radius: 10px;
    padding: 14px 16px;
}

.vms .vms-stat.is-live   { border-left-color: var(--vms-live); }
.vms .vms-stat.is-warn   { border-left-color: var(--vms-warn); }
.vms .vms-stat.is-danger { border-left-color: var(--vms-danger); }

.vms .vms-stat-label {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 10px;
    font-weight: 700;
    color: var(--vms-muted);
}

.vms .vms-stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.vms .vms-stat-unit {
    font-size: 12px;
    font-weight: 600;
    color: var(--vms-muted);
    margin-left: 3px;
}

/* ==========================================================================
   4. Panels, cards, grids
   ========================================================================== */

.vms .vms-panel {
    background: var(--vms-surface);
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius);
    padding: 14px;
    margin-bottom: 16px;
}

.vms .vms-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--vms-line);
}

.vms .vms-panel-head h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.vms .vms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 12px;
}

.vms .vms-card {
    background: var(--vms-surface);
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius);
    padding: 14px 16px;
}

.vms .vms-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.vms .vms-card-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
}

.vms .vms-card-sub {
    font-weight: 600;
    font-size: 13px;
}

.vms .vms-card-note {
    color: var(--vms-muted);
    font-size: 12px;
    margin: 2px 0 12px;
    word-break: break-word;
}

/* a strip of read-only figures inside a card */
.vms .vms-readings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 8px;
    border-top: 1px solid var(--vms-line);
    border-bottom: 1px solid var(--vms-line);
    padding: 10px 0;
    margin-bottom: 12px;
}

.vms .vms-reading-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--vms-muted);
}

.vms .vms-reading-value {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.vms .vms-reading-value.is-warn { color: var(--vms-warn); }

/* ==========================================================================
   5. Tabs
   ========================================================================== */

.vms .vms-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--vms-line);
    margin-bottom: 16px;
}

.vms .vms-tab {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 13px;
    color: var(--vms-muted);
    cursor: pointer;
}

.vms .vms-tab.is-active {
    color: var(--vms-brand);
    border-bottom-color: var(--vms-brand);
}

.vms .vms-pane { display: none; }
.vms .vms-pane.is-active { display: block; }

/* ==========================================================================
   6. Tables
   ========================================================================== */

.vms table.vms-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.vms table.vms-table thead th {
    background: var(--vms-head);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--vms-ink);
    border-bottom: 1px solid var(--vms-line);
    vertical-align: bottom;
    padding: 8px;
    text-align: left;
}

.vms table.vms-table thead th input {
    width: 100%;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 3px 6px;
    margin-bottom: 5px;
    border: 1px solid var(--vms-line);
    border-radius: 5px;
}

.vms table.vms-table tbody td {
    padding: 8px;
    border-bottom: 1px solid var(--vms-line-soft);
    vertical-align: middle;
}

.vms table.vms-table tbody tr:hover td {
    background: #fafbfd;
}

.vms .vms-wrap {
    white-space: normal;
    word-break: break-word;
    max-width: 280px;
}

/* ==========================================================================
   7. Badges
   ========================================================================== */

.vms .vms-badge {
    display: inline-block;
    border-radius: 6px;
    padding: 2px 9px;
    font-weight: 700;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    background: var(--vms-brand-soft);
    color: var(--vms-brand);
}

.vms .vms-badge--live   { background: var(--vms-live-soft);   color: var(--vms-live); }
.vms .vms-badge--warn   { background: var(--vms-warn-soft);   color: var(--vms-warn); }
.vms .vms-badge--danger { background: var(--vms-danger-soft); color: var(--vms-danger); }
.vms .vms-badge--info   { background: var(--vms-info-soft);   color: var(--vms-info); }
.vms .vms-badge--muted  { background: var(--vms-line-soft);   color: var(--vms-muted); }

/* pill with a pulsing dot, for anything happening right now */
.vms .vms-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--vms-live-soft);
    color: var(--vms-live);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.vms .vms-live-tag--warn {
    background: var(--vms-warn-soft);
    color: var(--vms-warn);
}

.vms .vms-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: vmsPulse 1.6s ease-in-out infinite;
}

@keyframes vmsPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.75); }
}

/* ==========================================================================
   8. Alerts
   ========================================================================== */

.vms .vms-alert {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--vms-info-soft);
    color: var(--vms-info);
    border-color: #bae6fd;
}

.vms .vms-alert--ok {
    background: var(--vms-live-soft);
    color: #065f46;
    border-color: #a7f3d0;
}

.vms .vms-alert--bad {
    background: var(--vms-danger-soft);
    color: #991b1b;
    border-color: #fecaca;
}

.vms .vms-alert--warn {
    background: var(--vms-warn-soft);
    color: #92400e;
    border-color: #fde68a;
}

.vms .vms-alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
    font-weight: 400;
}

/* ==========================================================================
   9. Empty & loading states
   ========================================================================== */

.vms .vms-empty {
    background: var(--vms-surface);
    border: 1px dashed var(--vms-line);
    border-radius: var(--vms-radius);
    padding: 44px 20px;
    text-align: center;
    color: var(--vms-muted);
}

.vms .vms-empty i {
    font-size: 30px;
    display: block;
    margin-bottom: 10px;
    opacity: .4;
}

.vms .vms-loading {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--vms-muted);
    font-weight: 600;
    padding: 30px;
    justify-content: center;
}

.vms .vms-loading.is-on { display: flex; }

.vms .vms-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid var(--vms-line);
    border-top-color: var(--vms-brand);
    border-radius: 50%;
    animation: vmsSpin .8s linear infinite;
}

@keyframes vmsSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   10. Forms & filters
   ========================================================================== */

.vms .vms-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.vms .vms-field {
    margin-bottom: 14px;
}

.vms label,
.vms .vms-filters label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--vms-muted);
    margin-bottom: 4px;
}

.vms .vms-input,
.vms .vms-filters input,
.vms .vms-filters select {
    display: block;
    width: 100%;
    font-size: 13px;
    color: var(--vms-ink);
    background: var(--vms-surface);
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius-sm);
    padding: 8px 11px;
    line-height: 1.35;
}

.vms .vms-filters input,
.vms .vms-filters select {
    min-width: 155px;
    width: auto;
}

.vms .vms-input:focus {
    outline: none;
    border-color: var(--vms-brand);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}

.vms .vms-input[readonly] {
    background: var(--vms-bg);
    color: var(--vms-muted);
}

.vms textarea.vms-input {
    resize: vertical;
    min-height: 62px;
}

.vms .vms-hint {
    display: block;
    font-size: 11px;
    color: var(--vms-muted);
    margin-top: 4px;
}

.vms .vms-hint.is-bad {
    color: var(--vms-danger);
    font-weight: 600;
}

/* two/three column form rows without pulling in the Bootstrap grid */
.vms .vms-cols {
    display: grid;
    gap: 0 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.vms .vms-cols--2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* file drop / upload box */
.vms .vms-file {
    border: 1px dashed var(--vms-line);
    border-radius: var(--vms-radius-sm);
    padding: 14px;
    background: var(--vms-bg);
    font-size: 12px;
    color: var(--vms-muted);
}

.vms .vms-file input[type="file"] {
    width: 100%;
    font-size: 12px;
}

/* ==========================================================================
   11. Calculation strip  (a − b = result)
   ========================================================================== */

.vms .vms-calc {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    background: var(--vms-bg);
    border: 1px solid var(--vms-line);
    border-radius: 10px;
    padding: 14px;
    margin-top: 14px;
    text-align: center;
}

.vms .vms-calc-op {
    font-size: 17px;
    font-weight: 700;
    color: #9ca3af;
}

.vms .vms-calc-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--vms-muted);
}

.vms .vms-calc-value {
    font-size: 19px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.vms .vms-calc-value.is-result { color: var(--vms-live); }
.vms .vms-calc-value.is-bad { color: var(--vms-danger); }

/* ==========================================================================
   12. Modals
   The layout still uses Bootstrap 4 modals, so this only reskins them.
   ========================================================================== */

.vms-modal .modal-content {
    border: 0;
    border-radius: var(--vms-radius, 12px);
    /* no overflow:hidden here — it clipped the select dropdowns */
}

.vms-modal .modal-header {
    border-top-left-radius: var(--vms-radius, 12px);
    border-top-right-radius: var(--vms-radius, 12px);
}

.vms-modal .modal-header {
    background: #1f2937;
    color: #fff;
    border: 0;
    padding: 14px 20px;
}

.vms-modal .modal-header .close {
    color: #fff;
    opacity: .8;
    text-shadow: none;
}

.vms-modal .modal-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.vms-modal .modal-body {
    padding: 20px;
    font-size: 13px;
    color: #1f2937;
}

/* the modal is a sibling of .vms, so the shared bits are repeated here */
.vms-modal label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 4px;
}

.vms-modal .vms-input,
.vms-modal .form-control {
    display: block;
    width: 100%;
    font-size: 13px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 11px;
    line-height: 1.35;
}

.vms-modal .vms-input[readonly],
.vms-modal .form-control[readonly] {
    background: #f4f6fa;
    color: #6b7280;
}

.vms-modal textarea.vms-input {
    resize: vertical;
    min-height: 62px;
}

.vms-modal .vms-field { margin-bottom: 14px; }

.vms-modal .vms-cols {
    display: grid;
    gap: 0 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.vms-modal .vms-hint {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

.vms-modal .vms-hint.is-bad {
    color: #b91c1c;
    font-weight: 600;
}

.vms-modal .vms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: #1d4ed8;
    color: #fff;
}

.vms-modal .vms-btn:hover { opacity: .88; color: #fff; }
.vms-modal .vms-btn:disabled { opacity: .5; cursor: not-allowed; }
.vms-modal .vms-btn--success { background: #059669; }
.vms-modal .vms-btn--danger { background: #b91c1c; }
.vms-modal .vms-btn--block { width: 100%; }

.vms-modal .vms-calc {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    background: #f4f6fa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    margin-top: 14px;
    text-align: center;
}

.vms-modal .vms-calc-op { font-size: 17px; font-weight: 700; color: #9ca3af; }
.vms-modal .vms-calc-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}
.vms-modal .vms-calc-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vms-modal .vms-calc-value.is-result { color: #059669; }
.vms-modal .vms-calc-value.is-bad { color: #b91c1c; }

/* ==========================================================================
   13. DataTables trim, so exported/filtered tables match the rest
   ========================================================================== */

.vms .dt-buttons {
    margin-bottom: 10px;
}

.vms .dt-buttons .dt-button {
    background: var(--vms-surface) !important;
    border: 1px solid var(--vms-line) !important;
    border-radius: var(--vms-radius-sm) !important;
    color: var(--vms-ink-soft) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    margin-right: 6px !important;
    box-shadow: none !important;
    background-image: none !important;
}

.vms .dt-buttons .dt-button:hover {
    background: var(--vms-bg) !important;
    border-color: #d1d5db !important;
}

.vms .dataTables_filter input,
.vms .dataTables_length select {
    border: 1px solid var(--vms-line);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
}

.vms .dataTables_info,
.vms .dataTables_paginate {
    font-size: 12px;
    color: var(--vms-muted);
}

.vms .dataTables_paginate .paginate_button.current {
    background: var(--vms-brand) !important;
    border-color: var(--vms-brand) !important;
    color: #fff !important;
    border-radius: 6px;
}

/* ==========================================================================
   14. Utilities
   ========================================================================== */

.vms .vms-muted { color: var(--vms-muted); }
.vms .vms-strong { font-weight: 700; }
.vms .vms-nums { font-variant-numeric: tabular-nums; }
.vms .vms-right { text-align: right; }
.vms .vms-center { text-align: center; }
.vms .vms-mt { margin-top: 14px; }
.vms .vms-mb { margin-bottom: 14px; }

.vms .vms-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   15. Responsive
   ========================================================================== */

@media (max-width: 767px) {
    .vms .vms-shell { padding: 12px; }

    .vms .vms-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .vms .vms-stat-value { font-size: 22px; }
}

@media (max-width: 575px) {
    .vms .vms-calc,
    .vms-modal .vms-calc {
        grid-template-columns: 1fr;
    }

    .vms .vms-calc-op,
    .vms-modal .vms-calc-op {
        display: none;
    }

    .vms .vms-filters input,
    .vms .vms-filters select {
        width: 100%;
    }
}

/* ==========================================================================
   16. Print — reports go out on paper often enough to matter
   ========================================================================== */

@media print {
    .vms .vms-shell { background: #fff; padding: 0; }
    .vms .vms-head,
    .vms .vms-panel,
    .vms .vms-card { border: 0; }
    .vms .vms-btn,
    .vms .vms-tabs,
    .vms .dt-buttons,
    .vms .dataTables_filter,
    .vms .dataTables_paginate { display: none !important; }
    .vms .vms-pane { display: block !important; }
}

/* ==========================================================================
   17. Public landing page
   Used by resources/views/welcome.blade.php, which sits outside the admin
   shell — so it is namespaced separately and carries its own layout.
   ========================================================================== */

.vms-landing {
    --l-ink: #0f172a;
    --l-muted: #94a3b8;
    --l-line: rgba(255, 255, 255, .1);
    --l-brand: #3b82f6;

    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(1200px 600px at 50% -10%, #1e3a8a 0%, #0f172a 55%, #0b1120 100%);
    color: #e2e8f0;
    font-family: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.vms-landing .l-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--l-line);
}

.vms-landing .l-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: .5px;
}

.vms-landing .l-brand img {
    height: 38px;
    width: auto;
}

.vms-landing .l-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.vms-landing .l-inner {
    width: 100%;
    max-width: 940px;
    text-align: center;
}

.vms-landing .l-eyebrow {
    display: inline-block;
    border: 1px solid var(--l-line);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 22px;
}

.vms-landing h1 {
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 0 0 16px;
    color: #fff;
}

.vms-landing .l-lead {
    font-size: 16px;
    line-height: 1.65;
    color: #cbd5e1;
    max-width: 620px;
    margin: 0 auto 32px;
}

.vms-landing .l-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--l-brand);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 14px 34px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 10px 30px rgba(59, 130, 246, .3);
}

.vms-landing .l-cta:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(59, 130, 246, .42);
}

.vms-landing .l-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 56px;
    text-align: left;
}

.vms-landing .l-feature {
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--l-line);
    border-radius: 14px;
    padding: 20px;
}

.vms-landing .l-feature i {
    font-size: 20px;
    color: #93c5fd;
    margin-bottom: 12px;
    display: block;
}

.vms-landing .l-feature h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}

.vms-landing .l-feature p {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--l-muted);
    margin: 0;
}

.vms-landing .l-status {
    background: rgba(16, 185, 129, .12);
    border: 1px solid rgba(16, 185, 129, .35);
    color: #6ee7b7;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 13px;
    margin: 0 auto 26px;
    max-width: 520px;
}

.vms-landing .l-foot {
    padding: 20px 28px;
    border-top: 1px solid var(--l-line);
    text-align: center;
    font-size: 12px;
    color: var(--l-muted);
}

.vms-landing .l-foot a {
    color: #93c5fd;
    text-decoration: none;
}

@media (max-width: 575px) {
    .vms-landing .l-bar { padding: 16px 18px; }
    .vms-landing .l-main { padding: 32px 18px; }
    .vms-landing .l-features { margin-top: 38px; }
}

/* ==========================================================================
   18. Legacy bridge
   The older screens are Bootstrap 4 markup (.card / .table / .btn / .modal).
   Rather than rewrite forms that already work — and risk breaking field names
   and routes — adding `vms` to a page's .content element pulls that markup
   onto this design system. New screens use the .vms-* components directly.
   ========================================================================== */

.vms.content,
.vms .content {
    padding: 18px;
    background: var(--vms-bg);
    min-height: 70vh;
}

/* ---- cards become panels ---- */
.vms .card {
    background: var(--vms-surface);
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius);
    box-shadow: none;
    margin-bottom: 16px;
}

.vms .card-header {
    background: transparent;
    border-bottom: 1px solid var(--vms-line);
    padding: 14px 18px;
}

.vms .card-header h1,
.vms .card-header h2,
.vms .card-header h3,
.vms .card-header h4,
.vms .card-header h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--vms-ink);
    margin: 0;
}

/* the old headings lean on <u> and <i> for emphasis — calm them down */
.vms .card-header u {
    text-decoration: none;
}

.vms .card-header i.fa,
.vms .card-header i.now-ui-icons {
    font-style: normal;
}

.vms .card-body {
    padding: 16px 18px;
}

/* ---- tables ---- */
.vms table.table,
.vms table.display,
.vms table.dataTable {
    width: 100% !important;
    font-size: 12px;
    border-collapse: collapse;
}

.vms table.table thead th,
.vms table.display thead th,
.vms table.dataTable thead th {
    background: var(--vms-head);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--vms-ink);
    border-bottom: 1px solid var(--vms-line) !important;
    border-top: 0 !important;
    vertical-align: bottom;
    padding: 8px;
}

.vms table.table thead th input,
.vms table.display thead th input,
.vms table.dataTable thead th input {
    width: 100%;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 3px 6px;
    margin-bottom: 5px;
    border: 1px solid var(--vms-line);
    border-radius: 5px;
    background: #fff;
    color: var(--vms-ink);
    height: auto;
}

.vms table.table tbody td,
.vms table.display tbody td,
.vms table.dataTable tbody td {
    padding: 8px;
    border-top: 0;
    border-bottom: 1px solid var(--vms-line-soft);
    vertical-align: middle;
}

.vms table tbody tr:hover td {
    background: #fafbfd;
}

/* the old pages colour whole cells with alert-* — turn those into quiet chips */
.vms td.alert-success,
.vms td.alert-warning,
.vms td.alert-danger,
.vms td.alert-info {
    background: transparent !important;
    border-color: var(--vms-line-soft) !important;
    color: var(--vms-ink) !important;
}

.vms td p[type="button"],
.vms td p[data-toggle="modal"] {
    color: var(--vms-brand);
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}

/* ---- buttons ---- */
.vms .btn {
    border-radius: var(--vms-radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    padding: 9px 17px;
    box-shadow: none !important;
    border: 1px solid transparent;
}

.vms .btn-sm { padding: 6px 12px; font-size: 12px; }

.vms .btn-primary,
.vms .btn-info { background: var(--vms-brand) !important; border-color: var(--vms-brand) !important; color: #fff !important; }
.vms .btn-success { background: var(--vms-live) !important; border-color: var(--vms-live) !important; color: #fff !important; }
.vms .btn-warning { background: var(--vms-warn) !important; border-color: var(--vms-warn) !important; color: #fff !important; }
.vms .btn-danger  { background: var(--vms-danger) !important; border-color: var(--vms-danger) !important; color: #fff !important; }
.vms .btn-secondary,
.vms .btn-default { background: #fff !important; border-color: var(--vms-line) !important; color: var(--vms-ink-soft) !important; }

.vms .btn:hover { opacity: .9; }

/* ---- forms ---- */
.vms label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--vms-muted);
    margin-bottom: 4px;
    margin-left: 0 !important;
}

.vms .form-control,
.vms select.form-control,
.vms textarea.form-control {
    font-size: 13px;
    color: var(--vms-ink);
    background: var(--vms-surface);
    background-image: none;
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius-sm);
    padding: 8px 11px;
    height: auto;
    line-height: 1.35;
    box-shadow: none;
}

.vms .form-control:focus {
    border-color: var(--vms-brand);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}

.vms .form-control[readonly],
.vms .form-control:disabled {
    background: var(--vms-bg);
    color: var(--vms-muted);
}

.vms .form-control.is-invalid { border-color: var(--vms-danger); }

.vms .invalid-feedback {
    font-size: 11px;
    font-weight: 600;
    color: var(--vms-danger);
}

.vms .form-group { margin-bottom: 14px; }

/* bootstrap-select renders its own button — keep it in the same language */
.vms .bootstrap-select > .dropdown-toggle {
    background: var(--vms-surface) !important;
    border: 1px solid var(--vms-line) !important;
    border-radius: var(--vms-radius-sm) !important;
    color: var(--vms-ink) !important;
    font-size: 13px;
    font-weight: 400;
    padding: 8px 11px;
    box-shadow: none !important;
}

.vms .bootstrap-select .dropdown-menu { font-size: 13px; }

/* ---- legacy alerts ---- */
.vms > .alert,
.vms .content > .alert,
.vms .alert-info,
.vms .alert-danger,
.vms .alert-success,
.vms .alert-warning {
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid transparent;
    padding: 12px 16px;
}

.vms .alert-success,
.vms .alert-info { background: var(--vms-live-soft); color: #065f46; border-color: #a7f3d0; }
.vms .alert-danger { background: var(--vms-danger-soft); color: #991b1b; border-color: #fecaca; }
.vms .alert-warning { background: var(--vms-warn-soft); color: #92400e; border-color: #fde68a; }

.vms .alert ul { margin: 0; padding-left: 18px; font-weight: 400; }
.vms .alert ul li { list-style: none; }

/* ---- legacy badges ---- */
.vms .badge {
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
}

.vms .badge-secondary { background: var(--vms-line-soft); color: var(--vms-muted); }
.vms .badge-danger { background: var(--vms-danger-soft); color: var(--vms-danger); }
.vms .badge-success { background: var(--vms-live-soft); color: var(--vms-live); }
.vms .badge-warning { background: var(--vms-warn-soft); color: var(--vms-warn); }
.vms .badge-info { background: var(--vms-brand-soft); color: var(--vms-brand); }

/* ---- legacy modals ---- */
.vms .modal-content {
    border: 0;
    border-radius: var(--vms-radius);
    overflow: hidden;
}

.vms .modal-header {
    background: #1f2937 !important;
    color: #fff !important;
    border: 0;
    padding: 14px 20px;
}

.vms .modal-header .modal-title,
.vms .modal-header p,
.vms .modal-header h5 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.vms .modal-header .close { color: #fff; opacity: .8; text-shadow: none; }

.vms .modal-body { padding: 20px; font-size: 13px; }

/* the old markup often floats the heading and the action button apart */
.vms .card-header .float-left,
.vms .card-header .float-right {
    float: none !important;
}

.vms .card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* ==========================================================================
   19. Suggestion / comment thread
   Lifted out of the inline <style> blocks that sugesstions.blade.php and
   replysugestion.blade.php used to carry, and scoped so it stays put.
   ========================================================================== */

.vms .dots {
    height: 4px;
    width: 4px;
    margin-bottom: 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
}

.vms .user-img { margin-top: 4px; }

.vms .check-icon {
    font-size: 17px;
    color: #c3bfbf;
    top: 1px;
    position: relative;
    margin-left: 3px;
}

.vms .form-check-input {
    margin-top: 6px;
    margin-left: -24px !important;
    cursor: pointer;
}

.vms .form-check-input:focus { box-shadow: none; }

.vms .icons i { margin-left: 8px; }

.vms .reply { margin-left: 12px; }
.vms .reply small { color: var(--vms-muted); }
.vms .reply small:hover { color: var(--vms-live); cursor: pointer; }

/* ==========================================================================
   20. Sidebar file tree
   The menu reads like a folder listing: a folder carries + / − and expands to
   reveal its files. Rendered by layouts/app.blade.php.
   ========================================================================== */

.vms-nav .logo {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.vms-nav .logo .logo-normal {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
}

.vms-tree {
    padding: 10px 8px 30px;
    font-size: 12.5px;
}

/* ---- shared row ---- */
.vms-tree-branch,
.vms-tree-file {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: rgba(255, 255, 255, .78);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.3;
}

.vms-tree-branch:hover,
.vms-tree-file:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
}

.vms-tree-file.is-current {
    background: rgba(59, 130, 246, .22);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 2px 0 0 #60a5fa;
}

/* ---- the + / − box ---- */
.vms-tree-toggle {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, .85);
    font-family: Consolas, "Courier New", monospace;
}

.vms-tree-toggle.is-empty {
    border-color: transparent;
}

.vms-tree-branch:hover .vms-tree-toggle {
    border-color: rgba(255, 255, 255, .6);
    background: rgba(255, 255, 255, .1);
}

.vms-tree-icon {
    flex: 0 0 14px;
    font-size: 13px;
    opacity: .85;
    text-align: center;
}

.vms-tree-label {
    flex: 1 1 auto;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
    font-weight: 600;
}

.vms-tree-file .vms-tree-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 12.5px;
    font-weight: 400;
}

.vms-tree-file.is-current .vms-tree-label {
    font-weight: 600;
}

/* how many files the folder holds */
.vms-tree-count {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .08);
    border-radius: 999px;
    padding: 1px 7px;
}

/* ---- children ---- */
.vms-tree-children {
    display: none;
    margin: 2px 0 6px 17px;
    padding-left: 10px;
    border-left: 1px dashed rgba(255, 255, 255, .18);
}

.vms-tree-folder.is-open > .vms-tree-children {
    display: block;
}

/* the little connector into each file */
.vms-tree-elbow {
    flex: 0 0 10px;
    height: 1px;
    background: rgba(255, 255, 255, .25);
    margin-right: 2px;
}

.vms-tree-root {
    margin-bottom: 2px;
}

/* ==========================================================================
   21. Authentication screens
   login / register / password reset / email verification / 2FA.
   Self-contained: these pages no longer depend on Tailwind or the Jetstream
   blade components, so a Jetstream upgrade cannot restyle them by surprise.
   ========================================================================== */

.vms-auth {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    background: radial-gradient(1000px 520px at 50% -10%, #1e3a8a 0%, #0f172a 55%, #0b1120 100%);
    font-family: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #1f2937;
}

.vms-auth .a-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, .45);
    overflow: hidden;
}

.vms-auth .a-card--wide { max-width: 520px; }

.vms-auth .a-head {
    text-align: center;
    padding: 30px 30px 6px;
}

.vms-auth .a-head img {
    height: 54px;
    width: auto;
    margin-bottom: 16px;
}

.vms-auth .a-head h1 {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 5px;
    color: #0f172a;
    letter-spacing: -.2px;
}

.vms-auth .a-head p {
    font-size: 12.5px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

.vms-auth .a-body { padding: 22px 30px 30px; }

.vms-auth .a-field { margin-bottom: 15px; }

.vms-auth label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 5px;
}

.vms-auth input[type="text"],
.vms-auth input[type="email"],
.vms-auth input[type="password"] {
    display: block;
    width: 100%;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    padding: 11px 13px;
    line-height: 1.35;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.vms-auth input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .13);
}

/* password field with a show/hide control */
.vms-auth .a-reveal { position: relative; }

.vms-auth .a-reveal input { padding-right: 44px; }

.vms-auth .a-reveal button {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #9ca3af;
    font-size: 14px;
    padding: 8px 10px;
    cursor: pointer;
    line-height: 1;
}

.vms-auth .a-reveal button:hover { color: #1d4ed8; }

.vms-auth .a-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #4b5563;
    margin-bottom: 18px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.vms-auth .a-check input { width: auto; margin: 0; }

.vms-auth .a-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: #1d4ed8;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 18px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s ease;
}

.vms-auth .a-btn:hover { opacity: .9; color: #fff; text-decoration: none; }

.vms-auth .a-btn--ghost {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.vms-auth .a-btn--ghost:hover { background: #f4f6fa; color: #1f2937; }

.vms-auth .a-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    font-size: 12.5px;
}

.vms-auth .a-links a,
.vms-auth .a-linkbtn {
    color: #1d4ed8;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font-size: 12.5px;
    cursor: pointer;
}

.vms-auth .a-links a:hover,
.vms-auth .a-linkbtn:hover { text-decoration: underline; }

.vms-auth .a-note {
    border-radius: 9px;
    padding: 11px 14px;
    font-size: 12.5px;
    line-height: 1.55;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.vms-auth .a-note--ok   { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.vms-auth .a-note--bad  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.vms-auth .a-note--info { background: #f0f9ff; color: #075985; border-color: #bae6fd; }

.vms-auth .a-note ul { margin: 5px 0 0; padding-left: 18px; }

.vms-auth .a-foot {
    text-align: center;
    padding: 14px 30px 22px;
    font-size: 11.5px;
    color: #9ca3af;
}

.vms-auth .a-foot a { color: #6b7280; text-decoration: none; }

/* the 6-digit authentication code */
.vms-auth .a-code {
    letter-spacing: .5em;
    text-align: center;
    font-size: 20px !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
    .vms-auth .a-head { padding: 24px 20px 4px; }
    .vms-auth .a-body { padding: 18px 20px 24px; }
}

/* ==========================================================================
   22. Dual-pane picker
   Used by the role/permission screen: available on the left, assigned on the
   right, with the move controls between them.
   ========================================================================== */

.vms .vms-dual {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: stretch;
}

.vms .vms-dual-pane {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius);
    background: var(--vms-surface);
    min-height: 340px;
    overflow: hidden;
}

.vms .vms-dual-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--vms-head);
    border-bottom: 1px solid var(--vms-line);
}

.vms .vms-dual-head h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0;
    color: var(--vms-ink);
}

.vms .vms-dual-pane--assigned .vms-dual-head {
    background: var(--vms-live-soft);
}

.vms .vms-dual-pane--assigned .vms-dual-head h3 {
    color: #065f46;
}

.vms .vms-dual-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--vms-line-soft);
}

.vms .vms-dual-search input {
    width: 100%;
    font-size: 12px;
    border: 1px solid var(--vms-line);
    border-radius: 6px;
    padding: 6px 9px;
}

.vms .vms-dual-list {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: 420px;
    padding: 6px;
    margin: 0;
    list-style: none;
}

.vms .vms-dual-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 12.5px;
    cursor: pointer;
    user-select: none;
}

.vms .vms-dual-list li:hover {
    background: var(--vms-bg);
}

.vms .vms-dual-list li.is-picked {
    background: var(--vms-brand-soft);
    color: var(--vms-brand);
    font-weight: 600;
}

.vms .vms-dual-list li .vms-dual-tag {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    color: var(--vms-muted);
    background: var(--vms-line-soft);
    border-radius: 999px;
    padding: 1px 7px;
}

.vms .vms-dual-empty {
    padding: 26px 12px;
    text-align: center;
    color: var(--vms-muted);
    font-size: 12px;
}

.vms .vms-dual-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.vms .vms-dual-controls button {
    width: 46px;
    height: 34px;
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius-sm);
    background: var(--vms-surface);
    color: var(--vms-ink-soft);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.vms .vms-dual-controls button:hover:not(:disabled) {
    background: var(--vms-brand);
    border-color: var(--vms-brand);
    color: #fff;
}

.vms .vms-dual-controls button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.vms .vms-dual-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--vms-line-soft);
    font-size: 11px;
    color: var(--vms-muted);
}

.vms .vms-dual-foot button {
    border: 0;
    background: none;
    color: var(--vms-brand);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.vms .vms-dual-foot button:hover { text-decoration: underline; }

@media (max-width: 767px) {
    .vms .vms-dual {
        grid-template-columns: 1fr;
    }

    .vms .vms-dual-controls {
        flex-direction: row;
        justify-content: center;
    }
}

/* ==========================================================================
   23. bootstrap-select
   The plugin copies `form-control` onto its wrapper <div> and then renders a
   real <button> inside it, so the plain .form-control rules drew a border and
   padding around a second bordered control. The wrapper is reset here and the
   button is styled to match .vms-input exactly.
   ========================================================================== */

.vms .bootstrap-select.form-control,
.vms-modal .bootstrap-select.form-control {
    border: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    height: auto;
}

/* ---- the closed control ---- */
.vms .bootstrap-select > .dropdown-toggle,
.vms-modal .bootstrap-select > .dropdown-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff !important;
    background-image: none !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    color: #1f2937 !important;
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 8px 30px 8px 11px;
    line-height: 1.35;
    min-height: 38px;
    box-shadow: none !important;
    outline: none !important;
}

.vms .bootstrap-select > .dropdown-toggle:hover,
.vms-modal .bootstrap-select > .dropdown-toggle:hover {
    border-color: #d1d5db !important;
    background: #fff !important;
}

.vms .bootstrap-select.show > .dropdown-toggle,
.vms-modal .bootstrap-select.show > .dropdown-toggle,
.vms .bootstrap-select > .dropdown-toggle:focus,
.vms-modal .bootstrap-select > .dropdown-toggle:focus {
    border-color: #1d4ed8 !important;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12) !important;
}

/* the placeholder ("Choose driver") should read as a placeholder */
.vms .bootstrap-select > .dropdown-toggle .filter-option-inner-inner,
.vms-modal .bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vms .bootstrap-select > .dropdown-toggle.bs-placeholder .filter-option-inner-inner,
.vms-modal .bootstrap-select > .dropdown-toggle.bs-placeholder .filter-option-inner-inner {
    color: #9ca3af;
}

/* ---- caret ---- */
.vms .bootstrap-select > .dropdown-toggle::after,
.vms-modal .bootstrap-select > .dropdown-toggle::after {
    position: absolute;
    right: 12px;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
    border-top-color: #9ca3af;
}

/* ---- the open menu ---- */
.vms .bootstrap-select .dropdown-menu,
.vms-modal .bootstrap-select .dropdown-menu {
    font-size: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
    padding: 6px;
    margin-top: 4px;
}

/* the search box the picker adds */
.vms .bootstrap-select .bs-searchbox,
.vms-modal .bootstrap-select .bs-searchbox {
    padding: 4px 4px 8px;
}

.vms .bootstrap-select .bs-searchbox .form-control,
.vms-modal .bootstrap-select .bs-searchbox .form-control {
    font-size: 12.5px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 7px 10px;
    height: auto;
    box-shadow: none;
}

.vms .bootstrap-select .bs-searchbox .form-control:focus,
.vms-modal .bootstrap-select .bs-searchbox .form-control:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}

/* ---- the options ---- */
.vms .bootstrap-select .dropdown-menu li a,
.vms-modal .bootstrap-select .dropdown-menu li a {
    border-radius: 6px;
    padding: 8px 10px;
    color: #1f2937;
    white-space: normal;
}

.vms .bootstrap-select .dropdown-menu li a:hover,
.vms-modal .bootstrap-select .dropdown-menu li a:hover,
.vms .bootstrap-select .dropdown-menu li a:focus,
.vms-modal .bootstrap-select .dropdown-menu li a:focus {
    background: #f4f6fa;
    color: #1f2937;
}

.vms .bootstrap-select .dropdown-menu li.selected a,
.vms-modal .bootstrap-select .dropdown-menu li.selected a,
.vms .bootstrap-select .dropdown-menu li a.active,
.vms-modal .bootstrap-select .dropdown-menu li a.active {
    background: #eef2ff !important;
    color: #1d4ed8 !important;
    font-weight: 600;
}

/* a vehicle that is already out or in the garage is disabled — make that
   read as unavailable rather than just faint */
.vms .bootstrap-select .dropdown-menu li.disabled a,
.vms-modal .bootstrap-select .dropdown-menu li.disabled a {
    color: #9ca3af !important;
    background: none !important;
    cursor: not-allowed;
    font-style: italic;
    opacity: 1;
}

.vms .bootstrap-select .no-results,
.vms-modal .bootstrap-select .no-results {
    background: none;
    color: #6b7280;
    font-size: 12px;
    padding: 10px;
    margin: 0;
}

/* when the menu is rendered at body level (data-container="body") it is no
   longer inside .vms / .vms-modal, so it is styled on its own too */
body > .bootstrap-select.dropdown .dropdown-menu {
    font-size: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
    padding: 6px;
    z-index: 1060;              /* above the Bootstrap modal */
}

body > .bootstrap-select.dropdown .dropdown-menu li a {
    border-radius: 6px;
    padding: 8px 10px;
    color: #1f2937;
    white-space: normal;
}

body > .bootstrap-select.dropdown .dropdown-menu li a:hover {
    background: #f4f6fa;
}

body > .bootstrap-select.dropdown .dropdown-menu li.selected a {
    background: #eef2ff !important;
    color: #1d4ed8 !important;
    font-weight: 600;
}

body > .bootstrap-select.dropdown .dropdown-menu li.disabled a {
    color: #9ca3af !important;
    cursor: not-allowed;
    font-style: italic;
    opacity: 1;
}

body > .bootstrap-select.dropdown .bs-searchbox .form-control {
    font-size: 12.5px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 7px 10px;
    height: auto;
}

/* ==========================================================================
   24. System log viewer
   ========================================================================== */

.vms .vms-loglist {
    border: 1px solid var(--vms-line);
    border-radius: var(--vms-radius);
    overflow: hidden;
}

.vms .vms-logentry + .vms-logentry {
    border-top: 1px solid var(--vms-line-soft);
}

.vms .vms-logentry.is-error {
    background: #fffafa;
}

.vms .vms-logentry-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 12.5px;
}

.vms .vms-logentry-head:hover {
    background: var(--vms-bg);
}

.vms .vms-logentry-time {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    color: var(--vms-muted);
    font-size: 11.5px;
    padding-top: 1px;
}

.vms .vms-logentry-msg {
    flex: 1 1 auto;
    word-break: break-word;
    line-height: 1.45;
}

.vms .vms-logentry-caret {
    flex: 0 0 16px;
    text-align: center;
    font-family: Consolas, "Courier New", monospace;
    font-weight: 700;
    color: var(--vms-muted);
}

.vms .vms-logentry-detail {
    display: none;
    margin: 0;
    padding: 12px 14px;
    background: #0f172a;
    color: #cbd5e1;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 380px;
    overflow: auto;
}

.vms .vms-logentry-detail.is-open {
    display: block;
}
