:root {
  --blue: #0b54c5;
  --deep-blue: #073f96;
  --green: #17a34a;
  --orange: #f59e0b;
  --red: #ef4444;
  --purple: #6d28d9;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --bg: #f4f7fb;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}

body.driver-locked .phone-shell,
body.driver-locked .bottom-nav {
  display: none;
}

.auth-view {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
  background: linear-gradient(145deg, #0b54c5, #0f766e);
}

.auth-card {
  display: grid;
  gap: 16px;
  width: min(100%, 390px);
  border-radius: 10px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.26);
}

.auth-brand {
  text-align: center;
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  color: var(--blue);
  font-size: 24px;
}

.auth-brand span,
.auth-card small {
  color: var(--muted);
  font-weight: 800;
}

.auth-card label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.auth-card input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 900;
}

.auth-card button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
}

.auth-error {
  min-height: 18px;
  margin: 0;
  color: #dc2626;
  font-size: 13px;
  font-weight: 900;
}

button,
input,
select {
  font: inherit;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: calc(100vh - 74px);
  margin: 0 auto;
  padding-bottom: 16px;
  background: var(--bg);
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 10px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--deep-blue));
  box-shadow: 0 10px 22px rgba(7, 63, 150, 0.22);
}

.app-top strong,
.app-top span {
  display: block;
  text-align: center;
}

.app-top strong {
  font-size: 18px;
  line-height: 1.1;
}

.app-top span {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.82;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 22px;
  font-weight: 900;
}

.panel-view {
  display: none;
  padding: 14px;
}

.panel-view.active {
  display: grid;
  gap: 14px;
}

.driver-card,
.driver-form,
.profile-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.profile-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #0b54c5;
  background: #dbeafe;
  font-size: 18px;
  font-weight: 900;
}

.avatar.big {
  width: 86px;
  height: 86px;
  margin: 0 auto 10px;
  font-size: 24px;
}

.profile-card strong,
.profile-large strong {
  display: block;
  font-size: 16px;
}

.profile-card span,
.profile-large span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#driverPicker {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
}

.online-pill {
  border-radius: 999px;
  padding: 6px 10px;
  color: #15803d;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 900;
}

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

.action-tile {
  min-height: 112px;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  color: #ffffff;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.action-tile span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 22px;
}

.green {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.blue {
  background: linear-gradient(135deg, #0b74de, #0b54c5);
}

.orange {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.red {
  background: linear-gradient(135deg, #f05252, #dc2626);
}

.summary-card,
.driver-card {
  padding: 14px;
}

.section-head,
.screen-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head button,
.screen-title button {
  border: 0;
  border-radius: 8px;
  color: var(--blue);
  background: #eff6ff;
  font-size: 24px;
  font-weight: 900;
}

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

.summary-grid div,
.report-grid div {
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  background: #f8fafc;
}

.summary-grid span,
.report-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.summary-grid strong,
.report-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--blue);
  font-size: 17px;
}

.summary-card small {
  display: block;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.trip-list,
.log-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.trip-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.trip-item strong,
.trip-item span {
  display: block;
}

.trip-item span,
.log-item {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.trip-item button {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
}

.screen-title {
  min-height: 48px;
  padding: 0 2px;
}

.screen-title strong {
  flex: 1;
  text-align: center;
  font-size: 18px;
}

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

.driver-form label {
  display: grid;
  gap: 7px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 900;
}

.driver-form input,
.driver-form select,
#driverPicker {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.submit-btn {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  text-transform: uppercase;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.trip-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trip-mini div {
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.trip-mini span,
.trip-mini strong {
  display: block;
}

.trip-mini span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.trip-mini strong {
  margin-top: 5px;
  font-size: 14px;
}

.profile-large {
  padding: 20px;
  text-align: center;
}

.profile-row {
  min-height: 54px;
  border: 1px solid var(--line);
  padding: 0 16px;
  text-align: left;
  color: var(--ink);
  font-weight: 900;
}

.profile-row.danger {
  color: #dc2626;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 430px);
  min-height: 74px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

.bottom-nav button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
  font-weight: 900;
}

.bottom-nav button.active {
  color: var(--blue);
}

.bottom-nav span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 40;
  transform: translateX(-50%) translateY(16px);
  width: min(360px, calc(100% - 32px));
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: #111827;
  text-align: center;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 680px) {
  body {
    background: #e8eef7;
  }

  .phone-shell,
  .bottom-nav {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

/* 2026-06-30 premium mobile refresh */
:root {
  --blue: #075985;
  --deep-blue: #0f172a;
  --green: #15803d;
  --orange: #c2410c;
  --red: #b91c1c;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe3ee;
  --panel: #ffffff;
  --bg: #eef4f8;
}

body {
  background:
    linear-gradient(180deg, #dcebf4 0, #f7fafc 42%, #eef4f8 100%);
}

.auth-view {
  background: linear-gradient(145deg, #075985, #15803d);
}

.auth-card,
.driver-card,
.driver-form,
.profile-row,
.trip-item {
  border-color: rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.phone-shell {
  background: transparent;
}

.app-top {
  min-height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #0f172a, #075985 58%, #0f766e);
}

.app-top strong {
  font-size: 19px;
}

.icon-btn {
  width: 48px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: 0;
}

.driver-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 118px;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-radius: 8px;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #075985);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.driver-hero span,
.driver-hero small,
.driver-hero strong {
  display: block;
}

.driver-hero span {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.82;
}

.driver-hero strong {
  margin-top: 7px;
  font-size: 20px;
  line-height: 1.15;
}

.driver-hero small {
  margin-top: 7px;
  line-height: 1.35;
  opacity: 0.86;
}

.driver-hero button {
  min-width: 70px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #075985;
  background: #ffffff;
  font-weight: 900;
}

.profile-card {
  border-top: 4px solid #0f766e;
}

.avatar {
  color: #ffffff;
  background: linear-gradient(135deg, #075985, #0f766e);
}

.online-pill {
  color: #166534;
  border: 1px solid #bbf7d0;
}

.action-grid {
  gap: 12px;
}

.action-tile {
  min-height: 118px;
  border-radius: 8px;
  text-align: left;
}

.action-tile span {
  width: auto;
  height: auto;
  margin: 0 0 16px;
  border-radius: 0;
  place-items: start;
  background: transparent;
  font-size: 12px;
  letter-spacing: 0;
  opacity: 0.86;
}

.summary-grid div,
.report-grid div,
.trip-mini div {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.trip-item {
  border-left: 4px solid #075985;
}

.screen-title button,
.section-head button {
  min-width: 58px;
  min-height: 38px;
  font-size: 12px;
}

.driver-form input,
.driver-form select,
#driverPicker,
.auth-card input {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.bottom-nav {
  min-height: 76px;
  border-radius: 8px 8px 0 0;
}

.bottom-nav b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 8px;
  background: #eef2ff;
  font-size: 13px;
}

.bottom-nav button.active b {
  color: #ffffff;
  background: #075985;
}
