:root {
    color-scheme: light;
    --bg: #f6f1e8;
    --bg-soft: #fbf8f2;
    --card: rgba(255, 255, 255, 0.88);
    --card-solid: #ffffff;
    --card-muted: #f6f3ed;
    --sidebar: linear-gradient(160deg, rgba(28, 24, 20, 0.98), rgba(57, 48, 36, 0.96));
    --text: #1f1c18;
    --text-soft: #6b645c;
    --text-inverse: #f5f1e8;
    --accent: #d9a63c;
    --accent-strong: #b78321;
    --accent-soft: rgba(217, 166, 60, 0.1);
    --line: rgba(31, 28, 24, 0.08);
    --line-strong: rgba(31, 28, 24, 0.14);
    --shadow: 0 24px 80px -48px rgba(34, 31, 24, 0.38);
    --shadow-soft: 0 18px 44px -36px rgba(34, 31, 24, 0.32);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(217, 166, 60, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(31, 28, 24, 0.1), transparent 34%),
        linear-gradient(135deg, #fcfaf5, var(--bg));
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

code {
    border-radius: 10px;
    background: rgba(31, 28, 24, 0.06);
    padding: 0.15rem 0.45rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

.guest-body,
.app-body {
    min-height: 100vh;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.brand-logo {
    width: 210px;
    max-width: 100%;
    filter: drop-shadow(0 18px 48px rgba(0, 0, 0, 0.35));
}

.brand-fallback {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(217, 166, 60, 0.28), rgba(255, 255, 255, 0.08));
    color: #f8d27b;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-align: center;
}

.sidebar-brand-logo {
    width: 78px;
    max-width: 78px;
}

.brand-fallback.sidebar-brand-logo {
    width: 78px;
    height: 78px;
    border-radius: 24px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(217, 166, 60, 0.3);
    background: rgba(217, 166, 60, 0.1);
    padding: 0.55rem 0.95rem;
    color: #fde8b8;
    font-size: 0.85rem;
    font-weight: 700;
}

.eyebrow {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: #7d766d;
}

.eyebrow-light {
    color: rgba(253, 232, 184, 0.82);
}

.eyebrow-soft {
    color: rgba(237, 234, 229, 0.7);
}

.eyebrow-accent {
    color: rgba(142, 93, 6, 0.8);
}

.button {
    border: none;
    border-radius: 999px;
    padding: 0.95rem 1.35rem;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled,
.button-disabled {
    cursor: not-allowed;
    opacity: 0.58;
    box-shadow: none;
    transform: none;
}

.button-primary {
    background: linear-gradient(135deg, #efbc58, #d7a239);
    color: #2b2114;
    box-shadow: 0 18px 30px -24px rgba(183, 131, 33, 0.7);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.button-outline {
    background: rgba(255, 255, 255, 0.64);
    color: var(--text);
    border: 1px solid rgba(31, 28, 24, 0.1);
    box-shadow: var(--shadow-soft);
}

.button-full {
    width: 100%;
}

.button-small {
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
}

.alert {
    border-radius: 18px;
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
}

.alert-error {
    border: 1px solid rgba(185, 28, 28, 0.15);
    background: rgba(254, 242, 242, 0.95);
    color: #b91c1c;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: min(100%, 1180px);
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 30px 120px -48px rgba(34, 31, 24, 0.45);
    backdrop-filter: blur(18px);
}

.auth-hero {
    position: relative;
    display: flex;
    min-height: 420px;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    background: linear-gradient(140deg, rgba(31, 28, 24, 0.98), rgba(56, 49, 39, 0.92));
    padding: 2rem;
    color: var(--text-inverse);
}

.auth-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(70px);
}

.auth-glow-top {
    top: 2rem;
    right: -3rem;
    width: 12rem;
    height: 12rem;
    background: rgba(217, 166, 60, 0.16);
}

.auth-glow-bottom {
    bottom: -2rem;
    left: -1rem;
    width: 18rem;
    height: 10rem;
    background: radial-gradient(circle, rgba(245, 187, 84, 0.22), transparent 70%);
}

.auth-hero-content,
.feature-grid,
.auth-panel {
    position: relative;
    z-index: 1;
}

.auth-copy h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4.8vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.auth-copy p:last-child,
.panel-heading p:last-child,
.sidebar-note,
.card-head p,
.topbar-copy p:last-child,
.section-header p:last-child,
.empty-state p,
.muted-text,
.list-item p,
.placeholder-card p {
    color: var(--text-soft);
    line-height: 1.72;
}

.auth-copy p:last-child {
    color: rgba(233, 228, 220, 0.8);
    max-width: 42rem;
}

.feature-grid {
    display: grid;
    gap: 0.85rem;
}

.feature-pill {
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.1rem;
    font-size: 0.95rem;
}

.auth-panel {
    display: grid;
    align-content: center;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    padding: 1.75rem;
}

.auth-panel > * {
    width: min(100%, 430px);
    margin: 0 auto;
}

.auth-panel-wide > * {
    width: min(100%, 760px);
}

.auth-card-wide {
    width: min(100%, 1320px);
}

.panel-heading h2 {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.form-card,
.seed-card,
.surface-card,
.stat-card,
.tenant-panel,
.topbar {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow);
}

.form-card {
    background: rgba(247, 243, 236, 0.82);
    box-shadow: none;
    padding: 1.5rem;
}

.auth-form {
    display: grid;
    gap: 1.1rem;
}

.field {
    display: grid;
    gap: 0.5rem;
}

.field label {
    font-size: 0.95rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    border: 1px solid rgba(110, 100, 88, 0.2);
    border-radius: 18px;
    background: #fff;
    padding: 0.95rem 1rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
    border-color: rgba(217, 166, 60, 0.5);
    box-shadow: 0 0 0 4px rgba(217, 166, 60, 0.12);
}

.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(110, 100, 88, 0.2);
    border-radius: 18px;
    background: #fff;
    padding: 0.95rem 1rem;
    color: var(--text);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field select:focus,
.field textarea:focus {
    border-color: rgba(217, 166, 60, 0.5);
    box-shadow: 0 0 0 4px rgba(217, 166, 60, 0.12);
}

.field-grow {
    min-width: 0;
}

.field-hint,
.table-subline {
    margin: 0.4rem 0 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.field-error {
    margin: 0.4rem 0 0;
    color: #b91c1c;
    font-size: 0.88rem;
    line-height: 1.5;
}

.seed-card {
    background: rgba(255, 255, 255, 0.75);
    border-style: dashed;
    padding: 1rem 1.15rem;
    box-shadow: none;
}

.seed-card p {
    margin: 0.2rem 0;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-shell {
    display: grid;
    gap: 1.5rem;
    padding: 1rem;
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--sidebar);
    color: var(--text-inverse);
    padding: 1.4rem;
    box-shadow: 0 26px 90px -58px rgba(0, 0, 0, 0.48);
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 166, 60, 0.45) rgba(255, 255, 255, 0.06);
}

.sidebar::-webkit-scrollbar {
    width: 0.62rem;
}

.sidebar::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    background: rgba(217, 166, 60, 0.45);
}

.sidebar-platform {
    background: linear-gradient(160deg, rgba(19, 33, 53, 0.98), rgba(31, 73, 111, 0.94));
}

.sidebar-top {
    display: grid;
    gap: 1rem;
}

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

.sidebar-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    min-width: 0;
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    min-width: 2.9rem;
    height: 2.9rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
    box-shadow: none;
}

.sidebar-toggle:focus-visible {
    outline: 2px solid rgba(217, 166, 60, 0.65);
    outline-offset: 2px;
}

.sidebar-toggle-bars {
    display: grid;
    gap: 0.24rem;
}

.sidebar-toggle-bars span {
    display: block;
    width: 1rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-title {
    margin: 0.25rem 0 0.4rem;
    font-size: 1.8rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

.sidebar-subtitle {
    margin: 0;
    color: rgba(237, 234, 229, 0.76);
    line-height: 1.65;
}

.tenant-card {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

.tenant-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.tenant-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
    color: rgba(237, 234, 229, 0.78);
    font-size: 0.92rem;
}

.role-pill,
.table-tag,
.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.38rem 0.78rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.role-pill {
    background: rgba(217, 166, 60, 0.14);
    border: 1px solid rgba(217, 166, 60, 0.24);
    color: #fce8bf;
}

.sidebar-nav {
    display: grid;
    gap: 0.65rem;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.95rem 1rem;
    font-size: 0.96rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link-icon {
    flex: 0 0 2.6rem;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #f2d28d;
}

.nav-link-icon svg {
    width: 1.18rem;
    height: 1.18rem;
}

.nav-link-copy {
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.nav-link-label {
    font-weight: 600;
}

.nav-link small {
    color: rgba(229, 222, 211, 0.66);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-link-active {
    color: #fff;
    border-color: rgba(217, 166, 60, 0.34);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link-active .nav-link-icon {
    background: rgba(217, 166, 60, 0.18);
    color: #fff3d3;
}

.sidebar-foot {
    margin-top: auto;
    display: grid;
    gap: 1rem;
}

.sidebar-note {
    margin: 0;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    color: rgba(237, 234, 229, 0.76);
}

.sidebar-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
}

.sidebar-logout-label {
    font-weight: 700;
}

.content-frame {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.topbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    background: rgba(255, 255, 255, 0.72);
}

.topbar-copy h1,
.section-header h2,
.card-head h3,
.empty-state h3 {
    margin: 0;
    letter-spacing: -0.03em;
}

.topbar-copy h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.topbar-copy p:last-child,
.section-header p:last-child,
.card-head p,
.empty-state p,
.muted-text,
.list-item p,
.placeholder-card p {
    margin: 0.35rem 0 0;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.topbar-pill {
    background: rgba(255, 248, 225, 0.88);
    border: 1px solid rgba(217, 166, 60, 0.22);
    color: #684b13;
}

.topbar-label {
    opacity: 0.75;
    font-weight: 600;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem 0.45rem 0.45rem;
    border-radius: 999px;
    background: rgba(247, 243, 236, 0.88);
    border: 1px solid rgba(31, 28, 24, 0.08);
}

.topbar-user p {
    margin: 0.15rem 0 0;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.topbar-avatar {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #efbc58, #d7a239);
    color: #2b2114;
    font-weight: 800;
}

.app-content {
    min-width: 0;
}

.content-stack {
    display: grid;
    gap: 1.25rem;
}

.flash-stack {
    display: grid;
}

.flash-card {
    border-radius: 22px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    background: rgba(240, 253, 244, 0.98);
    color: #166534;
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.15rem;
}

.flash-card p {
    margin: 0.3rem 0 0;
    color: rgba(22, 101, 52, 0.85);
}

.flash-card-error {
    border-color: rgba(185, 28, 28, 0.14);
    background: rgba(254, 242, 242, 0.98);
    color: #991b1b;
}

.flash-card-error p {
    color: rgba(153, 27, 27, 0.86);
}

.flash-card-warning {
    border-color: rgba(180, 83, 9, 0.16);
    background: rgba(255, 247, 237, 0.98);
    color: #9a3412;
}

.flash-card-warning p {
    color: rgba(154, 52, 18, 0.84);
}

.section-header,
.surface-card,
.empty-state,
.tenant-panel {
    padding: 1.4rem;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
}

.section-header h2 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.stats-grid,
.page-grid,
.tenant-grid,
.placeholder-grid,
.info-grid {
    display: grid;
    gap: 1rem;
}

.stat-card {
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.92);
}

.stat-card-emphasis {
    background: linear-gradient(160deg, rgba(34, 30, 25, 0.96), rgba(59, 49, 38, 0.94));
    color: #f6f1e8;
}

.stat-card-emphasis .stat-copy,
.stat-card-emphasis .stat-meta {
    color: rgba(246, 241, 232, 0.72);
}

.stat-copy {
    display: block;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.stat-value {
    display: block;
    margin-top: 0.9rem;
    font-size: 2.3rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat-label {
    display: block;
    margin-top: 0.9rem;
    font-size: 1.15rem;
    line-height: 1.4;
}

.stat-meta {
    display: block;
    margin-top: 0.45rem;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.surface-card {
    background: rgba(255, 255, 255, 0.82);
}

.toolbar-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.2rem;
}

.toolbar-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toolbar-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-slab {
    display: grid;
    gap: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.64);
    padding: 1rem;
}

.card-head {
    margin-bottom: 1rem;
}

.card-head h3 {
    font-size: 1.25rem;
}

.table-shell {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.data-table th,
.data-table td {
    padding: 0.95rem 0.8rem;
    border-bottom: 1px solid rgba(31, 28, 24, 0.08);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--text-soft);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

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

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.table-actions-vertical {
    flex-direction: column;
    align-items: stretch;
}

.table-tag {
    background: rgba(31, 28, 24, 0.06);
    border: 1px solid rgba(31, 28, 24, 0.08);
    color: var(--text);
}

.table-tag-success {
    background: rgba(217, 166, 60, 0.12);
    border-color: rgba(217, 166, 60, 0.22);
    color: #7a5206;
}

.table-tag-warning {
    background: rgba(254, 243, 199, 0.9);
    border-color: rgba(217, 119, 6, 0.18);
    color: #92400e;
}

.table-tag-info {
    background: rgba(219, 234, 254, 0.92);
    border-color: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
}

.table-tag-danger {
    background: rgba(254, 226, 226, 0.95);
    border-color: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.list-stack {
    display: grid;
    gap: 0.75rem;
}

.list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.72);
    padding: 0.95rem 1rem;
}

.list-item strong,
.info-pair strong,
.placeholder-card strong {
    display: block;
}

.list-item p {
    font-size: 0.94rem;
}

.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-pair {
    display: grid;
    gap: 0.35rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.72);
    padding: 0.95rem 1rem;
}

.info-pair span {
    color: var(--text-soft);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 0.75rem;
    border: 1px dashed rgba(31, 28, 24, 0.14);
    border-radius: var(--radius-xl);
    background: rgba(247, 243, 236, 0.72);
}

.empty-state-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(217, 166, 60, 0.12);
    color: #7a5206;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.tenant-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tenant-panel {
    background: rgba(255, 255, 255, 0.84);
}

.placeholder-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.placeholder-card {
    display: grid;
    gap: 0.55rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.72);
    padding: 1rem;
}

.muted-text {
    margin: 0;
}

.resource-form {
    display: grid;
    gap: 1.2rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.72);
    padding: 0.95rem 1rem;
    font-weight: 600;
}

.checkbox-field input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: #d7a239;
}

.form-error-summary {
    display: grid;
    gap: 0.6rem;
}

.error-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.35rem;
}

.notice-list {
    display: grid;
    gap: 0.35rem;
}

.notice-list p {
    margin: 0;
}

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

.field-status-readonly {
    align-content: start;
}

.status-pill-readonly {
    min-height: 3.2rem;
    display: flex;
    align-items: center;
}

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

.status-action-grid {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.trip-notes-card {
    margin-top: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.72);
    padding: 1rem;
}

.trip-notes-card span {
    display: block;
    color: var(--text-soft);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.trip-notes-card p {
    margin: 0.75rem 0 0;
    line-height: 1.72;
}

.landing-page {
    display: grid;
    gap: 2rem;
    padding: 1.5rem;
}

.landing-hero {
    display: grid;
    gap: 1.5rem;
}

.landing-hero-copy,
.landing-highlight {
    min-width: 0;
}

.landing-hero-copy {
    display: grid;
    align-content: center;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at top left, rgba(217, 166, 60, 0.18), transparent 34%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(247, 243, 236, 0.86));
    box-shadow: var(--shadow);
    padding: 2rem;
}

.landing-hero-copy h1,
.message-title {
    margin: 0;
    font-size: clamp(2.2rem, 4.2vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.landing-hero-copy p:last-child,
.message-copy {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.75;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pricing-section {
    display: grid;
    gap: 1rem;
}

.pricing-grid {
    display: grid;
    gap: 1rem;
}

.pricing-card {
    display: grid;
    gap: 0.75rem;
}

.pricing-card-emphasis {
    background: linear-gradient(160deg, rgba(34, 30, 25, 0.96), rgba(59, 49, 38, 0.94));
    color: #f6f1e8;
}

.pricing-card-emphasis p {
    color: rgba(246, 241, 232, 0.74);
}

.pricing-price {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.message-shell {
    width: min(100%, 760px);
}

.message-shell .surface-card {
    padding: 1.75rem;
}

.stats-grid-platform {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.stats-grid-operational {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.toolbar-form-rich {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.quick-actions-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.action-tile {
    display: grid;
    gap: 0.55rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.78);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.action-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(217, 166, 60, 0.24);
    background: rgba(255, 250, 241, 0.96);
}

.action-tile p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.trip-route-box {
    display: grid;
    gap: 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.74);
    padding: 1rem;
}

.trip-route-box p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.72;
}

.surface-card-compact {
    padding: 1.4rem;
}

.document-items-stack {
    display: grid;
    gap: 1rem;
}

.document-item-row {
    display: grid;
    gap: 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.72);
    padding: 1rem;
}

.document-item-grid {
    display: grid;
    gap: 1rem;
}

.document-item-description {
    min-width: 0;
}

.document-item-actions {
    display: flex;
    justify-content: flex-end;
}

.trip-document-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.trip-documents-list {
    margin-top: 1rem;
}

.notes-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.compact-form {
    margin-top: 1rem;
}

.calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.calendar-title {
    margin: 0;
    font-size: 1.45rem;
}

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

.calendar-grid-head {
    margin-bottom: 0.85rem;
}

.calendar-head-cell {
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    background: rgba(217, 166, 60, 0.1);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
}

.calendar-day {
    display: grid;
    align-content: start;
    gap: 0.8rem;
    min-height: 190px;
    border-radius: 22px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.95rem;
}

.calendar-day-muted {
    opacity: 0.58;
}

.calendar-day-today {
    border-color: rgba(217, 166, 60, 0.42);
    box-shadow: inset 0 0 0 1px rgba(217, 166, 60, 0.18);
}

.calendar-day-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text-soft);
}

.calendar-day-top strong {
    color: var(--text);
    font-size: 1.15rem;
}

.calendar-events {
    display: grid;
    gap: 0.55rem;
}

.calendar-event {
    display: grid;
    gap: 0.15rem;
    border-radius: 16px;
    padding: 0.7rem 0.8rem;
    color: var(--text);
}

.calendar-event strong,
.calendar-event span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event span {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.calendar-event-trip {
    background: rgba(217, 166, 60, 0.12);
    border: 1px solid rgba(217, 166, 60, 0.2);
}

.calendar-event-reservation {
    background: rgba(43, 97, 141, 0.08);
    border: 1px solid rgba(43, 97, 141, 0.12);
}

.calendar-empty {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.topbar-sticky {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(251, 248, 242, 0.82);
    border: 1px solid rgba(31, 28, 24, 0.06);
}

.topbar-search {
    position: relative;
    min-width: min(32rem, 100%);
}

.topbar-search-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.topbar-search-form input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.9rem 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.search-suggestion-item,
.search-suggestion-empty {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 1rem;
}

.search-suggestion-item + .search-suggestion-item,
.search-suggestion-empty + .search-suggestion-item {
    border-top: 1px solid var(--line);
}

.search-suggestion-item span,
.search-suggestion-empty {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.notification-menu {
    position: relative;
}

.notification-toggle {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.notification-toggle::-webkit-details-marker {
    display: none;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: min(26rem, 88vw);
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    padding: 1rem;
}

.notification-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.notification-mini-list {
    display: grid;
    gap: 0.75rem;
}

.notification-mini-item {
    display: grid;
    gap: 0.2rem;
    border-radius: 18px;
    padding: 0.85rem 0.95rem;
    background: var(--card-muted);
}

.notification-mini-item p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.notification-mini-empty {
    border: 1px dashed rgba(31, 28, 24, 0.12);
    background: rgba(246, 243, 237, 0.7);
}

.quick-create {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 40;
}

.quick-create-trigger {
    list-style: none;
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #f0c86e);
    color: #1f1c18;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 26px 50px -24px rgba(183, 131, 33, 0.55);
    cursor: pointer;
}

.quick-create-trigger::-webkit-details-marker {
    display: none;
}

.quick-create-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.8rem);
    width: 15rem;
    display: grid;
    gap: 0.55rem;
    padding: 0.8rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
}

.quick-create-link {
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    background: var(--card-muted);
    font-weight: 600;
}

.dashboard-pro-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compact-stat-card {
    gap: 0.55rem;
    min-height: 100%;
}

.dashboard-chart-grid,
.dashboard-feed-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 0.85rem;
    align-items: end;
    min-height: 17rem;
}

.bar-chart-item {
    display: grid;
    gap: 0.55rem;
    align-items: end;
}

.bar-chart-value,
.bar-chart-label {
    text-align: center;
    font-size: 0.82rem;
}

.bar-chart-value {
    color: var(--text-soft);
}

.bar-chart-track {
    height: 11rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(31, 28, 24, 0.04), rgba(31, 28, 24, 0.08));
    padding: 0.45rem;
}

.bar-chart-fill {
    width: 100%;
    display: block;
    border-radius: 12px;
    background: linear-gradient(180deg, #1f1c18, #4a4033);
}

.bar-chart-fill-accent {
    background: linear-gradient(180deg, #d9a63c, #b78321);
}

.rank-list {
    display: grid;
    gap: 0.9rem;
}

.rank-row {
    display: grid;
    gap: 0.55rem;
}

.rank-row p {
    margin: 0.15rem 0 0;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.rank-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(31, 28, 24, 0.08);
    overflow: hidden;
}

.rank-bar span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #f0c86e);
}

.planner-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.planner-tab {
    border-radius: 999px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    font-weight: 600;
}

.planner-tab-active {
    border-color: rgba(217, 166, 60, 0.5);
    background: rgba(217, 166, 60, 0.14);
    color: var(--accent-strong);
}

.dispatch-toolbar {
    align-items: center;
}

.resource-planner-shell {
    display: grid;
    gap: 1.4rem;
}

.resource-planner-group {
    display: grid;
    gap: 0.85rem;
}

.resource-planner-head p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
}

.resource-lane {
    display: grid;
    gap: 0.65rem;
}

.resource-lane-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
}

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

.resource-lane-track {
    position: relative;
    min-height: 3.9rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background:
        repeating-linear-gradient(
            90deg,
            rgba(31, 28, 24, 0.04),
            rgba(31, 28, 24, 0.04) 1px,
            transparent 1px,
            transparent 12.5%
        ),
        rgba(255, 255, 255, 0.78);
}

.resource-block {
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    display: grid;
    align-content: center;
    gap: 0.1rem;
    padding: 0.45rem 0.7rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid transparent;
    color: var(--text);
    background: rgba(217, 166, 60, 0.12);
}

.resource-block strong,
.resource-block span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-block span {
    font-size: 0.78rem;
    color: var(--text-soft);
}

.dispatch-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.dispatch-pill-free {
    background: rgba(46, 125, 80, 0.12);
    color: #1e7a44;
}

.dispatch-pill-reserved {
    background: rgba(217, 166, 60, 0.18);
    color: #946812;
}

.dispatch-pill-progress {
    background: rgba(43, 97, 141, 0.16);
    color: #20577f;
}

.dispatch-pill-problem {
    background: rgba(177, 54, 54, 0.14);
    color: #9a2222;
}

.dispatch-pill-vacation {
    background: rgba(31, 28, 24, 0.12);
    color: #433a31;
}

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

.sticky-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fbf8f2;
}

.day-timeline {
    display: grid;
    gap: 0.8rem;
}

.day-timeline-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.day-timeline-time {
    font-weight: 700;
    color: var(--text-soft);
    padding-top: 0.55rem;
}

.day-timeline-events {
    display: grid;
    gap: 0.7rem;
}

.day-timeline-event {
    display: grid;
    gap: 0.15rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: var(--card-muted);
}

.day-timeline-event span {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.checklist-progress {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.checklist-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checklist-progress-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(31, 28, 24, 0.08);
    overflow: hidden;
}

.checklist-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #f0c86e);
}

.checklist-grid {
    display: grid;
    gap: 0.8rem;
}

.checklist-item {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.checklist-item-complete {
    border-color: rgba(46, 125, 80, 0.24);
    background: rgba(46, 125, 80, 0.08);
}

.checklist-toggle {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.checklist-toggle-static {
    cursor: default;
}

.checklist-box {
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(31, 28, 24, 0.18);
    background: white;
    font-size: 0.9rem;
    font-weight: 700;
}

.checklist-copy {
    display: grid;
    gap: 0.18rem;
}

.checklist-copy small {
    color: var(--text-soft);
}

.timeline-list {
    position: relative;
    display: grid;
    gap: 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: start;
}

.timeline-marker {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    margin-top: 0.2rem;
    background: linear-gradient(135deg, var(--accent), #f0c86e);
    box-shadow: 0 0 0 6px rgba(217, 166, 60, 0.1);
}

.timeline-copy {
    display: grid;
    gap: 0.18rem;
}

.timeline-copy p {
    margin: 0;
    color: var(--text-soft);
}

.timeline-time {
    color: var(--text-soft);
    font-size: 0.84rem;
}

.notification-row {
    align-items: center;
}

.notification-row-read {
    opacity: 0.72;
}

.notification-row-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.25rem;
}

.search-result-item {
    border-radius: 18px;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.search-result-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

@media (min-width: 860px) {
    .auth-card {
        grid-template-columns: 1.15fr 0.85fr;
    }

    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .app-shell {
        grid-template-columns: 300px minmax(0, 1fr);
        align-items: start;
        padding: 1.5rem;
        transition: grid-template-columns 0.2s ease;
    }

    .sidebar {
        position: sticky;
        top: 1.5rem;
        min-height: calc(100vh - 3rem);
        max-height: calc(100vh - 3rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    body.sidebar-collapsed .app-shell {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    body.sidebar-collapsed .sidebar {
        padding: 1rem 0.8rem;
    }

    body.sidebar-collapsed .sidebar-toolbar {
        display: grid;
        justify-items: center;
    }

    body.sidebar-collapsed .sidebar-brand {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    body.sidebar-collapsed .sidebar-brand-copy,
    body.sidebar-collapsed .tenant-card,
    body.sidebar-collapsed .sidebar-note,
    body.sidebar-collapsed .nav-link-copy,
    body.sidebar-collapsed .sidebar-logout-label {
        display: none;
    }

    body.sidebar-collapsed .sidebar-brand-logo {
        margin-inline: auto;
    }

    body.sidebar-collapsed .sidebar-nav {
        gap: 0.75rem;
    }

    body.sidebar-collapsed .nav-link,
    body.sidebar-collapsed .sidebar-logout-button {
        justify-content: center;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    body.sidebar-collapsed .sidebar-foot {
        gap: 0.75rem;
    }

    .topbar {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .topbar-copy {
        max-width: 52rem;
    }

    .section-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

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

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

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

    .stats-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .page-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    }

    .page-grid-balanced {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .toolbar-form {
        flex-direction: row;
        align-items: flex-end;
    }

    .toolbar-form .field-grow {
        flex: 1 1 auto;
    }

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

    .document-item-grid {
        grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(120px, 1fr));
        align-items: end;
    }

    .landing-page {
        padding: 2rem;
    }

    .landing-hero {
        grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
        align-items: stretch;
    }

.pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

.executive-toolbar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 246, 238, 0.88)),
        radial-gradient(circle at top right, rgba(217, 166, 60, 0.08), transparent 30%);
}

.executive-toolbar-form {
    gap: 1.25rem;
}

.executive-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.executive-toolbar-actions {
    align-items: center;
}

.executive-kpi-grid,
.executive-range-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.executive-kpi-card {
    position: relative;
    overflow: hidden;
}

.executive-kpi-card::after {
    content: "";
    position: absolute;
    inset: auto -15% -35% auto;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(217, 166, 60, 0.16), transparent 65%);
    pointer-events: none;
}

.executive-donut-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.donut-card {
    display: grid;
    gap: 1rem;
}

.donut-visual {
    width: min(220px, 100%);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--donut-gradient);
    box-shadow: inset 0 0 0 1px rgba(31, 28, 24, 0.06);
}

.donut-hole {
    width: 58%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    text-align: center;
    box-shadow: 0 12px 30px -20px rgba(31, 28, 24, 0.36);
}

.donut-hole strong {
    display: block;
    font-size: 1.65rem;
    letter-spacing: -0.04em;
}

.donut-hole span {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-soft);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.donut-legend {
    display: grid;
    gap: 0.6rem;
}

.donut-legend-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
    border-radius: 16px;
    background: rgba(247, 243, 236, 0.7);
    border: 1px solid rgba(31, 28, 24, 0.06);
    padding: 0.8rem 0.9rem;
}

.chart-shell {
    display: grid;
    gap: 0.85rem;
}

.line-chart-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart-axis {
    stroke: rgba(31, 28, 24, 0.12);
    stroke-width: 1.2;
}

.chart-line {
    fill: none;
    stroke: var(--chart-color, var(--accent));
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-area {
    fill: color-mix(in srgb, var(--chart-color, var(--accent)) 18%, transparent);
}

.chart-point {
    fill: #fff;
    stroke: var(--chart-color, var(--accent));
    stroke-width: 2.2;
}

.chart-label {
    fill: var(--text-soft);
    font-size: 22px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.chart-legend-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: var(--chart-color, var(--accent));
    box-shadow: 0 0 0 1px rgba(31, 28, 24, 0.06);
}

.heatmap-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.heatmap-cell {
    min-height: 88px;
    display: grid;
    align-content: space-between;
    gap: 0.45rem;
    padding: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 28, 24, 0.06);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(250, 244, 232, calc(0.75 + (var(--heat) * 0.15)))),
        radial-gradient(circle at top right, rgba(217, 166, 60, calc(0.12 + var(--heat))), transparent 55%);
    box-shadow: var(--shadow-soft);
}

.heatmap-cell strong {
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.heatmap-cell span {
    color: var(--text-soft);
    font-size: 0.82rem;
}

.executive-mini-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.executive-subhead {
    margin-top: 1.25rem;
}

.workflow-next-action {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(250, 244, 232, 0.95)),
        radial-gradient(circle at top right, rgba(62, 124, 177, 0.12), transparent 55%);
}

.workflow-next-action strong {
    font-size: 1.1rem;
}

.workflow-link-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 1rem;
}

.workflow-link-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 28, 24, 0.06);
    background: rgba(255, 255, 255, 0.9);
}

.workflow-link-card span {
    color: var(--text-soft);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workflow-link-card strong {
    font-size: 1rem;
}

.compact-heading {
    margin: 0 0 0.85rem;
    font-size: 1rem;
}

.dispatch-filter-form {
    gap: 1rem;
}

.dispatch-inline-form {
    display: grid;
    gap: 0.55rem;
    min-width: 260px;
}

.dispatch-inline-form select {
    min-width: 0;
}

.dispatch-warning-list {
    display: grid;
    gap: 0.35rem;
    min-width: 240px;
}

@media (max-width: 859px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        min-width: 100%;
    }

    .list-item,
    .topbar-actions,
    .topbar-user,
    .topbar-search-form,
    .table-actions,
    .form-actions,
    .document-item-actions,
    .trip-document-meta,
    .landing-actions,
    .auth-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .day-timeline-row,
    .timeline-item {
        grid-template-columns: 1fr;
    }

    .resource-lane-copy {
        flex-direction: column;
        align-items: flex-start;
    }

    .donut-visual {
        width: min(180px, 100%);
    }
}

.sidebar {
    gap: 1rem;
    padding: 1rem;
}

.sidebar-top {
    gap: 0.75rem;
}

.sidebar-toolbar {
    align-items: center;
}

.sidebar-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar-section {
    display: grid;
    gap: 0.5rem;
}

.sidebar-section + .sidebar-section {
    margin-top: 0.15rem;
}

.sidebar-section-label {
    margin: 0 0 0.1rem;
    padding-inline: 0.25rem;
    color: rgba(237, 234, 229, 0.56);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.sidebar-nav {
    gap: 0.9rem;
}

.nav-link {
    min-height: 3.35rem;
    padding: 0.78rem 0.9rem;
}

.sidebar-foot {
    gap: 0.75rem;
}

.topbar-compact {
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 22px;
}

.topbar-actions-compact {
    justify-content: flex-end;
}

.topbar-copy .eyebrow {
    margin-bottom: 0.3rem;
}

.topbar-copy h1 {
    font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.topbar-copy p:last-child {
    margin-top: 0.2rem;
    font-size: 0.94rem;
}

.notification-toggle-compact {
    padding: 0.45rem 0.7rem;
    gap: 0.45rem;
}

.notification-toggle-compact .nav-link-icon {
    width: 2rem;
    height: 2rem;
    flex-basis: 2rem;
}

.topbar-user-compact {
    padding: 0.3rem 0.45rem 0.3rem 0.3rem;
}

.topbar-user-copy p {
    white-space: nowrap;
}

.driver-shell-grid,
.bank-grid {
    display: grid;
    gap: 1rem;
}

.driver-hero,
.bank-summary-card,
.attachment-row {
    display: grid;
    gap: 0.85rem;
}

.driver-trip-grid,
.driver-assignment-grid,
.bank-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mini-card {
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.72);
    padding: 1rem;
}

.mini-card p,
.attachment-meta p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
}

.attachment-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.bank-transaction-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.86);
}

.bank-transaction-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.bank-transaction-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.bank-transaction-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.inline-form-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.helper-text {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.workflow-progress-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.workflow-progress-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.78);
}

.workflow-progress-card p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.workflow-progress-card-done {
    border-color: rgba(64, 117, 74, 0.24);
    background: rgba(232, 245, 234, 0.88);
}

.workflow-progress-card-current {
    border-color: rgba(217, 166, 60, 0.38);
    box-shadow: 0 18px 34px -26px rgba(183, 131, 33, 0.45);
}

.workflow-progress-index {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(31, 28, 24, 0.08);
    font-size: 0.9rem;
    font-weight: 700;
}

.fleet-matrix-shell {
    overflow: auto;
    max-width: 100%;
    border-radius: 22px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.76);
}

.fleet-matrix-table {
    min-width: 1240px;
}

.fleet-matrix-head,
.fleet-matrix-row {
    display: grid;
    grid-template-columns: 92px 96px 240px repeat(var(--matrix-columns, 1), minmax(210px, 1fr));
}

.fleet-matrix-head {
    position: sticky;
    top: 0;
    z-index: 8;
    background: rgba(250, 247, 241, 0.98);
    backdrop-filter: blur(8px);
}

.fleet-matrix-cell {
    min-height: 100%;
    padding: 0.75rem;
    border-right: 1px solid rgba(31, 28, 24, 0.08);
    border-bottom: 1px solid rgba(31, 28, 24, 0.08);
}

.fleet-matrix-cell strong,
.fleet-matrix-cell span,
.fleet-matrix-cell small {
    display: block;
}

.fleet-matrix-cell-day,
.fleet-matrix-cell-date {
    background: rgba(247, 243, 236, 0.96);
}

.fleet-matrix-cell-sticky {
    position: sticky;
    left: 0;
    z-index: 7;
}

.fleet-matrix-cell-sticky-2 {
    position: sticky;
    left: 92px;
    z-index: 7;
}

.fleet-matrix-cell-vehicle {
    display: grid;
    gap: 0.25rem;
    min-width: 210px;
    background: rgba(250, 247, 241, 0.98);
}

.fleet-matrix-cell-vehicle span,
.fleet-matrix-cell-vehicle small {
    color: var(--text-soft);
    font-size: 0.84rem;
}

.fleet-matrix-row-today .fleet-matrix-cell-day,
.fleet-matrix-row-today .fleet-matrix-cell-date {
    background: rgba(255, 244, 214, 0.98);
}

.fleet-matrix-row-weekend {
    background: rgba(247, 244, 239, 0.45);
}

.fleet-matrix-cell-body {
    display: grid;
    gap: 0.55rem;
    align-content: start;
    min-height: 132px;
    background: rgba(255, 255, 255, 0.72);
}

.fleet-matrix-cell-inbox {
    min-width: 240px;
}

.fleet-matrix-cell-conflict {
    background: rgba(254, 242, 242, 0.82);
}

.matrix-entry {
    display: grid;
    gap: 0.2rem;
    padding: 0.65rem 0.7rem;
    border-radius: 16px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.92);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.matrix-entry:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -24px rgba(31, 28, 24, 0.45);
}

.matrix-entry strong {
    font-size: 0.9rem;
}

.matrix-entry span,
.matrix-entry small {
    color: var(--text-soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.matrix-entry-trip {
    border-style: dashed;
}

.matrix-warning {
    color: #b45309;
    font-weight: 700;
}

.matrix-empty-state {
    display: grid;
    gap: 0.45rem;
    align-content: center;
    justify-items: start;
    min-height: 100%;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.matrix-empty-add {
    border: none;
    border-radius: 999px;
    background: rgba(217, 166, 60, 0.14);
    color: var(--accent-strong);
    padding: 0.45rem 0.8rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
}

@media print {
    .sidebar,
    .topbar,
    .quick-create,
    .button,
    .matrix-empty-add,
    [data-matrix-create-panel] {
        display: none !important;
    }

    .app-shell,
    .content-frame,
    .app-content,
    .content-stack {
        display: block;
        padding: 0;
        margin: 0;
    }

    .surface-card {
        box-shadow: none;
        border-radius: 0;
        border: none;
    }
}

@media (min-width: 860px) {
    .topbar-compact {
        align-items: center;
    }

    .topbar-compact .topbar-copy {
        max-width: 42rem;
    }

    body.sidebar-collapsed .sidebar-section-label,
    body.sidebar-collapsed .sidebar-logout-label {
        display: none;
    }
}

.dispatch-board-toolbar-card,
.dispatch-board-table-card {
    display: grid;
    gap: 1rem;
}

.dispatch-board-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.dispatch-board-toolbar-copy h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.dispatch-board-toolbar-copy p:last-child {
    margin: 0.3rem 0 0;
    color: var(--text-soft);
}

.dispatch-board-toolbar-actions,
.dispatch-board-month-jumps,
.dispatch-excel-entry-actions,
.dispatch-board-modal-danger {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.dispatch-board-filter-form {
    gap: 1rem;
}

.dispatch-board-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dispatch-board-month-jumps {
    align-items: center;
}

.dispatch-board-month-jump {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.9);
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-soft);
}

.dispatch-board-month-jump-active {
    border-color: rgba(217, 166, 60, 0.34);
    background: rgba(217, 166, 60, 0.16);
    color: #7a5206;
}

.dispatch-excel-shell {
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: #fffdfa;
    overflow: hidden;
}

.dispatch-excel-scroll {
    overflow: auto;
    max-width: 100%;
    max-height: calc(100vh - 14rem);
}

.dispatch-excel-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fffdfa;
    font-size: 0.74rem;
    line-height: 1.2;
}

.dispatch-excel-table th,
.dispatch-excel-table td {
    position: relative;
    padding: 0;
    border-right: 1px solid #c9c2b7;
    border-bottom: 1px solid #c9c2b7;
    vertical-align: top;
}

.dispatch-excel-global-row th,
.dispatch-excel-section-row th,
.dispatch-excel-month-row th {
    z-index: 5;
}

.dispatch-excel-head-cell,
.dispatch-excel-section-cell,
.dispatch-excel-month-title,
.dispatch-excel-month-spacer,
.dispatch-excel-left-label,
.dispatch-excel-left-date {
    background: #f4efe6;
}

.dispatch-excel-head-cell,
.dispatch-excel-section-cell {
    padding: 0.2rem 0.25rem;
    min-height: 2rem;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dispatch-excel-head-cell span,
.dispatch-excel-section-cell span {
    display: block;
    white-space: pre-line;
}

.dispatch-excel-head-cell-marker,
.dispatch-excel-section-cell-marker {
    text-align: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.dispatch-excel-month-row th {
    padding: 0.3rem 0.45rem;
    border-top: 1px solid #bfb7a9;
    background: #fff9ee;
}

.dispatch-excel-month-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #8a7348;
    text-align: left;
}

.dispatch-excel-month-spacer {
    min-width: 58px;
}

.dispatch-excel-day-row th,
.dispatch-excel-day-row td {
    min-height: 2.25rem;
    background: #fffdfa;
}

.dispatch-excel-day-row-today th,
.dispatch-excel-day-row-today td.dispatch-excel-group-vehicle,
.dispatch-excel-day-row-today td.dispatch-excel-group-driver_marker,
.dispatch-excel-day-row-today td.dispatch-excel-group-amount {
    background: #fff6de;
}

.dispatch-excel-day-row-weekend th {
    color: #b91c1c;
}

.dispatch-excel-sticky-left {
    position: sticky;
    left: 0;
    z-index: 7;
}

.dispatch-excel-sticky-left-2 {
    left: 58px;
    z-index: 7;
}

.dispatch-excel-global-row .dispatch-excel-sticky-left,
.dispatch-excel-section-row .dispatch-excel-sticky-left,
.dispatch-excel-month-row .dispatch-excel-sticky-left {
    z-index: 10;
}

.dispatch-excel-global-row th {
    position: sticky;
    top: 0;
    background: #ece6db;
    min-height: 4.3rem;
}

.dispatch-excel-section-row th {
    position: sticky;
    top: 4.3rem;
    background: #f6f3ed;
}

.dispatch-excel-left-label,
.dispatch-excel-left-date {
    display: grid;
    place-items: center;
    min-height: 2.25rem;
    padding: 0.15rem;
    text-align: center;
    font-weight: 700;
}

.dispatch-excel-left-label {
    min-width: 58px;
}

.dispatch-excel-left-date {
    min-width: 42px;
}

.dispatch-excel-cell {
    min-width: 28px;
}

.dispatch-excel-cell-conflict {
    box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.5);
}

.dispatch-excel-cell-stack {
    display: grid;
    gap: 0.12rem;
    min-height: 2.25rem;
    padding: 0.08rem;
}

.dispatch-excel-entry {
    display: grid;
    gap: 0.08rem;
    padding: 0.1rem 0.15rem;
    border-radius: 4px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.68);
    overflow: hidden;
}

.dispatch-excel-entry-imported {
    background: transparent;
    border-color: transparent;
}

.dispatch-excel-entry-live {
    border-color: rgba(217, 166, 60, 0.3);
    background: rgba(255, 249, 235, 0.95);
}

.dispatch-excel-entry-marker,
.dispatch-excel-entry-amount {
    place-items: center;
    text-align: center;
    min-height: 1.4rem;
}

.dispatch-excel-entry-time {
    font-size: 0.62rem;
    font-weight: 700;
    color: #7a5206;
}

.dispatch-excel-entry-lines {
    display: grid;
    gap: 0.02rem;
    white-space: pre-line;
    word-break: break-word;
}

.dispatch-excel-entry-lines div {
    overflow: hidden;
}

.dispatch-excel-entry-meta,
.dispatch-excel-entry-warning-list {
    display: grid;
    gap: 0.05rem;
}

.dispatch-excel-entry-meta span,
.dispatch-excel-entry-warning-list span {
    color: var(--text-soft);
    font-size: 0.61rem;
    line-height: 1.15;
}

.dispatch-excel-entry-warning-list span {
    color: #a53a17;
}

.dispatch-excel-entry-actions {
    margin-top: 0.1rem;
}

.dispatch-excel-entry-actions form {
    margin: 0;
}

.dispatch-excel-action-button,
.dispatch-excel-action-link,
.dispatch-excel-empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(247, 243, 236, 0.94);
    color: var(--text-soft);
    padding: 0.05rem 0.35rem;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
}

.dispatch-excel-action-button-danger {
    color: #a53a17;
}

.dispatch-excel-empty-button {
    width: 1.35rem;
    min-width: 1.35rem;
    padding: 0;
    margin: auto 0 auto auto;
}

.dispatch-excel-empty-placeholder {
    display: block;
    min-height: 1.4rem;
}

.dispatch-board-modal-open {
    overflow: hidden;
}

.dispatch-board-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.dispatch-board-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 14, 10, 0.48);
}

.dispatch-board-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 28px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 80px -36px rgba(31, 28, 24, 0.45);
    padding: 1.25rem;
}

.dispatch-board-modal-danger {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(31, 28, 24, 0.08);
}

.dispatch-print-body {
    margin: 0;
    background: #fff;
    color: #1f1c18;
}

.dispatch-print-frame {
    padding: 0.8rem;
}

.dispatch-print-head {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.dispatch-print-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dispatch-print-logo {
    width: 120px;
}

.dispatch-print-brand h1 {
    margin: 0;
    font-size: 1.4rem;
}

.dispatch-print-brand p:last-child,
.dispatch-print-meta {
    margin: 0;
    color: #6b645c;
}

.dispatch-print-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
}

@media (max-width: 859px) {
    .dispatch-board-toolbar-actions,
    .dispatch-board-month-jumps,
    .dispatch-excel-entry-actions,
    .dispatch-board-modal-danger,
    .dispatch-print-brand,
    .dispatch-print-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .dispatch-excel-scroll {
        max-height: none;
    }

    .dispatch-excel-global-row th {
        top: 0;
    }

    .dispatch-excel-section-row th {
        top: 4rem;
    }
}

@media print {
    .dispatch-print-body {
        background: #fff;
    }

    .dispatch-print-frame {
        padding: 0;
    }

    .dispatch-excel-shell {
        border: none;
        border-radius: 0;
    }

    .dispatch-excel-scroll {
        overflow: visible;
        max-height: none;
    }

    .dispatch-excel-table {
        width: 100%;
        font-size: 0.5rem;
    }
}

.dispatch-excel-entry-actions,
.dispatch-excel-empty-button,
.dispatch-board-modal {
    display: none !important;
}

.dispatch-board-surface,
.dispatch-board-table-card {
    display: grid;
    gap: 1rem;
}

.dispatch-board-module-head {
    position: sticky;
    top: 0.85rem;
    z-index: 15;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(31, 28, 24, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    padding: 1rem 1.1rem;
    box-shadow: 0 18px 36px -30px rgba(31, 28, 24, 0.34);
    backdrop-filter: blur(12px);
}

.dispatch-board-module-copy h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.6rem, 2vw, 2.35rem);
    line-height: 1.02;
}

.dispatch-board-module-copy p:last-child {
    margin: 0;
    max-width: 60rem;
    color: var(--text-soft);
    line-height: 1.55;
}

.dispatch-board-module-actions,
.dispatch-board-search-jumps,
.dispatch-ops-panel-actions,
.dispatch-ops-utility-actions,
.dispatch-color-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.dispatch-board-module-actions {
    justify-content: flex-end;
}

.dispatch-board-filter-strip {
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.95rem 1rem;
}

.dispatch-board-filter-grid {
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    gap: 0.8rem;
    align-items: end;
}

.dispatch-board-filter-grid .field {
    grid-column: span 2;
}

.dispatch-board-filter-grid .field-search {
    grid-column: span 4;
}

.dispatch-board-conflicts-only {
    grid-column: span 2;
    align-self: end;
}

.dispatch-board-filter-actions {
    margin-top: 0.8rem;
}

.dispatch-board-search-jumps {
    align-items: stretch;
}

.dispatch-board-search-jump {
    min-width: 13rem;
    display: grid;
    gap: 0.2rem;
    border: 1px solid rgba(31, 28, 24, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    padding: 0.72rem 0.88rem;
    box-shadow: var(--shadow-soft);
}

.dispatch-board-search-jump strong {
    font-size: 0.86rem;
}

.dispatch-board-search-jump span {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.35;
}

.dispatch-ops-shell {
    display: grid;
    gap: 0.9rem;
}

.dispatch-ops-utility-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.dispatch-ops-legend {
    display: grid;
    gap: 0.55rem;
    border: 1px solid rgba(31, 28, 24, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    padding: 0.75rem 0.9rem;
}

.dispatch-ops-legend-head {
    display: grid;
    gap: 0.1rem;
}

.dispatch-ops-legend-head strong {
    font-size: 0.84rem;
}

.dispatch-ops-legend-head span {
    color: var(--text-soft);
    font-size: 0.74rem;
}

.dispatch-ops-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
}

.dispatch-ops-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text);
    font-size: 0.76rem;
}

.dispatch-ops-legend-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: var(--dispatch-legend-color);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

html[data-dispatch-details-panel-hidden='true'] [data-dispatch-layout] {
    grid-template-columns: minmax(0, 1fr);
}

html[data-dispatch-details-panel-hidden='true'] [data-dispatch-panel] {
    display: none !important;
}

html[data-dispatch-details-panel-hidden='true'] .dispatch-ops-panel-show-toggle {
    display: inline-flex;
}

.dispatch-ops-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 25rem;
    gap: 1rem;
    align-items: start;
}

.dispatch-ops-layout-panel-hidden {
    grid-template-columns: minmax(0, 1fr);
}

.dispatch-ops-layout-panel-hidden .dispatch-ops-panel {
    display: none;
}

.dispatch-ops-grid-wrap {
    min-width: 0;
    display: grid;
    gap: 0.75rem;
}

.dispatch-ops-grid-wrap-has-floating-scroll {
    padding-bottom: 3.1rem;
}

.dispatch-ops-panel-show-toggle {
    display: none;
    justify-self: end;
}

.dispatch-ops-grid-scroll {
    overflow: auto;
    scrollbar-gutter: stable both-edges;
    max-height: calc(100vh - 15rem);
    border: 1px solid rgba(31, 28, 24, 0.1);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(251, 248, 242, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dispatch-ops-grid-scroll::-webkit-scrollbar {
    height: 0.72rem;
    width: 0.72rem;
}

.dispatch-ops-grid-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(146, 130, 96, 0.48);
    border: 2px solid rgba(255, 255, 255, 0.74);
}

.dispatch-ops-grid-scroll::-webkit-scrollbar-track {
    background: rgba(31, 28, 24, 0.04);
}

.dispatch-ops-floating-scroll {
    position: sticky;
    bottom: 0.75rem;
    z-index: 14;
    overflow-x: auto;
    overflow-y: hidden;
    height: 1rem;
    border: 1px solid rgba(31, 28, 24, 0.1);
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 12px 30px rgba(31, 28, 24, 0.12);
}

.dispatch-ops-floating-scroll::-webkit-scrollbar {
    height: 0.8rem;
}

.dispatch-ops-floating-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(146, 130, 96, 0.56);
    border: 2px solid rgba(255, 255, 255, 0.74);
}

.dispatch-ops-floating-scroll::-webkit-scrollbar-track {
    background: rgba(31, 28, 24, 0.05);
    border-radius: 999px;
}

.dispatch-ops-floating-scroll-inner {
    height: 1px;
}

.dispatch-ops-table {
    width: max(100%, 104rem);
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 0.78rem;
    font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

.dispatch-ops-table th,
.dispatch-ops-table td {
    border-right: 1px solid rgba(43, 38, 33, 0.05);
    border-bottom: 1px solid rgba(43, 38, 33, 0.06);
    vertical-align: top;
}

.dispatch-ops-group-row th,
.dispatch-ops-head-row th {
    position: sticky;
}

.dispatch-ops-group-row th {
    top: 0;
    z-index: 7;
    background: #ece4d7;
    color: #665b4f;
    box-shadow: 0 1px 0 rgba(31, 28, 24, 0.06);
}

.dispatch-ops-head-row th {
    top: 1.75rem;
    z-index: 8;
    background: rgba(247, 243, 235, 0.98);
    box-shadow: 0 4px 14px -12px rgba(31, 28, 24, 0.5);
}

.dispatch-ops-group-spacer,
.dispatch-ops-group-head,
.dispatch-ops-head-cell {
    padding: 0.38rem 0.54rem;
    text-align: left;
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.dispatch-ops-group-head {
    font-weight: 800;
    white-space: nowrap;
}

.dispatch-ops-group-head span {
    display: inline-block;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    padding: 0.12rem 0.45rem;
}

.dispatch-ops-head-cell {
    min-width: 11.1rem;
    max-width: 11.1rem;
    font-weight: 700;
    color: #3c352c;
}

.dispatch-ops-head-cell-special {
    background: rgba(242, 238, 249, 0.98);
}

.dispatch-ops-head-cell-sticky,
.dispatch-ops-day-cell-sticky {
    left: 0;
    min-width: 4.9rem;
    width: 4.9rem;
}

.dispatch-ops-head-cell-sticky-2,
.dispatch-ops-date-cell-sticky {
    left: 4.9rem;
    min-width: 12rem;
    width: 12rem;
}

.dispatch-ops-head-row .dispatch-ops-head-cell-sticky,
.dispatch-ops-day-cell-sticky,
.dispatch-ops-group-row .dispatch-ops-group-spacer {
    z-index: 11;
    box-shadow: 6px 0 12px -12px rgba(31, 28, 24, 0.35);
}

.dispatch-ops-head-row .dispatch-ops-head-cell-sticky-2,
.dispatch-ops-date-cell-sticky {
    z-index: 10;
    box-shadow: 8px 0 14px -14px rgba(31, 28, 24, 0.32);
}

.dispatch-ops-head-title,
.dispatch-ops-head-meta {
    display: block;
}

.dispatch-ops-head-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: normal;
    line-height: 1.16;
    text-transform: none;
}

.dispatch-ops-head-meta {
    margin-top: 0.16rem;
    font-size: 0.68rem;
    line-height: 1.22;
    color: rgba(68, 58, 48, 0.82);
    letter-spacing: normal;
    text-transform: none;
}

.dispatch-ops-row:nth-child(odd) td,
.dispatch-ops-row:nth-child(odd) th {
    background: rgba(255, 255, 255, 0.96);
}

.dispatch-ops-row:nth-child(even) td,
.dispatch-ops-row:nth-child(even) th {
    background: rgba(251, 249, 245, 0.95);
}

.dispatch-ops-row-weekend td,
.dispatch-ops-row-weekend th {
    background: rgba(246, 241, 232, 0.94) !important;
}

.dispatch-ops-row-today td,
.dispatch-ops-row-today th {
    background: rgba(255, 244, 216, 0.96) !important;
}

.dispatch-ops-day-cell-sticky,
.dispatch-ops-date-cell-sticky {
    position: sticky;
    background: inherit;
    padding: 0.55rem 0.62rem;
}

.dispatch-ops-day-cell {
    text-align: center;
}

.dispatch-ops-day-cell span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    border-radius: 999px;
    background: rgba(31, 28, 24, 0.06);
    padding: 0.2rem 0.46rem;
    font-size: 0.68rem;
    font-weight: 800;
}

.dispatch-ops-date-stack {
    display: grid;
    gap: 0.08rem;
}

.dispatch-ops-date-stack strong {
    font-size: 0.94rem;
    line-height: 1.08;
}

.dispatch-ops-date-stack span,
.dispatch-ops-date-summary span {
    color: rgba(75, 68, 60, 0.82);
    font-size: 0.68rem;
    line-height: 1.28;
}

.dispatch-ops-date-summary {
    display: grid;
    gap: 0.08rem;
    margin-top: 0.34rem;
}

.dispatch-ops-cell {
    min-width: 11.1rem;
    max-width: 11.1rem;
    padding: 0.18rem;
    background: inherit;
    transition: background-color 140ms ease, box-shadow 140ms ease;
}

.dispatch-ops-cell:hover {
    background: rgba(255, 255, 255, 0.98);
}

.dispatch-ops-cell-special {
    background: rgba(244, 241, 250, 0.94) !important;
}

.dispatch-ops-cell-conflict {
    box-shadow: inset 3px 0 0 rgba(220, 38, 38, 0.74);
}

.dispatch-ops-cell-match {
    box-shadow: inset 0 0 0 1px rgba(217, 166, 60, 0.28);
}

.dispatch-ops-cell-inner {
    min-height: 3rem;
    display: grid;
    gap: 0.18rem;
}

.dispatch-ops-entry,
.dispatch-ops-empty-hit {
    width: 100%;
    display: grid;
    justify-items: start;
    gap: 0.14rem;
    position: relative;
    border: 1px solid rgba(31, 28, 24, 0.06);
    border-left: 4px solid var(--dispatch-entry-color, #1f9d67);
    border-radius: 8px;
    background: var(--dispatch-entry-bg, rgba(31, 157, 103, 0.12));
    padding: 0.34rem 0.44rem 0.38rem 0.56rem;
    text-align: left;
    box-shadow: none;
    transition: transform 130ms ease, box-shadow 130ms ease, border-color 130ms ease, background-color 130ms ease;
}

.dispatch-ops-entry {
    cursor: pointer;
}

.dispatch-ops-entry:hover,
.dispatch-ops-empty-hit:hover {
    border-color: rgba(217, 166, 60, 0.24);
    box-shadow: 0 8px 18px -16px rgba(31, 28, 24, 0.7);
    transform: translateY(-1px);
}

.dispatch-ops-entry-conflict {
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.22);
}

.dispatch-ops-entry-match {
    outline: 2px solid rgba(217, 166, 60, 0.52);
    outline-offset: 1px;
}

.dispatch-ops-entry-match-pulse {
    animation: dispatchMatchPulse 1.6s ease-out 1;
}

@keyframes dispatchMatchPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 166, 60, 0.38);
    }

    100% {
        box-shadow: 0 0 0 16px rgba(217, 166, 60, 0);
    }
}

.dispatch-ops-entry-accent {
    position: absolute;
    top: 0.36rem;
    right: 0.36rem;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--dispatch-entry-marker, rgba(31, 157, 103, 0.28));
}

.dispatch-ops-entry-time {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: rgba(45, 41, 34, 0.9);
}

.dispatch-ops-entry-line {
    display: block;
    font-size: 0.72rem;
    line-height: 1.24;
    font-weight: 700;
    color: #221d17;
}

.dispatch-ops-entry-line-soft {
    font-weight: 600;
    color: rgba(59, 52, 45, 0.78);
}

.dispatch-ops-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.18rem 0.34rem;
    color: rgba(76, 67, 59, 0.88);
    font-size: 0.62rem;
    line-height: 1.18;
}

.dispatch-ops-entry-warning-flag {
    position: absolute;
    right: 0.4rem;
    bottom: 0.38rem;
    width: 0.98rem;
    height: 0.98rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.12);
    color: #b3261e;
    font-size: 0.62rem;
    font-weight: 900;
}

.dispatch-ops-empty-hit {
    min-height: 3rem;
    place-items: center;
    border-style: dashed;
    background: transparent;
    cursor: pointer;
}

.dispatch-ops-empty-plus {
    opacity: 0;
    color: rgba(112, 105, 96, 0.72);
    font-size: 1rem;
    font-weight: 800;
    transition: opacity 140ms ease, transform 140ms ease;
}

.dispatch-ops-empty-hit:hover .dispatch-ops-empty-plus,
.dispatch-ops-cell:focus-within .dispatch-ops-empty-plus {
    opacity: 1;
    transform: scale(1.05);
}

.dispatch-ops-empty-mark {
    display: block;
    width: 100%;
    min-height: 3rem;
}

.dispatch-ops-empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-soft);
}

.dispatch-ops-panel {
    position: sticky;
    top: 0.85rem;
    display: grid;
    gap: 1rem;
    border: 1px solid rgba(31, 28, 24, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.dispatch-ops-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.dispatch-ops-panel-head h3 {
    margin: 0.08rem 0 0.2rem;
    font-size: 1.14rem;
    line-height: 1.1;
}

.dispatch-ops-panel-subtitle,
.dispatch-ops-panel-placeholder p:last-child {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.55;
}

.dispatch-ops-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.82rem;
    margin: 0;
}

.dispatch-ops-preview-grid-full {
    grid-column: 1 / -1;
}

.dispatch-ops-preview-grid dt {
    margin: 0 0 0.2rem;
    color: rgba(105, 98, 88, 0.84);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dispatch-ops-preview-grid dd {
    margin: 0;
    color: var(--text);
    line-height: 1.45;
    white-space: pre-wrap;
}

.dispatch-ops-warning-list {
    margin: 0;
    padding-left: 1rem;
    color: #b3261e;
    font-size: 0.84rem;
    line-height: 1.45;
}

.trip-vat-source-field-active input {
    border-color: rgba(185, 124, 43, 0.88);
    box-shadow: 0 0 0 4px rgba(217, 166, 60, 0.14);
    background: rgba(255, 250, 241, 0.98);
}

.dispatch-color-card {
    display: grid;
    gap: 0.62rem;
    border: 1px solid rgba(31, 28, 24, 0.08);
    border-radius: 16px;
    background: rgba(248, 245, 239, 0.92);
    padding: 0.82rem 0.9rem;
}

.dispatch-color-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.dispatch-color-card-head strong {
    display: block;
    font-size: 0.84rem;
}

.dispatch-color-card-head span {
    color: var(--text-soft);
    font-size: 0.74rem;
    line-height: 1.35;
}

.dispatch-color-live-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(31, 28, 24, 0.06);
    padding: 0.22rem 0.56rem;
    color: rgba(55, 48, 41, 0.88);
    font-size: 0.72rem;
    font-weight: 700;
}

.dispatch-color-chip {
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid rgba(31, 28, 24, 0.12);
    border-radius: 999px;
    background: var(--dispatch-chip-color, #1f9d67);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.dispatch-color-chip:hover {
    transform: translateY(-1px);
}

.dispatch-color-chip-active {
    border-color: rgba(31, 28, 24, 0.28);
    box-shadow: 0 0 0 2px rgba(217, 166, 60, 0.22), inset 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.dispatch-color-chip-auto {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.72rem;
    font-weight: 800;
}

.dispatch-color-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-soft);
    font-size: 0.74rem;
}

.dispatch-color-custom input[type="color"] {
    width: 2.6rem;
    height: 1.8rem;
    border: 1px solid rgba(31, 28, 24, 0.12);
    border-radius: 999px;
    background: transparent;
    padding: 0.08rem;
}

.dictionary-color-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.dictionary-color-picker {
    display: inline-grid;
    gap: 0.35rem;
    justify-items: center;
    color: var(--text-soft);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dictionary-color-picker input[type="color"] {
    width: 3rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.dictionary-color-table-value {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.dictionary-color-swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: var(--dictionary-color-preview, #1f9d67);
    box-shadow: inset 0 0 0 1px rgba(31, 28, 24, 0.12);
}

.is-hidden {
    display: none !important;
}

.dispatch-ops-editor-form {
    display: grid;
    gap: 0.85rem;
}

.dispatch-ops-shell-print .dispatch-ops-layout {
    grid-template-columns: minmax(0, 1fr);
}

.dispatch-ops-shell-print .dispatch-ops-grid-scroll {
    max-height: none;
    overflow: visible;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #fff;
}

.dispatch-ops-shell-print .dispatch-ops-group-row th,
.dispatch-ops-shell-print .dispatch-ops-head-row th,
.dispatch-ops-shell-print .dispatch-ops-day-cell-sticky,
.dispatch-ops-shell-print .dispatch-ops-date-cell-sticky {
    position: static;
    box-shadow: none;
}

.dispatch-print-body {
    background: #fff;
}

.dispatch-print-frame {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.dispatch-print-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dispatch-print-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dispatch-print-logo {
    width: 110px;
}

.dispatch-print-meta {
    display: grid;
    gap: 0.25rem;
    color: rgba(64, 56, 47, 0.84);
    font-size: 0.8rem;
}

@media print {
    .app-shell-sidebar,
    .app-topbar,
    .dispatch-board-module-head,
    .dispatch-board-filter-strip,
    .dispatch-board-search-jumps,
    .dispatch-ops-utility-bar,
    .dispatch-ops-panel {
        display: none !important;
    }

    .app-shell-main {
        padding: 0 !important;
    }

    .dispatch-board-table-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    @page {
        size: A3 landscape;
        margin: 10mm;
    }
}

@media (max-width: 1600px) {
    .dispatch-board-filter-grid .field {
        grid-column: span 3;
    }

    .dispatch-board-filter-grid .field-search {
        grid-column: span 6;
    }
}

@media (max-width: 1340px) {
    .dispatch-ops-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .dispatch-ops-panel {
        position: static;
    }
}

@media (max-width: 1180px) {
    .dispatch-board-module-head,
    .dispatch-ops-utility-bar {
        display: grid;
    }

    .dispatch-board-module-actions,
    .dispatch-ops-utility-actions {
        justify-content: flex-start;
    }

    .dispatch-board-filter-grid .field,
    .dispatch-board-filter-grid .field-search,
    .dispatch-board-conflicts-only {
        grid-column: span 6;
    }
}

@media (max-width: 820px) {
    .dispatch-board-filter-grid .field,
    .dispatch-board-filter-grid .field-search,
    .dispatch-board-conflicts-only {
        grid-column: span 18;
    }

    .dispatch-ops-preview-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dispatch-print-head,
    .dispatch-print-brand {
        display: grid;
    }
}

.toolbar-inline-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.toolbar-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    padding: 0.65rem 0.9rem;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.toolbar-flag input {
    width: 1rem;
    height: 1rem;
}

.driver-trip-primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.travel-order-shell {
    display: grid;
    gap: 1.2rem;
}

.travel-order-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
}

.travel-order-hero-copy h2 {
    margin: 0;
    font-size: clamp(1.8rem, 2vw, 2.5rem);
    line-height: 1.05;
}

.travel-order-hero-copy p {
    margin: 0.6rem 0 0;
    color: var(--text-soft);
}

.travel-order-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.travel-order-section {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-soft);
}

.travel-order-section > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 241, 232, 0.96));
}

.travel-order-section > summary::-webkit-details-marker {
    display: none;
}

.travel-order-section > summary span {
    font-size: 1rem;
    font-weight: 800;
}

.travel-order-section > summary small {
    color: var(--text-soft);
    text-align: right;
}

.travel-order-section-body {
    display: grid;
    gap: 1rem;
    padding: 1.05rem 1.15rem 1.2rem;
}

.travel-order-autosave-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-radius: var(--radius-md);
    background: rgba(217, 166, 60, 0.08);
    border: 1px solid rgba(217, 166, 60, 0.18);
    padding: 0.8rem 0.95rem;
}

.travel-order-form {
    gap: 1rem;
}

.travel-order-divider {
    height: 1px;
    background: var(--line);
    margin: 0.35rem 0;
}

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

.travel-order-check-item {
    display: grid;
    gap: 0.7rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(246, 243, 237, 0.78);
    padding: 0.9rem;
}

.travel-order-check-item strong {
    font-size: 0.96rem;
}

.travel-order-check-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.travel-order-check-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 600;
}

.travel-order-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

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

.travel-order-attachment-card {
    display: grid;
    gap: 0.9rem;
}

.travel-order-status-actions {
    display: grid;
    gap: 1rem;
}

.travel-order-status-actions form {
    display: grid;
    gap: 0.7rem;
}

.travel-order-sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 0.5rem;
    padding-top: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 45%);
}

@media (max-width: 1080px) {
    .travel-order-hero,
    .travel-order-hero-actions {
        display: grid;
        justify-content: stretch;
    }

    .travel-order-metric-grid,
    .travel-order-attachment-groups,
    .travel-order-checklist-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .travel-order-section > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .travel-order-section > summary small {
        text-align: left;
    }

    .travel-order-sticky-actions {
        position: sticky;
        bottom: -1rem;
        margin: 0 -0.15rem;
        padding: 0.85rem 0 0;
    }

.travel-order-sticky-actions .button {
        width: 100%;
    }
}

.trip-sticky-actions {
    position: sticky;
    top: 1rem;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(217, 166, 60, 0.18);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(247, 242, 234, 0.94));
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.1rem;
    backdrop-filter: blur(18px);
}

.trip-form-shell {
    padding: 0.85rem;
}

.trip-density-form {
    gap: 0.7rem;
}

.trip-density-form .trip-sticky-actions {
    min-height: 48px;
    margin-bottom: 0;
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
}

.trip-density-form .trip-sticky-actions-copy {
    gap: 0;
}

.trip-density-form .trip-sticky-actions-copy strong {
    font-size: 0.9rem;
}

.trip-density-form .form-actions {
    gap: 0.45rem;
}

.trip-input-mode-row {
    height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.3rem 0.4rem 0.3rem 0.65rem;
}

.trip-inline-label {
    flex: 0 0 auto;
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trip-segmented-control {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border-radius: 9px;
    background: rgba(31, 28, 24, 0.055);
    padding: 0.2rem;
}

.trip-segment-option {
    position: relative;
    cursor: pointer;
}

.trip-segment-option input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.trip-segment-option span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 750;
    padding: 0.35rem 0.7rem;
}

.trip-segment-option input:checked + span {
    border-color: rgba(217, 166, 60, 0.35);
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 5px rgba(31, 28, 24, 0.09);
}

.trip-segment-option input:focus-visible + span {
    outline: 3px solid rgba(217, 166, 60, 0.2);
    outline-offset: 1px;
}

.trip-sticky-actions-copy {
    display: grid;
    gap: 0.3rem;
}

.trip-sticky-actions-copy span {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.trip-primary-slab,
.trip-secondary-slab {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.trip-primary-slab {
    background: rgba(255, 255, 255, 0.78);
    padding: 0.75rem 0.8rem;
}

.trip-secondary-slab {
    background: rgba(250, 246, 239, 0.9);
    padding: 0.7rem 0.75rem;
}

.trip-density-form .trip-primary-slab,
.trip-density-form .trip-secondary-slab {
    gap: 0.65rem;
    border-radius: 12px;
    box-shadow: none;
}

.trip-density-form .card-head {
    margin-bottom: 0.15rem;
}

.trip-density-form .card-head h3 {
    font-size: 1.02rem;
}

.trip-density-form .form-grid {
    gap: 0.7rem;
}

.trip-density-form .field {
    gap: 0.32rem;
}

.trip-density-form .field label {
    font-size: 0.86rem;
}

.trip-density-form .trip-inline-status {
    min-height: 46px;
}

.trip-density-form .trip-route-box-compact {
    gap: 0.45rem;
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
}

.trip-series-compact {
    margin-top: 0;
}

.trip-density-form [data-series-panel][hidden] {
    display: none !important;
}

.trip-weekday-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.trip-weekday-chip {
    position: relative;
    cursor: pointer;
}

.trip-weekday-chip input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.trip-weekday-chip span {
    min-width: 52px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 28, 24, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 0.3rem 0.55rem;
}

.trip-weekday-chip input:checked + span {
    border-color: rgba(217, 166, 60, 0.55);
    background: rgba(217, 166, 60, 0.16);
    color: #684b13;
}

.trip-weekday-chip input:checked + span::before {
    content: '\2713';
    margin-right: 0.32rem;
}

.trip-weekday-chip input:focus-visible + span {
    outline: 3px solid rgba(217, 166, 60, 0.2);
    outline-offset: 1px;
}

.trip-weekday-actions {
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.trip-excluded-dates {
    max-width: 680px;
}

.trip-primary-grid {
    align-items: start;
}

.trip-inline-status {
    min-height: 54px;
    align-items: center;
}

.trip-form-disclosure {
    margin-top: 0.55rem;
    border: 1px solid rgba(31, 28, 24, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.68);
    padding: 0.65rem 0.75rem;
}

@media (max-width: 680px) {
    .trip-form-shell {
        padding: 0.55rem;
    }

    .trip-sticky-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .trip-input-mode-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .trip-segmented-control {
        width: 100%;
    }

    .trip-segment-option {
        flex: 1 1 0;
    }

    .trip-segment-option span {
        justify-content: center;
    }
}

.trip-form-disclosure > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.trip-form-disclosure > summary::-webkit-details-marker {
    display: none;
}

.trip-form-disclosure-subtle {
    background: rgba(247, 242, 234, 0.76);
}

.trip-stop-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.trip-stop-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.8rem 0.9rem;
}

.trip-stop-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    border-radius: 999px;
    background: rgba(217, 166, 60, 0.14);
    color: #7f5a14;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.45rem 0.7rem;
}

.trip-hidden-field {
    display: none;
}

.trip-country-stack {
    display: grid;
    gap: 0.9rem;
}

.trip-country-row {
    display: grid;
    gap: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.95rem;
}

.trip-country-main {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) 120px minmax(220px, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.trip-country-kpi {
    display: grid;
    gap: 0.3rem;
    border-radius: var(--radius-md);
    background: rgba(246, 241, 232, 0.84);
    padding: 0.8rem 0.9rem;
}

.trip-country-kpi span,
.trip-country-summary-card span,
.trip-doc-card-label {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trip-country-kpi strong,
.trip-country-summary-card strong,
.trip-doc-card strong {
    font-size: 1rem;
    line-height: 1.3;
}

.trip-country-kpi small {
    color: var(--text-soft);
    line-height: 1.5;
}

.trip-country-kpi-wide {
    min-width: 0;
}

.trip-country-row-actions {
    display: flex;
    justify-content: flex-end;
}

.trip-country-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.trip-country-summary-card,
.trip-doc-card {
    display: grid;
    gap: 0.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.05rem;
}

.trip-doc-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    margin: 1rem 0 1.1rem;
}

.trip-doc-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.55;
}

.trip-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1.15rem;
}

.trip-tab-button {
    border: 1px solid rgba(31, 28, 24, 0.1);
    background: rgba(255, 255, 255, 0.68);
    color: var(--text-soft);
    padding: 0.75rem 1rem;
    box-shadow: none;
}

.trip-tab-button-active {
    background: linear-gradient(135deg, rgba(217, 166, 60, 0.18), rgba(255, 255, 255, 0.92));
    border-color: rgba(217, 166, 60, 0.28);
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.trip-detail-stats .stat-card {
    padding: 1rem 1.05rem;
    border-radius: var(--radius-lg);
}

.trip-detail-stats .stat-label {
    font-size: 1.18rem;
}

.trip-checklist-disclosure {
    display: grid;
    gap: 0.9rem;
}

.trip-checklist-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
}

.trip-checklist-disclosure > summary::-webkit-details-marker {
    display: none;
}

.trip-checklist-disclosure > summary span {
    display: grid;
    gap: 0.2rem;
}

.trip-checklist-disclosure > summary small {
    color: var(--text-soft);
}

.trip-checklist-disclosure-body {
    display: grid;
    gap: 1rem;
}

@media (max-width: 1080px) {
    .trip-sticky-actions,
    .trip-country-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .trip-sticky-actions {
        position: sticky;
        top: 0.5rem;
        align-items: stretch;
    }

    .trip-country-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .trip-sticky-actions,
    .trip-stop-row,
    .trip-checklist-disclosure > summary {
        grid-template-columns: minmax(0, 1fr);
        flex-direction: column;
        align-items: stretch;
    }

    .trip-stop-row {
        display: grid;
    }

    .trip-country-summary,
    .trip-doc-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .trip-sticky-actions .form-actions,
    .trip-doc-card .table-actions {
        display: grid;
    }

    .trip-sticky-actions .button,
    .trip-doc-card .button,
    .trip-country-row-actions .button,
    .trip-tab-button {
        width: 100%;
    }
}
