:root {
  color-scheme: light;
  --paper: #f0f3f6;
  --white: #fff;
  --ink: #1c2a3b;
  --muted: #647389;
  --line: #dce3eb;
  --navy: #233b59;
  --blue: #245fa9;
  --orange: #c36128;
  --green: #247457;
  --red: #b73737;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 17px;
  background: var(--blue);
  color: white;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.quiet {
  background: transparent;
  color: var(--muted);
  padding: 8px;
}
.danger {
  background: #fff0f0;
  color: var(--red);
  border-color: #f0caca;
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid #6aacef;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 20;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--navy);
  color: #e4ebf4;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand {
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand img {
  width: 42px;
  height: 30px;
  object-fit: contain;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar nav button {
  justify-content: flex-start;
  background: transparent;
  color: #d9e2ef;
  font-weight: 500;
  text-align: left;
}
.sidebar nav button.active {
  background: #ffffff1c;
  color: #fff;
}
.sidebar small {
  color: #adc0d7;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 15px;
}
.sidebar .account {
  margin-top: auto;
  border-top: 1px solid #ffffff25;
  padding-top: 20px;
  overflow-wrap: anywhere;
}
.account button {
  color: #d9e2ef;
}
.workspace {
  max-width: 1440px;
  width: 100%;
  padding: 32px 44px 64px;
  margin: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 28px;
  color: var(--muted);
}
.topbar select {
  max-width: 310px;
  margin: 0;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0 28px;
}
.page-head h1 {
  font-size: 34px;
  letter-spacing: -1.1px;
  font-weight: 740;
  margin: 5px 0 8px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h2,
.card h3 {
  margin: 0 0 10px;
}
.card p {
  line-height: 1.6;
  color: var(--muted);
}
.car-card {
  padding: 0;
  overflow: hidden;
}
.car-card .car-visual {
  height: 170px;
  background: #e5ebf2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.car-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.car-visual .silhouette {
  font-size: 52px;
  color: #899db5;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -3px;
}
.car-card .body {
  padding: 24px;
}
.registration {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 650;
  font-size: 12px;
  letter-spacing: 1px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 7px;
  color: var(--muted);
  display: inline-block;
}
.odometer {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 20px 0;
}
.odometer small {
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  margin-bottom: 24px;
}
.strip > div {
  padding: 22px 26px;
}
.strip > div + div {
  border-left: 1px solid var(--line);
}
.strip strong {
  display: block;
  font-size: 25px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  margin-top: 8px;
}
.strip span {
  font-size: 12px;
  color: var(--muted);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-title h2 {
  font-size: 20px;
  margin: 0;
}
.ledger {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.row {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row .grow {
  flex: 1;
  min-width: 0;
}
.row h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.row p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.row .date {
  min-width: 90px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  color: var(--muted);
}
.amount {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 650;
  white-space: nowrap;
}
.badge {
  font-size: 11px;
  border-radius: 5px;
  background: #e8f3ec;
  color: var(--green);
  padding: 4px 7px;
  display: inline-block;
}
.badge.warning {
  color: var(--orange);
  background: #fff0e5;
}
.badge.overdue {
  color: var(--red);
  background: #fff0f0;
}
.schedule {
  display: flex;
  gap: 18px;
  align-items: center;
}
.schedule-mark {
  width: 5px;
  align-self: stretch;
  background: var(--green);
  border-radius: 4px;
}
.schedule-mark.overdue {
  background: var(--red);
}
.empty {
  padding: 52px 24px;
  text-align: center;
  background: white;
  border: 1px dashed #bfcbd9;
  border-radius: var(--radius);
}
.empty h2 {
  font-size: 22px;
  margin: 0 0 10px;
}
.empty p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 22px;
}
.error {
  color: var(--red);
  background: #fff0f0;
  padding: 16px;
  border-radius: 10px;
  line-height: 1.5;
}
.loading {
  padding: 100px 30px;
  text-align: center;
  color: var(--muted);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #c6d0dc;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  margin-top: 7px;
  min-height: 44px;
}
input[type='checkbox'] {
  display: inline-block;
  width: 18px;
  min-height: 18px;
  margin: 0 8px 0 0;
  vertical-align: middle;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.wide {
  grid-column: 1/-1;
}
.hint {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
  font-size: 12px;
  margin: 8px 0 16px;
}
.auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-story {
  background: var(--navy);
  color: white;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-story h1 {
  font-size: clamp(38px, 4vw, 64px);
  letter-spacing: -2px;
  line-height: 1.08;
  max-width: 580px;
}
.auth-story p {
  color: #c3d1e2;
  line-height: 1.8;
  max-width: 430px;
}
.auth-story .logbook {
  border-top: 1px solid #ffffff30;
  border-bottom: 1px solid #ffffff30;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  gap: 15px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
}
.auth-panel > div {
  width: 100%;
  max-width: 390px;
}
.auth-panel h2 {
  font-size: 29px;
  letter-spacing: -0.7px;
  margin: 0 0 12px;
}
.auth-panel .subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 30px;
}
.auth-panel button[type='submit'] {
  width: 100%;
}
.auth-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.auth-links button {
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  width: min(660px, calc(100% - 24px));
  max-height: 90vh;
  padding: 28px;
  box-shadow: 0 25px 100px #152b4440;
  color: var(--ink);
}
dialog::backdrop {
  background: #14243688;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}
.dialog-head h2 {
  margin: 0;
  font-size: 23px;
}
dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
#form-error {
  color: var(--red);
  font-size: 13px;
  white-space: pre-line;
}
.operation {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}
.operation select,
.operation input {
  background: white;
}
.operation .actions {
  justify-content: space-between;
  margin-bottom: 12px;
}
.documents img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: var(--paper);
  border-radius: 8px;
}
.documents .card {
  padding: 18px;
}
.documents .card .actions {
  margin-top: 16px;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  border-radius: 10px;
  box-shadow: 0 8px 30px #0003;
  padding: 15px 24px;
  z-index: 30;
  max-width: 90vw;
}
.profile {
  max-width: 720px;
  display: grid;
  gap: 20px;
}
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}
.report-note {
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.more {
  margin: 20px auto;
  display: flex;
}
.progress {
  height: 5px;
  width: 100%;
  accent-color: var(--blue);
}
.mobile-brand {
  display: none;
}
.totals {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.totals .card {
  padding: 14px 20px;
}
.search {
  max-width: 300px;
}
.filters {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filters input,
.filters select {
  width: auto;
  flex: 1;
  margin: 0;
}
@media (max-width: 1050px) {
  .workspace {
    padding: 28px;
  }
  .shell {
    grid-template-columns: 200px 1fr;
  }
  .sidebar {
    padding: 24px 12px;
  }
  .row {
    gap: 12px;
  }
  .auth-story {
    padding: 42px;
  }
  .row .date {
    min-width: 70px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    gap: 14px;
  }
  .sidebar > .brand,
  .sidebar small,
  .sidebar .account {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 13px;
  }
  .workspace {
    padding: 20px 16px 45px;
  }
  .topbar {
    padding-bottom: 16px;
    flex-wrap: wrap;
  }
  .topbar select {
    max-width: 100%;
    flex: 1;
  }
  .mobile-brand {
    display: block;
    font-size: 21px;
    font-weight: 800;
    color: var(--navy);
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }
  .page-head h1 {
    font-size: 29px;
  }
  .strip > div {
    padding: 16px 12px;
  }
  .strip strong {
    font-size: 19px;
  }
  .row {
    padding: 18px 16px;
    flex-wrap: wrap;
  }
  .row .date {
    width: 100%;
    font-size: 11px;
  }
  .row .actions {
    width: 100%;
    padding-top: 6px;
  }
  .auth {
    display: block;
  }
  .auth-story {
    padding: 24px;
  }
  .auth-story h1,
  .auth-story p,
  .auth-story .logbook {
    display: none;
  }
  .auth-panel {
    padding: 36px 22px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  dialog {
    padding: 22px 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .totals .card {
    flex: 1;
  }
  .topbar > .hint {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .card,
  .ledger,
  .empty {
    animation: appear 0.2s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
/* CarTales iOS: compact vehicle cards and navigation-stack screens. */
.ios-nav,
.ios-overview {
  display: none;
}
.garage-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.ios-car .vehicle-button {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 20px;
  background: transparent;
  color: var(--ink);
  gap: 16px;
  justify-content: flex-start;
  border-radius: 0;
}
.ios-car .car-visual {
  width: 104px;
  height: 65px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.car-visual svg {
  width: 80px;
  color: var(--muted);
}
.ios-car .car-visual img {
  object-fit: contain;
}
.identity {
  flex: 1;
  min-width: 0;
}
.identity h2 {
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 4px;
}
.identity p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.identity strong {
  font-size: 14px;
}
.mileage-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-bottom: 2px;
}
.chevron {
  font-size: 24px;
  color: var(--muted);
}
.car-footer {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px;
  gap: 10px;
}
.status-button {
  padding: 0;
  background: transparent;
  color: var(--ink);
  flex: 1;
  justify-content: flex-start;
  text-align: left;
}
.status-button strong {
  font-size: 13px;
  display: block;
}
.status-button small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}
.status-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #24745720;
  color: var(--green);
}
.status-icon.warn {
  background: #c3612820;
  color: var(--orange);
}
.mileage-pill {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--orange);
  border-radius: 24px;
  padding: 10px 12px;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  :root {
    color-scheme: dark;
    --paper: #111113;
    --white: #232429;
    --ink: #f3f3f5;
    --muted: #9c9ca3;
    --line: #333338;
    --navy: #18181b;
    --blue: #e96d37;
    --orange: #e96d37;
    --green: #51b96b;
    --red: #f06467;
    --radius: 22px;
    background: var(--paper);
  }
  body {
    background: var(--paper);
  }
  .sidebar,
  .topbar {
    display: none;
  }
  .workspace {
    padding: 0 16px max(28px, env(safe-area-inset-bottom));
    margin: 0;
  }
  .ios-nav {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 5;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    margin: 0 -16px;
    padding: 8px 16px;
    background: #111113ed;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #ffffff09;
  }
  .ios-nav > strong {
    font-size: 19px;
  }
  .ios-nav > .quiet {
    padding-left: 0;
    color: var(--orange);
  }
  .ios-nav > div {
    display: flex;
    gap: 4px;
  }
  .ios-nav button {
    font-size: 22px;
    color: var(--orange);
    min-width: 40px;
    min-height: 44px;
  }
  .page-head {
    margin: 18px 0;
  }
  .page-head .eyebrow,
  .page-head p {
    display: none;
  }
  .page-head h1 {
    font-size: 29px;
    color: var(--ink);
  }
  body[data-tab='garage'] .page-head,
  body[data-tab='overview'] .page-head {
    display: none;
  }
  body:not([data-tab='garage']):not([data-tab='overview']) .page-head h1 {
    display: none;
  }
  .page-head .actions {
    width: 100%;
  }
  .page-head .actions button {
    flex: 1;
  }
  .garage-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 18px;
  }
  .card,
  .ledger,
  .empty {
    background: linear-gradient(135deg, #17171a, #232429);
    border-color: var(--line);
  }
  .ios-car {
    border-radius: 22px;
  }
  .ios-car .vehicle-button {
    padding: 14px;
    gap: 14px;
    min-height: 113px;
  }
  .ios-car .car-visual {
    background: linear-gradient(135deg, #232429, #111113);
    width: 104px;
    height: 61px;
  }
  .identity h2 {
    font-size: 17px;
  }
  .identity p {
    font-size: 14px;
  }
  .identity .registration {
    font-size: 10px;
    padding: 3px 5px;
    background: #ffffff12;
    border: 0;
  }
  .car-footer {
    margin: 0 14px;
    padding: 14px 0;
    gap: 12px;
  }
  .mileage-pill {
    font-size: 11px;
    padding: 10px 12px;
    background: #111113b8;
    border-color: #e96d37a6;
  }
  .status-button strong {
    font-size: 13px;
  }
  .status-button small {
    font-size: 11px;
    max-width: 145px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .status-icon {
    font-size: 17px;
  }
  .desktop-overview {
    display: none;
  }
  .ios-overview {
    display: block;
    padding-top: 16px;
  }
  .detail-photo {
    position: relative;
    aspect-ratio: 12/7;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #232429, #111113);
    border: 1px solid #ffffff14;
    display: grid;
    place-items: center;
  }
  .detail-photo > svg {
    width: 150px;
    color: #ffffff26;
  }
  .detail-photo > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
  }
  .photo-action {
    position: absolute;
    top: 14px;
    right: 14px;
    border-radius: 24px;
    background: #2b83e9;
    color: white;
    padding: 10px 13px;
    font-size: 12px;
  }
  .photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 48px 16px 14px;
    background: linear-gradient(transparent, #000b);
  }
  .photo-caption strong {
    font-size: 17px;
    display: block;
    color: white;
  }
  .photo-caption small {
    font-size: 11px;
    color: #ffffffaa;
    display: block;
    margin: 4px 0;
  }
  .photo-caption > div:last-child {
    text-align: right;
  }
  .ios-status {
    margin: 16px 0;
    background: #51b96b15;
    color: var(--ink);
    border: 1px solid #51b96b47;
    border-radius: 14px;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 500;
  }
  .ios-status.warn {
    background: #e96d3715;
    border-color: #e96d3747;
    padding: 16px;
    font-size: 17px;
  }
  .ios-status small {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
  }
  .quick-actions {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 16px -16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }
  .quick-actions button {
    flex: 0 0 138px;
    height: 96px;
    background: #232429ad;
    border: 1px solid #ffffff12;
    border-radius: 16px;
    color: var(--ink);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
  }
  .quick-actions button > span {
    color: var(--orange);
    font-size: 24px;
    line-height: 1;
  }
  .quick-actions strong {
    font-size: 14px;
  }
  .ios-overview .section-title {
    margin: 20px 0 12px;
  }
  .ios-overview .section-title h2 {
    font-size: 20px;
  }
  .ios-overview .schedule .actions {
    display: none;
  }
  .ios-overview .schedule {
    cursor: pointer;
  }
  .ios-extra {
    margin-top: 20px;
  }
  .ios-extra button {
    flex: 1;
  }
  .secondary {
    background: #29292f;
    color: var(--ink);
    border-color: #3b3b42;
  }
  .quiet {
    color: var(--orange);
  }
  .row {
    border-color: #ffffff12;
  }
  .badge {
    background: #51b96b18;
    color: var(--green);
  }
  .badge.warning {
    background: #e96d3720;
    color: var(--orange);
  }
  .badge.overdue {
    background: #f0646720;
    color: var(--red);
  }
  .strip {
    background: #232429;
    border-color: var(--line);
  }
  input,
  select,
  textarea,
  .operation input,
  .operation select {
    background: #1c1c20;
    color: var(--ink);
    border-color: #414148;
  }
  dialog {
    background: #1c1c1f;
    border-color: var(--line);
    width: 100%;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    padding: 24px 18px max(24px, env(safe-area-inset-bottom));
  }
  .dialog-head h2 {
    font-size: 21px;
  }
  dialog footer {
    position: sticky;
    bottom: 0;
    background: #1c1c1f;
    padding-top: 12px;
  }
  dialog footer button {
    flex: 1;
  }
  .operation {
    background: #242429;
  }
  .error,
  .danger {
    background: #f0646714;
    color: var(--red);
    border-color: #f0646733;
  }
  .auth-story {
    background: #111113;
  }
  .auth-panel {
    background: #111113;
  }
  .auth-story .brand {
    color: var(--ink);
  }
  .auth-panel .subtitle {
    color: var(--muted);
  }
  .documents img {
    background: #111113;
  }
  .profile .card p {
    color: var(--muted);
  }
  #notice:not(:empty) {
    background: #393940;
  }
  .empty {
    padding: 36px 18px;
  }
  .empty h2 {
    font-size: 21px;
  }
  .row .date {
    font-family: inherit;
    color: var(--orange);
  }
  .amount {
    font-family: inherit;
  }
  .auth button[type='submit'] {
    background: var(--orange);
    color: white;
  }
  .section-title {
    margin-top: 20px;
  }
}
.expense-period {
  align-items: flex-end;
}
.expense-period label {
  min-width: 0;
  margin: 0;
  flex: 1;
  max-width: 250px;
}
.expense-period input {
  width: 100%;
  margin-top: 6px;
}
.month-title {
  text-transform: capitalize;
  font-size: 17px;
  margin: 28px 0 12px;
  color: var(--muted);
}
.expense-row {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 8px;
}
@media (max-width: 760px) {
  .expense-row {
    background: #232429;
  }
  .expense-row .date {
    width: auto;
    min-width: 0;
    font-size: 11px;
  }
  .expense-row .grow {
    min-width: 140px;
  }
  .expense-row .amount {
    font-size: 15px;
  }
  .expense-row > button {
    padding: 8px 12px;
    font-size: 12px;
  }
  .expense-period label {
    font-size: 12px;
  }
  .expense-period input {
    min-width: 0;
  }
  .expense-period {
    flex-wrap: nowrap;
  }
}
.workspace {
  margin: 0 auto;
}
.auth .eyebrow {
  color: #adc0d7;
}
button {
  font-weight: 600;
}
@media (max-width: 760px) {
  .auth .eyebrow {
    display: none;
  }
  .ios-car .vehicle-button {
    font-weight: 400;
  }
  .status-button strong,
  .identity strong {
    font-weight: 600;
  }
  .quick-actions strong {
    font-weight: 600;
  }
}
/* Shared iOS palette on every screen size. */
:root {
  color-scheme: dark;
  --paper: #111113;
  --white: #232429;
  --ink: #f3f3f5;
  --muted: #9c9ca3;
  --line: #333338;
  --navy: #18181b;
  --blue: #e96d37;
  --orange: #e96d37;
  --green: #51b96b;
  --red: #f06467;
}
body {
  background: var(--paper);
}
.sidebar {
  background: #171719;
  color: var(--ink);
  border-right: 1px solid #ffffff0a;
}
.sidebar nav button {
  color: var(--muted);
}
.sidebar nav button.active {
  color: var(--orange);
  background: #e96d3714;
}
.sidebar small,
.account button,
.auth .eyebrow {
  color: var(--muted);
}
.sidebar .account {
  border-color: var(--line);
}
.card,
.ledger,
.empty {
  background: linear-gradient(135deg, #17171a, #232429);
  border-color: var(--line);
}
.secondary {
  background: #29292f;
  color: var(--ink);
  border-color: #3b3b42;
}
.quiet {
  color: var(--orange);
}
input,
select,
textarea,
.operation input,
.operation select {
  background: #1c1c20;
  color: var(--ink);
  border-color: #414148;
}
.strip {
  background: #232429;
  border-color: var(--line);
}
.badge {
  background: #51b96b18;
  color: var(--green);
}
.badge.warning {
  background: #e96d3720;
  color: var(--orange);
}
.badge.overdue {
  background: #f0646720;
  color: var(--red);
}
.expense-row {
  background: #232429;
}
.car-card .car-visual {
  background: linear-gradient(135deg, #232429, #111113);
}
.error,
.danger {
  background: #f0646714;
  color: var(--red);
  border-color: #f0646733;
}
.operation {
  background: #242429;
}
.documents img {
  background: #111113;
}
.auth-story {
  background: #18181b;
}
.auth-panel {
  background: #111113;
}
.auth-story p {
  color: var(--muted);
}
dialog,
dialog footer {
  background: #1c1c1f;
}
#notice:not(:empty) {
  background: #393940;
}
.skip {
  background: #232429;
}
.auth-story .logbook {
  border-color: var(--line);
}
.status-icon {
  background: #51b96b18;
  color: var(--green);
}
.status-icon.warn {
  background: #e96d3720;
  color: var(--orange);
}
[hidden] {
  display: none !important;
}
button[class=''],
button[type='submit'],
.button {
  color: #111113;
}
.sidebar nav button {
  color: var(--muted);
}
.sidebar nav button.active {
  color: var(--orange);
}
.ios-nav h1 {
  font-size: 17px;
  line-height: 1.3;
  margin: 0;
}
.ios-nav button,
.quick-actions button {
  color: var(--ink) !important;
}
.ios-nav .quiet {
  color: var(--orange) !important;
}
.auth-panel button[type='submit'] {
  color: #111113;
}
.photo-action {
  background: #245fa9 !important;
  color: white !important;
}
.auth-panel .hint[role='alert']:not(:empty) {
  color: var(--red);
}
@media (max-width: 760px) {
  button,
  .button {
    min-height: 44px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .ios-nav > h1 {
    font-size: 19px;
  }
  .ios-overview .schedule {
    min-height: 84px;
  }
}
