:root {
  --brand: #1261a6;
  --brand-dark: #0b3d76;
  --ink: #18212b;
  --muted: #66717f;
  --line: #d8dee7;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #edf1f5;
  --brand-soft: #e7f1fb;
  --teal-soft: #e4f4f2;
  --amber-soft: #fff2dc;
  --danger-soft: #fae8e8;
  --teal: #0f766e;
  --amber: #a65f0b;
  --green: #287044;
  --danger: #b91c1c;
  --sidebar: #17212b;
  --sidebar-soft: #202c38;
  --shadow: 0 18px 44px rgba(24, 33, 43, 0.08);
  --shadow-soft: 0 8px 22px rgba(24, 33, 43, 0.06);
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbfcfd 0, rgba(251, 252, 253, 0) 240px),
    var(--paper);
  font-size: 14px;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 264px minmax(0, 1fr);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
}

.auth-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-brand {
  padding: 0;
}

.auth-copy {
  margin: 28px 0 18px;
}

.auth-copy h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.auth-copy p:last-child,
.auth-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form .primary-button {
  width: 100%;
}

.auth-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--sidebar);
  padding: 22px 16px;
  box-shadow: 10px 0 28px rgba(24, 33, 43, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius);
}

.brand-mark {
  display: block;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 9px 16px rgba(0, 0, 0, 0.18));
}

.auth-brand .brand-mark {
  width: 58px;
  height: 56px;
}

.auth-brand .brand-title {
  color: var(--ink);
}

.auth-brand .brand-subtitle {
  color: var(--muted);
}

.brand-title {
  margin: 0;
  color: #fff;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.05;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: #aeb8c3;
  font-size: 13px;
}

.nav-list,
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-button,
.mobile-nav button,
.icon-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: var(--radius);
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: transparent;
  color: #c5ced8;
  text-align: left;
  font-weight: 720;
}

.nav-button svg,
.mobile-nav svg,
.icon-button svg,
.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.danger-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 2.1;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 3px 0 0 #45b7c4;
}

.sidebar-footer {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--sidebar-soft);
}

.sidebar-footer p {
  margin: 0;
  color: #b9c3ce;
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-footer .version-line {
  margin-top: 8px;
  color: #d4eef0;
  font-size: 12px;
  font-weight: 700;
}

.main {
  min-width: 0;
  padding: 22px clamp(18px, 3vw, 36px) 42px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  backdrop-filter: blur(16px);
}

.page-kicker {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.sync-pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.sync-pill.ok {
  border-color: rgba(44, 122, 63, 0.2);
  background: #e7f4eb;
  color: var(--green);
}

.sync-pill.pending {
  border-color: rgba(181, 106, 18, 0.22);
  background: var(--amber-soft);
  color: var(--amber);
}

.sync-pill.warn {
  border-color: rgba(185, 28, 28, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
}

.search-field {
  position: relative;
  min-width: 240px;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  padding: 0 12px 0 40px;
  color: var(--ink);
  outline: none;
}

.search-field input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(15, 70, 160, 0.72);
  box-shadow: 0 0 0 3px rgba(15, 70, 160, 0.13);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
  font-weight: 750;
}

.primary-button {
  background: linear-gradient(180deg, #1672bd, var(--brand));
  color: #fff;
  box-shadow: 0 11px 22px rgba(18, 97, 166, 0.2);
}

.primary-button:hover,
.danger-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(24, 33, 43, 0.04);
}

.ghost-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.danger-button {
  background: var(--danger-soft);
  color: var(--danger);
}

.icon-button {
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.view {
  display: grid;
  gap: 22px;
}

.section-band {
  display: grid;
  gap: 16px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card,
.item-card,
.form-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 18px;
}

.kpi-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--teal));
  content: "";
}

.kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.kpi-label svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.kpi-value {
  margin: 0;
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
}

.kpi-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
}

.list-grid {
  display: grid;
  gap: 12px;
}

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

.item-card {
  display: grid;
  gap: 12px;
  padding: 17px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.item-card:hover {
  border-color: #c8d2dd;
  box-shadow: 0 18px 42px rgba(24, 33, 43, 0.11);
  transform: translateY(-1px);
}

.item-card.compact {
  gap: 8px;
  box-shadow: none;
}

.item-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-title {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.2;
}

.item-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maintenance-layout {
  display: grid;
  gap: 18px;
}

.maintenance-tracking {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  padding: 14px;
}

.maintenance-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.maintenance-list {
  display: grid;
  gap: 10px;
}

.maintenance-record {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.pill.green {
  border-color: rgba(40, 112, 68, 0.13);
  background: #e8f5ed;
  color: var(--green);
}

.pill.red {
  border-color: rgba(185, 28, 28, 0.13);
  background: var(--danger-soft);
  color: var(--danger);
}

.pill.amber {
  border-color: rgba(166, 95, 11, 0.13);
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.teal {
  border-color: rgba(15, 118, 110, 0.13);
  background: var(--teal-soft);
  color: var(--teal);
}

.pill.done {
  background: #eceae2;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--brand);
  color: #fff;
}

.planning-vehicle-select {
  min-width: min(320px, 100%);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f9fbfc;
}

tr:last-child td {
  border-bottom: 0;
}

.planning-table {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.planning-header,
.planning-row {
  display: grid;
  min-width: 940px;
  grid-template-columns: 190px repeat(7, minmax(96px, 1fr));
  gap: 8px;
}

.planning-cell,
.planning-vehicle,
.planning-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(24, 33, 43, 0.03);
}

.planning-day {
  min-height: 48px;
  padding: 9px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.planning-vehicle {
  padding: 12px;
}

.planning-cell {
  min-height: 82px;
  padding: 8px;
}

.booking-block {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 7px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  background: var(--teal-soft);
  padding: 8px;
  color: var(--ink);
  text-align: left;
}

.booking-block.active {
  background: #e7f4eb;
}

.booking-block.green {
  background: #e7f4eb;
}

.booking-block.reserved {
  background: var(--amber-soft);
}

.booking-block.amber {
  background: var(--amber-soft);
}

.booking-block.done {
  background: #eceae2;
}

.booking-block strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.booking-block span {
  color: var(--muted);
  font-size: 11px;
}

.available-cell {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: #8a867f;
  font-size: 12px;
}

.month-planning {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.month-heading,
.month-cell {
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
}

.month-heading {
  min-height: 38px;
  padding: 10px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.month-cell {
  display: grid;
  min-height: 126px;
  align-content: start;
  gap: 8px;
  padding: 9px;
}

.month-cell.outside {
  background: rgba(240, 238, 232, 0.7);
  color: var(--muted);
}

.month-date {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8eef4;
  font-size: 13px;
  font-weight: 800;
}

.month-bookings {
  display: grid;
  gap: 6px;
}

.month-booking,
.month-empty {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 7px;
  text-align: left;
}

.month-booking {
  border: 1px solid rgba(166, 95, 11, 0.1);
  background: var(--amber-soft);
  color: var(--ink);
}

.month-booking.green {
  background: #e7f4eb;
}

.month-booking.done {
  background: #eceae2;
}

.month-booking strong,
.month-booking span,
.month-empty span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-booking strong {
  font-size: 12px;
}

.month-booking span,
.month-empty span {
  color: var(--muted);
  font-size: 11px;
}

.month-empty {
  background: transparent;
  color: var(--muted);
}

.vehicle-planning-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
}

.vehicle-planning-summary h3 {
  margin: 0;
  font-size: 15px;
}

.vehicle-planning-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.vehicle-month-planning .month-empty {
  min-height: 32px;
  border: 1px dashed var(--line);
}

.form-panel {
  padding: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.compact-field {
  min-width: 180px;
}

.field.full,
.full {
  grid-column: 1 / -1;
}

.conditional-block[hidden] {
  display: none;
}

.form-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field > span,
.field label {
  color: #53606f;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  padding: 9px 11px;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.file-field input {
  padding: 8px 11px;
}

.range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 11px;
}

.range-control input {
  min-height: 24px;
  padding: 0;
  accent-color: var(--brand);
}

.range-control output {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.return-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  padding: 10px;
}

.return-summary div {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border-radius: 7px;
  background: #f1f5f8;
  padding: 8px;
}

.return-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.return-summary strong {
  font-size: 15px;
}

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

.settings-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  box-shadow: var(--shadow);
}

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

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-card-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 850;
}

.settings-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.settings-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.settings-stats div,
.data-paths p {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9fb;
  padding: 10px;
}

.settings-stats span,
.data-paths strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-stats strong {
  font-size: 18px;
}

.data-paths {
  display: grid;
  gap: 8px;
}

.data-paths p {
  margin: 0;
}

.data-paths span {
  overflow-wrap: anywhere;
  color: var(--ink);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backup-table table {
  min-width: 980px;
}

.accounting-table table {
  min-width: 1120px;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  padding: 8px 10px;
}

.attachment-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-2);
}

.attachment-file-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.attachment-file-icon svg {
  width: 19px;
  height: 19px;
}

.attachment-item.empty {
  color: var(--muted);
  background: var(--surface-2);
}

.attachment-item span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attachment-item strong,
.attachment-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-item small {
  color: var(--muted);
}

.attachment-actions,
.signature-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.signature-pad-field {
  min-width: 0;
}

.signature-canvas {
  width: 100%;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  touch-action: none;
}

.empty-state {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 24px;
  border-style: dashed;
  box-shadow: none;
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  max-width: 460px;
  margin: 0;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(24, 33, 43, 0.5);
  padding: 18px;
}

.modal {
  width: min(920px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: #f7f9fb;
  box-shadow: 0 30px 90px rgba(24, 33, 43, 0.35);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 16px;
  backdrop-filter: blur(16px);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
}

.modal-body {
  padding: 16px;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: min(380px, calc(100vw - 40px));
  border-radius: var(--radius);
  background: #111827;
  padding: 13px 15px;
  color: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  font-size: 14px;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 12px;
  }

  .brand-block {
    justify-content: center;
    padding: 0;
  }

  .brand-copy,
  .nav-button span,
  .sidebar-footer {
    display: none;
  }

  .nav-button {
    justify-content: center;
    padding: 10px;
  }

  .split-grid,
  .list-grid.two,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .app-shell {
    display: block;
    padding-bottom: 78px;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 14px 24px;
  }

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

  .topbar-actions {
    justify-content: stretch;
  }

  .search-field {
    min-width: 0;
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    flex: 1 1 auto;
  }

  .sync-pill {
    flex: 1 0 100%;
    justify-content: center;
  }

  .page-title {
    font-size: 25px;
  }

  .kpi-grid,
  .form-grid,
  .settings-stats,
  .return-summary {
    grid-template-columns: 1fr;
  }

  .attachment-item {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-actions {
    justify-content: stretch;
  }

  .attachment-actions .icon-button {
    flex: 1;
    width: auto;
  }

  table {
    min-width: 720px;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    padding: 7px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .mobile-nav button {
    display: grid;
    min-height: 50px;
    place-items: center;
    background: transparent;
    color: var(--muted);
  }

  .mobile-nav button.active {
    background: var(--ink);
    color: #fff;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

/* Premium polish layer */
:root {
  --brand: #0f5f99;
  --brand-dark: #0b3559;
  --brand-soft: #e5f2fb;
  --accent: #39aeb8;
  --accent-soft: #e3f6f7;
  --gold: #b7791f;
  --gold-soft: #fff4df;
  --ink: #17212c;
  --muted: #647182;
  --line: #dbe4ec;
  --paper: #eef3f6;
  --surface-2: #eef4f8;
  --sidebar: #101a24;
  --sidebar-soft: #1b2b37;
  --shadow: 0 22px 58px rgba(22, 33, 44, 0.1);
  --shadow-soft: 0 10px 28px rgba(22, 33, 44, 0.07);
}

html {
  background: #edf3f7;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0, rgba(238, 243, 246, 0.58) 320px, var(--paper) 100%),
    repeating-linear-gradient(90deg, rgba(15, 95, 153, 0.035) 0, rgba(15, 95, 153, 0.035) 1px, transparent 1px, transparent 92px);
  color: var(--ink);
}

::selection {
  background: rgba(57, 174, 184, 0.22);
}

.auth-screen {
  background:
    linear-gradient(135deg, rgba(15, 95, 153, 0.1), transparent 38%),
    linear-gradient(180deg, #fafdff, #edf3f7);
}

.auth-panel {
  border-color: rgba(15, 95, 153, 0.16);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 28px 80px rgba(23, 33, 44, 0.16);
}

.sidebar {
  overflow: hidden;
  border-right: 0;
  background:
    linear-gradient(180deg, #0e1720 0%, #152533 58%, #11202c 100%);
  box-shadow: 14px 0 36px rgba(16, 26, 36, 0.12);
}

.sidebar::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--gold));
  content: "";
}

.brand-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.auth-brand {
  border: 0;
  background: transparent;
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 5px;
}

.auth-brand .brand-mark {
  border-color: rgba(15, 95, 153, 0.12);
  background: #fff;
}

.brand-title {
  font-size: 20px;
}

.nav-list {
  gap: 7px;
}

.nav-button {
  position: relative;
  min-height: 46px;
  padding: 7px 10px;
  color: #cbd5df;
}

.nav-button svg {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 7px;
  color: #d9e2ea;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.nav-button.active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.nav-button.active svg {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
}

.sidebar-footer {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
}

.main {
  padding-top: 26px;
}

.topbar {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 95, 153, 0.11);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(247, 251, 253, 0.9)),
    linear-gradient(90deg, rgba(57, 174, 184, 0.08), transparent);
  box-shadow: 0 16px 40px rgba(22, 33, 44, 0.08);
}

.topbar::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  content: "";
}

.page-kicker {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(15, 95, 153, 0.12);
  border-radius: 999px;
  background: var(--brand-soft);
  padding: 0 9px;
  color: var(--brand-dark);
  letter-spacing: 0;
}

.page-title {
  margin-top: 6px;
  color: #152334;
}

.sync-pill {
  border-color: rgba(15, 95, 153, 0.1);
  background: #fff;
  box-shadow: 0 5px 14px rgba(22, 33, 44, 0.04);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 43px;
  border-radius: 8px;
}

.primary-button {
  background: linear-gradient(135deg, #0f6fb0 0%, var(--brand) 52%, #0d7f89 100%);
  box-shadow: 0 14px 28px rgba(15, 95, 153, 0.22);
}

.secondary-button,
.icon-button {
  border-color: rgba(15, 95, 153, 0.12);
  background: linear-gradient(180deg, #fff, #f8fbfd);
}

.ghost-button:hover,
.secondary-button:hover,
.icon-button:hover {
  border-color: rgba(15, 95, 153, 0.22);
  background: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.section-heading h2 {
  color: #182536;
}

.kpi-card,
.item-card,
.form-panel,
.settings-card {
  border-color: rgba(15, 95, 153, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.95));
  box-shadow: var(--shadow-soft);
}

.kpi-card {
  min-height: 132px;
  padding: 19px;
}

.kpi-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--accent), #287044);
}

.kpi-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--gold), #d89d45);
}

.kpi-card:nth-child(4)::before {
  background: linear-gradient(90deg, #287044, var(--brand));
}

.kpi-label svg {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand-soft);
  padding: 8px;
  color: var(--brand);
}

.kpi-value {
  color: #111c27;
}

.item-card {
  position: relative;
  overflow: hidden;
}

.item-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  opacity: 0.8;
  content: "";
}

.item-card.compact::before {
  opacity: 0.55;
}

.pill {
  border-color: rgba(100, 113, 130, 0.14);
  background: #f3f7fa;
}

.pill.green {
  background: #e8f5ed;
}

.pill.amber {
  background: var(--gold-soft);
}

.pill.teal {
  background: var(--accent-soft);
}

.segmented {
  border-color: rgba(15, 95, 153, 0.12);
  background: #f7fbfd;
}

.segmented button {
  border-right-color: rgba(15, 95, 153, 0.1);
}

.segmented button.active {
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.table-wrap {
  border-color: rgba(15, 95, 153, 0.1);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid rgba(15, 95, 153, 0.12);
  background: linear-gradient(180deg, #f9fcfe, #eef5f9);
  color: #526174;
}

td {
  background: rgba(255, 255, 255, 0.96);
}

tbody tr:hover td {
  background: #f7fbfd;
}

.planning-day,
.month-heading {
  background: linear-gradient(180deg, #f8fbfd, #edf4f8);
}

.planning-cell,
.planning-vehicle,
.month-cell,
.vehicle-planning-summary {
  border-color: rgba(15, 95, 153, 0.11);
  background: rgba(255, 255, 255, 0.96);
}

.booking-block,
.month-booking {
  border-left: 3px solid var(--accent);
  box-shadow: 0 4px 10px rgba(22, 33, 44, 0.04);
}

.booking-block.reserved,
.booking-block.amber,
.month-booking {
  border-left-color: var(--gold);
}

.booking-block.done,
.month-booking.done {
  border-left-color: #8a8f98;
}

.available-cell,
.month-empty {
  background: rgba(255, 255, 255, 0.54);
}

.field > span,
.field label {
  color: #4f6174;
  letter-spacing: 0;
}

.field input,
.field select,
.field textarea,
.range-control {
  border-color: #d7e2ea;
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(15, 95, 153, 0.26);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(57, 174, 184, 0.18);
}

.return-summary,
.attachment-item,
.maintenance-record,
.settings-stats div,
.data-paths p {
  border-color: rgba(15, 95, 153, 0.1);
}

.return-summary div,
.settings-stats div,
.data-paths p {
  background: linear-gradient(180deg, #f8fbfd, #f1f6f9);
}

.signature-canvas {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(15, 95, 153, 0.2), rgba(57, 174, 184, 0.2)) border-box;
}

.empty-state {
  border-color: rgba(15, 95, 153, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 251, 253, 0.82));
}

.modal-backdrop {
  background: rgba(15, 25, 36, 0.58);
  backdrop-filter: blur(5px);
}

.modal {
  border-color: rgba(255, 255, 255, 0.62);
  background: #f5f9fb;
  box-shadow: 0 38px 100px rgba(12, 22, 32, 0.38);
}

.modal-header {
  background: rgba(255, 255, 255, 0.98);
}

.modal-header h2 {
  color: #152334;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #111b26, #193244);
}

@media (max-width: 1100px) {
  .nav-button svg {
    width: 36px;
    height: 36px;
    padding: 8px;
  }
}

@media (max-width: 720px) {
  .main {
    padding-top: 14px;
  }

  .topbar {
    padding: 14px;
  }

  .mobile-nav {
    gap: 4px;
    border-color: rgba(15, 95, 153, 0.16);
    background: rgba(255, 255, 255, 0.96);
    padding: 6px;
  }

  .mobile-nav button {
    min-height: 48px;
    border-radius: 8px;
  }

  .mobile-nav button.active {
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
  }
}

/* Natural business-form refinement */
.modal {
  width: min(860px, calc(100vw - 32px));
  background: #fff;
}

.modal-header {
  min-height: 62px;
  padding: 14px 18px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 780;
}

.modal-body {
  background: #fff;
  padding: 18px;
}

.modal-footer {
  background: #fbfcfd;
  padding: 13px 18px;
}

.modal .form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 13px 14px;
}

.modal .field {
  grid-column: span 6;
  gap: 5px;
}

.modal .field.full,
.modal .full {
  grid-column: 1 / -1;
}

.modal .form-subgrid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 13px 14px;
}

.modal .form-subgrid .field {
  grid-column: span 6;
}

.modal .form-subgrid .field.full,
.modal .form-subgrid .full {
  grid-column: 1 / -1;
}

.modal .conditional-block {
  grid-column: 1 / -1;
  margin: 1px 0;
  border-top: 1px solid #edf2f6;
  padding-top: 13px;
}

.modal .conditional-block[hidden] {
  display: none;
}

.modal .field > span,
.modal .field label {
  color: #344457;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-transform: none;
}

.modal .field input,
.modal .field select,
.modal .field textarea {
  min-height: 38px;
  border-color: #cfdbe5;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  font-size: 14px;
  box-shadow: none;
}

.modal .field textarea {
  min-height: 76px;
}

.modal .file-field input {
  min-height: 38px;
  padding: 7px 9px;
}

.modal .range-control {
  min-height: 38px;
  border-color: #cfdbe5;
  border-radius: 6px;
  padding: 7px 10px;
  box-shadow: none;
}

.modal .form-note {
  border-top: 1px solid #edf2f6;
  padding-top: 9px;
  color: #6b7684;
  font-size: 12.5px;
}

.modal .attachment-list {
  gap: 7px;
}

.modal .attachment-item {
  min-height: 48px;
  border-radius: 6px;
  background: #fbfcfd;
  padding: 7px 9px;
}

.modal .attachment-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

.modal .signature-canvas {
  height: 150px;
  border-radius: 6px;
}

.modal .primary-button,
.modal .secondary-button,
.modal .ghost-button,
.modal .danger-button,
.modal .icon-button {
  min-height: 38px;
}

.modal .icon-button {
  width: 38px;
}

.modal .return-summary {
  border-radius: 6px;
  padding: 8px;
}

.modal .return-summary div {
  min-height: 46px;
  border-radius: 5px;
  padding: 7px;
}

.modal .maintenance-tracking,
.modal .maintenance-record {
  border-radius: 6px;
  background: #fbfcfd;
}

@media (max-width: 720px) {
  .modal {
    width: 100%;
  }

  .modal-body {
    padding: 15px;
  }

  .modal .field,
  .modal .form-subgrid .field {
    grid-column: 1 / -1;
  }
}

/* Refined daily-use finish */
:root {
  --brand: #105f92;
  --brand-dark: #0d3555;
  --brand-soft: #e8f4fb;
  --accent: #17898f;
  --accent-soft: #e6f5f5;
  --gold: #a86d24;
  --gold-soft: #fff4e2;
  --ink: #131c27;
  --muted: #697486;
  --line: #dfe7ee;
  --paper: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f0f4f7;
  --sidebar: #101923;
  --sidebar-soft: #182634;
  --shadow: 0 16px 36px rgba(19, 28, 39, 0.09);
  --shadow-soft: 0 7px 18px rgba(19, 28, 39, 0.065);
}

html {
  background: var(--paper);
}

body {
  background:
    linear-gradient(180deg, #fbfcfd 0, #f5f7f9 360px, #f3f6f8 100%);
  line-height: 1.38;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #101923 0%, #152536 100%);
  padding: 18px 14px;
  box-shadow: 8px 0 26px rgba(16, 25, 35, 0.11);
}

.sidebar::before {
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.brand-block {
  gap: 11px;
  border: 0;
  background: transparent;
  padding: 6px 5px 13px;
}

.auth-brand {
  padding: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 4px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.16));
}

.brand-title {
  font-size: 20px;
  letter-spacing: 0;
}

.brand-subtitle {
  color: #aab6c2;
  font-size: 12.5px;
}

.nav-list {
  gap: 4px;
}

.nav-button {
  min-height: 42px;
  border-radius: 7px;
  padding: 7px 9px;
  color: #c8d3de;
  font-size: 14px;
  font-weight: 680;
}

.nav-button svg {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  padding: 6px;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.075);
}

.nav-button.active::before {
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--accent);
}

.sidebar-footer {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.main {
  padding: 24px clamp(20px, 3vw, 38px) 44px;
}

.topbar {
  overflow: visible;
  margin-bottom: 22px;
  border: 0;
  border-bottom: 1px solid rgba(20, 34, 48, 0.09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 2px 0 17px;
  backdrop-filter: none;
}

.topbar::before {
  display: none;
}

.page-kicker {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 780;
}

.page-title {
  margin-top: 3px;
  color: #121a24;
  font-size: 30px;
  font-weight: 820;
}

.topbar-actions {
  gap: 8px;
}

.sync-pill,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button,
.segmented,
.field input,
.field select,
.field textarea,
.toolbar select,
.range-control {
  border-radius: 7px;
}

.sync-pill {
  min-height: 38px;
  border-color: #dde7ef;
  background: #fff;
  box-shadow: none;
  font-weight: 650;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 39px;
  font-weight: 690;
}

.primary-button {
  background: linear-gradient(180deg, #136fa6 0%, var(--brand) 100%);
  box-shadow: 0 9px 18px rgba(16, 95, 146, 0.18);
}

.secondary-button,
.icon-button {
  border-color: #dbe5ed;
  background: #fff;
  box-shadow: 0 2px 7px rgba(19, 28, 39, 0.035);
}

.ghost-button {
  color: #546173;
}

.danger-button {
  background: #fff1f1;
}

.primary-button:hover,
.danger-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.view {
  gap: 20px;
}

.section-band {
  gap: 14px;
}

.section-heading h2 {
  color: #151f2c;
  font-size: 19px;
  font-weight: 780;
}

.section-heading p {
  color: #737f8e;
  font-size: 13.5px;
}

.kpi-grid {
  gap: 12px;
}

.kpi-card,
.item-card,
.form-panel,
.empty-state,
.settings-card {
  border-color: #e1e9f0;
  background: #fff;
  box-shadow: 0 5px 16px rgba(19, 28, 39, 0.055);
}

.kpi-card {
  min-height: 118px;
  padding: 16px;
}

.kpi-card::before,
.item-card::before {
  display: none;
}

.kpi-label {
  margin-bottom: 10px;
  color: #647183;
  font-size: 11.5px;
  font-weight: 760;
  text-transform: none;
}

.kpi-label svg {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--brand-soft);
  padding: 7px;
}

.kpi-card:nth-child(2) .kpi-label svg {
  background: var(--accent-soft);
  color: var(--accent);
}

.kpi-card:nth-child(3) .kpi-label svg {
  background: var(--gold-soft);
  color: var(--gold);
}

.kpi-card:nth-child(4) .kpi-label svg {
  background: #e8f5ed;
  color: var(--green);
}

.kpi-value {
  font-size: 29px;
  font-weight: 790;
}

.kpi-note {
  color: #747f8e;
}

.split-grid {
  gap: 16px;
}

.list-grid {
  gap: 10px;
}

.item-card {
  gap: 11px;
  border-radius: 8px;
  padding: 15px;
}

.item-card:hover {
  border-color: #cbd8e3;
  box-shadow: 0 12px 30px rgba(19, 28, 39, 0.09);
}

.item-title {
  font-size: 16px;
  font-weight: 760;
}

.item-meta {
  color: #6d7785;
  font-size: 13px;
}

.item-actions {
  gap: 7px;
}

.pill {
  min-height: 24px;
  border-color: #e1e8ee;
  background: #f3f6f8;
  color: #5f6a78;
  font-weight: 680;
}

.pill.green {
  border-color: #d7eadf;
  background: #ebf7ef;
}

.pill.amber {
  border-color: #f3dfb9;
  background: #fff5e5;
}

.pill.teal {
  border-color: #cfe9ea;
  background: #e9f7f7;
}

.toolbar {
  align-items: flex-start;
  gap: 10px;
}

.toolbar select,
.compact-field input {
  min-height: 39px;
  border: 1px solid #dbe5ed;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
  outline: none;
}

.segmented {
  overflow: hidden;
  border-color: #dbe5ed;
  background: #fff;
  box-shadow: none;
  padding: 2px;
}

.segmented button {
  min-height: 34px;
  border-right: 0;
  border-radius: 5px;
  padding: 0 11px;
  color: #627083;
  font-size: 13px;
  font-weight: 700;
}

.segmented button.active {
  background: #142132;
  color: #fff;
}

.table-wrap {
  border-color: #e1e9f0;
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(19, 28, 39, 0.05);
}

th,
td {
  padding: 12px 14px;
}

th {
  background: #f7fafc;
  color: #596679;
  font-size: 11.5px;
  font-weight: 720;
  text-transform: none;
}

td {
  background: #fff;
}

tbody tr:hover td {
  background: #f8fbfd;
}

.planning-table {
  gap: 8px;
}

.planning-header,
.planning-row {
  gap: 7px;
}

.planning-day,
.planning-cell,
.planning-vehicle,
.month-heading,
.month-cell,
.vehicle-planning-summary {
  border-color: #e1e9f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.planning-day,
.month-heading {
  background: #f7fafc;
  color: #667387;
  font-weight: 720;
  text-transform: none;
}

.planning-cell {
  min-height: 78px;
}

.booking-block,
.month-booking {
  border: 1px solid #d7ecec;
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  background: #effafa;
  box-shadow: none;
}

.booking-block.reserved,
.booking-block.amber,
.month-booking {
  border-color: #f0dfbf;
  border-left-color: var(--gold);
  background: #fff7e8;
}

.booking-block.green,
.booking-block.active,
.month-booking.green {
  border-color: #d7eadf;
  border-left-color: var(--green);
  background: #edf8f1;
}

.booking-block.done,
.month-booking.done {
  border-color: #dfe3e8;
  border-left-color: #8b94a1;
  background: #f3f5f7;
}

.available-cell,
.month-empty {
  border-color: #dfe7ee;
  background: #fbfcfd;
}

.month-cell {
  min-height: 116px;
}

.month-date {
  width: 26px;
  height: 26px;
  background: #eef3f7;
  color: #263444;
  font-weight: 700;
}

.vehicle-planning-summary {
  margin: 12px 0 8px;
  padding: 11px 12px;
}

.form-panel {
  padding: 14px;
}

.field {
  gap: 5px;
}

.field > span,
.field label {
  color: #3e4b5c;
  font-size: 13px;
  font-weight: 630;
  text-transform: none;
}

.field input,
.field select,
.field textarea,
.range-control {
  min-height: 39px;
  border-color: #d6e1ea;
  background: #fff;
  padding: 8px 10px;
  box-shadow: none;
}

.field textarea {
  min-height: 82px;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.toolbar select:hover {
  border-color: #bfd0dc;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 137, 143, 0.13);
}

input[type="file"]::file-selector-button {
  border: 1px solid #d6e1ea;
  border-radius: 6px;
  background: #f5f8fa;
  margin-right: 10px;
  padding: 6px 10px;
  color: #263444;
  font: inherit;
  font-weight: 650;
}

.range-control {
  grid-template-columns: minmax(0, 1fr) 52px;
}

.range-control input {
  accent-color: var(--accent);
}

.return-summary {
  border-color: #e1e9f0;
  background: #fff;
}

.return-summary div,
.settings-stats div,
.data-paths p {
  border-color: #e1e9f0;
  background: #f8fafc;
}

.return-summary span,
.settings-stats span,
.data-paths strong {
  color: #667387;
  font-size: 11.5px;
  font-weight: 680;
  text-transform: none;
}

.settings-grid {
  gap: 15px;
}

.settings-card {
  border-radius: 8px;
  padding: 15px;
}

.settings-card-head h2 {
  font-size: 18px;
  font-weight: 770;
}

.attachment-item {
  min-height: 50px;
  border-color: #e1e9f0;
  border-radius: 7px;
  background: #fbfcfd;
}

.attachment-item.empty {
  background: #f6f9fb;
}

.attachment-thumb {
  border-color: #dfe7ee;
  border-radius: 7px;
}

.signature-canvas {
  height: 168px;
  border-color: #d6e1ea;
  border-radius: 7px;
  background: #fff;
}

.empty-state {
  min-height: 128px;
  border-color: #dfe7ee;
  background: #fbfcfd;
}

.modal-backdrop {
  background: rgba(12, 21, 31, 0.46);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(900px, calc(100vw - 32px));
  max-height: min(840px, 92vh);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 76px rgba(12, 21, 31, 0.28);
}

.modal-header {
  min-height: 58px;
  border-bottom-color: #e6edf3;
  background: rgba(255, 255, 255, 0.98);
  padding: 13px 17px;
}

.modal-header h2 {
  color: #151f2c;
  font-size: 18px;
  font-weight: 750;
}

.modal-body {
  padding: 18px 17px;
}

.modal-footer {
  border-top-color: #e6edf3;
  background: #fbfcfd;
  padding: 12px 17px;
}

.modal .form-grid,
.modal .form-subgrid {
  gap: 12px 13px;
}

.modal .form-subgrid > div:empty {
  display: none;
}

.modal .conditional-block {
  margin: 0;
  border-top: 1px solid #edf2f6;
  padding-top: 12px;
}

.modal .field input,
.modal .field select,
.modal .field textarea,
.modal .range-control {
  min-height: 37px;
  border-color: #d6e1ea;
  border-radius: 6px;
  padding: 7px 9px;
}

.modal .field textarea {
  min-height: 74px;
}

.modal .file-field input {
  min-height: 37px;
}

.modal .form-note {
  border-top-color: #edf2f6;
  color: #707b89;
  font-size: 12.5px;
}

.modal .attachment-item {
  min-height: 46px;
}

.modal .signature-canvas {
  height: 144px;
}

.modal .return-summary {
  gap: 7px;
}

.modal .return-summary div {
  min-height: 44px;
}

.toast {
  border-radius: 8px;
  background: #132234;
  box-shadow: 0 16px 42px rgba(12, 21, 31, 0.24);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .nav-button svg {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding-bottom: 76px;
  }

  .main {
    padding: 16px 13px 24px;
  }

  .topbar {
    gap: 12px;
    padding-bottom: 14px;
  }

  .page-title {
    font-size: 25px;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .sync-pill {
    min-height: 36px;
  }

  .kpi-card {
    min-height: auto;
  }

  .item-card {
    padding: 13px;
  }

  .item-topline {
    gap: 9px;
  }

  .item-actions .secondary-button,
  .item-actions .ghost-button,
  .item-actions .danger-button {
    flex: 1 1 135px;
  }

  .toolbar,
  .toolbar-group {
    align-items: stretch;
    width: 100%;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1 1 0;
    padding: 0 8px;
  }

  .mobile-nav {
    right: 10px;
    bottom: 10px;
    left: 10px;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(19, 28, 39, 0.16);
  }

  .mobile-nav button {
    min-height: 46px;
  }

  .modal-backdrop {
    align-items: end;
  }

  .modal {
    width: 100%;
    max-height: 91vh;
    border-radius: 8px 8px 0 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-right: 14px;
    padding-left: 14px;
  }
}
