:root {
  --bg: #eef3f0;
  --panel: #ffffff;
  --line: rgba(20, 50, 38, 0.1);
  --line-strong: rgba(20, 50, 38, 0.16);
  --text: #14241c;
  --muted: #5d7268;
  --accent: #0d9f56;
  --accent-dark: #087a41;
  --warn: #c4841d;
  --danger: #d64545;
  --field-bg: #f3f7f5;
  --shadow: 0 14px 36px rgba(20, 50, 38, 0.08);
  --radius: 16px;
  --sans: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --bottomnav-h: 64px;
  --tap: 48px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

a,
button,
label,
input,
select,
textarea {
  touch-action: manipulation;
}

img {
  max-width: 100%;
}

h1,
h2,
p {
  margin: 0;
}

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

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.mono {
  font-family: var(--mono);
}

.boot {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

/* ---------------- Buttons & fields ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  font: 600 1rem var(--sans);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(13, 159, 86, 0.08);
}

.btn.sm {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.btn.block {
  width: 100%;
}

.stack {
  display: grid;
  gap: 14px;
}

.field-label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* 16px+ text stops iOS Safari zooming the page when a field is focused. */
.input {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line-strong);
  background: var(--field-bg);
  border-radius: 12px;
  padding: 12px 14px;
  font: 500 16px var(--sans);
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input[type="date"],
.input[type="datetime-local"] {
  display: block;
  text-align: left;
  line-height: 1.3;
}

.input[type="date"]::-webkit-date-and-time-value,
.input[type="datetime-local"]::-webkit-date-and-time-value {
  text-align: left;
}

select.input,
select.input:focus {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235d7268' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  text-overflow: ellipsis;
}

.input::placeholder {
  color: #92a49b;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 159, 86, 0.15);
  background: #fff;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > .icon {
  position: absolute;
  left: 13px;
  color: var(--muted);
  pointer-events: none;
}

.input-wrap .input {
  padding-left: 40px;
  padding-right: 44px;
}

.input-btn {
  position: absolute;
  right: 4px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.input-btn:hover {
  background: rgba(13, 159, 86, 0.08);
}

.form-error {
  color: var(--danger);
  font-size: 0.9rem;
  background: rgba(214, 69, 69, 0.08);
  border: 1px solid rgba(214, 69, 69, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
}

/* ---------------- Login ---------------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--safe-top)) calc(14px + var(--safe-right)) calc(20px + var(--safe-bottom))
    calc(14px + var(--safe-left));
  background:
    radial-gradient(circle at 15% 10%, rgba(13, 159, 86, 0.22), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(21, 119, 212, 0.14), transparent 45%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px 18px;
  display: grid;
  gap: 20px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand-full {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.login-wordmark {
  display: block;
  width: 210px;
  max-width: 75%;
  height: auto;
}

.login-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.login-brand h1 {
  font-size: 1.4rem;
}

.login-brand p {
  color: var(--muted);
  font-weight: 500;
}

.login-register {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.forgot-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: -10px 0 -6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.forgot-notes {
  margin: 0;
  padding: 12px 14px 12px 32px;
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
  justify-self: stretch;
  line-height: 1.5;
}

/* ---------------- Register ---------------- */
.register {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(12px + var(--safe-top)) calc(10px + var(--safe-right)) calc(28px + var(--safe-bottom))
    calc(10px + var(--safe-left));
  background:
    radial-gradient(circle at 15% 0%, rgba(13, 159, 86, 0.2), transparent 40%),
    var(--bg);
}

.register-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px 16px 22px;
  display: grid;
  gap: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -8px 0 -10px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

textarea.input {
  resize: vertical;
  min-height: 64px;
}

.field-row {
  display: grid;
  gap: 14px;
}

.field-hint {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--muted);
}

.req {
  margin-left: 3px;
  color: var(--danger);
  font-weight: 700;
}

.required-note {
  margin-bottom: -4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.field-error {
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.field-label.is-invalid {
  color: var(--danger);
}

.is-invalid .input,
.is-invalid .input:focus {
  border-color: var(--danger);
  background: #fff8f8;
}

.is-invalid .input:focus {
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.15);
}

.photo-field.is-invalid {
  border-color: var(--danger);
  background: #fff8f8;
}

.photo-field.is-invalid .photo-box {
  border-color: rgba(214, 69, 69, 0.45);
}

.photo-field.is-invalid .photo-label {
  color: var(--danger);
}

.agree-field {
  display: grid;
  gap: 6px;
}

.agree-field.is-invalid .check-row {
  background: rgba(214, 69, 69, 0.08);
  box-shadow: inset 0 0 0 1px var(--danger);
  color: var(--danger);
}

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

.photo-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fbfdfc;
  transition: border-color 0.15s;
}

.photo-field.has-photo {
  border-color: rgba(13, 159, 86, 0.55);
}

.photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.photo-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.photo-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(13, 159, 86, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.photo-status .icon {
  width: 14px;
  height: 14px;
}

.photo-status.is-pending {
  color: var(--warn);
  background: rgba(196, 132, 29, 0.14);
}

.photo-box {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.586;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--field-bg);
  overflow: hidden;
}

.has-photo .photo-box {
  border-style: solid;
  border-color: transparent;
}

.photo-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
}

.photo-empty .icon {
  width: 34px;
  height: 34px;
  color: #9fb3a9;
}

.photo-empty small {
  font-size: 0.85rem;
}

.photo-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-actions.single {
  grid-template-columns: 1fr;
}

.photo-btn {
  position: relative;
  padding: 10px 8px;
  font-size: 0.92rem;
  background: #fff;
  overflow: hidden;
}

.photo-btn .icon {
  color: var(--accent);
}

.photo-btn span {
  white-space: nowrap;
}

@media (max-width: 379px) {
  .photo-btn {
    flex-direction: column;
    gap: 4px;
    padding: 8px 6px;
    font-size: 0.88rem;
  }
}

@media (max-width: 359px) {
  .photo-btn {
    flex-direction: column;
    gap: 2px;
    padding: 8px 4px;
    font-size: 0.85rem;
  }
}

.photo-btn:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 159, 86, 0.15);
}

/* Kept in the layout (not display:none) so the label reliably opens the picker on iOS Safari. */
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-field [hidden],
.done-card [hidden] {
  display: none !important;
}

.agreement {
  max-height: 45vh;
  max-height: 45dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fbfdfc;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #2b3d34;
}

.agreement-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.agreement-title .icon {
  color: var(--accent);
}

.agreement h3:not(.agreement-title) {
  margin: 14px 0 4px;
  font-size: 0.92rem;
}

.agreement p {
  margin: 0 0 8px;
}

.agreement ul {
  margin: 0 0 8px;
  padding-left: 20px;
}

.agreement li {
  margin-bottom: 2px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(13, 159, 86, 0.07);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.check-row input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.done-card {
  text-align: center;
  justify-items: center;
}

.done-card h1 {
  font-size: 1.4rem;
}

.done-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(13, 159, 86, 0.12);
  color: var(--accent);
}

.done-icon.warn {
  background: rgba(196, 132, 29, 0.14);
  color: var(--warn);
}

.done-icon .icon {
  width: 30px;
  height: 30px;
}

@media (min-width: 480px) {
  .login-card {
    padding: 28px 24px;
  }
  .register {
    padding: calc(20px + var(--safe-top)) calc(14px + var(--safe-right)) calc(40px + var(--safe-bottom))
      calc(14px + var(--safe-left));
  }
  .register-card {
    padding: 22px 22px 28px;
  }
}

@media (min-width: 640px) {
  .field-row,
  .photo-grid {
    grid-template-columns: 1fr 1fr;
  }
  .register-card {
    padding: 28px 30px 32px;
  }
}

/* ---------------- Shell ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) calc(14px + var(--safe-right)) 10px calc(14px + var(--safe-left));
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-logo {
  display: block;
  width: auto;
  height: 34px;
}

.topbar-brand small {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.topnav {
  display: none;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
}

.nav-item.active {
  color: var(--accent);
  background: rgba(13, 159, 86, 0.1);
}

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px calc(12px + var(--safe-right)) calc(var(--bottomnav-h) + 20px + var(--safe-bottom))
    calc(12px + var(--safe-left));
  display: grid;
  gap: 14px;
}

.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-around;
  height: calc(var(--bottomnav-h) + var(--safe-bottom));
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(20, 50, 38, 0.06);
}

.bottomnav .nav-item {
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-size: 0.75rem;
  border-radius: 0;
  background: transparent;
}

.bottomnav .nav-item .icon {
  width: 22px;
  height: 22px;
}

#signOut {
  width: 44px;
  padding: 0;
  flex-shrink: 0;
}

#signOut span {
  display: none;
}

@media (min-width: 720px) {
  .topbar {
    padding: 14px 28px;
  }
  .topnav {
    display: flex;
  }
  .bottomnav {
    display: none;
  }
  .content {
    padding: 28px 24px 40px;
    gap: 16px;
  }
  #signOut {
    width: auto;
    padding: 8px 12px;
  }
  #signOut span {
    display: inline;
  }
}

/* ---------------- Cards ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
}

.card-title .icon {
  color: var(--accent);
}

.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.18), transparent 50%),
    linear-gradient(135deg, #0b8a4b, #0d9f56 55%, #18b56b);
  box-shadow: 0 16px 34px rgba(13, 159, 86, 0.28);
}

.hero h1 {
  font-size: 1.6rem;
}

.hero-hello,
.hero-sub {
  opacity: 0.88;
  font-size: 0.92rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #12b866);
  border: 0;
}

.quick-actions {
  display: grid;
  gap: 12px;
}

.action-btn {
  min-height: 56px;
  gap: 10px;
  font-size: 1.05rem;
  color: #fff;
}

.action-btn .icon {
  width: 22px;
  height: 22px;
}

.action-btn.get {
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(13, 159, 86, 0.28);
}

.action-btn.handover {
  background: #1577d4;
  box-shadow: 0 8px 20px rgba(21, 119, 212, 0.26);
}

.action-btn.incident {
  background: #d9622b;
  box-shadow: 0 8px 20px rgba(217, 98, 43, 0.26);
}

.action-btn:focus-visible {
  outline: 3px solid rgba(20, 50, 38, 0.25);
  outline-offset: 2px;
}

@media (hover: hover) {
  .action-btn.get:hover {
    background: var(--accent-dark);
  }
  .action-btn.handover:hover {
    background: #0f62b0;
  }
  .action-btn.incident:hover {
    background: #b94f1f;
  }
}

@media (min-width: 480px) {
  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }
  .action-btn.incident {
    grid-column: 1 / -1;
  }
}

/* ---------------- Get a Vehicle ---------------- */
.content [hidden] {
  display: none !important;
}

.page-head {
  display: grid;
  gap: 4px;
}

.page-head .back-link {
  margin: -6px 0 0;
  justify-self: start;
}

.page-head h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
}

.page-head h1 .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.combo {
  position: relative;
}

.combo-control {
  position: relative;
}

.combo-input {
  padding-right: 52px;
  text-transform: uppercase;
}

.combo-input::placeholder {
  text-transform: none;
}

.combo-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.combo-toggle .icon {
  width: 20px;
  height: 20px;
  transition: transform 0.15s;
}

.combo.is-open .combo-toggle .icon {
  transform: rotate(180deg);
}

.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: min(288px, 45vh);
  max-height: min(288px, 45dvh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(20, 50, 38, 0.16);
  color: var(--text);
}

.combo-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.combo-option.is-active {
  background: rgba(13, 159, 86, 0.1);
}

.combo-option.is-selected {
  color: var(--accent-dark);
}

.combo-option .icon {
  color: var(--accent);
}

@media (hover: hover) {
  .combo-option:hover {
    background: rgba(13, 159, 86, 0.08);
  }
}

.combo-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.question {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.question-label {
  padding: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.question.is-invalid .question-label {
  color: var(--danger);
}

.question.is-invalid .choice span {
  border-color: var(--danger);
  background: #fff8f8;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 8px;
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 8px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--field-bg);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.choice input:checked + span {
  border-color: var(--accent);
  background: rgba(13, 159, 86, 0.12);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice input:focus-visible + span {
  outline: 3px solid rgba(13, 159, 86, 0.3);
  outline-offset: 2px;
}

.reveal {
  padding: 12px;
  border-radius: 14px;
  background: #f6faf8;
  border: 1px dashed var(--line-strong);
}

.photo-landscape .photo-box {
  aspect-ratio: 4 / 3;
}

.photo-count {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.thumb-empty {
  grid-column: 1 / -1;
  padding: 18px 8px;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--field-bg);
  text-align: center;
}

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--field-bg);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 36, 28, 0.72);
  color: #fff;
  cursor: pointer;
}

.thumb-remove .icon {
  width: 16px;
  height: 16px;
}

.multi-photos.is-full .photo-btn {
  opacity: 0.5;
  pointer-events: none;
}

.submit-lg {
  min-height: 56px;
  font-size: 1.05rem;
}

@media (min-width: 480px) {
  .thumb-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.vehicle-card {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.vehicle-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.vehicle-icon {
  background: rgba(13, 159, 86, 0.12);
  color: var(--accent);
}

.vehicle-icon .icon {
  width: 24px;
  height: 24px;
}

.vehicle-card small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vehicle-card strong {
  display: block;
  font-size: 1.15rem;
}

.vehicle-card .mono {
  color: var(--muted);
  font-size: 0.85rem;
}

.profile-head {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.profile-head h1 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pill.ok {
  color: var(--accent);
  background: rgba(13, 159, 86, 0.12);
}

.status-pill.warn {
  color: var(--warn);
  background: rgba(196, 132, 29, 0.14);
}

.info-list {
  display: grid;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.info-value {
  min-width: 0;
  margin-left: auto;
  font-weight: 600;
  text-align: right;
}

.input.plain {
  padding-left: 14px;
}

.history-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.history-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(13, 159, 86, 0.12);
}

.history-icon.warn {
  color: var(--warn);
  background: rgba(196, 132, 29, 0.14);
}

.history-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.history-body strong {
  overflow-wrap: anywhere;
}

.history-note {
  margin-top: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--field-bg);
  font-size: 0.88rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottomnav-h) + 14px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 50;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  text-align: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  background: var(--accent);
}

.toast.bad {
  background: var(--danger);
}

body.is-login .toast {
  bottom: calc(20px + var(--safe-bottom));
}

@media (min-width: 720px) {
  .toast {
    bottom: 28px;
  }
}
