/* DPASS driver-center mobile UI kit — base */
@import url("../../colors_and_type.css");

* { box-sizing: border-box; }

/* Device frame + demo backdrop live in prototype.css (prototype-only chrome). */

/* App bar */
.app-bar {
  height: 56px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; flex-shrink: 0;
}
.app-bar-title { font: 700 16px/24px var(--font-sans); letter-spacing: -0.017em; }
.app-bar-btn {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 0; cursor: pointer;
}
.icon {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon svg { width: 100%; height: 100%; fill: currentColor; }
.icon svg [fill] { fill: currentColor; }
.icon-24 { width: 24px; height: 24px; }
.icon-16 { width: 16px; height: 16px; }
.icon-22 { width: 22px; height: 22px; }

/* Generic page body */
.page-body {
  background: #EDEDED;
  padding: 24px 16px;
  display: flex; flex-direction: column; gap: 20px;
  flex: 1; min-height: 0;
  overflow-y: auto;
}
.page-body > * { flex-shrink: 0; }

/* Card surfaces */
.card-surface {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.card-surface--lg { padding: 20px; border-radius: 16px; }

/* Generic stack/row */
.stack-4 { display: flex; flex-direction: column; gap: 4px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.row-center { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.flex-1 { flex: 1; min-width: 0; }

/* Icon bubble — signature pattern */
.icon-bubble {
  width: 40px; height: 40px; border-radius: 9999px;
  background: var(--bg-pill-info);
  color: var(--main-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-bubble--lg { width: 48px; height: 48px; }
.icon-bubble--neutral { background: var(--neutral-100); color: var(--fg-default); }
.icon-bubble--success { background: #E6F0FF; color: #073A7E; }
.icon-bubble--error   { background: var(--error-50); color: var(--error-400); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 9999px; border: 1px solid transparent;
  font: 700 16px/24px var(--font-sans); letter-spacing: -0.017em;
  padding: 12px 24px;
  cursor: pointer; transition: filter .15s, transform .1s; user-select: none;
}
.btn:active { filter: brightness(.92); transform: scale(.98); }
.btn--block { width: 100%; }
.btn--primary  { background: var(--ink); color: #fff; }
.btn--secondary{ background: #fff; color: var(--ink); border-color: var(--ink); }
.btn--tertiary { background: transparent; color: var(--ink); }
.btn--disabled, .btn[disabled] { background: var(--neutral-400); color: #fff; cursor: not-allowed; }
.btn--sm { padding: 4px 14px; font: 700 12px/18px var(--font-sans); }

/* List row */
.list-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: background-color .15s;
}
.list-row:active { background-color: var(--main-100); }
.list-row .title { font: 700 16px/24px var(--font-sans); color: var(--fg-strong); letter-spacing: -0.017em; }
.list-row .sub   { font: 400 12px/18px var(--font-sans); color: var(--fg-muted); margin-top: 2px; }

/* Numbers */
.num { font-family: var(--font-num); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 9999px;
  font: 500 12px/16px var(--font-sans);
}
.chip--success { background: var(--main-100); color: var(--main-700); }
.chip--warn    { background: var(--error-50); color: var(--error-500); }
.chip--neutral { background: var(--neutral-100); color: var(--fg-muted); }
.chip--on-dark {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
}

/* Bottom tab nav */
.tab-bar {
  display: flex; height: 72px; background: #fff;
  border-top: 1px solid var(--neutral-200);
  padding: 6px 0 12px;
  flex-shrink: 0;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  color: var(--neutral-500);
}
.tab-item.is-active { color: var(--ink); }
.tab-item .label { font: 500 11px/13px var(--font-sans); }
.tab-item .icon { width: 24px; height: 24px; }

/* Modal */
.modal-scrim {
  position: absolute; inset: 44px 0 0 0; /* below status bar */
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 20;
  animation: fadeIn .2s ease-out;
}
.modal-sheet {
  background: #fff; border-radius: 24px; padding: 28px 24px;
  width: 100%;
  box-shadow: 0px 4px 3px rgba(0,0,0,0.10), 0px 10px 8px rgba(0,0,0,0.04);
  animation: slideUp .25s ease-out;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1 } }

/* Form input */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font: 400 14px/21px var(--font-sans); color: var(--fg-default); }
.field-input {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 12px 16px;
  font: 400 16px/24px var(--font-sans);
  color: var(--fg-default);
}
.field-input:focus-within { border-color: var(--main-700); box-shadow: 0 0 0 3px rgba(7,58,126,0.10); }
.field-input.is-error { border-color: var(--accent-error); }
.field-input input { all: unset; flex: 1; font: inherit; color: inherit; min-width: 0; }
.field-input input::placeholder { color: var(--fg-subtle); }
.field-hint { font: 400 12px/18px var(--font-sans); color: var(--fg-subtle); }
.field-hint.is-error { color: var(--accent-error); }
