/* ═══════════════════════════════════════════════════════════════
   MotoServiço — Design System v3
   Paleta: Azul petróleo + branco + laranja acento
   Clean, moderno, fácil de navegar
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Primária — azul petróleo */
  --p900: #0B1D35;
  --p800: #0F2744;
  --p700: #163459;
  --p600: #1C4270;
  --p500: #1E5799;
  --p400: #2872C8;
  --p300: #5B9BD5;
  --p100: #D6E8FA;
  --p50:  #EBF4FD;

  /* Acento — laranja vibrante */
  --a500: #F97316;
  --a400: #FB923C;
  --a100: #FFEDD5;

  /* Neutros */
  --n900: #111827;
  --n800: #1F2937;
  --n700: #374151;
  --n600: #4B5563;
  --n500: #6B7280;
  --n400: #9CA3AF;
  --n300: #D1D5DB;
  --n200: #E5E7EB;
  --n100: #F3F4F6;
  --n50:  #F9FAFB;
  --white: #FFFFFF;

  /* Status */
  --s-open:    #2563EB; --s-open-bg:    #EFF6FF;
  --s-active:  #D97706; --s-active-bg:  #FFFBEB;
  --s-part:    #7C3AED; --s-part-bg:    #F5F3FF;
  --s-approve: #EA580C; --s-approve-bg: #FFF7ED;
  --s-done:    #059669; --s-done-bg:    #ECFDF5;
  --s-cancel:  #6B7280; --s-cancel-bg:  #F9FAFB;
  --s-budget:  #0891B2; --s-budget-bg:  #ECFEFF;

  /* Layout */
  --header-h: 56px;
  --banner-h: 60px;
  --nav-h:    62px;

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl:32px;
  --r-full:999px;

  /* Sombras */
  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --sh-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --sh-lg: 0 10px 30px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.05);

  /* Transições */
  --ease: cubic-bezier(.4,0,.2,1);
  --t-fast: .12s var(--ease);
  --t-mid:  .22s var(--ease);
  --t-slow: .35s var(--ease);
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html { height: 100%; overflow: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px; line-height: 1.5;
  color: var(--n900); background: var(--n50);
  height: 100dvh; overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── SPLASH ──────────────────────────────────────────────────── */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, var(--p800) 0%, var(--p900) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  transition: opacity .5s var(--ease), visibility .5s;
}
.splash-screen.out { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-logo-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.splash-icon {
  width: 80px; height: 80px; border-radius: 22px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
}
.splash-icon .material-icons { font-size: 42px; color: #fff; }

.splash-name {
  font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.5px;
}
.splash-tag {
  font-size: 13px; color: rgba(255,255,255,.5); letter-spacing: .5px;
  text-transform: uppercase; font-weight: 500;
}

.splash-loader {
  width: 36px; height: 36px;
  border: 2.5px solid rgba(255,255,255,.15);
  border-top-color: rgba(255,255,255,.75);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ── LOGIN ───────────────────────────────────────────────────── */
#login-screen {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  overflow-y: auto;
  background: linear-gradient(170deg, var(--p50) 0%, var(--n100) 100%);
}

.login-wrap {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px 48px;
}

.login-card {
  width: 100%; max-width: 400px;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--n200);
  overflow: hidden;
}

.login-card-header {
  background: linear-gradient(135deg, var(--p700) 0%, var(--p800) 100%);
  padding: 32px 28px 28px;
  text-align: center;
}

.login-brand {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 18px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.2);
  margin-bottom: 14px;
}
.login-brand .material-icons { font-size: 34px; color: #fff; }

.login-card-title {
  font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.4px;
}
.login-card-sub {
  font-size: 13px; color: rgba(255,255,255,.6); margin-top: 4px;
}

.login-card-body { padding: 28px; }

/* Empresa encontrada */
.empresa-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--p50); border: 1px solid var(--p100);
  border-radius: var(--r-md); padding: 10px 14px;
  margin-bottom: 20px;
}
.empresa-chip-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--p500), var(--p700));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.empresa-chip-icon .material-icons { font-size: 18px; color: #fff; }
.empresa-chip-name { font-size: 14px; font-weight: 600; color: var(--p700); }
.empresa-chip-loc  { font-size: 12px; color: var(--p400); margin-top: 1px; }

/* Erro */
.login-error-msg {
  display: none;
  align-items: flex-start; gap: 8px;
  background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: var(--r-sm); padding: 10px 12px;
  font-size: 13px; color: #B91C1C; line-height: 1.4;
  margin-top: 12px;
}
.login-error-msg.show { display: flex; }
.login-error-msg .material-icons { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── FORMS ───────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }

.field-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--n500); text-transform: uppercase; letter-spacing: .7px;
  margin-bottom: 6px;
}

.field-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--n200); border-radius: var(--r-md);
  font-size: 15px; font-family: inherit; color: var(--n900);
  background: var(--white); outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
}
.field-input::placeholder { color: var(--n400); }
.field-input:focus {
  border-color: var(--p400);
  box-shadow: 0 0 0 3px rgba(40,114,200,.12);
}
textarea.field-input { resize: vertical; min-height: 88px; line-height: 1.5; }
select.field-input { cursor: pointer; }

.field-hint { font-size: 12px; color: var(--n400); margin-top: 4px; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--r-md); font-family: inherit;
  font-weight: 600; cursor: pointer; transition: all var(--t-fast);
  user-select: none; white-space: nowrap; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn .material-icons { font-size: 18px; }

.btn-primary {
  background: var(--p500); color: #fff;
  padding: 13px 22px; font-size: 15px;
  box-shadow: 0 4px 12px rgba(30,87,153,.3);
}
.btn-primary:hover:not(:disabled) { background: var(--p400); }

.btn-success {
  background: var(--s-done); color: #fff;
  padding: 12px 20px; font-size: 14px;
  box-shadow: 0 4px 12px rgba(5,150,105,.25);
}

.btn-danger {
  background: #DC2626; color: #fff;
  padding: 12px 20px; font-size: 14px;
  box-shadow: 0 4px 12px rgba(220,38,38,.25);
}

.btn-outline {
  background: transparent; color: var(--p500);
  border: 1.5px solid var(--p300);
  padding: 11px 18px; font-size: 14px;
}
.btn-outline:hover:not(:disabled) { background: var(--p50); }

.btn-ghost {
  background: transparent; color: var(--n600);
  padding: 10px 16px; font-size: 14px;
}
.btn-ghost:hover:not(:disabled) { background: var(--n100); }

.btn-ghost-danger {
  background: transparent; color: #DC2626;
  padding: 9px 14px; font-size: 13px;
}
.btn-ghost-danger:hover:not(:disabled) { background: #FEF2F2; }

.btn-full { width: 100%; }

/* Icon button no header */
.hdr-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.1); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--t-fast);
  flex-shrink: 0;
}
.hdr-btn:active { background: rgba(255,255,255,.2); transform: scale(.92); }
.hdr-btn .material-icons { font-size: 20px; }

/* ── LAYOUT DO APP ───────────────────────────────────────────── */
#app-shell {
  display: none;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.app-header {
  height: var(--header-h); flex-shrink: 0;
  background: linear-gradient(135deg, var(--p700) 0%, var(--p800) 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  z-index: 50;
}

.hdr-brand { display: flex; align-items: center; gap: 10px; }

.hdr-brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
}
.hdr-brand-icon .material-icons { font-size: 18px; color: #fff; }

.hdr-brand-name  { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -.2px; }
.hdr-brand-store { font-size: 11px; color: rgba(255,255,255,.55); margin-top: -1px; }

.hdr-actions { display: flex; gap: 4px; }

/* ── VEHICLE STRIP ───────────────────────────────────────────── */
.vehicle-strip {
  height: var(--banner-h); flex-shrink: 0;
  background: var(--p600);
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px; cursor: pointer;
  transition: opacity var(--t-fast);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.vehicle-strip:active { opacity: .82; }

.vs-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vs-icon .material-icons { font-size: 20px; color: #fff; }

.vs-info { flex: 1; min-width: 0; }
.vs-plate {
  font-size: 15px; font-weight: 700; color: #fff;
  letter-spacing: .5px; font-variant-numeric: tabular-nums;
}
.vs-model { font-size: 11.5px; color: rgba(255,255,255,.55); margin-top: 1px; }

.vs-swap { color: rgba(255,255,255,.4); }
.vs-swap .material-icons { font-size: 18px; }

/* ── CONTEÚDO PRINCIPAL ──────────────────────────────────────── */
.app-body {
  flex: 1; overflow-y: auto;
  padding-bottom: var(--nav-h);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* ── PÁGINAS ─────────────────────────────────────────────────── */
.page { display: none; animation: none; }
.page.active {
  display: block;
  animation: pgIn .18s var(--ease);
}
@keyframes pgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Page header interno */
.page-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 8px;
}
.page-hdr-title {
  font-size: 18px; font-weight: 800;
  color: var(--n900); letter-spacing: -.3px;
}

.btn-back {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--n100); color: var(--n700);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--t-fast); flex-shrink: 0;
}
.btn-back:active { background: var(--n200); transform: scale(.92); }
.btn-back .material-icons { font-size: 20px; }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  border: 1px solid var(--n200);
  overflow: hidden;
}

/* ── SECTION LABEL ───────────────────────────────────────────── */
.sec-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--n400);
  padding: 18px 14px 6px;
}

/* ── DASHBOARD GREETING ──────────────────────────────────────── */
.greet-row {
  padding: 18px 14px 6px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.greet-hi { font-size: 11px; color: var(--n500); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.greet-name { font-size: 22px; font-weight: 800; color: var(--n900); letter-spacing: -.4px; margin-top: 2px; }

/* ── OS ATIVA HERO ───────────────────────────────────────────── */
.os-hero {
  margin: 4px 14px 0;
  background: linear-gradient(135deg, var(--p600) 0%, var(--p800) 100%);
  border-radius: var(--r-lg);
  padding: 18px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15,39,68,.25);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.os-hero:active { transform: scale(.985); box-shadow: 0 3px 10px rgba(15,39,68,.2); }

.os-hero-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: rgba(255,255,255,.5); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.os-hero-label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #4ADE80; box-shadow: 0 0 6px #4ADE80;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.os-hero-num {
  font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.2px; margin-bottom: 4px;
}
.os-hero-desc {
  font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 14px;
}
.os-hero-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.os-hero-chevron { color: rgba(255,255,255,.4); }
.os-hero-chevron .material-icons { font-size: 18px; }

/* ── STATUS BADGE ────────────────────────────────────────────── */
.sbadge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.sbadge .material-icons { font-size: 10px; }

.sb-aberta             { background: var(--s-open-bg);    color: var(--s-open); }
.sb-em_andamento       { background: var(--s-active-bg);  color: var(--s-active); }
.sb-aguardando_peca    { background: var(--s-part-bg);    color: var(--s-part); }
.sb-aguardando_aprovacao { background: var(--s-approve-bg); color: var(--s-approve); }
.sb-concluida          { background: var(--s-done-bg);    color: var(--s-done); }
.sb-cancelada          { background: var(--s-cancel-bg);  color: var(--s-cancel); }
.sb-orcamento          { background: var(--s-budget-bg);  color: var(--s-budget); }

/* badge no fundo escuro */
.sbadge-dark {
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.9);
}

/* ── QUICK ACTIONS ───────────────────────────────────────────── */
.quick-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding: 0 14px;
}

.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 12px;
  background: var(--white);
  border: 1px solid var(--n200);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: var(--sh-xs);
}
.quick-item:active { transform: scale(.94); background: var(--n50); }

.qi-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.qi-icon .material-icons { font-size: 22px; }

.qi-label { font-size: 10.5px; font-weight: 600; color: var(--n600); text-align: center; }

/* Cores dos ícones */
.qi-blue   { background: var(--p100); }
.qi-blue   .material-icons { color: var(--p500); }
.qi-green  { background: #D1FAE5; }
.qi-green  .material-icons { color: #059669; }
.qi-orange { background: var(--a100); }
.qi-orange .material-icons { color: var(--a500); }
.qi-purple { background: #EDE9FE; }
.qi-purple .material-icons { color: #7C3AED; }

/* ── REVISÃO / AGENDAMENTO CARD ──────────────────────────────── */
.info-card {
  margin: 0 14px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--n200);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  transition: all var(--t-fast);
}
.info-card:active { background: var(--n50); }

.info-card-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.info-card-icon .material-icons { font-size: 22px; }
.ic-blue  { background: var(--p100); }
.ic-blue  .material-icons { color: var(--p500); }
.ic-amber { background: #FFFBEB; }
.ic-amber .material-icons { color: #D97706; }

.info-card-body { flex: 1; min-width: 0; }
.info-card-title { font-size: 14px; font-weight: 700; color: var(--n900); }
.info-card-sub   { font-size: 12.5px; color: var(--n500); margin-top: 2px; }

/* ── OS LIST ITEM ────────────────────────────────────────────── */
.os-item {
  display: flex; align-items: stretch; gap: 0;
  background: var(--white);
  border: 1px solid var(--n200);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  transition: all var(--t-fast);
  margin: 0 14px 10px; overflow: hidden;
}
.os-item:active { transform: scale(.985); box-shadow: none; }

.os-item-stripe {
  width: 4px; flex-shrink: 0;
}
.stripe-aberta             { background: var(--s-open); }
.stripe-em_andamento       { background: var(--s-active); }
.stripe-aguardando_peca    { background: var(--s-part); }
.stripe-aguardando_aprovacao { background: var(--s-approve); }
.stripe-concluida          { background: var(--s-done); }
.stripe-cancelada          { background: var(--s-cancel); }
.stripe-orcamento          { background: var(--s-budget); }

.os-item-body {
  flex: 1; min-width: 0; padding: 13px 12px;
}
.os-item-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 4px;
}
.os-item-num  { font-size: 12.5px; font-weight: 700; color: var(--p500); }
.os-item-desc {
  font-size: 13.5px; color: var(--n800); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 8px;
}
.os-item-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.os-item-date {
  font-size: 11.5px; color: var(--n400);
  display: flex; align-items: center; gap: 3px;
}
.os-item-date .material-icons { font-size: 12px; }
.os-item-total { font-size: 14px; font-weight: 700; color: var(--n800); }

.os-item-arrow {
  display: flex; align-items: center; padding: 0 12px 0 8px; color: var(--n300);
}
.os-item-arrow .material-icons { font-size: 18px; }

/* ── OS DETALHE ──────────────────────────────────────────────── */
.os-det-hero {
  margin: 0 14px 14px;
  background: var(--white);
  border: 1px solid var(--n200);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.os-det-stripe-top {
  height: 4px;
}

.os-det-inner { padding: 16px; }

.os-det-title {
  font-size: 20px; font-weight: 800; color: var(--n900);
  letter-spacing: -.3px; margin-bottom: 4px;
}

.os-det-veiculo {
  font-size: 13px; color: var(--n500); margin-bottom: 12px;
}

.os-det-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.os-det-meta-item { }
.os-det-meta-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--n400); }
.os-det-meta-val   { font-size: 14px; font-weight: 600; color: var(--n900); margin-top: 2px; }

.os-det-problema {
  background: var(--n50); border-radius: var(--r-sm); padding: 12px;
  font-size: 13.5px; color: var(--n700); line-height: 1.5;
  border: 1px solid var(--n200);
}

/* Seções de detalhe */
.det-section { margin: 0 14px 12px; }

.det-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 11px 14px; gap: 12px;
  border-bottom: 1px solid var(--n100);
}
.det-row:last-child { border-bottom: none; }
.det-row-name { font-size: 13.5px; color: var(--n800); flex: 1; }
.det-row-right { text-align: right; flex-shrink: 0; }
.det-row-qty   { font-size: 11px; color: var(--n400); }
.det-row-val   { font-size: 14px; font-weight: 600; color: var(--n900); }

/* Total box */
.total-box {
  margin: 0 14px 14px;
  background: var(--p50); border: 1px solid var(--p100);
  border-radius: var(--r-md); overflow: hidden;
}
.total-subtotal {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--p100);
  font-size: 13.5px; color: var(--n600);
}
.total-subtotal span:last-child { font-weight: 600; color: var(--n800); }
.total-main {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px; background: var(--p50);
}
.total-main-label { font-size: 15px; font-weight: 700; color: var(--p700); }
.total-main-val   { font-size: 22px; font-weight: 800; color: var(--p700); }

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline { padding: 8px 14px 4px; }

.tl-step {
  display: flex; gap: 10px; position: relative;
}
.tl-step:not(:last-child) .tl-line-wrap::after {
  content: '';
  position: absolute; left: 14px; top: 29px;
  width: 2px; height: calc(100% - 9px);
  background: var(--n200); z-index: 0;
}
.tl-line-wrap {
  position: relative; flex-shrink: 0;
  width: 30px;
  display: flex; justify-content: center;
}
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%; z-index: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--n200); background: var(--white);
}
.tl-dot .material-icons { font-size: 13px; color: var(--n300); }
.tl-dot.tl-done { border-color: var(--s-done); background: var(--s-done); }
.tl-dot.tl-done .material-icons { color: #fff; }
.tl-dot.tl-active { border-color: var(--p400); background: var(--p400); box-shadow: 0 0 0 4px rgba(40,114,200,.15); }
.tl-dot.tl-active .material-icons { color: #fff; }
.tl-dot.tl-cancel { border-color: #DC2626; background: #DC2626; }
.tl-dot.tl-cancel .material-icons { color: #fff; }

.tl-body { flex: 1; padding: 4px 0 20px; }
.tl-title { font-size: 14px; font-weight: 600; color: var(--n800); }
.tl-sub   { font-size: 12px; color: var(--n400); margin-top: 2px; }

/* ── APROVAÇÃO BANNER ────────────────────────────────────────── */
.aprov-banner {
  margin: 0 14px 12px;
  background: #FFFBEB; border: 1.5px solid #FDE68A;
  border-radius: var(--r-lg); padding: 16px;
}
.aprov-banner-top {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: #92400E; margin-bottom: 6px;
}
.aprov-banner-top .material-icons { font-size: 20px; color: #D97706; }
.aprov-banner-desc { font-size: 13.5px; color: #78350F; line-height: 1.5; }
.aprov-actions { display: flex; gap: 10px; margin-top: 14px; }
.aprov-actions .btn { flex: 1; }

/* ── AVALIAÇÃO ESTRELAS ──────────────────────────────────────── */
.stars-row {
  display: flex; justify-content: center; gap: 4px; margin: 10px 0;
}
.star-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  font-size: 34px; line-height: 1; color: var(--n200);
  transition: color var(--t-fast), transform var(--t-fast);
}
.star-btn.on { color: #FBBF24; }
.star-btn:active { transform: scale(1.2); }

.stars-static { display: inline-flex; gap: 2px; }
.star-s { font-size: 16px; color: var(--n200); }
.star-s.on { color: #FBBF24; }

/* ── AGENDAMENTO ITEM ────────────────────────────────────────── */
.agend-item {
  background: var(--white); border: 1px solid var(--n200);
  border-radius: var(--r-md); box-shadow: var(--sh-xs);
  margin: 0 14px 10px; padding: 14px;
  border-left: 4px solid var(--n200);
}
.agend-item.pendente   { border-left-color: var(--s-active); }
.agend-item.confirmado { border-left-color: var(--s-open); }
.agend-item.cancelado  { border-left-color: var(--s-cancel); opacity: .65; }
.agend-item.concluido  { border-left-color: var(--s-done); }

.agend-top    { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.agend-date   { font-size: 14px; font-weight: 700; color: var(--n900); margin-bottom: 3px; }
.agend-veiculo{ font-size: 12px; color: var(--n500); margin-bottom: 4px; }
.agend-desc   { font-size: 13px; color: var(--n700); line-height: 1.4; }
.agend-os     { font-size: 11.5px; color: var(--n400); margin-top: 6px; }

/* ── PERFIL ──────────────────────────────────────────────────── */
.perfil-hero {
  padding: 24px 14px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: linear-gradient(170deg, var(--p50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--n200);
}
.perfil-av {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--p500), var(--p700));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(30,87,153,.3);
}
.perfil-av .material-icons { font-size: 40px; color: #fff; }
.perfil-name    { font-size: 20px; font-weight: 800; color: var(--n900); letter-spacing: -.3px; }
.perfil-empresa { font-size: 13px; color: var(--n500); }
.perfil-chips   { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.perfil-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: var(--r-full);
  background: var(--n100); font-size: 12px; font-weight: 500; color: var(--n600);
}
.perfil-chip .material-icons { font-size: 13px; }

/* ── VEÍCULO LIST ITEM ───────────────────────────────────────── */
.veiculo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-bottom: 1px solid var(--n100);
  cursor: pointer; transition: background var(--t-fast);
}
.veiculo-row:last-child { border-bottom: none; }
.veiculo-row:active { background: var(--n50); }
.veiculo-row-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--p100); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.veiculo-row-icon .material-icons { font-size: 22px; color: var(--p500); }
.veiculo-row-icon.active-v { background: var(--p500); }
.veiculo-row-icon.active-v .material-icons { color: #fff; }
.veiculo-row-plate { font-size: 14px; font-weight: 700; color: var(--n900); }
.veiculo-row-info  { font-size: 12.5px; color: var(--n500); margin-top: 2px; }
.veiculo-row-badge {
  margin-left: auto; flex-shrink: 0;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  background: var(--p100); color: var(--p500);
}

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty {
  padding: 56px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon {
  width: 68px; height: 68px; border-radius: 20px;
  background: var(--n100);
  display: flex; align-items: center; justify-content: center;
}
.empty-icon .material-icons { font-size: 34px; color: var(--n300); }
.empty-title { font-size: 16px; font-weight: 700; color: var(--n800); }
.empty-sub   { font-size: 13.5px; color: var(--n500); line-height: 1.5; }

/* ── LOADING ─────────────────────────────────────────────────── */
.loading-box {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 56px 24px; gap: 14px;
}
.loading-ring {
  width: 32px; height: 32px;
  border: 3px solid var(--n200);
  border-top-color: var(--p400);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.loading-txt { font-size: 13px; color: var(--n400); }

/* ── BOTTOM NAV ──────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid var(--n200);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}

.nav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; border: none; background: none;
  cursor: pointer; padding: 8px 4px;
  color: var(--n400); font-size: 10px; font-weight: 600;
  font-family: inherit; letter-spacing: .2px;
  transition: color var(--t-fast); position: relative;
}
.nav-btn .material-icons { font-size: 22px; transition: transform var(--t-fast); }
.nav-btn.active { color: var(--p500); }
.nav-btn.active .material-icons { transform: scale(1.08); }
.nav-btn.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--p500); border-radius: 0 0 3px 3px;
}

/* ── MODAL / SHEET ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,29,53,.5);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-mid);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-sheet {
  background: var(--white);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%; max-width: 520px; max-height: 90dvh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform var(--t-slow);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 32px; height: 4px; background: var(--n200);
  border-radius: 2px; margin: 10px auto 0;
}

.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 12px; border-bottom: 1px solid var(--n200);
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-head .material-icons { font-size: 22px; color: var(--p500); }
.modal-title { font-size: 17px; font-weight: 700; color: var(--n900); flex: 1; }
.modal-body  { padding: 18px; }

/* ── SNACKBAR ────────────────────────────────────────────────── */
.snackbar {
  position: fixed; bottom: calc(var(--nav-h) + 10px); left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--n800); color: #fff;
  padding: 11px 18px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 500;
  max-width: 88vw; white-space: nowrap;
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: all var(--t-mid);
  box-shadow: var(--sh-md);
}
.snackbar.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.snackbar.ok   { background: #065F46; }
.snackbar.err  { background: #9B1C1C; }
.snackbar.warn { background: #78350F; }

/* ── AVALIAÇÕES CARD ─────────────────────────────────────────── */
.aval-item {
  background: var(--white); border: 1px solid var(--n200);
  border-radius: var(--r-md); box-shadow: var(--sh-xs);
  margin: 0 14px 10px; padding: 14px;
}
.aval-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  margin-bottom: 8px;
}
.aval-os   { font-size: 13.5px; font-weight: 700; color: var(--n900); }
.aval-date { font-size: 11.5px; color: var(--n400); margin-top: 2px; }
.aval-comentario {
  font-size: 13.5px; color: var(--n700); line-height: 1.5;
  font-style: italic; padding: 10px 12px;
  background: var(--n50); border-radius: var(--r-sm);
  border-left: 3px solid var(--p100);
  margin-top: 8px;
}
.aval-resposta {
  margin-top: 8px; padding: 10px 12px;
  background: #ECFDF5; border-radius: var(--r-sm);
  border-left: 3px solid var(--s-done);
  font-size: 13px; color: #065F46; line-height: 1.4;
}
.aval-resposta strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }

/* ── UTILITÁRIOS ─────────────────────────────────────────────── */
.p-14   { padding: 14px; }
.p-h14  { padding: 0 14px; }
.mb-12  { margin-bottom: 12px; }
.mt-12  { margin-top: 12px; }
.mt-4   { margin-top: 4px; }
.flex   { display: flex; }
.gap-10 { gap: 10px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.fw-700 { font-weight: 700; }
.text-sm { font-size: 13px; }

/* ── DARK MODE ───────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --white:  #131A24;
    --n50:    #0D1219;
    --n100:   #161D28;
    --n200:   #1E2735;
    --n300:   #283444;
    --n400:   #4A5568;
    --n500:   #718096;
    --n700:   #A0AEC0;
    --n800:   #CBD5E0;
    --n900:   #E2E8F0;
    --p50:    #0B1929;
    --p100:   #0E2040;
    --sh-xs: 0 1px 3px rgba(0,0,0,.4);
    --sh-sm: 0 2px 6px rgba(0,0,0,.5);
    --sh-md: 0 4px 16px rgba(0,0,0,.6);
    --sh-lg: 0 10px 30px rgba(0,0,0,.7);
  }
  body { background: #0D1219; }
  .app-header  { background: linear-gradient(135deg, #0B1929, #070F1A); }
  .vehicle-strip { background: #0E2040; }
  .os-hero    { background: linear-gradient(135deg, #0E2040, #070F1A); }
  .bottom-nav { background: #131A24; border-color: #1E2735; }
  .modal-sheet { background: #131A24; }
  .modal-head  { background: #131A24; border-color: #1E2735; }
  .card        { background: #131A24; border-color: #1E2735; }
  .login-card  { background: #131A24; border-color: #1E2735; }
  .field-input { background: #161D28; border-color: #1E2735; color: var(--n800); }
  .perfil-hero { background: linear-gradient(170deg, #0B1929, #131A24); border-color: #1E2735; }
  .os-det-problema { background: #161D28; border-color: #1E2735; }
}
