:root {
  --fleet-navy: #132b3a;
  --fleet-teal: #087e8b;
  --fleet-border: #e1e7ed;
  --fleet-muted: #627183;
  --fleet-sidebar-width: 264px;
  --bs-body-font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-body-color: #253649;
  --bs-body-bg: #f5f7fa;
  --bs-primary: #087e8b;
  --bs-primary-rgb: 8, 126, 139;
  --bs-link-color: #076b78;
  --bs-link-color-rgb: 7, 107, 120;
  --bs-link-hover-color: #04515c;
  --bs-border-color: #e1e7ed;
}

body { font-size: .9rem; -webkit-font-smoothing: antialiased; }
[x-cloak] { display: none !important; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.workspace-header {
  min-height: 88px; padding: 20px 36px; background: #fff;
  border-bottom: 1px solid var(--fleet-border);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.workspace-eyebrow { display: block; color: var(--fleet-muted); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 4px; }
.workspace-user { display: flex; align-items: center; gap: 9px; color: var(--fleet-muted); font-size: .8rem; }
.workspace-user i { font-size: 1.25rem; }
.workspace-content { flex: 1; padding: 32px 24px; }
.workspace-content > .container { max-width: 1400px; }
.workspace-footer { padding: 18px 36px; color: var(--fleet-muted); font-size: .73rem; border-top: 1px solid var(--fleet-border); }
.workspace-footer span { padding: 0 8px; }

.app-sidebar { background: var(--fleet-navy); color: #fff; width: var(--fleet-sidebar-width); }
aside.app-sidebar { position: fixed; inset: 0 auto 0 0; height: 100dvh; z-index: 1030; padding: 28px 18px 18px; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; color: #fff; text-decoration: none; font-size: 1rem; font-weight: 700; }
.sidebar-brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; background: #ffffff0e; border: 1px solid #ffffff20; border-radius: 12px; }
.sidebar-brand small, .brand-mobile-subtitle { display: block; font-size: .7rem; font-weight: 400; color: #b7c7d1; margin-top: 4px; }
.sidebar-navigation { flex: 1; overflow-y: auto; padding-bottom: 24px; }
.sidebar-section-label { margin: 25px 14px 10px; color: #9bb1c0; font-size: .64rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-section-label:first-child { margin-top: 10px; }
.app-sidebar .nav-link { color: #c7d4dd; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; font-size: .83rem; font-weight: 500; }
.app-sidebar .nav-link i { font-size: 1.08rem; }
.app-sidebar .nav-link:hover { background: #ffffff0c; color: #fff; }
.app-sidebar .nav-link.active { background: #1e4657; color: #fff; box-shadow: inset 3px 0 #52d2c5; }
.sidebar-account { margin-top: auto; padding-top: 18px; border-top: 1px solid #ffffff18; }
.account-toggle { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; color: #fff; padding: 6px; text-align: left; border-radius: 8px; }
.account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: #285062; font-weight: 600; }
.account-details { flex: 1; min-width: 0; }
.account-details strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 500; }
.account-details small { display: block; color: #b7c7d1; font-size: .68rem; margin-top: 3px; }
.mobile-topbar { background: var(--fleet-navy); }
.mobile-topbar .navbar-brand { font-size: .95rem; }
.app-sidebar .offcanvas-body { padding: 0 18px 18px; }

h1, h2, h3, h4, h5, h6 { color: #182f42; letter-spacing: -.035em; font-weight: 700; }
h1 { font-size: clamp(1.65rem, 2.4vw, 2.1rem); }
h2 { font-size: 1.5rem; }
.text-muted { color: var(--fleet-muted) !important; }
.btn { font-size: .82rem; font-weight: 600; padding: .62rem 1rem; border-radius: 8px; }
.btn-primary, .btn-dark {
  --bs-btn-bg: #087e8b; --bs-btn-border-color: #087e8b;
  --bs-btn-hover-bg: #066874; --bs-btn-hover-border-color: #066874;
  --bs-btn-active-bg: #055763; --bs-btn-active-border-color: #055763;
  --bs-btn-disabled-bg: #087e8b; --bs-btn-disabled-border-color: #087e8b;
  --bs-btn-focus-shadow-rgb: 8, 126, 139;
}
.btn-secondary { --bs-btn-bg: #fff; --bs-btn-color: #34475a; --bs-btn-border-color: #ced8e1; --bs-btn-hover-bg: #eaf0f5; --bs-btn-hover-color: #182f42; --bs-btn-hover-border-color: #b8c7d3; }
.card { --bs-card-bg: #fff; --bs-card-border-color: var(--fleet-border); --bs-card-border-radius: 12px; box-shadow: 0 3px 12px #132b3a04; }
.card-header { background: #fff; border-bottom-color: var(--fleet-border); padding: 16px 20px; }
.card-body { padding: 24px; }
.table-responsive { background: #fff; border: 1px solid var(--fleet-border); border-radius: 12px; margin-top: 24px; box-shadow: 0 3px 12px #132b3a03; }
.table { --bs-table-bg: #fff; --bs-table-color: #34475a; --bs-table-border-color: #edf0f4; --bs-table-striped-bg: #fafbfd; --bs-table-hover-bg: #f0f7f8; margin-bottom: 0; font-size: .84rem; }
.table > :not(caption) > * > * { padding: 16px 20px; }
.table thead { --bs-table-bg: #f8fafc; --bs-table-color: #617185; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.table thead th { font-weight: 600; white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.form-label, label { font-size: .82rem; font-weight: 500; }
.form-control, .form-select { background-color: #fff; border-color: #ced8e1; border-radius: 8px; padding: .65rem .85rem; font-size: .88rem; }
.form-control:focus, .form-select:focus { border-color: #087e8b; box-shadow: 0 0 0 3px #087e8b20; }
.form-text { color: var(--fleet-muted); font-size: .75rem; }
form select { display: block; width: 100%; min-height: 43px; max-width: 100%; }
.choice-search { width: 100%; min-width: 0; }
.choice-search-input { width: 100%; margin-bottom: .5rem; }
.choice-search-status { display: block; }
.dropdown-menu { font-size: .83rem; border-color: var(--fleet-border); border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px #132b3a18; }
.dropdown-item { padding: 9px 12px; border-radius: 6px; }
.dropdown-item:active { background: var(--fleet-teal); }
.alert { border-radius: 10px; font-size: .85rem; }
.badge { font-weight: 500; padding: .45em .65em; }
:focus-visible { outline: 3px solid #169eaa; outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 1100; background: #fff; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
#signature-pad { touch-action: none; cursor: crosshair; background: #fff; }

@media (min-width: 992px) {
  .app-authenticated .app-main { margin-left: var(--fleet-sidebar-width); }
  .workspace-content > .container.p-lg-5 { padding: 16px 12px !important; }
}
@media (max-width: 991.98px) {
  .workspace-header { min-height: 76px; padding: 16px 24px; }
  .workspace-content { padding: 24px 12px; }
  .workspace-footer { padding: 16px 24px; }
}
@media (max-width: 575.98px) {
  .workspace-header { padding: 16px 20px; }
  .workspace-header .workspace-user { display: none; }
  .workspace-content { padding: 24px 8px; }
  .table > :not(caption) > * > * { padding: 13px 14px; }
}
@media print {
  .app-sidebar, .mobile-topbar, .workspace-header, .workspace-footer, .skip-link { display: none !important; }
  .app-authenticated .app-main { margin-left: 0; }
  .workspace-content { padding: 0; }
}

.auth-container { max-width: 1000px !important; padding-top: 32px; padding-bottom: 32px; }
.auth-card { background: #fff; border: 1px solid var(--fleet-border); border-radius: 18px; overflow: hidden; box-shadow: 0 16px 48px #132b3a08; }
.auth-form { padding: 48px; }
.auth-intro { display: flex; flex-direction: column; justify-content: center; padding: 48px; background: var(--fleet-navy); color: #c7d4dd; }
.auth-intro h2 { color: #fff; font-size: 1.8rem; line-height: 1.35; margin: 12px 0 20px; }
.auth-intro p { line-height: 1.8; margin-bottom: 0; }
.auth-intro .workspace-eyebrow { color: #a8c5d2; font-size: .65rem; }
.auth-intro-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 32px; border: 1px solid #ffffff25; border-radius: 16px; color: #81e0d4; font-size: 1.8rem; }
@media (max-width: 991.98px) {
  .auth-container { max-width: 560px !important; padding-top: 8px; }
  .auth-form { padding: 32px 24px; }
  .auth-intro { padding: 32px 24px; }
  .auth-intro-icon { display: none; }
  .auth-intro h2 { font-size: 1.4rem; }
}

/* Vehicle workspace and history forms */
.vehicle-workspace { max-width: 1400px; }
.detail-back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 24px; font-size: .78rem; color: var(--fleet-muted); text-decoration: none; }
.vehicle-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.vehicle-emblem { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 16px; background: #e3f1f1; color: var(--fleet-teal); font-size: 1.9rem; border: 1px solid #cce4e5; }
.fleet-stat { display: flex; flex-direction: column; height: 100%; padding: 20px; border: 1px solid var(--fleet-border); border-radius: 12px; background: #fff; }
.stat-label { display: flex; gap: 8px; align-items: center; font-size: .72rem; color: var(--fleet-muted); font-weight: 500; }
.fleet-stat > strong { display: block; margin: 16px 0 8px; font-size: clamp(1.2rem, 1.6vw, 1.65rem); color: var(--fleet-navy); letter-spacing: -.04em; overflow-wrap: anywhere; }
.fleet-stat > strong small { font-size: .65rem; color: var(--fleet-muted); letter-spacing: 0; }
.fleet-stat .stat-date { font-size: 1.18rem; }
.stat-caption { font-size: .68rem; color: var(--fleet-muted); }
.vehicle-section-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--fleet-border); }
.vehicle-section-nav a { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; text-decoration: none; }
.vehicle-section-nav span { background: #e7edf2; border-radius: 5px; padding: 2px 6px; color: #536476; font-size: .68rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.section-heading h2 { font-size: 1.15rem; margin-bottom: 0; }
.detail-chip { padding: 6px 10px; border-radius: 6px; background: #eff4f8; font-size: .65rem; font-weight: 600; color: #536476; }
.vehicle-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; }
.vehicle-facts dt { font-size: .69rem; color: var(--fleet-muted); font-weight: 500; margin-bottom: 6px; }
.vehicle-facts dd { font-size: .82rem; font-weight: 600; margin-bottom: 0; overflow-wrap: anywhere; }
.vehicle-note { border-top: 1px solid var(--fleet-border); margin-top: 24px; padding-top: 20px; font-size: .8rem; line-height: 1.8; }
.next-service-card { background: #f0f7f7; border-color: #d6e6e7; }
.next-service-card h2 { font-size: 1.15rem; }
.next-service-date { font-size: 1.65rem; color: var(--fleet-navy); font-weight: 600; letter-spacing: -.04em; margin: 16px 0; }
.service-state { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 600; border-radius: 5px; background: #d9eeea; color: #19614e; padding: 6px 9px; }
.service-overdue { background: #fce8df; color: #a74420; }
#vehicle-details, .history-section, #record-editor { scroll-margin-top: 100px; }
.record-subline { display: block; margin-top: 5px; font-size: .71rem; color: var(--fleet-muted); line-height: 1.6; font-weight: 400; }
.latest-label { display: block; margin-top: 6px; color: var(--fleet-teal); font-size: .63rem; font-weight: 600; }
.record-notes { min-width: 190px; max-width: 420px; overflow-wrap: anywhere; }
.history-empty { text-align: center; padding: 40px 20px 16px; color: var(--fleet-muted); }
.history-empty > i { display: block; font-size: 1.7rem; color: #8ca5b4; margin-bottom: 16px; }
.history-empty h3 { font-size: 1rem; }
.history-empty p { font-size: .8rem; }
.service-entry { border-top: 1px solid var(--fleet-border); padding: 24px 0; }
.service-entry:last-child { padding-bottom: 0; }
.service-entry-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.service-entry-heading h3 { font-size: .93rem; margin-bottom: 6px; }
.service-entry-icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; background: #f0f5f8; color: #5b7688; }
.service-entry-cost { font-size: .9rem; color: var(--fleet-navy); }
.service-entry-cost small { color: var(--fleet-muted); font-size: .62rem; }
.service-entry-notes { margin: 20px 0 16px; font-size: .81rem; line-height: 1.8; }
.service-entry-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .71rem; color: var(--fleet-muted); }
.service-entry-meta i { margin-right: 4px; }
.service-items-toggle { margin-top: 18px; color: var(--fleet-teal); border: 0; background: none; padding: 0; font-size: .75rem; font-weight: 600; }
.service-items { list-style: none; margin: 16px 0 0; padding: 0; }
.service-items li { display: flex; justify-content: space-between; gap: 16px; background: #f8fafc; padding: 12px; margin-top: 4px; border-radius: 6px; font-size: .75rem; }
.record-form-card { border-color: #bedadb; box-shadow: 0 6px 24px #087e8b0a; }
.record-form-card .mb-3 { margin-bottom: 0 !important; }
.saving-label { display: none; }
.htmx-request .save-label { display: none; }
.htmx-request .saving-label { display: inline; }
@media (max-width: 767.98px) {
  .vehicle-heading { flex-direction: column; align-items: flex-start; }
  .vehicle-emblem { width: 52px; height: 52px; font-size: 1.5rem; }
  .vehicle-heading h1 { font-size: 1.65rem; }
  .vehicle-facts { gap: 20px 16px; }
}

/* Fleet directories and staff profiles */
.directory-workspace { max-width: 1400px; }
.directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.directory-heading h1 { margin: 6px 0 8px; }
.directory-heading p { margin: 0; color: var(--fleet-muted); font-size: .81rem; line-height: 1.7; }
.directory-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.directory-stats > div { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; background: #fff; border: 1px solid var(--fleet-border); border-radius: 12px; }
.directory-stats span { color: var(--fleet-muted); font-size: .74rem; font-weight: 500; }
.directory-stats i { margin-right: 8px; color: var(--fleet-teal); }
.directory-stats strong { color: var(--fleet-navy); font-size: 1.9rem; line-height: 1; letter-spacing: -.04em; }
.directory-card { overflow: hidden; }
.directory-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 22px 24px; }
.directory-toolbar h2 { font-size: 1.05rem; margin-bottom: 0; }
.directory-search { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.directory-search > i { position: absolute; left: 13px; color: var(--fleet-muted); }
.directory-search .form-control { padding-left: 36px; min-width: 0; }
.directory-toolbar .directory-search { max-width: 480px; flex: 1; }
.directory-filters { display: flex; gap: 12px; flex-wrap: wrap; padding: 0 24px 24px; }
.directory-filters .directory-search { flex: 1 1 230px; }
.directory-filters .form-select { width: auto; flex: 0 1 180px; }
.directory-table { margin-top: 0; border: 0; border-top: 1px solid var(--fleet-border); border-radius: 0; box-shadow: none; }
.directory-table .table { font-size: .78rem; }
.directory-table .table > :not(caption) > * > * { padding: 18px 24px; }
.directory-table td > strong { font-size: .8rem; font-weight: 500; }
.directory-identity { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fleet-navy); min-width: 170px; }
.directory-identity strong { font-size: .8rem; font-weight: 600; }
.directory-identity small { display: block; color: var(--fleet-muted); font-size: .68rem; margin-top: 4px; }
.directory-icon, .person-avatar { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; color: var(--fleet-teal); background: #edf6f6; font-size: 1.1rem; }
.person-avatar { color: #38566f; background: #eaf0f7; font-size: .73rem; font-weight: 700; }
.directory-open { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.status-chip { display: inline-flex; border-radius: 5px; color: #22634f; background: #e3f2eb; padding: 5px 8px; font-size: .64rem; font-weight: 600; white-space: nowrap; }
.status-neutral { color: #627183; background: #edf1f5; }
.status-warning { color: #a74420; background: #fce8df; }
.group-chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 140px; }
.directory-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 24px; border-top: 1px solid var(--fleet-border); font-size: .7rem; color: var(--fleet-muted); }
.profile-heading { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile-avatar { width: 68px; height: 68px; border-radius: 18px; font-size: 1.25rem; }
.profile-heading h1 { overflow-wrap: anywhere; }
.profile-facts { margin: 0; }
.profile-facts > div { margin-top: 22px; }
.profile-facts > div:first-child { margin-top: 0; }
.profile-facts dt { color: var(--fleet-muted); font-size: .7rem; font-weight: 500; margin-bottom: 6px; }
.profile-facts dd { color: var(--fleet-navy); font-size: .83rem; font-weight: 500; overflow-wrap: anywhere; margin: 0; }
.access-group { display: flex; align-items: center; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--fleet-border); }
.access-group strong { font-size: .83rem; }
.access-group p { color: var(--fleet-muted); font-size: .72rem; margin: 4px 0 0; }
.access-explanation { color: var(--fleet-muted); font-size: .73rem; line-height: 1.8; }
.permission-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.permission-list code { padding: 5px 8px; background: #f3f6f9; border-radius: 5px; font-size: .68rem; color: #536b80; overflow-wrap: anywhere; }
.account-form-card { max-width: 800px; }
.account-form-card .card-body { padding: 32px; }
@media (max-width: 767.98px) {
  .directory-heading { flex-direction: column; align-items: flex-start; }
  .directory-stats { gap: 8px; }
  .directory-stats > div { padding: 16px 12px; gap: 12px; }
  .directory-stats span { font-size: .62rem; }
  .directory-stats i { display: none; }
  .directory-stats strong { font-size: 1.5rem; }
  .directory-toolbar { padding: 20px 16px; }
  .directory-toolbar .directory-search { flex-basis: 100%; max-width: none; }
  .directory-table .table > :not(caption) > * > * { padding: 16px; }
  .directory-filters { padding: 0 16px 20px; gap: 8px; }
  .directory-filters .form-select { flex: 1 1 120px; }
  .directory-pagination { padding: 16px; }
  .account-form-card .card-body { padding: 24px; }
}
.card-header.bg-dark :is(h1, h2, h3, h4, h5, h6) { color: inherit; }

/* Permission-based dashboards and personal notifications */
.workspace-header-actions { display: flex; align-items: center; gap: 24px; }
.notification-bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; color: #536476; border: 1px solid var(--fleet-border); border-radius: 10px; text-decoration: none; font-size: 1.05rem; }
.notification-count { position: absolute; top: -6px; right: -7px; min-width: 18px; padding: 2px 4px; background: var(--fleet-teal); color: #fff; border-radius: 20px; font-size: .6rem; font-weight: 700; text-align: center; }
.dashboard-welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 8px 0 28px; }
.dashboard-welcome h1 { margin: 8px 0 12px; }
.dashboard-welcome p { color: var(--fleet-muted); font-size: .83rem; margin: 0; }
.dashboard-date { display: flex; align-items: center; gap: 12px; color: var(--fleet-muted); font-size: .75rem; }
.dashboard-date > i { font-size: 1.3rem; }
.dashboard-date strong { display: block; color: var(--fleet-navy); margin-top: 5px; font-size: .83rem; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.dashboard-metric { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 22px; background: #fff; border: 1px solid var(--fleet-border); border-radius: 12px; color: var(--fleet-muted); font-size: .73rem; text-decoration: none; }
.dashboard-metric-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #eaf4f4; color: var(--fleet-teal); font-size: 1rem; margin-bottom: 18px; }
.dashboard-metric > strong { font-size: 2rem; color: var(--fleet-navy); margin-top: 9px; letter-spacing: -.05em; line-height: 1.2; }
.metric-arrow { position: absolute; top: 24px; right: 22px; color: #96a7b5; }
.dashboard-actions { margin-bottom: 28px; }
.dashboard-actions h2 { font-size: .7rem; color: var(--fleet-muted); text-transform: uppercase; letter-spacing: .09em; margin-bottom: 12px; }
.dashboard-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-vehicles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 24px 24px; }
.dashboard-vehicles > a { border: 1px solid var(--fleet-border); border-radius: 10px; padding: 18px; text-decoration: none; color: var(--fleet-navy); }
.dashboard-vehicles .vehicle-emblem { width: 44px; height: 44px; font-size: 1.3rem; margin-bottom: 16px; }
.dashboard-vehicles strong { display: block; font-size: .88rem; }
.dashboard-vehicles a > span:last-child { display: block; color: var(--fleet-muted); font-size: .7rem; margin-top: 6px; }
.dashboard-maintenance { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-top: 1px solid var(--fleet-border); color: var(--fleet-navy); text-decoration: none; font-size: .77rem; }
.dashboard-maintenance small { display: block; color: var(--fleet-muted); margin-top: 5px; font-size: .67rem; }
.dashboard-storages > a { text-decoration: none; color: var(--fleet-navy); font-size: .73rem; }
.dashboard-storages > a:hover strong { color: var(--fleet-teal); text-decoration: underline; }
.dashboard-storages small { color: var(--fleet-muted); display: block; margin-top: 8px; font-size: .63rem; }
.dashboard-activity-entry { display: flex; gap: 12px; padding: 20px; border-top: 1px solid var(--fleet-border); }
.dashboard-activity-entry strong, .dashboard-activity-entry strong a { color: var(--fleet-navy); text-decoration: none; font-size: .76rem; font-weight: 600; line-height: 1.7; }
.dashboard-activity-entry p { font-size: .7rem; color: var(--fleet-muted); line-height: 1.7; margin: 6px 0; }
.dashboard-activity-entry time { color: #8392a2; font-size: .62rem; }
.dashboard-help { display: flex; gap: 12px; padding: 24px 12px; color: var(--fleet-muted); }
.dashboard-help i { color: var(--fleet-teal); font-size: 1.2rem; }
.dashboard-help p { font-size: .71rem; line-height: 1.8; margin: 0; }
.notification-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.notification-toolbar a[aria-current=page] { color: var(--fleet-navy); }
.notification-entry { display: flex; align-items: flex-start; gap: 16px; padding: 24px; border-bottom: 1px solid var(--fleet-border); }
.notification-entry:last-of-type { border-bottom: 0; }
.notification-unread { background: #f4fafa; box-shadow: inset 3px 0 var(--fleet-teal); }
.notification-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: #edf2f8; color: #486c8a; font-size: 1rem; }
.notification-warning { background: #fff0dc; color: #956323; }
.notification-success { background: #e2f3ec; color: #2a7257; }
.notification-body { flex: 1; min-width: 0; }
.notification-body h2 { font-size: .85rem; margin-bottom: 8px; line-height: 1.6; }
.notification-body p { font-size: .78rem; color: var(--fleet-muted); line-height: 1.8; margin-bottom: 10px; }
.notification-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .67rem; color: var(--fleet-muted); }
.notification-meta a { text-decoration: none; font-weight: 600; }
@media (max-width: 767.98px) {
  .workspace-header-actions { gap: 12px; }
  .dashboard-welcome { flex-direction: column; align-items: flex-start; }
  .dashboard-date { font-size: .68rem; }
  .dashboard-date strong { display: inline; margin-left: 8px; font-size: .72rem; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dashboard-metric { padding: 16px; font-size: .68rem; }
  .dashboard-vehicles { padding: 0 16px 16px; }
  .dashboard-maintenance { padding: 16px; }
  .notification-entry { padding: 20px 16px; gap: 12px; }
}

/* Transient status messages; validation errors remain in their forms. */
.flash-stack { position: fixed; top: 104px; right: 28px; z-index: 1060; display: flex; flex-direction: column; gap: 12px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.flash-message { --flash-accent: #486c8a; --flash-tint: #edf2f8; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 18px 48px 18px 18px; background: #fff; color: var(--fleet-navy); border: 1px solid var(--fleet-border); border-left: 3px solid var(--flash-accent); border-radius: 12px; box-shadow: 0 10px 36px #132b3a1a; pointer-events: auto; }
.flash-success { --flash-accent: #23775b; --flash-tint: #e5f4ed; }
.flash-warning { --flash-accent: #986014; --flash-tint: #fff2dc; }
.flash-error { --flash-accent: #ae3d3d; --flash-tint: #fceaea; }
.flash-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--flash-tint); color: var(--flash-accent); font-size: 1.05rem; }
.flash-content { min-width: 0; }
.flash-content strong { display: block; font-size: .78rem; font-weight: 600; margin: 1px 0 5px; }
.flash-content p { margin: 0; color: var(--fleet-muted); font-size: .75rem; line-height: 1.7; overflow-wrap: anywhere; }
.flash-message .btn-close { top: 14px; right: 10px; padding: 10px; font-size: .65rem; }
@media (max-width: 991.98px) { .flash-stack { top: 152px; right: 16px; } }
@media (prefers-reduced-motion: reduce) { .flash-message.fade { transition: none; } }
@media print { .flash-stack { display: none; } }

/* All-time fuel leaderboards */
.fuel-insights-description { margin: -8px 0 20px; color: var(--fleet-muted); font-size: .73rem; line-height: 1.7; }
.fuel-rankings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fuel-ranking { min-width: 0; }
.fuel-ranking-heading { display: flex; align-items: center; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--fleet-border); }
.fuel-ranking-heading h3 { font-size: .9rem; margin: 0 0 6px; line-height: 1.5; }
.fuel-ranking-heading p { margin: 0; color: var(--fleet-muted); font-size: .67rem; }
.vertical-chart-scroll { overflow-x: auto; padding: 48px 24px 24px; border-radius: 0 0 16px 16px; }
.vertical-chart-scroll:focus-visible { outline: 2px solid var(--fleet-teal); outline-offset: -3px; }
.vertical-chart { display: flex; gap: 16px; min-width: 420px; margin: 0; padding: 0; list-style: none; }
.vertical-chart-column { flex: 1 0 68px; min-width: 0; text-align: center; }
.vertical-chart-plot { height: 190px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 14px; border-bottom: 1px solid #cddae2; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #edf1f4 calc(25% - 1px), #edf1f4 25%); }
.vertical-chart-bar { position: relative; width: 54%; max-width: 62px; border-radius: 6px 6px 0 0; background: #4d9b9f; }
.fuel-ranking-list > li:first-child .vertical-chart-bar, .dashboard-storages .vertical-chart-bar { background: var(--fleet-teal); }
.vertical-chart-column:hover .vertical-chart-bar { background: #096a76; }
.fuel-rank-value { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); color: var(--fleet-navy); font-size: .73rem; font-weight: 700; white-space: nowrap; }
.fuel-rank-value small { display: block; margin: 0; color: var(--fleet-muted); font-size: .59rem; font-weight: 500; }
.fuel-rank-position { display: block; color: #8b9dac; font-size: .62rem; font-weight: 600; margin-bottom: 5px; }
.fuel-ranking-list > li:first-child .fuel-rank-position { color: var(--fleet-teal); }
.fuel-rank-identity a, .fuel-rank-identity strong { color: var(--fleet-navy); font-size: .7rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.fuel-rank-identity a:hover { color: var(--fleet-teal); text-decoration: underline; }
.fuel-rank-identity > span:not(.fuel-rank-position) { display: block; color: var(--fleet-muted); font-size: .6rem; margin-top: 5px; overflow-wrap: anywhere; }
.fuel-rank-caption { display: block; color: var(--fleet-muted); font-size: .59rem; margin-top: 8px; }
.fuel-ranking-list:has(.fuel-rank-empty) { min-width: 0; }
.fuel-rank-empty { width: 100%; text-align: center; padding: 32px 0; color: var(--fleet-muted); }
.fuel-rank-empty i { display: block; color: #91a5b5; font-size: 1.5rem; margin-bottom: 12px; }
.fuel-rank-empty p { font-size: .74rem; margin: 0; }
@media (max-width: 767.98px) {
  .fuel-rankings-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fuel-ranking-heading { padding: 20px 16px; }
  .vertical-chart-scroll { padding-right: 16px; padding-left: 16px; }
}

/* The workspace keeps its navigation while record screens share one dialog. */
.workspace-modal .modal-body { padding: 24px; }
.workspace-modal .modal-body > .container { max-width: none; padding: 0; margin-top: 0 !important; margin-bottom: 0 !important; }
.workspace-modal .modal-body .directory-heading,
.workspace-modal .modal-body .vehicle-heading { margin-top: 0; }
.workspace-modal .modal-body .account-form-card { max-width: none; }
.workspace-modal .modal-body .modal-body { padding: 0; }
.workspace-modal .modal-body .modal-footer { margin: 24px -24px -24px; }
.workspace-modal[aria-busy="true"] .modal-header::after { content: ''; width: 16px; height: 16px; margin-left: 12px; border: 2px solid var(--fleet-border); border-top-color: var(--fleet-primary, #132b3a); border-radius: 50%; animation: workspace-loading .7s linear infinite; }
@keyframes workspace-loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .workspace-modal[aria-busy="true"] .modal-header::after { animation: none; } }
@media (max-width: 767.98px) { .workspace-modal .modal-body { padding: 16px; } .workspace-modal .modal-body .modal-footer { margin: 16px -16px -16px; } }
.table-sort-link { display: inline-flex; align-items: center; gap: 8px; padding-block: 4px; }
.table-sort-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.workspace-footer a { color: var(--fleet-navy); font-weight: 600; }
