:root {
    --sidebar-bg: linear-gradient(180deg, #263b5e 0%, #314c78 52%, #2a4369 100%);
    --page-bg: #eef4f8;
    --card-bg: #ffffff;
    --accent: #496d9f;
    --accent-dark: #385681;
    --accent-soft: #b8c8df;
    --text-main: #142743;
    --text-soft: #62738f;
    --danger: #b91c1c;
    --warning: #b45309;
}

body {
    background:
        radial-gradient(circle at top left, rgba(73, 109, 159, 0.06) 0%, rgba(73, 109, 159, 0) 38%),
        radial-gradient(circle at bottom right, rgba(120, 145, 182, 0.08) 0%, rgba(120, 145, 182, 0) 30%),
        linear-gradient(180deg, #f7f9fc 0%, #edf2f7 100%);
    color: var(--text-main);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.layout-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: #fff;
    padding: 2rem 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.brand {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: transparent;
    overflow: hidden;
    box-shadow: none;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    background: transparent;
}

.brand-title {
    font-weight: 700;
    letter-spacing: .08em;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.76);
    font-size: .85rem;
}

.nav-menu .nav-link {
    color: rgba(255, 255, 255, 0.88);
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: .35rem;
    transition: .2s ease;
}

.nav-menu .nav-link.active,
.nav-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: translateX(2px);
}

.main-content {
    flex: 1;
    padding: 2rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.page-subtitle {
    color: var(--text-soft);
}

.user-chip {
    background: #fff;
    padding: .55rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(73, 109, 159, 0.10);
    box-shadow: 0 8px 18px rgba(73, 109, 159, 0.05);
}

.metric-card {
    background: var(--card-bg);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: 0 12px 32px rgba(16, 33, 66, 0.08);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    border: 1px solid rgba(73, 109, 159, 0.07);
}

.metric-card span {
    color: var(--text-soft);
}

.metric-card strong {
    font-size: 1.85rem;
}

.metric-card.success { border-left: 6px solid var(--accent); }
.metric-card.warning { border-left: 6px solid var(--warning); }
.metric-card.danger { border-left: 6px solid var(--danger); }

.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.access-tabs {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.permission-group-card {
    background: #f8fbff;
    border: 1px solid rgba(73, 109, 159, 0.12);
    border-radius: 18px;
    padding: 1.25rem;
}

.permission-group-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.permission-group-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.permission-group-header p {
    margin: .2rem 0 0;
    color: var(--text-soft);
    font-size: .86rem;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .75rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(73, 109, 159, 0.1);
    background: #fff;
    cursor: pointer;
}

.permission-item input {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .8rem;
    text-transform: capitalize;
    background: #e2e8f0;
}

.status-planned, .status-pending, .status-draft, .status-planejada, .status-pendente, .status-rascunho { background: #e9eef5; color: #385681; }
.status-in_progress, .status-info, .status-em_andamento, .status-informativo, .status-aguardando_descarga { background: #e3eaf3; color: #385681; }
.status-completed, .status-imported, .status-updated, .status-on_time, .status-concluida, .status-importada, .status-atualizada, .status-no_prazo, .status-disponivel { background: #e7f0f6; color: #3f638f; }
.status-late, .status-error, .status-rejected, .status-invalid, .status-atrasada, .status-erro, .status-rejeitada, .status-invalida { background: #fee2e2; color: #991b1b; }
.status-cancelled, .status-cancelada { background: #f3e8e8; color: #7f1d1d; }

.row-alert {
    background: rgba(239, 68, 68, 0.04);
}

.row-urgent {
    background: rgba(185, 28, 28, 0.08);
}

.table-operational td, .table-operational th {
    white-space: nowrap;
    font-size: .92rem;
}

.programming-grid-wrapper {
    overflow: auto;
    max-height: 72vh;
    position: relative;
    background: #fff;
}

.programming-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef3f9;
    box-shadow: inset 0 -1px 0 rgba(73, 109, 159, 0.18);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.programming-grid thead .group-row th {
    top: 0;
    z-index: 3;
    background: linear-gradient(180deg, #dde7f3 0%, #d3dfef 100%);
    color: var(--accent-dark);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid rgba(73, 109, 159, 0.18);
    text-align: center;
}

.programming-grid thead tr:not(.group-row) th {
    top: 37px;
}

.programming-grid td {
    min-width: 140px;
    font-size: .84rem;
    vertical-align: top;
    background: #fff;
}

.programming-grid td:nth-child(3),
.programming-grid td:nth-child(4),
.programming-grid td:nth-child(8),
.programming-grid td:nth-child(9),
.programming-grid td:nth-child(10),
.programming-grid td:nth-child(11),
.programming-grid td:nth-child(12),
.programming-grid td:nth-child(13),
.programming-grid td:nth-child(17),
.programming-grid td:nth-child(18),
.programming-grid td:nth-child(29) {
    min-width: 92px;
}

.programming-grid td:nth-child(6),
.programming-grid td:nth-child(7),
.programming-grid td:nth-child(14),
.programming-grid td:nth-child(15),
.programming-grid td:nth-child(16),
.programming-grid td:nth-child(19),
.programming-grid td:nth-child(20),
.programming-grid td:nth-child(21),
.programming-grid td:nth-child(22),
.programming-grid td:nth-child(23),
.programming-grid td:nth-child(24),
.programming-grid td:nth-child(25),
.programming-grid td:nth-child(26),
.programming-grid td:nth-child(27),
.programming-grid td:nth-child(28),
.programming-grid td:nth-child(30) {
    min-width: 130px;
}

.programming-grid td:nth-child(2),
.programming-grid td:nth-child(31) {
    min-width: 280px;
}

.programming-grid td:last-child,
.programming-grid th:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -8px 0 12px rgba(20, 39, 67, 0.05);
}

.compact-kpi {
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
    border: 1px solid rgba(73, 109, 159, 0.08);
    border-radius: 18px;
    padding: 1rem 1.15rem;
    box-shadow: 0 10px 24px rgba(20, 39, 67, 0.05);
    display: grid;
    gap: .35rem;
}

.compact-kpi span {
    color: var(--text-soft);
    font-size: .88rem;
}

.compact-kpi strong {
    font-size: 1.6rem;
}

.compact-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, #fcfdff 0%, #f4f8fc 100%);
    border-bottom: 1px solid rgba(73, 109, 159, 0.08);
}

.compact-grid-header--stacked {
    gap: 1rem;
    flex-wrap: wrap;
}

.view-switcher {
    display: inline-flex;
    gap: .35rem;
    padding: .35rem;
    border-radius: 999px;
    background: #e9eff7;
    border: 1px solid rgba(73, 109, 159, 0.1);
}

.view-switcher__button {
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    padding: .55rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    transition: .2s ease;
}

.view-switcher__button.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 10px 20px rgba(57, 86, 129, 0.18);
}

.programming-view {
    display: none;
}

.programming-view.is-active {
    display: block;
}

.compact-programming-table {
    table-layout: fixed;
    min-width: 1760px;
}

.compact-programming-table--lean {
    min-width: 1220px;
}

.compact-programming-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef3f9;
    text-transform: uppercase;
    font-size: .74rem;
    letter-spacing: .05em;
    white-space: nowrap;
}

.compact-programming-table td {
    vertical-align: top;
    font-size: .88rem;
    padding: 1rem .95rem;
    border-bottom: 1px solid rgba(73, 109, 159, 0.08);
}

.compact-main {
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
}

.compact-sub {
    color: var(--text-soft);
    font-size: .8rem;
    line-height: 1.35;
}

.compact-inline-meta {
    display: grid;
    gap: .2rem;
    margin-top: .45rem;
    color: var(--text-soft);
    font-size: .75rem;
    line-height: 1.25;
}

.compact-inline-meta strong {
    color: var(--text-main);
    font-weight: 600;
}

.compact-flag {
    display: inline-flex;
    align-items: center;
    margin-top: .35rem;
    padding: .22rem .55rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.doc-stack,
.time-stack,
.status-stack {
    display: grid;
    gap: .45rem;
}

.doc-stack span,
.time-stack span {
    line-height: 1.3;
}

.doc-stack--tight {
    gap: .3rem;
}

.doc-stack--tight span {
    font-size: .81rem;
}

.status-stack--spacious {
    gap: .5rem;
}

.status-cell {
    min-width: 180px;
}

.status-cell--lean {
    min-width: 175px;
}

.compact-actions-cell {
    min-width: 180px;
    width: 180px;
    background: #fff;
    position: sticky;
    right: 0;
    z-index: 3;
    box-shadow: -10px 0 18px rgba(20, 39, 67, 0.08);
}

.compact-actions {
    display: grid;
    gap: .55rem;
    justify-content: end;
}

.compact-actions .btn {
    min-width: 108px;
}

.compact-actions-cell--lean {
    min-width: 120px;
    width: 120px;
}

.action-menu-button {
    min-width: 92px;
}

.time-chip-stack {
    display: grid;
    gap: .38rem;
}

.time-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .38rem .55rem;
    border-radius: 12px;
    background: #f4f7fb;
    color: var(--text-main);
    font-size: .79rem;
    line-height: 1.2;
}

.compact-programming-table th:nth-child(1),
.compact-programming-table td:nth-child(1) {
    min-width: 108px;
}

.compact-programming-table th:nth-child(2),
.compact-programming-table td:nth-child(2) {
    min-width: 160px;
}

.compact-programming-table th:nth-child(3),
.compact-programming-table td:nth-child(3) {
    min-width: 180px;
}

.compact-programming-table th:nth-child(4),
.compact-programming-table td:nth-child(4) {
    min-width: 190px;
}

.compact-programming-table th:nth-child(5),
.compact-programming-table td:nth-child(5),
.compact-programming-table th:nth-child(6),
.compact-programming-table td:nth-child(6),
.compact-programming-table th:nth-child(7),
.compact-programming-table td:nth-child(7),
.compact-programming-table th:nth-child(8),
.compact-programming-table td:nth-child(8),
.compact-programming-table th:nth-child(9),
.compact-programming-table td:nth-child(9),
.compact-programming-table th:nth-child(10),
.compact-programming-table td:nth-child(10) {
    min-width: 170px;
}

.compact-programming-table th:nth-child(10),
.compact-programming-table td:nth-child(10) {
    min-width: 190px;
}

.compact-programming-table th:nth-child(11),
.compact-programming-table td:nth-child(11) {
    min-width: 180px;
}

.compact-programming-table--lean th:nth-child(1),
.compact-programming-table--lean td:nth-child(1) {
    min-width: 104px;
}

.compact-programming-table--lean th:nth-child(2),
.compact-programming-table--lean td:nth-child(2) {
    min-width: 180px;
}

.compact-programming-table--lean th:nth-child(3),
.compact-programming-table--lean td:nth-child(3) {
    min-width: 155px;
}

.compact-programming-table--lean th:nth-child(4),
.compact-programming-table--lean td:nth-child(4) {
    min-width: 118px;
}

.compact-programming-table--lean th:nth-child(5),
.compact-programming-table--lean td:nth-child(5) {
    min-width: 160px;
}

.compact-programming-table--lean th:nth-child(6),
.compact-programming-table--lean td:nth-child(6),
.compact-programming-table--lean th:nth-child(7),
.compact-programming-table--lean td:nth-child(7) {
    min-width: 165px;
}

.compact-programming-table--lean th:nth-child(8),
.compact-programming-table--lean td:nth-child(8) {
    min-width: 175px;
}

.compact-programming-table--lean th:nth-child(9),
.compact-programming-table--lean td:nth-child(9) {
    min-width: 120px;
}

.programming-detail-modal {
    border: 0;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(20, 39, 67, 0.18);
}

.programming-detail-modal__header {
    padding: 1.35rem 1.5rem;
    background: linear-gradient(180deg, #fcfdff 0%, #f1f6fb 100%);
    border-bottom: 1px solid rgba(73, 109, 159, 0.1);
}

.programming-detail-modal__body {
    padding: 1.4rem;
    background:
        radial-gradient(circle at top right, rgba(73, 109, 159, 0.05) 0%, rgba(73, 109, 159, 0) 28%),
        linear-gradient(180deg, #f9fbfe 0%, #f4f8fc 100%);
}

.driver-daily-grid-wrapper {
    overflow: auto;
    max-height: 74vh;
    background: #fff;
}

.driver-daily-grid-wrapper--fit {
    overflow-x: auto;
}

.driver-daily-screen {
    overflow: hidden;
}

.driver-daily-week-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem 0;
    flex-wrap: wrap;
}

.driver-daily-week-tabs {
    display: flex;
    gap: .7rem;
    flex: 1;
    flex-wrap: wrap;
}

.driver-daily-week-tab {
    border: 1px solid rgba(73, 109, 159, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    color: var(--text-main);
    border-radius: 16px;
    padding: .7rem .95rem;
    display: grid;
    gap: .1rem;
    min-width: 132px;
    text-align: left;
    box-shadow: 0 8px 16px rgba(20, 39, 67, 0.04);
}

.driver-daily-week-tab span {
    font-weight: 700;
}

.driver-daily-week-tab strong {
    font-size: .92rem;
    color: var(--accent-dark);
}

.driver-daily-week-tab small {
    color: var(--text-soft);
}

.driver-daily-week-tab.is-active {
    background: linear-gradient(135deg, rgba(73, 109, 159, 0.16), rgba(184, 200, 223, 0.28));
    border-color: rgba(73, 109, 159, 0.24);
    box-shadow: 0 12px 22px rgba(57, 86, 129, 0.12);
}

.driver-daily-week-panel {
    display: none;
    padding: 1rem 1.25rem 0;
}

.driver-daily-week-panel.is-active {
    display: block;
}

.driver-daily-week-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .9rem;
}

.driver-daily-week-panel__eyebrow {
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
}

.driver-daily-week-panel__title {
    margin: .15rem 0 0;
    font-size: 1.2rem;
}

.driver-daily-grid {
    min-width: 2280px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.driver-daily-grid--week {
    min-width: 760px;
}

.driver-daily-grid thead th,
.driver-daily-grid tfoot th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: linear-gradient(180deg, #edf3fa 0%, #e4edf7 100%);
    text-transform: uppercase;
    font-size: .74rem;
    letter-spacing: .05em;
    white-space: nowrap;
    text-align: center;
    border-bottom: 1px solid rgba(73, 109, 159, 0.14);
}

.driver-daily-grid tfoot th {
    position: sticky;
    bottom: 0;
    top: auto;
    z-index: 3;
    background: linear-gradient(180deg, #f9fbfe 0%, #eef4fa 100%);
    box-shadow: inset 0 1px 0 rgba(73, 109, 159, 0.12);
}

.driver-daily-grid td,
.driver-daily-grid th {
    padding: .7rem .55rem;
    vertical-align: middle;
}

.driver-daily-grid tbody tr:nth-child(even) td:not(.sticky-col):not(.daily-total-cell) {
    background: #fbfdff;
}

.driver-daily-grid tbody tr:hover td:not(.sticky-col):not(.daily-total-cell):not(.driver-daily-week-total-cell) {
    background: #f4f8fd;
}

.driver-daily-grid .sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    box-shadow: 1px 0 0 rgba(73, 109, 159, 0.08);
}

.driver-daily-grid thead .sticky-col,
.driver-daily-grid tfoot .sticky-col {
    z-index: 5;
    background: linear-gradient(180deg, #edf3fa 0%, #e4edf7 100%);
}

.driver-daily-grid tfoot .sticky-col {
    background: linear-gradient(180deg, #f9fbfe 0%, #eef4fa 100%);
}

.driver-daily-sticky-plate { left: 0; min-width: 104px; width: 104px; }
.driver-daily-sticky-driver { left: 0; min-width: 220px; width: 220px; }
.driver-daily-sticky-sheet { left: 374px; min-width: 96px; width: 96px; }

.daily-value-cell {
    min-width: 96px;
    width: 96px;
    padding: .45rem .35rem !important;
    transition: background-color .18s ease, box-shadow .18s ease;
}

.daily-value-input {
    min-width: 84px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    border-radius: 10px;
    border-color: rgba(73, 109, 159, 0.18);
    background: #ffffff;
    padding: .42rem .45rem;
    font-size: .82rem;
    box-shadow: inset 0 1px 2px rgba(20, 39, 67, 0.04);
}

.daily-value-input.is-filled {
    border-color: rgba(73, 109, 159, 0.32);
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fd 100%);
    color: var(--accent-dark);
    font-weight: 700;
}

.daily-value-input:focus {
    border-color: rgba(73, 109, 159, 0.48);
    box-shadow: 0 0 0 .18rem rgba(73, 109, 159, 0.14);
    background: #fdfefe;
}

.daily-value-cell.has-value {
    background: linear-gradient(180deg, rgba(73, 109, 159, 0.06), rgba(184, 200, 223, 0.08));
    box-shadow: inset 0 0 0 1px rgba(73, 109, 159, 0.08);
}

.daily-total-cell {
    min-width: 120px;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
    color: var(--accent-dark);
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow: -8px 0 12px rgba(20, 39, 67, 0.06);
}

.driver-daily-total-head,
.driver-daily-total-foot {
    position: sticky !important;
    right: 0;
    z-index: 6 !important;
    background: linear-gradient(180deg, #edf3fa 0%, #e4edf7 100%) !important;
    min-width: 128px;
}

.driver-daily-total-foot {
    background: linear-gradient(180deg, #f9fbfe 0%, #eef4fa 100%) !important;
}

.day-col {
    min-width: 54px;
    width: 54px;
}

.day-col__weekday {
    font-size: .67rem;
    font-weight: 700;
    color: var(--text-soft);
    letter-spacing: .08em;
}

.day-col__date {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-main);
}

.day-col--weekend {
    background: linear-gradient(180deg, #f9f3ec 0%, #f4eadf 100%) !important;
}

.daily-value-cell--weekend {
    background: #fcf8f3;
}

.daily-value-cell--weekend.has-value {
    background: linear-gradient(180deg, rgba(228, 184, 119, 0.16), rgba(244, 234, 223, 0.6));
}

.driver-daily-row--inactive td:not(.sticky-col):not(.daily-total-cell) {
    background: #f8fafc !important;
}

.driver-daily-row--inactive .compact-main,
.driver-daily-row--inactive .compact-sub {
    opacity: .75;
}

.driver-daily-toolbar-note {
    font-size: .9rem;
    color: var(--text-soft);
    padding: .8rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(73, 109, 159, 0.05), rgba(184, 200, 223, 0.14));
    border: 1px solid rgba(73, 109, 159, 0.08);
}

.driver-daily-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.driver-daily-legend {
    display: flex;
    gap: .85rem;
    align-items: center;
    flex-wrap: wrap;
}

.driver-daily-legend__item {
    display: inline-flex;
    gap: .42rem;
    align-items: center;
    font-size: .8rem;
    color: var(--text-soft);
}

.driver-daily-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #d5e2f3;
    border: 1px solid rgba(73, 109, 159, 0.22);
}

.driver-daily-legend__dot--weekend {
    background: #f3dfc8;
    border-color: rgba(180, 83, 9, 0.28);
}

.driver-daily-legend__dot--filled {
    background: #d8e7fb;
    border-color: rgba(73, 109, 159, 0.3);
}

.driver-daily-legend__dot--inactive {
    background: #e5e7eb;
    border-color: rgba(100, 116, 139, 0.22);
}

.driver-daily-helper-bar {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(73, 109, 159, 0.08);
    background: linear-gradient(180deg, #fcfdff 0%, #f7fbff 100%);
}

.driver-daily-helper-pill {
    display: inline-flex;
    align-items: center;
    padding: .42rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    color: var(--text-soft);
    background: rgba(73, 109, 159, 0.07);
}

.driver-daily-helper-pill--accent {
    color: var(--accent-dark);
    background: rgba(73, 109, 159, 0.12);
}

.driver-daily-row-action {
    margin-top: .45rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font-size: .76rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.driver-daily-row-action:hover {
    color: #2b4365;
}

.driver-daily-note-head,
.driver-daily-note-col {
    min-width: 260px;
    width: 260px;
}

.driver-daily-week-total-head,
.driver-daily-week-total-foot,
.driver-daily-week-total-cell {
    min-width: 126px;
    width: 126px;
    text-align: center;
    white-space: nowrap;
    background: linear-gradient(180deg, #fbfdff 0%, #f1f6fb 100%);
    color: var(--accent-dark);
    font-weight: 700;
}

.daily-total-cell,
.driver-daily-total-head,
.driver-daily-total-foot {
    text-align: center;
}

.driver-daily-week-total-head,
.driver-daily-week-total-foot {
    text-transform: uppercase;
    font-size: .74rem;
}

.driver-daily-note-input {
    min-width: 240px;
    border-radius: 12px;
    border-color: rgba(73, 109, 159, 0.18);
    font-size: .82rem;
}

.driver-daily-note-input--inline {
    min-width: 0;
    width: 100%;
    margin-top: .42rem;
    font-size: .74rem;
    padding: .28rem .45rem;
    border-radius: 10px;
}

.driver-daily-footer-label {
    text-align: left !important;
    font-size: .8rem;
}

.driver-daily-footer-bar {
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9fd 100%);
}

.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-col--expanded-only {
    display: none;
}

.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-grid--week {
    min-width: 760px;
}

.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-sticky-driver {
    left: 0;
    min-width: 210px;
    width: 210px;
}

.driver-daily-screen[data-driver-daily-view="compact"] .day-col,
.driver-daily-screen[data-driver-daily-view="compact"] .daily-value-cell {
    min-width: 50px;
    width: 50px;
    padding: .24rem .16rem !important;
}

.driver-daily-screen[data-driver-daily-view="compact"] .daily-value-input {
    min-width: 42px;
    font-size: .7rem;
    padding: .2rem .2rem;
    border-radius: 8px;
}

.driver-daily-screen[data-driver-daily-view="compact"] .day-col__weekday {
    font-size: .56rem;
    letter-spacing: .04em;
}

.driver-daily-screen[data-driver-daily-view="compact"] .day-col__date {
    font-size: .7rem;
}

.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-week-total-head,
.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-week-total-foot,
.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-week-total-cell,
.driver-daily-screen[data-driver-daily-view="compact"] .daily-total-cell,
.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-total-head,
.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-total-foot {
    min-width: 66px;
    width: 66px;
    font-size: .68rem;
    padding-left: .25rem;
    padding-right: .25rem;
}

.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-grid td,
.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-grid th {
    padding-top: .48rem;
    padding-bottom: .48rem;
}

.driver-daily-screen[data-driver-daily-view="compact"] .compact-main {
    font-size: .8rem;
    line-height: 1.2;
}

.driver-daily-screen[data-driver-daily-view="compact"] .compact-sub {
    font-size: .66rem;
    line-height: 1.2;
}

.driver-daily-screen[data-driver-daily-view="compact"] .driver-daily-row-action {
    margin-top: .28rem;
    font-size: .7rem;
}


.driver-daily-screen[data-driver-daily-view="expanded"] .driver-daily-grid--week {
    min-width: 1460px;
}

.detail-sheet {
    display: grid;
    gap: 1.25rem;
}

.detail-sheet__hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(73, 109, 159, 0.08), rgba(184, 200, 223, 0.14));
}

.detail-sheet__eyebrow {
    color: var(--text-soft);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.detail-sheet__title {
    margin: .2rem 0;
    font-size: 1.35rem;
}

.detail-sheet__subtitle {
    color: var(--text-soft);
}

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

.detail-card {
    background: #fff;
    border: 1px solid rgba(73, 109, 159, 0.08);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(20, 39, 67, 0.04);
}

.detail-card--full {
    grid-column: 1 / -1;
}

.detail-card h4 {
    font-size: .95rem;
    margin-bottom: .9rem;
}

.detail-card dl {
    margin: 0;
    display: grid;
    gap: .75rem;
}

.detail-card dl div {
    display: grid;
    gap: .15rem;
}

.detail-card dt {
    color: var(--text-soft);
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.detail-card dd {
    margin: 0;
    color: var(--text-main);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(73, 109, 159, 0.10) 0%, rgba(73, 109, 159, 0) 35%),
        linear-gradient(135deg, #f1f5fa 0%, #e7eef7 52%, #f8fbff 100%);
    padding: 2rem;
}

.auth-card {
    width: min(620px, 100%);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    border-radius: 28px;
    padding: 2.2rem;
    box-shadow: 0 20px 60px rgba(73, 109, 159, 0.08);
    border: 1px solid rgba(73, 109, 159, 0.07);
}

.auth-brand {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.75rem;
}

.auth-logo-wrap {
    width: 140px;
    flex: 0 0 140px;
}

.auth-logo {
    width: 100%;
    height: auto;
    display: block;
}

.auth-copy {
    display: grid;
    gap: .35rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(73, 109, 159, 0.06), rgba(184, 200, 223, 0.18));
    color: var(--text-main);
}

.auth-copy span {
    color: var(--text-soft);
}

.card {
    border: 1px solid rgba(73, 109, 159, 0.07) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: var(--accent-dark);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--accent-dark), #304a70);
    border-color: #304a70;
}

.btn-outline-primary {
    color: var(--accent-dark);
    border-color: rgba(73, 109, 159, 0.26);
}

.btn-outline-primary:hover {
    background: rgba(73, 109, 159, 0.08);
    color: var(--accent-dark);
    border-color: rgba(73, 109, 159, 0.42);
}

@media (max-width: 991px) {
    .layout-shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { padding: 1rem; }
    .topbar, .toolbar, .auth-brand { flex-direction: column; align-items: stretch; }
    .auth-logo-wrap { width: 100%; flex: unset; max-width: 220px; margin: 0 auto; }
    .view-switcher {
        width: 100%;
        justify-content: stretch;
    }
    .view-switcher__button {
        flex: 1;
    }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-sheet__hero { flex-direction: column; }
    .programming-detail-modal {
        border-radius: 18px;
    }
    .driver-daily-week-nav,
    .driver-daily-week-panel__header {
        flex-direction: column;
        align-items: stretch;
    }
    .driver-daily-week-panel__summary {
        justify-items: start;
    }
    .driver-daily-week-tabs {
        width: 100%;
    }
    .driver-daily-week-tab {
        flex: 1 1 180px;
    }
}
