/* ==========================================
   CARRIER DASHBOARD – Premium Workspace
   ========================================== */

/* Layout */
.dash-layout {
    display: flex;
    min-height: 100vh;
    --dash-card-radius: 16px;
    --dash-card-header-padding: 0.9375rem 1.25rem;
    --dash-card-body-padding: 1.25rem;
    --dash-card-table-padding: 1rem 0.5rem 0;
    --dash-toolbar-gap: 0.5rem;
    --dash-toolbar-padding: 0.5rem 0.625rem;
    --dash-toolbar-radius: 12px;
    --dash-control-height: 30px;
    --dash-control-font-size: 0.75rem;
    --dash-search-width: 220px;
    --dash-status-filter-width: 118px;
    --dash-fuel-filter-width: 94px;
    --dash-add-button-width: 124px;
    --dash-import-button-width: 86px;
    --dash-table-font-size: 0.6875rem;
    --dash-table-head-font-size: 0.625rem;
    --dash-row-height: 30px;
    --dash-cell-min-height: 28px;
    --dash-action-column-width: 52px;
    --dash-action-button-size: 22px;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 35%, #fef3f2 65%, #f0fdf4 100%);
    background-attachment: fixed;
}

/* Sidebar */
.dash-sidebar {
    width: 240px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    box-shadow: 1px 0 16px rgba(0, 0, 0, 0.04);
}

.dash-sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dash-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.dash-logo svg {
    color: var(--primary);
}

.dash-nav {
    flex: 1;
    padding: 0.75rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.5625rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    border-radius: 10px;
    position: relative;
}

.dash-nav-item:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--gray-800);
}

.dash-nav-item.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.dash-nav-item svg {
    flex-shrink: 0;
    color: var(--gray-400);
    transition: color 0.18s ease;
}

.dash-nav-item:hover svg {
    color: var(--gray-600);
}

.dash-nav-item.active svg {
    color: var(--primary);
}

.dash-nav-item-company {
    margin-top: auto;
}

.dash-nav-item-settings {
    margin-top: 0;
}

/* ── Company Dashboard ─────────────────── */
.company-unified-body {
    display: grid;
    gap: 1rem;
}

.company-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem;
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.08);
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
}

.company-tab {
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: 9px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.company-tab:hover {
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.65);
}

.company-tab.active {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.company-tab-panel {
    display: none;
}

.company-tab-panel.active {
    display: block;
}

.company-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.company-block-head h3 {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--gray-700);
}

/* ── FMCSA Lookup Bar ─────────────────── */
.fmcsa-lookup-bar {
    background: rgba(79, 70, 229, 0.03);
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 10px;
    padding: 0.75rem 0.875rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}
.company-locked-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.04);
    border: 1px solid rgba(79, 70, 229, 0.12);
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.4;
}
.company-locked-notice svg {
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0.6;
}
.company-locked-notice .company-change-btn {
    margin-left: auto;
    flex-shrink: 0;
}
.company-locked-notice.hidden { display: none; }
.field-locked {
    background: rgba(0, 0, 0, 0.02) !important;
    color: var(--gray-500) !important;
    cursor: not-allowed;
}
.fmcsa-lookup-bar.fmcsa-lookup-done {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.15);
}
.fmcsa-lookup-hint {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin: 0 0 0.45rem;
}
.fmcsa-lookup-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.fmcsa-lookup-combo {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    flex: 1;
    max-width: 280px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fmcsa-lookup-combo:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.08);
}
.fmcsa-lookup-type {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--gray-600);
    border: none;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.42rem 0.2rem 0.42rem 0.5rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.3rem center;
    padding-right: 1.1rem;
    width: 58px;
    min-width: 58px;
}
.fmcsa-lookup-sep {
    width: 1px;
    height: 18px;
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.fmcsa-lookup-input {
    flex: 1;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    border: none;
    outline: none;
    padding: 0.42rem 0.55rem;
    background: transparent;
    min-width: 0;
}
.fmcsa-lookup-input::placeholder { color: var(--gray-400); }
.fmcsa-lookup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: none;
    border-radius: 8px;
    background: var(--primary, #4f46e5);
    color: #fff;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0 0.75rem;
    height: 34px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.fmcsa-lookup-btn:hover:not(:disabled) { background: #4338ca; }
.fmcsa-lookup-btn:disabled { opacity: 0.5; cursor: default; }
.fmcsa-lookup-btn.searching svg {
    animation: fmcsaSpin 0.8s linear infinite;
}
@keyframes fmcsaSpin {
    to { transform: rotate(360deg); }
}

/* ── FMCSA Verify Card ─────────────────── */
.fmcsa-verify-card {
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.25rem;
    overflow: hidden;
    animation: fmcsaVerifyIn 0.2s ease;
}
@keyframes fmcsaVerifyIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.fmcsa-verify-card.hidden { display: none; }
.fmcsa-verify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: rgba(79, 70, 229, 0.04);
    border-bottom: 1px solid rgba(79, 70, 229, 0.08);
}
.fmcsa-verify-header h4 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-700);
}
.fmcsa-verify-status {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.fmcsa-verify-status.fmcsa-status-ok {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}
.fmcsa-verify-status.fmcsa-status-bad {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}
.fmcsa-verify-body {
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 1.5rem;
}
.fmcsa-verify-row {
    display: flex;
    flex-direction: column;
    padding: 0.3rem 0;
}
.fmcsa-verify-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-400);
}
.fmcsa-verify-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
}
.fmcsa-verify-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.015);
}

/* ── FMCSA Carrier Snapshot ────────────── */
.fmcsa-hint {
    font-size: 0.82rem;
    color: var(--gray-400);
    margin: 0;
    line-height: 1.6;
}
.fmcsa-hint strong { color: var(--gray-600); }
.fmcsa-status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}
.fmcsa-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.fmcsa-status-ok {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.fmcsa-status-ok .fmcsa-status-dot { background: #10b981; }
.fmcsa-status-bad {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.fmcsa-status-bad .fmcsa-status-dot { background: #ef4444; }
.fmcsa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}
.fmcsa-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 0.75rem 0.875rem;
    background: rgba(0, 0, 0, 0.012);
}
.fmcsa-card h4 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin: 0 0 0.5rem;
}
.fmcsa-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.22rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.fmcsa-row:last-child { border-bottom: none; }
.fmcsa-row-label {
    font-size: 0.72rem;
    color: var(--gray-400);
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 0.75rem;
}
.fmcsa-row-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-700);
    text-align: right;
    word-break: break-word;
}
.fmcsa-fetched-at {
    font-size: 0.68rem;
    color: var(--gray-300);
    margin: 0.75rem 0 0;
    text-align: right;
}

/* ── Compliance Section ─────────── */
.compliance-snapshot {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.compliance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}
.compliance-stat-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 0.75rem 0.625rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.compliance-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.compliance-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.compliance-stat-label {
    display: block;
    font-size: 0.56rem;
    color: var(--gray-400);
    margin-top: 0.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}
.compliance-stat-sub {
    display: block;
    font-size: 0.6rem;
    color: var(--gray-400);
    margin-top: 0.1rem;
    font-weight: 500;
}
.compliance-block {
    margin: 0;
}
.compliance-block h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.compliance-fetched-at {
    font-size: 0.68rem;
    color: var(--gray-300);
    text-align: right;
}

@media (max-width: 640px) {
    .compliance-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.fmcsa-reminders {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.fmcsa-reminder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
}
.fmcsa-reminder svg { flex-shrink: 0; }
.fmcsa-reminder-info {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: #2563eb;
}
.fmcsa-reminder-warning {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: #b45309;
}
.fmcsa-reminder-danger {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #dc2626;
}
.fmcsa-no-reminders {
    font-size: 0.82rem;
    color: var(--gray-400);
    margin: 0;
}

.company-block-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
}

.company-dashboard-layout {
    display: block;
}

.company-dashboard-panel {
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
}

.company-dashboard-panel-wide {
    width: 100%;
}

.company-dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.company-dashboard-panel-head h3 {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--gray-700);
}

.company-dashboard-subtitle {
    margin: 0.625rem 0 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
}

.company-dashboard-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.company-check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.62);
}

.company-check-item input {
    margin-top: 0.15rem;
}

.company-check-item span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.company-check-item strong {
    font-size: 0.75rem;
    color: var(--gray-700);
}

.company-check-item small {
    font-size: 0.6875rem;
    color: var(--gray-500);
    line-height: 1.25;
}

.company-user-invite-row {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 0.9fr auto;
    gap: 0.45rem;
    margin-bottom: 0.625rem;
}

.company-user-invite-row input,
.company-user-invite-row select,
.company-template-form input,
.company-template-form select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    padding: 0.4375rem 0.625rem;
    color: var(--gray-800);
    font-size: 0.75rem;
    font-weight: 500;
}

.company-user-table-wrap {
    overflow-x: auto;
}

.company-user-table th,
.company-user-table td {
    font-size: 0.71875rem;
}

.company-user-row-role {
    min-width: 120px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.25rem 0.375rem;
    font-size: 0.71875rem;
}

.company-user-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.company-user-status.active {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

.company-user-status.pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.company-template-form {
    display: grid;
    grid-template-columns: 1.1fr 1fr auto;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.company-template-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.75rem;
}

.company-template-tool-grid label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.71875rem;
    color: var(--gray-600);
}

.company-template-list {
    display: grid;
    gap: 0.5rem;
}

.company-template-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 0.625rem;
}

.company-template-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
}

.company-template-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-700);
}

.company-template-dept {
    font-size: 0.625rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.company-template-tools {
    margin-top: 0.375rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.company-template-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
}

.company-template-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-template-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    color: var(--gray-500);
}

/* ── Settings Page ─────────────────────── */
.settings-group {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.settings-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin: 0 0 0.875rem;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-danger .settings-row-label {
    color: #dc2626;
}

.settings-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.settings-row-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.settings-row-desc {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Toggle switch */
.settings-toggle {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.settings-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-track {
    width: 36px;
    height: 20px;
    background: var(--gray-300);
    border-radius: 10px;
    transition: background 0.2s ease;
    position: relative;
}

.settings-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.settings-toggle input:checked + .settings-toggle-track {
    background: var(--primary);
}

.settings-toggle input:checked + .settings-toggle-track::after {
    transform: translateX(16px);
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

.dash-nav-item-nested {
    padding-left: 1.375rem;
    font-size: 0.78125rem;
}

.dash-nav-group {
    display: flex;
    flex-direction: column;
}

.dash-nav-group-chevron {
    margin-left: auto;
    color: var(--gray-400);
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.18s ease;
}

.dash-nav-group.open .dash-nav-group-chevron {
    transform: rotate(180deg);
    color: var(--gray-600);
}

.dash-nav-group-dropdown {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.22s ease;
}

.dash-nav-group.open .dash-nav-group-dropdown {
    max-height: 200px;
}

.dash-nav-group-dropdown .dash-nav-item {
    padding-left: 1.375rem;
    font-size: 0.78125rem;
}

.dash-nav-count {
    margin-left: auto;
    font-size: 0.6875rem;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 0.125rem 0.5rem;
    font-weight: 600;
    border-radius: 10px;
    min-width: 1.25rem;
    text-align: center;
}

.dash-sidebar-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dash-back-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.18s ease;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.dash-back-link:hover {
    color: var(--primary);
}

/* Main Content */
.dash-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    position: sticky;
    top: 0;
    z-index: 40;
}

.dash-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.02em;
}

.dash-topbar-actions {
    display: flex;
    align-items: center;
}

.dash-account-trigger {
    display: inline-flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    cursor: pointer;
    transition: color 0.18s ease;
}

.dash-account-trigger:hover .dash-user-email {
    color: var(--primary);
}

.dash-account-trigger:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.28);
    outline-offset: 2px;
}

.dash-account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe, #c4b5fd);
    color: var(--primary-dark);
    font-size: 0.8125rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.dash-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-account-copy {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    line-height: 1;
    padding-bottom: 0.125rem;
}

.dash-user-email {
    font-size: 0.75rem;
    color: var(--gray-700);
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
    font-weight: 700;
}

/* Sections */
.dash-section {
    display: none;
    padding: 1.75rem 1rem;
}

.dash-section.active {
    display: block;
}

/* Cards – Glassmorphism */
.dash-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--dash-card-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.dash-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.08);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: var(--dash-card-header-padding);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dash-card-header h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.01em;
}

.dash-card-header-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--dash-toolbar-gap);
    margin-left: auto;
}

.dash-card-header-actions .dash-toolbar-add {
    margin-left: 0;
}

.dash-card-body {
    padding: var(--dash-card-body-padding);
}

/* Card body with table needs no bottom padding */
.dash-card-body:has(.dash-table-wrap) {
    padding: var(--dash-card-table-padding);
}

/* Profile Hero */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-photo-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-photo {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-edit {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    color: var(--gray-500);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.profile-photo-edit:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.profile-hero-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
    letter-spacing: -0.01em;
}

.profile-hero-info p {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Dashboard Forms */
.dash-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.company-address-toggle-row {
    margin-top: -0.125rem;
}

.company-address-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 0.75rem;
    color: var(--gray-600);
    cursor: pointer;
}

.company-address-toggle input {
    position: static;
    opacity: 1;
    pointer-events: auto;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.company-address-toggle-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--gray-600);
    line-height: 1.35;
    text-transform: none;
}

.dash-form-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
}

/* Dashboard Tables – Spreadsheet Board */
.dash-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: default;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--dash-table-font-size);
    table-layout: fixed;
    cursor: default;
}

.dash-table th {
    text-align: left;
    padding: 0.375rem 0.35rem;
    font-weight: 600;
    font-size: var(--dash-table-head-font-size);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
    user-select: none;
}

.dash-table td {
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    color: var(--gray-700);
    position: relative;
    height: var(--dash-row-height);
    vertical-align: middle;
}

.dash-table td:last-child {
    border-right: none;
}

.dash-table td strong {
    color: var(--gray-800);
    font-weight: 600;
}

.dash-table .text-muted {
    color: var(--gray-400);
    font-size: var(--dash-table-font-size);
}

/* Scrollable table container */
.dash-table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    border-radius: 6px;
}

.dash-table-scroll::-webkit-scrollbar {
    height: 6px;
}

.dash-table-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

.dash-table-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.dash-table-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Shared column helpers */
.col-validation { width: 3%; min-width: 28px; }

.vin-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
}

/* Cell wrapper for click-to-edit */
.cell {
    display: flex;
    align-items: center;
    padding: 0 0.35rem;
    height: 100%;
    min-height: var(--dash-cell-min-height);
    cursor: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-primary {
    color: var(--primary-dark);
}

.cell-link {
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
}

.cell-link-unit {
    justify-content: flex-start;
    color: var(--primary-dark);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cell-link-unit:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary);
}

.cell-link-unit:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.25);
    background: rgba(79, 70, 229, 0.08);
}

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cell-editable {
    cursor: text;
    border-radius: 4px;
    margin: 1px;
    padding: 0 0.35rem;
    min-height: var(--dash-cell-min-height);
    transition: box-shadow 0.15s ease;
}

/* Inline edit input */
.cell-input {
    width: 100%;
    height: 100%;
    padding: 0 0.35rem;
    margin: 0;
    border: none;
    background: var(--white);
    font-size: var(--dash-table-font-size);
    font-family: inherit;
    color: var(--gray-800);
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary);
    border-radius: 4px;
    transition: box-shadow 0.15s ease;
}

.cell-input:focus {
    box-shadow: inset 0 0 0 2px var(--primary), 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Inline status select */
.cell-status-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: calc(var(--dash-control-height) - 4px);
    padding: 0 1.25rem 0 0.375rem;
    border: none;
    background: transparent;
    font-size: var(--dash-table-font-size);
    font-weight: 600;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    outline: none;
    border-radius: 999px;
    transition: box-shadow 0.15s ease, background 0.15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.375rem center;
}

.cell-status-select:hover {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.cell-status-select:focus {
    box-shadow: 0 0 0 2px var(--primary);
}

/* Row states */
.dash-table tbody tr {
    transition: background 0.1s ease;
}

.dash-table tbody tr[data-id] {
    cursor: default;
}

.dash-table tbody tr[data-id] td:not(.col-status):not(.row-actions):not(.col-validation),
.dash-table tbody tr[data-id] td:not(.col-status):not(.row-actions):not(.col-validation) .cell,
.dash-table tbody tr[data-id] td:not(.col-status):not(.row-actions):not(.col-validation) strong {
    cursor: pointer;
}

.dash-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.025);
}

.dash-table tbody tr.row-editing {
    background: rgba(79, 70, 229, 0.04);
}

.dash-table tbody tr:last-child td {
    border-bottom: none;
}

.dash-table td {
    height: var(--dash-row-height);
}

/* Compact row actions */
.row-actions {
    text-align: center;
    white-space: nowrap;
    min-width: var(--dash-action-column-width);
    width: var(--dash-action-column-width);
    flex-shrink: 0;
}

.row-actions .cell {
    justify-content: center;
    gap: 4px;
    padding: 0 0.25rem;
}

.row-actions button {
    background: none;
    border: none;
    cursor: pointer;
    width: var(--dash-action-button-size);
    height: var(--dash-action-button-size);
    padding: 0;
    color: var(--gray-400);
    border-radius: 6px;
    transition: all 0.12s ease;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.65;
}

.dash-table tbody tr:hover .row-actions button {
    opacity: 1;
}

.row-actions button:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.row-actions .btn-delete:hover {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.08);
}

/* Table Toolbar (search + filter) */
.dash-table-toolbar {
    display: flex;
    align-items: center;
    gap: var(--dash-toolbar-gap);
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: var(--dash-toolbar-padding);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--dash-toolbar-radius);
}

.dash-search-wrap {
    position: relative;
    flex: 0 0 var(--dash-search-width);
    width: var(--dash-search-width);
    min-width: var(--dash-search-width);
    max-width: var(--dash-search-width);
}

.dash-search-wrap svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    transition: color 0.2s ease;
}

.dash-search-wrap:focus-within svg {
    color: var(--primary);
}

.dash-search {
    width: 100%;
    height: var(--dash-control-height);
    padding: 0 0.75rem 0 2rem;
    font-size: var(--dash-control-font-size);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--gray-700);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dash-search:hover {
    border-color: rgba(0, 0, 0, 0.1);
    background: var(--white);
}

.dash-search:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.dash-search::placeholder {
    color: var(--gray-400);
}

.dash-filter {
    width: var(--dash-status-filter-width);
    min-width: var(--dash-status-filter-width);
    height: var(--dash-control-height);
    padding: 0 1.75rem 0 0.625rem;
    font-size: var(--dash-control-font-size);
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--gray-600);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 12px;
    flex: 0 0 auto;
}

#truckFuelFilter {
    width: var(--dash-fuel-filter-width);
    min-width: var(--dash-fuel-filter-width);
}

.dash-filter:hover {
    border-color: rgba(0, 0, 0, 0.1);
    background-color: var(--white);
    color: var(--gray-700);
}

.dash-filter:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
    color: var(--gray-800);
}

/* Toolbar add button */
.dash-toolbar-add {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: var(--dash-add-button-width);
    border-radius: 10px;
    font-weight: 700;
    min-height: var(--dash-control-height);
    font-size: var(--dash-control-font-size);
    padding: 0 0.75rem;
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-toolbar-add:hover {
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

.dash-toolbar-add:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.2);
}

.dash-toolbar-add svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Toolbar action group */
.dash-toolbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--dash-toolbar-gap);
    flex-shrink: 0;
}

/* Secondary toolbar button */
.dash-toolbar-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: var(--dash-import-button-width);
    border-radius: 10px;
    font-weight: 600;
    min-height: var(--dash-control-height);
    font-size: var(--dash-control-font-size);
    padding: 0 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--gray-600);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.dash-toolbar-secondary:hover {
    background: var(--white);
    border-color: rgba(79, 70, 229, 0.2);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.dash-toolbar-secondary:active {
    transform: translateY(0);
    box-shadow: none;
}

.dash-toolbar-secondary svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
}

.status-badge.active {
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
}

.status-badge.inactive {
    color: var(--gray-500);
    background: rgba(107, 114, 128, 0.1);
}

.status-badge.maintenance,
.status-badge.on-leave {
    color: #b45309;
    background: rgba(217, 119, 6, 0.1);
}

/* Empty State */
.dash-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.dash-empty p {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.overview-workspace-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.875rem;
}

.overview-workspace-tile {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    padding: 0.875rem;
}

.overview-workspace-tile h3 {
    font-size: 0.8125rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.overview-workspace-tile p {
    font-size: 0.6875rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.overview-lookup {
    position: relative;
    margin-bottom: 1.25rem;
    max-width: 540px;
}

.dash-nav .overview-lookup {
    margin: 0.125rem 0 0.5rem;
    max-width: none;
    width: 100%;
}

.dash-nav .overview-lookup-input {
    height: 34px;
    border-radius: 10px;
    padding: 0 0.625rem 0 2rem;
    font-size: 0.75rem;
    box-shadow: none;
}

.dash-nav .overview-lookup-results {
    left: 0;
    right: 0;
    top: calc(100% + 0.375rem);
    z-index: 60;
    padding: 0.25rem;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(87, 99, 145, 0.12);
}

.dash-nav .overview-lookup-result {
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
}

.dash-nav .overview-lookup-result:hover,
.dash-nav .overview-lookup-result.active {
    background: rgba(79, 70, 229, 0.06);
}

.dash-nav .overview-lookup-result-type {
    min-width: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--gray-500);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: right;
}

.dash-nav .overview-lookup-result-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    width: 100%;
}

.dash-nav .overview-lookup-result-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
}

.dash-nav .overview-lookup-result-copy strong {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
}

.dash-nav .overview-lookup-result-meta,
.dash-nav .overview-lookup-result-detail {
    display: block;
    font-size: 0.595rem;
    color: var(--gray-500);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.dash-nav .overview-lookup-result-detail {
    color: var(--gray-600);
}

.overview-lookup-shell {
    position: relative;
}

.overview-lookup-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
}

.overview-lookup-input {
    width: 100%;
    height: 42px;
    padding: 0 1rem 0 2.6rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.8125rem;
    color: var(--gray-700);
    box-shadow: 0 8px 24px rgba(122, 134, 176, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.overview-lookup-input:hover {
    background: rgba(255, 255, 255, 0.9);
}

.overview-lookup-input:focus {
    outline: none;
    border-color: rgba(79, 70, 229, 0.28);
    box-shadow: 0 10px 28px rgba(95, 108, 159, 0.12), 0 0 0 3px rgba(79, 70, 229, 0.08);
    background: rgba(255, 255, 255, 0.95);
}

.overview-lookup-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    display: none;
    padding: 0.375rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 34px rgba(87, 99, 145, 0.16);
    z-index: 20;
}

.overview-lookup-results.open {
    display: block;
}

.overview-lookup-result {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.overview-lookup-result:hover,
.overview-lookup-result.active {
    background: rgba(79, 70, 229, 0.07);
}

.overview-lookup-result-type {
    min-width: 58px;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
}

.overview-lookup-result-type.truck {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.overview-lookup-result-type.trailer {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.overview-lookup-result-type.driver {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.overview-lookup-result-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.overview-lookup-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.overview-lookup-result-copy strong {
    font-size: 0.8125rem;
    color: var(--gray-800);
    font-weight: 700;
}

.overview-lookup-result-meta,
.overview-lookup-result-detail {
    font-size: 0.6875rem;
    color: var(--gray-500);
    line-height: 1.45;
}

/* Overview Cards */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.overview-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 0.55rem 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.overview-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.overview-card[data-nav="trucks"]::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(37, 99, 235, 0.01));
}

.overview-card[data-nav="trailers"]::before {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.04), rgba(217, 119, 6, 0.01));
}

.overview-card[data-nav="drivers"]::before {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.04), rgba(124, 58, 237, 0.01));
}

.overview-card.active-card::before {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.04), rgba(22, 163, 74, 0.01));
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    border-color: rgba(255, 255, 255, 0.95);
}

.overview-card:hover::before {
    opacity: 1;
}

.overview-card:hover .overview-card-icon {
    transform: scale(1.04);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.overview-card:hover .overview-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.overview-card:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* Icon circle */
.overview-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.overview-card-icon svg {
    width: 15px;
    height: 15px;
}

.overview-card-icon.trucks {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
    color: #2563eb;
}

.overview-card-icon.trailers {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    color: #d97706;
}

.overview-card-icon.drivers {
    background: linear-gradient(135deg, #f3e8ff, #d8b4fe);
    color: #7c3aed;
}

.overview-card-icon.active-units {
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #16a34a;
}

/* Info block */
.overview-card-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.overview-card-value {
    display: block;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.overview-card-label {
    display: block;
    font-size: 0.56rem;
    color: var(--gray-400);
    margin-top: 0.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

/* Arrow indicator */
.overview-card-arrow {
    flex-shrink: 0;
    color: var(--gray-300);
    width: 12px;
    height: 12px;
    opacity: 0.55;
    transform: translateX(0);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
    position: relative;
    z-index: 1;
}

.overview-card:hover .overview-card-arrow {
    color: var(--gray-500);
    opacity: 0.9;
}

.overview-details {
    max-width: 520px;
}

@media (max-width: 1180px) {
    .overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .company-dashboard-layout {
        display: block;
    }

    .company-tabs {
        width: 100%;
    }

    .company-dashboard-check-grid {
        grid-template-columns: 1fr;
    }

    .company-user-invite-row,
    .company-template-form {
        grid-template-columns: 1fr;
    }

    .company-template-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Overview Alerts */
.overview-alerts {
    width: 100%;
    max-width: 980px;
    margin-bottom: 1.25rem;
}

.overview-alerts:empty {
    display: none;
    margin-bottom: 0;
}

.alert-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.alert-item:last-child {
    margin-bottom: 0;
}

.alert-item svg {
    flex-shrink: 0;
}

.alert-warning {
    color: #92400e;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.25);
}

.alert-danger {
    color: #991b1b;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.18);
}

.alert-info {
    color: #1e40af;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

.alert-unassigned {
    padding: 0.75rem 0.875rem;
}

.alert-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0;
}

.alert-dropdown-trigger span {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
}

.alert-dropdown-chevron {
    flex-shrink: 0;
    margin-top: 0.05rem;
    transition: transform 0.2s ease;
}

.alert-unassigned.expanded .alert-dropdown-chevron,
.alert-dropdown-trigger[aria-expanded="true"] .alert-dropdown-chevron {
    transform: rotate(180deg);
}

.alert-dropdown-panel {
    margin-top: 0.625rem;
    padding: 0.75rem;
    border-top: 1px solid rgba(37, 99, 235, 0.16);
    background: rgba(255, 255, 255, 0.36);
    border-radius: 10px;
}

.alert-dropdown-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.4rem;
    max-height: 260px;
    overflow-y: auto;
}

.alert-dropdown-item {
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(37, 99, 235, 0.08);
    display: grid;
    gap: 0.18rem;
}

.alert-dropdown-name {
    font-weight: 600;
    color: var(--gray-800);
}

.alert-dropdown-meta {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.35;
}

@media (max-width: 900px) {
    .overview-alerts {
        max-width: 100%;
    }

    .alert-dropdown-item {
        padding: 0.5rem 0.6rem;
    }
}

.overview-breakdown {
    display: flex;
    flex-direction: column;
}

.overview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.overview-row:last-child {
    border-bottom: none;
}

.overview-row-label {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.overview-row-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-800);
}

/* Modal overrides for dashboard */
.dash-layout ~ .modal .modal-content {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.dash-layout ~ .modal .modal-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.125rem 1.5rem;
}

.dash-layout ~ .modal .modal-header h2 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.dash-layout ~ .modal .modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.dash-layout ~ .modal .modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--gray-700);
}

.dash-layout ~ .modal .modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.dash-layout ~ .modal {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Compatibility: dashboard JS toggles the hidden class instead of .open */
.dash-layout ~ .modal:not(.hidden) {
    display: flex;
}

.dash-form-actions .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.dash-empty .btn {
    border-radius: 10px;
}

/* Form inputs – hover-to-edit style */
.dash-form input,
.dash-form select {
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    padding: 0.4375rem 0.625rem;
    color: var(--gray-800);
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-form input:hover,
.dash-form select:hover {
    background: rgba(79, 70, 229, 0.03);
    border-color: rgba(0, 0, 0, 0.18);
}

.dash-form input:focus,
.dash-form select:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.dash-form input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    border-color: rgba(0, 0, 0, 0.06);
}

.dash-form input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

/* Modal inputs – same hover-to-edit style */
.dash-layout ~ .modal .form-group input,
.dash-layout ~ .modal .form-group select {
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    padding: 0.4375rem 0.625rem;
    color: var(--gray-800);
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-layout ~ .modal .form-group input:hover,
.dash-layout ~ .modal .form-group select:hover {
    background: rgba(79, 70, 229, 0.03);
    border-color: rgba(0, 0, 0, 0.18);
}

.dash-layout ~ .modal .form-group input:focus,
.dash-layout ~ .modal .form-group select:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.dash-layout ~ .modal .form-group input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

/* Form label refinement for hover-to-edit */
.dash-form .form-group label,
.dash-layout ~ .modal .form-group label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.25rem;
    transition: color 0.15s ease;
}

.dash-form .form-group:focus-within label,
.dash-layout ~ .modal .form-group:focus-within label {
    color: var(--primary);
}

.dash-layout ~ .modal .form-actions {
    padding-top: 0.5rem;
}

.dash-layout ~ .modal .form-actions .btn {
    border-radius: 10px;
    font-weight: 600;
}

/* ── Expandable form sections ────────── */
.form-expand-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    margin: 0.75rem 0 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-400);
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.form-expand-toggle:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.04);
    border-color: rgba(79, 70, 229, 0.08);
}

.form-expand-toggle svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.form-expand-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.form-expand-toggle[aria-expanded="true"] {
    color: var(--primary);
}

.form-expand-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                margin 0.35s ease;
    margin-top: 0;
}

.form-expand-section.open {
    max-height: 600px;
    opacity: 1;
    margin-top: 0.75rem;
}

/* Expand section inner spacing */
.form-expand-section > .form-group:first-child,
.form-expand-section > .form-row:first-child,
.form-expand-section > .dash-form-grid:first-child {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* ── Sheet-Style Modal (Trucks, Trailers, Drivers) ── */
.sheet-modal {
    width: 96vw;
    max-width: 1200px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.sheet-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sheet-header-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sheet-row-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    padding: 0.25rem 0.625rem;
    background: rgba(79, 70, 229, 0.06);
    border-radius: 8px;
    letter-spacing: 0.01em;
}

.sheet-modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0 !important;
}

.sheet-wrap {
    width: 100%;
    height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sheet-wrap::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sheet-wrap::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

.sheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    table-layout: fixed;
}

.sheet-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sheet-table thead th {
    background: var(--gray-50);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-400);
    padding: 0.375rem 0.5rem;
    text-align: left;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    user-select: none;
}

.sheet-table thead th:last-child {
    border-right: none;
}

.sheet-table .row-num-col {
    width: 36px;
    text-align: center;
    color: var(--gray-300);
}

.sheet-table .row-action-col {
    width: 36px;
}

/* Body rows */
.sheet-table tbody tr {
    transition: background 0.1s ease;
}

/* Alternating row backgrounds */
.sheet-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.sheet-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.035);
}

.sheet-table tbody tr.row-has-data {
    background: rgba(79, 70, 229, 0.015);
}

.sheet-table tbody tr.row-has-data:nth-child(even) {
    background: rgba(79, 70, 229, 0.025);
}

.sheet-table tbody tr.row-has-data:hover {
    background: rgba(79, 70, 229, 0.05);
}

/* Active row — contains the cell being edited */
.sheet-table tbody tr:has(.cell-editing) {
    background: rgba(79, 70, 229, 0.04) !important;
}

/* Row number */
.sheet-table tbody .sheet-row-num {
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-300);
    padding: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    user-select: none;
    transition: color 0.1s ease, background 0.1s ease;
}

.sheet-table tbody tr:hover .sheet-row-num {
    color: var(--gray-500);
    background: rgba(79, 70, 229, 0.04);
}

.sheet-table tbody tr:has(.cell-editing) .sheet-row-num {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.07);
    font-weight: 700;
}

/* Cells */
.sheet-table td {
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
}

.sheet-table td:last-child {
    border-right: none;
}

.sheet-table td:not(.sheet-row-num):not(.sheet-row-action) {
    cursor: text;
}

/* ── Sheet cell: read-only display ────── */
.sheet-cell {
    display: flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.4rem;
    border: 1px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    user-select: none;
    position: relative;
}

.sheet-cell-text {
    flex: 1;
    min-width: 0;
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 28px;
}

.sheet-cell-text.placeholder {
    color: var(--gray-300);
    font-weight: 400;
}

/* Hover affordance — subtle highlight + border hint */
.sheet-cell:hover {
    background: rgba(79, 70, 229, 0.04);
    border-color: rgba(79, 70, 229, 0.15);
    border-radius: 2px;
}

/* Pencil icon hint on hover */
.sheet-cell::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.sheet-cell:hover::after {
    opacity: 0.5;
}

/* ── Sheet cell: editing state ────────── */
.sheet-cell.cell-editing {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15), 0 2px 8px rgba(79, 70, 229, 0.08);
    z-index: 3;
    position: relative;
    border-radius: 2px;
}

.sheet-cell.cell-editing::after {
    display: none;
}

.sheet-cell.cell-editing .sheet-cell-text {
    display: none;
}

/* Cell input (only visible when editing) */
.sheet-cell input,
.sheet-cell select {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--gray-800);
    font-weight: 500;
}

.sheet-cell.cell-editing input,
.sheet-cell.cell-editing select {
    display: block;
}

.sheet-cell input::placeholder {
    color: var(--gray-300);
    font-weight: 400;
}

.sheet-cell select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
}

/* Validation error */
.sheet-cell.cell-invalid {
    background: rgba(220, 38, 38, 0.04);
    border-color: rgba(220, 38, 38, 0.3);
}

.sheet-cell.cell-invalid .sheet-cell-text {
    color: #dc2626;
}

.sheet-cell.cell-invalid::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
    opacity: 0.7;
}

.sheet-cell.cell-invalid:hover::after {
    opacity: 1;
}

/* Duplicate unit warning */
.sheet-cell.cell-duplicate {
    background: rgba(217, 119, 6, 0.06);
    border-color: rgba(217, 119, 6, 0.3);
}

.sheet-cell.cell-duplicate .sheet-cell-text {
    color: #b45309;
}

/* Field-level warning (VIN length, state code, year range) */
.sheet-cell.cell-warning {
    background: rgba(234, 179, 8, 0.06);
    border-color: rgba(234, 179, 8, 0.35);
}

.sheet-cell.cell-warning .sheet-cell-text {
    color: #a16207;
}

.sheet-cell.cell-warning::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a16207' stroke-width='2'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
    opacity: 0.7;
}

.sheet-cell.cell-warning:hover::after {
    opacity: 1;
}

/* Row delete */
.sheet-row-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 0 auto;
    border: none;
    background: transparent;
    color: var(--gray-300);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    opacity: 0;
}

.sheet-table tbody tr:hover .sheet-row-delete {
    opacity: 1;
}

.sheet-row-delete:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

/* Footer */
.sheet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    gap: 1rem;
}

.sheet-footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.sheet-footer-info svg {
    flex-shrink: 0;
    color: var(--gray-300);
}

.sheet-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sheet-footer-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Row action column */
.sheet-row-action {
    padding: 0;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dash-sidebar {
        width: 100%;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 0;
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
    }

    .dash-sidebar-header,
    .dash-sidebar-footer {
        display: none;
    }

    .dash-nav {
        display: flex;
        flex-direction: row;
        padding: 0;
        gap: 0;
        overflow-x: auto;
    }

    .dash-nav-item {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.625rem;
        white-space: nowrap;
        border-radius: 0;
    }

    .dash-nav-item-company {
        margin-top: 0;
    }

    .dash-nav-item-nested {
        padding-left: 0.75rem;
        font-size: 0.625rem;
    }

    .dash-nav-group-dropdown .dash-nav-item {
        padding-left: 0.75rem;
        font-size: 0.625rem;
    }

    .dash-nav .overview-lookup {
        display: none;
    }

    .dash-nav-count {
        display: none;
    }

    .dash-main {
        margin-left: 0;
        padding-bottom: 70px;
    }

    .dash-section {
        padding: 1rem;
    }

    .dash-table-toolbar {
        gap: var(--dash-toolbar-gap);
    }

    .dash-search-wrap {
        flex: 0 1 var(--dash-search-width);
        width: min(100%, var(--dash-search-width));
        min-width: 0;
        max-width: 100%;
    }

    .dash-toolbar-actions {
        flex: 0 0 auto;
        justify-content: flex-start;
    }

    .dash-toolbar-add {
        margin-left: 0;
    }

    .dash-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .dash-card-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-workspace-grid {
        grid-template-columns: 1fr;
    }

    .overview-lookup {
        max-width: 100%;
    }

    .overview-lookup-result {
        padding: 0.6875rem 0.75rem;
    }

    .overview-lookup-result-type {
        min-width: 52px;
    }

    .dash-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        flex-direction: column;
        text-align: center;
    }

    .dash-card {
        border-radius: var(--dash-card-radius);
    }

    .overview-card {
        border-radius: 14px;
    }

    .sheet-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0 !important;
    }

    .sheet-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .sheet-footer-info {
        display: none;
    }

    .sheet-footer-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ── Dropdown Edit Button ────────────── */
.dropdown-edit-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
    opacity: 0.5;
}

.dropdown-edit-btn:hover {
    opacity: 1;
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--primary);
}

/* ── Dropdown Editor Modal ───────────── */
.dropdown-editor-modal {
    max-width: 440px;
    width: 100%;
}

.dropdown-editor-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0.75rem;
    max-height: 260px;
    overflow-y: auto;
}

.dropdown-editor-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.625rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
}

.dropdown-editor-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.dropdown-editor-value {
    font-size: 0.6875rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--gray-500);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 70px;
}

.dropdown-editor-label {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
}

.dropdown-editor-remove {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.dropdown-editor-remove:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger, #ef4444);
}

.dropdown-editor-add {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dropdown-editor-add input {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--gray-700);
    background: var(--white);
    transition: border-color 0.15s ease;
}

.dropdown-editor-add input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.dropdown-editor-add input::placeholder {
    color: var(--gray-400);
}

.dropdown-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Validation Row Indicators ───────────── */
.row-validation-warning {
    background: rgba(255, 193, 7, 0.08);
}
.row-validation-error {
    background: rgba(220, 53, 69, 0.08);
}

/* Indicator column */
.col-validation {
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    text-align: center;
    padding: 0 !important;
}
th.col-validation {
    border-bottom-color: transparent;
}

/* Indicator button */
.validation-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    padding: 2px;
    cursor: default;
    position: relative;
    border-radius: 4px;
    pointer-events: auto;
}

.dash-table th.col-validation + th {
    padding-left: 0.05rem;
}

.dash-table td.col-validation + td .cell,
.dash-table td.col-validation + td .cell-editable,
.dash-table td.col-validation + td .cell-link,
.dash-table td.col-validation + td .cell-input {
    padding-left: 0.05rem;
}
.validation-indicator svg {
    flex-shrink: 0;
}
.vi-warning svg {
    stroke: #e6a817;
}
.vi-error svg {
    stroke: #dc3545;
}
/* Custom tooltip on hover */
.vi-tooltip {
    display: none;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 6px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.75rem;
    line-height: 1.45;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    text-align: left;
    font-weight: 400;
    min-width: 120px;
}
.vi-tooltip strong {
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}
.validation-indicator:hover .vi-tooltip {
    display: block;
}

/* Expandable detail row */
.validation-detail-row td {
    padding: 0 !important;
    border-top: none !important;
}
.validation-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 14px 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    border-radius: 0 0 6px 6px;
}
.validation-detail svg {
    flex-shrink: 0;
    margin-top: 2px;
}
.vd-warning .validation-detail {
    background: rgba(255, 193, 7, 0.1);
    color: #92600a;
}
.vd-warning .validation-detail svg {
    stroke: #e6a817;
}
.vd-error .validation-detail {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
}
.vd-error .validation-detail svg {
    stroke: #dc3545;
}
.validation-detail ul {
    margin: 0;
    padding: 0;
    list-style: disc inside;
}
.validation-detail li {
    margin: 1px 0;
}

/* Legacy badge (remove later) */
.validation-badge {
    display: none;
}

/* ── VIN Input Wrapper & Status ──────────── */
.vin-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.vin-input-wrap input {
    flex: 1;
    padding-right: 2rem;
}
.vin-status {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}
.vin-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: vin-spin 0.6s linear infinite;
}
@keyframes vin-spin {
    to { transform: rotate(360deg); }
}
.vin-valid .vin-status svg { filter: drop-shadow(0 0 2px rgba(22, 163, 74, 0.3)); }

/* Sheet grid VIN decode states */
.vin-sheet-loading .sheet-cell-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: vin-spin 0.6s linear infinite;
    vertical-align: middle;
}
.vin-sheet-valid {
    background: rgba(22, 163, 74, 0.06) !important;
    border-color: rgba(22, 163, 74, 0.25) !important;
}

/* ── Compact Sheet Cells ─────────────────── */
.sheet-cell {
    min-height: 32px;
    padding: 0 0.5rem;
}
.sheet-cell-text {
    font-size: 0.75rem;
    line-height: 32px;
}
.sheet-cell input,
.sheet-cell select {
    min-height: 30px;
    font-size: 0.75rem;
}
.sheet-table th {
    font-size: 0.6875rem;
    padding: 0.375rem 0.5rem;
}
.sheet-row-num {
    font-size: 0.6875rem;
}

/* ── Autocomplete Dropdown ───────────────── */
.autocomplete-list {
    position: fixed;
    z-index: 9999;
    max-height: 160px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    list-style: none;
}
.autocomplete-item {
    padding: 6px 10px;
    font-size: 0.8125rem;
    color: var(--gray-700);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}
/* Inside sheet cells — use smaller font */
.sheet-cell .autocomplete-list {
    min-width: 140px;
}
.sheet-cell .autocomplete-item {
    font-size: 0.75rem;
    padding: 4px 8px;
}
/* Inside form inputs */
.form-group {
    position: relative;
}
.form-group .autocomplete-list {
    min-width: 180px;
}

/* ── Inline Select (fuel/type dropdowns) ── */
.cell-inline-select {
    width: 100%;
    padding: 0.25rem 0.375rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: var(--white);
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--gray-800);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
    cursor: pointer;
}
/* Inline text input autocomplete positioning */
.cell-editable {
    position: relative;
}
.cell-editable .autocomplete-list {
    top: 100%;
    left: 0;
    right: 0;
    min-width: 140px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEPARTMENT SCAFFOLDING STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Department Header ── */
.dept-header {
    margin-bottom: 1.5rem;
}
.dept-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}
.dept-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0;
}

/* ── Department Grid Layout ── */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.dash-card-wide {
    grid-column: span 2;
}
.dash-card-fullheight {
    min-height: 500px;
}
.dash-card-fullheight .dash-card-body {
    flex: 1;
    display: flex;
}

@media (max-width: 768px) {
    .dept-grid {
        grid-template-columns: 1fr;
    }
    .dash-card-wide {
        grid-column: span 1;
    }
}

/* ── Department Nav Cards (landing page quick-access cards) ── */
.dept-nav-card {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.dept-nav-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-400, #60a5fa);
}
.dept-nav-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem;
    min-height: 140px;
    gap: 0.5rem;
}
.dept-nav-card-body svg {
    color: var(--primary-500, #3b82f6);
    margin-bottom: 0.25rem;
}
.dept-nav-card-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}
.dept-nav-card-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ── Placeholder Content ── */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    min-height: 200px;
}
.placeholder-content svg {
    color: var(--gray-300);
    margin-bottom: 1rem;
}
.placeholder-content p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-500);
    margin: 0 0 0.5rem 0;
}
.placeholder-hint {
    font-size: 0.8125rem;
    color: var(--gray-400);
    max-width: 280px;
    line-height: 1.4;
}

/* Special map placeholder */
.placeholder-content-map {
    min-height: 400px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: 8px;
    width: 100%;
}
.placeholder-content-map svg {
    color: var(--gray-300);
}

/* ── Nav Group Colors (department accents) ── */
.dash-nav-group-trigger[data-section="safety"] svg:first-child { color: #10b981; }
.dash-nav-group-trigger[data-section="maintenance"] svg:first-child { color: #f59e0b; }
.dash-nav-group-trigger[data-section="dispatch"] svg:first-child { color: #3b82f6; }
.dash-nav-group-trigger[data-section="tracking"] svg:first-child { color: #8b5cf6; }
.dash-nav-group-trigger[data-section="accounting"] svg:first-child { color: #06b6d4; }
.dash-nav-group-trigger[data-section="hiring"] svg:first-child { color: #ec4899; }
.dash-nav-group-trigger[data-section="claims"] svg:first-child { color: #ef4444; }
.dash-nav-group-trigger[data-section="afterhours"] svg:first-child { color: #6366f1; }
.dash-nav-group-trigger[data-section="operations"] svg:first-child { color: #14b8a6; }

/* Active state for nav groups */
.dash-nav-group-trigger.active[data-section="safety"],
.dash-nav-group .dash-nav-item.active[data-section^="safety"],
.dash-nav-group .dash-nav-item.active[data-section="drivers"],
.dash-nav-group .dash-nav-item.active[data-section="trucks"],
.dash-nav-group .dash-nav-item.active[data-section="trailers"],
.dash-nav-group .dash-nav-item.active[data-section="violations"] {
    background: rgba(16, 185, 129, 0.1);
}
.dash-nav-group-trigger.active[data-section="maintenance"],
.dash-nav-group .dash-nav-item.active[data-section^="maintenance"],
.dash-nav-group .dash-nav-item.active[data-section="work-orders"],
.dash-nav-group .dash-nav-item.active[data-section="pm-schedules"],
.dash-nav-group .dash-nav-item.active[data-section="parts-inventory"] {
    background: rgba(245, 158, 11, 0.1);
}
.dash-nav-group-trigger.active[data-section="dispatch"],
.dash-nav-group .dash-nav-item.active[data-section^="dispatch"],
.dash-nav-group .dash-nav-item.active[data-section="active-loads"],
.dash-nav-group .dash-nav-item.active[data-section="driver-assignments"] {
    background: rgba(59, 130, 246, 0.1);
}
.dash-nav-group-trigger.active[data-section="tracking"],
.dash-nav-group .dash-nav-item.active[data-section="live-map"],
.dash-nav-group .dash-nav-item.active[data-section="load-status"],
.dash-nav-group .dash-nav-item.active[data-section="eta-tracking"] {
    background: rgba(139, 92, 246, 0.1);
}
.dash-nav-group-trigger.active[data-section="accounting"],
.dash-nav-group .dash-nav-item.active[data-section="invoices"],
.dash-nav-group .dash-nav-item.active[data-section="settlements"],
.dash-nav-group .dash-nav-item.active[data-section="expenses"],
.dash-nav-group .dash-nav-item.active[data-section="payroll"] {
    background: rgba(6, 182, 212, 0.1);
}
.dash-nav-group-trigger.active[data-section="hiring"],
.dash-nav-group .dash-nav-item.active[data-section="applications"],
.dash-nav-group .dash-nav-item.active[data-section="hiring-pipeline"],
.dash-nav-group .dash-nav-item.active[data-section="onboarding"] {
    background: rgba(236, 72, 153, 0.1);
}
.dash-nav-group-trigger.active[data-section="claims"],
.dash-nav-group .dash-nav-item.active[data-section="accidents"],
.dash-nav-group .dash-nav-item.active[data-section="cargo-claims"],
.dash-nav-group .dash-nav-item.active[data-section="insurance"] {
    background: rgba(239, 68, 68, 0.1);
}
.dash-nav-group-trigger.active[data-section="afterhours"],
.dash-nav-group .dash-nav-item.active[data-section="on-call"],
.dash-nav-group .dash-nav-item.active[data-section="emergency-contacts"],
.dash-nav-group .dash-nav-item.active[data-section="driver-support"] {
    background: rgba(99, 102, 241, 0.1);
}
.dash-nav-group-trigger.active[data-section="operations"],
.dash-nav-group .dash-nav-item.active[data-section="command-center"],
.dash-nav-group .dash-nav-item.active[data-section="cross-dept-alerts"],
.dash-nav-group .dash-nav-item.active[data-section="reports"] {
    background: rgba(20, 184, 166, 0.1);
}

/* ── Driver Detail Panel (slide-out) ── */
.detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.detail-backdrop:not(.hidden) { opacity: 1; }
.detail-backdrop.hidden { pointer-events: none; }

.detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 94vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.10);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.detail-panel.hidden {
    pointer-events: none;
    visibility: hidden;
    transform: translateX(100%);
}
.detail-panel:not(.hidden) {
    transform: translateX(0);
    visibility: visible;
}

.detail-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.detail-panel-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.detail-panel-title h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-panel-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.detail-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.15s ease;
}
.detail-action-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--gray-600);
}

.detail-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem 2rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-400);
    margin: 0 0 0.75rem;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
}

.detail-field {
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0;
}
.detail-field.full-width {
    grid-column: 1 / -1;
}

.detail-field-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-400);
    margin-bottom: 0.2rem;
}
.detail-field-label .req {
    color: #ef4444;
    font-weight: 700;
}

.detail-field-input {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-700);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.3rem 0.45rem;
    outline: none;
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}
.detail-field-input::placeholder {
    color: var(--gray-300);
    font-weight: 400;
    font-style: italic;
}

.detail-field:hover .detail-field-input,
.detail-field-input:focus {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.015);
}
.detail-field-input:focus {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.03);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.08);
}

select.detail-field-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    padding-right: 1.4rem;
    cursor: pointer;
}

textarea.detail-field-input {
    resize: vertical;
    min-height: 42px;
}

.detail-endorsement-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.2rem 0;
}

.dp-endorse-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.dp-endorse-chip input { display: none; }
.dp-endorse-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    color: var(--gray-400);
    transition: all 0.15s ease;
    padding: 0 4px;
}
.dp-endorse-chip:hover span {
    border-color: rgba(79, 70, 229, 0.2);
    background: rgba(79, 70, 229, 0.04);
}
.dp-endorse-chip input:checked + span {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.3);
    color: var(--primary);
}

.detail-save-btn {
    color: var(--primary) !important;
}
.detail-save-btn:hover {
    background: rgba(79, 70, 229, 0.08) !important;
    color: var(--primary) !important;
}

.detail-panel.is-create .detail-panel-header {
    border-bottom-color: rgba(79, 70, 229, 0.12);
}
.detail-panel.is-create .detail-panel-title h2 {
    color: var(--primary);
}

.detail-doc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.detail-doc-slot {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.015);
    transition: border-color 0.15s ease;
}
.detail-doc-slot:hover { border-color: rgba(0, 0, 0, 0.1); }

.detail-doc-slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    background: rgba(0, 0, 0, 0.025);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.detail-doc-slot-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-600);
}

.detail-doc-slot-status {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1px 6px;
    border-radius: 4px;
}

.detail-doc-slot-status.uploaded {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}
.detail-doc-slot-status.missing {
    color: #9ca3af;
    background: rgba(156, 163, 175, 0.1);
}

.detail-doc-slot-body {
    padding: 0.5rem 0.65rem;
    min-height: 54px;
    display: flex;
    align-items: center;
}

.detail-doc-upload-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.35rem;
    padding: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.04);
    border: 1px dashed rgba(79, 70, 229, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.detail-doc-upload-prompt:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.35);
}
.detail-doc-upload-prompt input[type="file"] { display: none; }

.detail-doc-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.detail-doc-file-info {
    flex: 1;
    min-width: 0;
}

.detail-doc-file-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-doc-file-meta {
    font-size: 0.65rem;
    color: var(--gray-400);
}

.detail-doc-file-actions {
    display: flex;
    gap: 0.2rem;
    flex-shrink: 0;
}

.detail-doc-file-actions a,
.detail-doc-file-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.detail-doc-file-actions a:hover,
.detail-doc-file-actions button:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--gray-600);
}
.detail-doc-file-actions .doc-slot-delete:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.detail-doc-thumb {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 560px) {
    .detail-panel { width: 100vw; }
    .detail-doc-grid { grid-template-columns: 1fr; }
    .detail-info-grid { grid-template-columns: 1fr; }
}

#driversTable tbody tr { cursor: pointer; }
#driversTable tbody tr:hover { background: rgba(79, 70, 229, 0.025); }

tr.detail-active {
    background: rgba(79, 70, 229, 0.04) !important;
    box-shadow: inset 3px 0 0 var(--primary);
}

/* ── Summary Bar ── */
.dp-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.dp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}
.dp-chip--green  { background: rgba(5,150,105,0.08);  color: #059669; border-color: rgba(5,150,105,0.15); }
.dp-chip--yellow { background: rgba(217,119,6,0.08);  color: #b45309; border-color: rgba(217,119,6,0.15); }
.dp-chip--red    { background: rgba(220,38,38,0.08);  color: #dc2626; border-color: rgba(220,38,38,0.15); }
.dp-chip--gray   { background: rgba(0,0,0,0.04);      color: var(--gray-500); border-color: rgba(0,0,0,0.06); }
.dp-chip--blue   { background: rgba(79,70,229,0.06);  color: var(--primary); border-color: rgba(79,70,229,0.12); }
.dp-chip-dot {
    width: 6px; height: 6px; border-radius: 50%;
}
.dp-chip--green .dp-chip-dot  { background: #059669; }
.dp-chip--yellow .dp-chip-dot { background: #d97706; }
.dp-chip--red .dp-chip-dot    { background: #dc2626; }
.dp-chip--gray .dp-chip-dot   { background: var(--gray-400); }
.dp-chip--blue .dp-chip-dot   { background: var(--primary); }

/* ── Quick Actions ── */
.dp-quick-actions {
    display: flex;
    gap: 0.35rem;
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.dp-qaction {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.015);
    color: var(--gray-600);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.dp-qaction:hover {
    background: rgba(79, 70, 229, 0.05);
    border-color: rgba(79, 70, 229, 0.2);
    color: var(--primary);
}
.dp-qaction--warn:hover {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}
.dp-qaction--danger {
    border-color: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
}
.dp-qaction--danger:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
    color: #991b1b;
}
.dp-qaction--active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
.dp-qaction--active:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}
.dp-qaction svg { flex-shrink: 0; }

/* DND badge in panel header */
.dnd-badge {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 8px;
    animation: dnd-pulse 2s infinite;
}
@keyframes dnd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* DND tag in drivers table */
.dnd-tag {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}
tr.row-dnd {
    background: rgba(220, 38, 38, 0.03) !important;
}
tr.row-dnd td:first-child {
    border-left: 3px solid #dc2626;
}

/* DND toggle switch */
.dnd-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.dnd-toggle input { display: none; }
.dnd-toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: #d1d5db;
    border-radius: 11px;
    transition: background 0.25s;
}
.dnd-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.dnd-toggle input:checked + .dnd-toggle-slider {
    background: #dc2626;
}
.dnd-toggle input:checked + .dnd-toggle-slider::after {
    transform: translateX(18px);
}
.dnd-toggle-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    transition: color 0.2s;
}
.dnd-toggle input:checked ~ .dnd-toggle-label {
    color: #dc2626;
}

/* ── Compose ── */
.dp-compose {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.012);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dp-compose:focus-within {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.06);
}
.dp-compose-input {
    display: block;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.75rem 0.85rem 0.35rem;
    font-family: inherit;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--gray-700);
    resize: none;
    min-height: 56px;
    max-height: 200px;
    box-sizing: border-box;
}
.dp-compose-input::placeholder { color: var(--gray-400); }
.dp-compose-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.dp-compose-selects {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.dp-compose-select {
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gray-500);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 5px;
    padding: 0.2rem 0.35rem;
    background: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    outline: none;
    max-width: 105px;
}
.dp-compose-select:focus { border-color: var(--primary); }
.dp-compose-post {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 7px;
    padding: 0.32rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, opacity 0.15s;
}
.dp-compose-post:hover:not(:disabled) { background: var(--primary-dark); }
.dp-compose-post:disabled { opacity: 0.25; cursor: default; }
.dp-compose-post.posting { pointer-events: none; opacity: 0.5; }
.dp-compose-post.posting svg { animation: dpSpin 0.6s linear infinite; }
@keyframes dpSpin { to { transform: rotate(360deg); } }
.dp-compose.posted { animation: dpPosted 0.5s ease; }
@keyframes dpPosted {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
    50%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.04); }
    100% { box-shadow: none; }
}

/* ── Collapsible Sections ── */
.dp-section-collapsible { overflow: hidden; }
.dp-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}
.dp-section-toggle:hover .dp-toggle-label { color: var(--primary); }
.dp-toggle-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s;
}
.dp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 700;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}
.dp-badge:empty { display: none; }
.dp-toggle-chevron {
    color: var(--gray-400);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dp-section-collapsible.collapsed .dp-toggle-chevron {
    transform: rotate(-90deg);
}
.dp-collapse-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 1;
}
.dp-collapse-body > * { overflow: hidden; }
.dp-section-collapsible.collapsed .dp-collapse-body {
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
}

/* ── Feed (Notes & Tasks) ── */
.dp-feed {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-top: 0.6rem;
}
.dp-note {
    display: flex;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: rgba(0, 0, 0, 0.012);
    transition: border-color 0.15s;
}
.dp-note:hover { border-color: rgba(0, 0, 0, 0.08); }
.dp-note-avi {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff; font-size: 0.58rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dp-note-body { flex: 1; min-width: 0; }
.dp-note-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
}
.dp-note-tag {
    display: inline-flex;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}
.dp-note-tag[data-type="incident"]    { background: rgba(220,38,38,0.08);  color: #dc2626; }
.dp-note-tag[data-type="safety"]      { background: rgba(234,88,12,0.08);  color: #ea580c; }
.dp-note-tag[data-type="maintenance"] { background: rgba(217,119,6,0.08);  color: #b45309; }
.dp-note-tag[data-type="training"]    { background: rgba(5,150,105,0.08);  color: #059669; }
.dp-note-tag[data-type="inspection"]  { background: rgba(37,99,235,0.08);  color: #2563eb; }
.dp-note-pri {
    font-size: 0.56rem; font-weight: 700; text-transform: uppercase;
}
.dp-note-pri[data-pri="high"]   { color: #ea580c; }
.dp-note-pri[data-pri="urgent"] { color: #dc2626; }
.dp-note-time {
    font-size: 0.6rem; color: var(--gray-400); margin-left: auto;
}
.dp-note-text {
    font-size: 0.78rem; color: var(--gray-700); line-height: 1.45;
    word-break: break-word;
}
.dp-note-author {
    font-size: 0.6rem; color: var(--gray-400); margin-top: 0.15rem;
}
.dp-note-del {
    border: none; background: none; color: var(--gray-300);
    font-size: 0.58rem; cursor: pointer; padding: 0.1rem 0.25rem;
    border-radius: 4px; transition: all 0.12s; flex-shrink: 0;
    align-self: flex-start;
}
.dp-note-del:hover { background: rgba(220,38,38,0.08); color: #dc2626; }

/* Tasks */
.dp-task {
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: rgba(0, 0, 0, 0.012);
    transition: border-color 0.15s;
}
.dp-task:hover { border-color: rgba(0, 0, 0, 0.08); }
.dp-task-top {
    display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.2rem;
}
.dp-task-type {
    display: inline-flex; padding: 0.1rem 0.35rem; border-radius: 4px;
    font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(79, 70, 229, 0.08); color: var(--primary);
}
.dp-task-pri {
    font-size: 0.56rem; font-weight: 700; text-transform: uppercase;
}
.dp-task-pri[data-pri="high"]   { color: #ea580c; }
.dp-task-pri[data-pri="urgent"] { color: #dc2626; }
.dp-task-overdue {
    font-size: 0.56rem; font-weight: 700; color: #dc2626;
    background: rgba(220,38,38,0.06); padding: 0.08rem 0.3rem;
    border-radius: 3px;
}
.dp-task-text {
    font-size: 0.78rem; color: var(--gray-700); line-height: 1.4;
    margin-bottom: 0.25rem; word-break: break-word;
}
.dp-task-bot {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.dp-task-date { font-size: 0.6rem; color: var(--gray-400); }
.dp-task-status {
    font-size: 0.6rem; font-weight: 700;
    padding: 0.08rem 0.35rem; border-radius: 4px;
}
.dp-task-status[data-status="Open"]        { background: rgba(79,70,229,0.08); color: var(--primary); }
.dp-task-status[data-status="In Progress"] { background: rgba(217,119,6,0.08); color: #b45309; }
.dp-task-status[data-status="Resolved"]    { background: rgba(5,150,105,0.08); color: #059669; }

/* Empty state */
.dp-empty {
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-400);
    font-style: italic;
}

/* ── Compliance Grid ── */
.dp-compliance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    padding-top: 0.5rem;
}
.dp-comp-item {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: rgba(0, 0, 0, 0.012);
}
.dp-comp-item.comp-ok      { border-color: rgba(5,150,105,0.15);  background: rgba(5,150,105,0.03); }
.dp-comp-item.comp-warn    { border-color: rgba(217,119,6,0.2);   background: rgba(217,119,6,0.04); }
.dp-comp-item.comp-expired { border-color: rgba(220,38,38,0.2);   background: rgba(220,38,38,0.04); }
.dp-comp-item.comp-na      { border-color: rgba(0,0,0,0.04); }
.dp-comp-label {
    font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--gray-400); margin-bottom: 0.1rem;
}
.dp-comp-value {
    font-size: 0.78rem; font-weight: 600; color: var(--gray-800);
}
.dp-comp-item.comp-ok .dp-comp-value      { color: #059669; }
.dp-comp-item.comp-warn .dp-comp-value    { color: #b45309; }
.dp-comp-item.comp-expired .dp-comp-value { color: #dc2626; }
.dp-comp-item.comp-na .dp-comp-value      { color: var(--gray-400); }
.dp-comp-sub {
    font-size: 0.58rem; color: var(--gray-400); margin-top: 0.05rem;
}
.dp-merged-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0.75rem 0;
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .dp-summary-bar { padding: 0 1rem 0.6rem; }
    .dp-quick-actions { padding: 0.5rem 1rem; flex-wrap: wrap; }
    .dp-compliance-grid { grid-template-columns: 1fr; }
}
