/* ==========================================================================
   Etapa Auto — Modern Studio Design System
   Estética automotiva · Azul elétrico #2259F5 · Precisão arquitetônica
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light;

  /* Marca — azul principal preservado (#2259F5) */
  --color-brand: #2259f5;
  --color-brand-hover: #1a4ae0;
  --color-brand-pressed: #143bc0;
  --color-brand-subtle: #eef4ff;
  --color-brand-subtle-strong: #dce8ff;
  --color-brand-glow: rgba(34, 89, 245, 0.24);

  /* Superfícies arquitetônicas */
  --color-ink: #0a101e;
  --color-text: #0f172a;
  --color-text-secondary: #4e5d78;
  --color-text-muted: #7a89a4;
  --color-canvas: #f4f6fb;
  --color-surface: #ffffff;
  --color-surface-muted: #f8fafd;
  --color-border: #e4eaf4;
  --color-border-strong: #cbd6e8;

  /* Sobre escuro */
  --color-on-dark: #ffffff;
  --color-on-dark-muted: #b6c6e3;
  --color-focus-on-dark: #93b8ff;

  /* Semânticas */
  --color-neutral-bg: #eef2f8;
  --color-neutral-text: #475569;
  --color-warning-bg: #fef3c7;
  --color-warning-text: #92400e;
  --color-success-bg: #ecfdf5;
  --color-success-text: #047857;
  --color-danger-bg: #fef2f2;
  --color-danger-text: #b91c1c;

  /* Espaçamento */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Geometria e elevação */
  --radius-control: 11px;
  --radius-photo: 13px;
  --radius-card: 18px;
  --radius-feature: 22px;
  --radius-pill: 999px;
  --border: 1px solid var(--color-border);
  --shadow-xs: 0 1px 2px rgba(10, 16, 30, 0.04);
  --shadow-card: 0 1px 2px rgba(10, 16, 30, 0.03), 0 8px 24px -4px rgba(15, 23, 42, 0.06);
  --shadow-raised: 0 4px 12px rgba(10, 16, 30, 0.06), 0 18px 36px -8px rgba(15, 23, 42, 0.12);
  --shadow-overlay: 0 24px 64px -12px rgba(10, 16, 30, 0.28);
  --shadow-feature: 0 16px 40px -12px rgba(10, 16, 30, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;

  /* Tipografia */
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --nav-width: 252px;
  --topbar-height: 62px;
  --bottomnav-height: 64px;
  --content: 1140px;
  --content-form: 820px;
  --content-narrow: 760px;
  --gutter: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 28px;
    --topbar-height: 66px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 36px;
  }
}

/* ---------------------------------------------------------------- base */

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

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

body {
  margin: 0;
  background: var(--color-canvas);
  background-image: radial-gradient(60% 45% at 80% 0%, rgba(34, 89, 245, 0.045) 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--color-brand);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 8px;
}

.feature :focus-visible,
.login-screen :focus-visible,
.public-hero :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

::selection {
  background: var(--color-brand-subtle-strong);
  color: var(--color-ink);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--color-surface);
  color: var(--color-brand);
  padding: 12px 18px;
  border-radius: var(--radius-control);
  font-weight: 600;
  box-shadow: var(--shadow-raised);
  transition: top 140ms var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- shell */

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    'topbar'
    'main'
    'bottomnav';
}

.topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--topbar-height);
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  margin-left: -2px;
  border: 0;
  background: none;
  color: var(--color-ink);
  cursor: pointer;
  text-decoration: none;
}

.brand svg {
  height: 22px;
  width: auto;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-unit {
  display: none;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow-xs);
}

.studio-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  flex: 0 0 auto;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-cta {
  display: none;
}

.user-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.user-button:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card);
}

.user-button svg {
  color: var(--color-text-muted);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4b80ff, var(--color-brand));
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex: 0 0 auto;
  box-shadow: 0 2px 6px rgba(34, 89, 245, 0.3);
}

.user-meta {
  display: block;
  text-align: left;
  line-height: 1.2;
}

@media (max-width: 639px) {
  .user-meta {
    display: none;
  }
}

.user-name {
  display: none;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--color-text);
}

.user-role {
  font-size: 11.5px;
  line-height: 1.2;
  color: var(--color-text-muted);
}

.menu {
  position: absolute;
  right: var(--gutter);
  top: calc(var(--topbar-height) - 4px);
  z-index: 50;
  width: min(276px, calc(100vw - 24px));
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-overlay);
  animation: page-in 150ms var(--ease);
}

.menu-head {
  padding: 10px 12px 12px;
  margin-bottom: 4px;
  border-bottom: var(--border);
}

.menu-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.menu-head span {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-unit {
  margin-top: 6px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-subtle);
  color: var(--color-brand-hover);
  font-weight: 600;
}

.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  color: var(--color-text);
  transition: background 120ms var(--ease);
}

.menu button:hover {
  background: var(--color-canvas);
}

.menu button.danger {
  color: var(--color-danger-text);
}

.menu button.danger:hover {
  background: var(--color-danger-bg);
}

.sidenav {
  display: none;
}

.sidenav-head,
.sidenav-brand,
.sidenav-logo,
.sidenav-brand-text,
.sidenav-sub,
.sidenav-cta,
.nav-foot-meta {
  display: block;
}

.main {
  grid-area: main;
  min-width: 0;
  padding: var(--space-5) var(--gutter) calc(var(--bottomnav-height) + env(safe-area-inset-bottom) + 32px);
}

.page-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.bottomnav {
  grid-area: bottomnav;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -10px 30px rgba(10, 16, 30, 0.06);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 50px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms var(--ease), background 150ms var(--ease);
}

.tab svg {
  width: 20px;
  height: 20px;
}

.tab[aria-current='page'] {
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  font-weight: 700;
}

@media (min-width: 640px) {
  .user-name {
    display: block;
  }

  .brand-unit {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  .shell {
    grid-template-columns: var(--nav-width) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      'sidenav topbar'
      'sidenav main';
  }

  .topbar {
    background: rgba(244, 246, 251, 0.78);
  }

  .topbar .brand {
    display: none;
  }

  .topbar-cta {
    display: inline-flex;
  }

  .bottomnav {
    display: none;
  }

  .sidenav {
    grid-area: sidenav;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 14px 18px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
  }

  .sidenav-head {
    padding: 2px 4px 14px;
  }

  .sidenav-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 4px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--color-ink);
    text-align: left;
    cursor: pointer;
    transition: background 140ms var(--ease);
  }

  .sidenav-brand:hover {
    background: var(--color-surface-muted);
  }

  .sidenav-logo {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(145deg, #162344, var(--color-ink));
    box-shadow: 0 4px 12px rgba(10, 16, 30, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    flex: 0 0 auto;
  }

  .sidenav-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .sidenav-brand .brand-name {
    font-size: 16px;
    line-height: 1.15;
  }

  .sidenav-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: 1px;
  }

  .sidenav-cta {
    margin: 2px 0 14px;
    min-height: 44px;
  }

  .nav-label {
    padding: 8px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .navlink {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 550;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    transition: background 150ms var(--ease), color 150ms var(--ease);
  }

  .navlink svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    opacity: 0.78;
    transition: opacity 150ms var(--ease), color 150ms var(--ease);
  }

  .navlink:hover {
    background: var(--color-canvas);
    color: var(--color-text);
  }

  .navlink:hover svg {
    opacity: 1;
  }

  .navlink[aria-current='page'] {
    background: var(--color-brand-subtle);
    color: var(--color-brand);
    font-weight: 650;
  }

  .navlink[aria-current='page']::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--color-brand);
  }

  .navlink[aria-current='page'] svg {
    opacity: 1;
    color: var(--color-brand);
  }

  .nav-sep {
    height: 1px;
    margin: var(--space-3) 10px var(--space-2);
    background: var(--color-border);
  }

  .nav-foot {
    margin-top: auto;
    padding: 13px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--color-surface-muted) 0%, #eff4fc 100%);
    border: 1px solid var(--color-border);
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-text-secondary);
  }

  .nav-foot strong {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
  }

  .nav-foot strong::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    flex: 0 0 auto;
  }

  .nav-foot-meta {
    font-size: 11.5px;
    color: var(--color-text-muted);
  }

  .main {
    padding: var(--space-8) var(--gutter) 72px;
  }
}

/* ---------------------------------------------------------------- página */

.page {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: var(--content);
  margin: 0 auto;
  animation: page-in 220ms var(--ease);
}

.page--form {
  max-width: var(--content-form);
}

.page--narrow {
  max-width: var(--content-narrow);
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 768px) {
  .page {
    gap: var(--space-6);
  }
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.page-header > div {
  min-width: 0;
}

.page-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 5px;
}

.page-title {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 800;
  color: var(--color-ink);
}

.page-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 62ch;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 520px) {
  .page-actions .btn:only-child {
    flex: 1 1 100%;
  }
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  margin: 0 0 6px -8px;
  padding: 0 12px 0 6px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}

.page-back:hover {
  color: var(--color-brand);
  background: var(--color-brand-subtle);
}

@media (min-width: 768px) {
  .page-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
  }

  .page-title {
    font-size: 34px;
  }

  .page-actions {
    padding-bottom: 2px;
  }
}

/* ---------------------------------------------------------------- kpis do estúdio */

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

@media (min-width: 768px) {
  .kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}

.kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
  border-color: var(--color-border-strong);
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.kpi-brand .kpi-icon {
  background: var(--color-brand-subtle);
  color: var(--color-brand);
}

.kpi-amber .kpi-icon {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.kpi-slate .kpi-icon {
  background: var(--color-neutral-bg);
  color: var(--color-neutral-text);
}

.kpi-emerald .kpi-icon {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.kpi-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-ink);
}

.kpi-label {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 550;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- selos automotivos & progresso */

.plate-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px 2px 7px;
  border-radius: 6px;
  background: #f8fafd;
  border: 1px solid #cbd6e8;
  border-top: 2.5px solid var(--color-brand);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-ink);
  line-height: 1.3;
  flex: 0 0 auto;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--color-brand-subtle);
  color: var(--color-brand-hover);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  flex: 0 0 auto;
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--color-neutral-bg);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 360ms var(--ease);
}

.progress-brand {
  background: linear-gradient(90deg, var(--color-brand), #4b80ff);
}

.progress-success {
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* ---------------------------------------------------------------- stepper de etapas */

.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 16px 18px;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
}

.step-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.step-node::after {
  content: '';
  position: absolute;
  top: 13px;
  left: calc(50% + 16px);
  right: calc(-50% + 8px);
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.step-node:last-child::after {
  display: none;
}

.step-node.is-done::after {
  background: var(--color-brand);
}

.step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-muted);
  border: 1.5px solid var(--color-border-strong);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.step-node.is-done .step-dot {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

.step-node.is-current .step-dot {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
  box-shadow: 0 0 0 5px var(--color-brand-glow);
}

.step-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.step-node.is-done .step-label {
  color: var(--color-text-secondary);
}

.step-node.is-current .step-label {
  color: var(--color-brand);
  font-weight: 700;
}

.step-node.is-next .step-dot {
  opacity: 0.7;
}

@media (max-width: 560px) {
  .stepper {
    padding: 12px 8px;
    gap: 4px;
  }

  .step-label {
    font-size: 10px;
  }

  .step-dot {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .step-node::after {
    top: 11px;
    left: calc(50% + 14px);
    right: calc(-50% + 10px);
  }
}

/* ---------------------------------------------------------------- cartões */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

@media (min-width: 768px) {
  .card {
    padding: var(--space-6);
  }
}

.section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.section-title {
  font-size: 19px;
  line-height: 26px;
  font-weight: 750;
  color: var(--color-ink);
}

.section-title-sm {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
  color: var(--color-ink);
}

.form-step-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.form-step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 auto;
}

.panel {
  padding: 15px 16px;
  border: 1px solid rgba(34, 89, 245, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%);
}

.link-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-secondary);
}

.link-preview svg {
  color: var(--color-brand);
  flex: 0 0 auto;
}

.status-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-ink);
}

.forecast-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--color-brand-pressed);
}

.btn-link {
  min-height: auto;
  padding: 0 3px;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.text-danger {
  color: var(--color-danger-text);
}

.col-method {
  display: none;
}

@media (min-width: 760px) {
  .col-method {
    display: table-cell;
  }
}

.section-note {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--color-neutral-bg);
  color: var(--color-neutral-text);
  font-size: 12px;
  font-weight: 650;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.grid-2 {
  display: grid;
  gap: var(--space-4);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 13px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
}

.mini-grid .tiny {
  display: block;
  margin-bottom: 2px;
}

.finance-top {
  display: grid;
  gap: 14px;
}

@media (min-width: 900px) {
  .finance-top {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.55fr);
    align-items: stretch;
  }

  .finance-top .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-top .stat-grid > .stat:last-child {
    grid-column: auto;
  }
}

@media (min-width: 1000px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr);
    align-items: start;
    gap: var(--space-5);
  }
}

.divider {
  height: 1px;
  background: var(--color-border);
  margin: 2px 0;
}

/* ---------------------------------------------------------------- botões */

.btn {
  --btn-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-height);
  padding: 0 18px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), box-shadow 150ms var(--ease),
    transform 100ms var(--ease), color 150ms var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, #2d66ff 0%, var(--color-brand) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 16, 30, 0.14), 0 6px 16px -4px rgba(34, 89, 245, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #2259f5 0%, var(--color-brand-hover) 100%);
  box-shadow: 0 2px 4px rgba(10, 16, 30, 0.16), 0 10px 22px -6px rgba(34, 89, 245, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:active:not(:disabled) {
  background: var(--color-brand-pressed);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface-muted);
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 0 12px;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-canvas);
  color: var(--color-text);
}

.btn-danger {
  background: var(--color-danger-text);
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(185, 28, 28, 0.35);
}

.btn-danger:hover:not(:disabled) {
  background: #991b1b;
}

.btn-outline-danger {
  background: var(--color-surface);
  border-color: #f3c4c4;
  color: var(--color-danger-text);
}

.btn-outline-danger:hover:not(:disabled) {
  background: var(--color-danger-bg);
  border-color: #e49b9b;
}

.btn-sm {
  --btn-height: 38px;
  padding: 0 13px;
  font-size: 13px;
  gap: 6px;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-lg {
  --btn-height: 50px;
  padding: 0 24px;
  font-size: 15px;
}

.btn-icon {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: var(--radius-control);
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.btn-icon:hover:not(:disabled) {
  background: var(--color-surface-muted);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-icon svg {
  width: 19px;
  height: 19px;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 560px) {
  .btn-row > .btn {
    flex: 1 1 auto;
  }
}

/* ---------------------------------------------------------------- etiquetas */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.badge svg {
  width: 13px;
  height: 13px;
}

.badge-agendado,
.badge-neutral {
  background: var(--color-neutral-bg);
  color: var(--color-neutral-text);
}

.badge-recebido,
.badge-brand {
  background: var(--color-brand-subtle);
  color: var(--color-brand);
}

.badge-em_execucao,
.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.badge-pronto {
  background: var(--color-brand-subtle);
  color: var(--color-brand-pressed);
  box-shadow: inset 0 0 0 1px rgba(34, 89, 245, 0.35);
}

.badge-entregue,
.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.badge-cancelado,
.badge-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.badge-dark {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* ---------------------------------------------------------------- destaque (Hero Studio Spotlight) */

.feature {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  padding: var(--space-5);
  border-radius: var(--radius-feature);
  background: linear-gradient(135deg, #0d162b 0%, var(--color-ink) 55%, #0c1b45 100%);
  color: var(--color-on-dark);
  text-decoration: none;
  box-shadow: var(--shadow-feature);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.feature::before {
  content: '';
  position: absolute;
  top: -35%;
  right: -10%;
  width: 58%;
  height: 180%;
  background: linear-gradient(155deg, rgba(34, 89, 245, 0.42), rgba(34, 89, 245, 0) 68%);
  clip-path: polygon(44% 0, 100% 0, 100% 100%, 4% 100%);
  pointer-events: none;
}

.feature::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 139, 255, 0.6), transparent);
  pointer-events: none;
}

.feature.is-overdue {
  background: linear-gradient(135deg, #1b1424 0%, #110f1d 55%, #2b1422 100%);
}

.feature.is-overdue::before {
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0) 68%);
}

.feature > * {
  position: relative;
  z-index: 1;
}

a.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px -12px rgba(10, 16, 30, 0.45), 0 0 0 1px rgba(91, 139, 255, 0.35) inset;
}

.feature-empty {
  border-style: dashed;
  border-color: var(--color-border-strong);
  background: var(--color-surface);
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.feature-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-focus-on-dark);
}

.feature-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.feature-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.feature-time {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.feature-time small {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(34, 89, 245, 0.28);
  border: 1px solid rgba(147, 184, 255, 0.25);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dbe8ff;
  vertical-align: 8px;
}

.feature-vehicle {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-service {
  font-size: 13.5px;
  color: var(--color-on-dark-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-photo {
  width: 82px;
  height: 82px;
  border-radius: 15px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.feature-photo-empty {
  display: grid;
  place-items: center;
  color: #8ba3cf;
}

.feature-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  color: var(--color-on-dark-muted);
}

.feature-code {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #dbe8ff;
}

.feature-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(34, 89, 245, 0.28);
  border: 1px solid rgba(147, 184, 255, 0.25);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
  transition: background 150ms var(--ease);
}

a.feature:hover .feature-cta {
  background: var(--color-brand);
}

.feature-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 550;
}

.feature-pulse::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .feature {
    padding: var(--space-6) 28px;
  }

  .feature-time {
    font-size: 54px;
  }

  .feature-photo {
    width: 114px;
    height: 114px;
    border-radius: 18px;
  }

  .feature-vehicle {
    font-size: 22px;
  }
}

/* ---------------------------------------------------------------- listas */

.list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1080px) {
  .list {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 14px;
  }
}

.list-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.list-card > .empty {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 68px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms var(--ease);
}

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

.list-row:hover {
  background: #f8faff;
}

.list-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.list-row-title {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--color-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-side {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  text-align: right;
  font-size: 12.5px;
  color: var(--color-text-secondary);
}

.row-chevron {
  display: inline-flex;
  color: var(--color-text-muted);
  transition: transform 150ms var(--ease), color 150ms var(--ease);
}

.list-row:hover .row-chevron {
  transform: translateX(2px);
  color: var(--color-brand);
}

.initials {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--color-brand-subtle) 0%, var(--color-brand-subtle-strong) 100%);
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 750;
  text-transform: uppercase;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------- cartão de veículo */

.order-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 13px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color 170ms var(--ease), box-shadow 170ms var(--ease), transform 170ms var(--ease);
}

.order-card:hover:not(.is-static) {
  border-color: rgba(34, 89, 245, 0.42);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.order-card.is-static {
  cursor: default;
}

.thumb {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-photo);
  background: var(--color-neutral-bg);
  color: #8ba0bd;
  object-fit: cover;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.thumb svg {
  width: 24px;
  height: 24px;
}

.thumb-empty {
  border: 1px dashed var(--color-border-strong);
  background: var(--color-surface-muted);
}

.order-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.order-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.order-model {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-service {
  font-size: 12.5px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-main .row {
  gap: 6px;
  margin-top: 3px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.order-main .row > .badge {
  flex: 0 0 auto;
}

.order-main .progress-track {
  margin-top: 6px;
  height: 5px;
}

.order-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--color-border);
  flex: 0 0 auto;
  text-align: right;
}

.order-time {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-ink);
  white-space: nowrap;
}

.order-time small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

@media (max-width: 400px) {
  .thumb {
    width: 58px;
    height: 58px;
  }

  .order-card {
    gap: 10px;
    padding: 11px;
  }

  .order-side {
    padding-left: 8px;
  }
}

/* ---------------------------------------------------------------- agenda */

.agenda-month {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .agenda-month {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    align-items: start;
    gap: var(--space-5);
  }
}

.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cal-month {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
  padding: 0 4px;
}

.cal-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
}

.cal-head span {
  padding: 4px 0;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease);
}

.cal-cell > span:first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 140ms var(--ease), color 140ms var(--ease), box-shadow 140ms var(--ease);
}

.cal-cell:hover:not(.is-empty) {
  background: var(--color-surface-muted);
  border-color: var(--color-border);
}

.cal-cell.is-today > span:first-child {
  box-shadow: inset 0 0 0 1.5px var(--color-brand);
  color: var(--color-brand);
  font-weight: 700;
}

.cal-cell.is-selected {
  background: var(--color-brand-subtle);
  border-color: rgba(34, 89, 245, 0.22);
}

.cal-cell.is-selected > span:first-child {
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(34, 89, 245, 0.35);
}

.cal-cell.is-empty {
  cursor: default;
  background: transparent;
}

@media (min-width: 768px) {
  .cal-cell {
    min-height: 64px;
  }
}

@media (min-width: 1200px) {
  .cal-cell {
    min-height: 74px;
  }
}

.cal-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 6px;
}

.cal-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--color-brand);
}

.cal-dot.retirada {
  background: #f59e0b;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: var(--border);
  font-size: 12px;
  color: var(--color-text-secondary);
}

.legend-swatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-brand);
}

.legend-swatch.retirada::before {
  background: #f59e0b;
}

.legend-swatch.hoje::before {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--color-brand);
}

.agenda-event {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 13px 15px 13px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}

.agenda-event::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-brand);
}

.agenda-event.is-retirada::before {
  background: #f59e0b;
}

.agenda-event.is-entrada::before {
  background: var(--color-brand);
}

.agenda-event:hover {
  border-color: rgba(34, 89, 245, 0.38);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.ev-time-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 62px;
  padding-right: 12px;
  border-right: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.ev-time {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-ink);
}

.ev-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.ev-kind.entrada {
  color: var(--color-brand);
}

.ev-kind.retirada {
  color: #b45309;
}

/* ---------------------------------------------------------------- linha do tempo */

.timeline {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 13px;
  padding-bottom: 18px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 2px;
  width: 2px;
  background: var(--color-border);
}

.tl-item:last-child::before {
  display: none;
}

.tl-marker {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.tl-marker svg {
  width: 13px;
  height: 13px;
}

.tl-item.done .tl-marker {
  border-color: #a7f3d0;
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.tl-item.current .tl-marker {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: #fff;
  box-shadow: 0 0 0 5px var(--color-brand-glow);
}

.tl-item.next .tl-marker {
  opacity: 0.55;
}

.tl-body {
  padding-top: 2px;
  min-width: 0;
}

.tl-title {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--color-ink);
}

.tl-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.tl-note {
  display: block;
  margin-top: 5px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------- formulários */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--color-text);
}

.field-label .req {
  color: var(--color-danger-text);
  margin-left: 2px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(10, 16, 30, 0.03);
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease);
}

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

.input::placeholder,
.textarea::placeholder {
  color: #9aa7be;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #a6b7d4;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 4px rgba(34, 89, 245, 0.14);
}

.input[aria-invalid='true'],
.select[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--color-danger-text);
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234e5d78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.field-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--color-danger-text);
}

.field-error svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.field-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-grid .span-2 {
    grid-column: span 2;
  }
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 44px;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.45;
  cursor: pointer;
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--color-brand);
}

.checkbox.is-switch {
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
}

.checkbox.is-switch input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: var(--radius-pill);
  background: #cbd6e8;
  transition: background 160ms var(--ease);
  cursor: pointer;
}

.checkbox.is-switch input::before {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 16, 30, 0.25);
  transition: transform 160ms var(--ease);
}

.checkbox.is-switch input:checked {
  background: var(--color-brand);
}

.checkbox.is-switch input:checked::before {
  transform: translateX(17px);
}

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

.search > svg {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search .input {
  padding-left: 44px;
  padding-right: 46px;
  border-radius: 13px;
  background: var(--color-surface);
}

.search-clear {
  position: absolute;
  right: 5px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.search-clear:hover {
  background: var(--color-canvas);
  color: var(--color-text);
}

.seg {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 13px;
  background: var(--color-neutral-bg);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.seg-btn svg {
  width: 15px;
  height: 15px;
}

.seg-btn[aria-pressed='true'] {
  background: var(--color-surface);
  color: var(--color-brand);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(10, 16, 30, 0.08);
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: 13px;
  background: var(--color-surface);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms var(--ease), background 140ms var(--ease), box-shadow 140ms var(--ease);
}

.choice:hover {
  border-color: rgba(34, 89, 245, 0.5);
  background: var(--color-surface-muted);
}

.choice[aria-pressed='true'] {
  border-color: var(--color-brand);
  background: var(--color-brand-subtle);
  color: var(--color-brand-pressed);
  box-shadow: inset 0 0 0 1px var(--color-brand);
}

.choice svg {
  flex: 0 0 auto;
  color: var(--color-brand);
}

.choice-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 450;
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------- avisos */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  background: var(--color-brand-subtle);
  border: 1px solid rgba(34, 89, 245, 0.14);
  color: var(--color-brand-pressed);
}

.notice svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.notice.warning {
  background: var(--color-warning-bg);
  border-color: rgba(146, 64, 14, 0.14);
  color: var(--color-warning-text);
}

.notice.danger {
  background: var(--color-danger-bg);
  border-color: rgba(185, 28, 28, 0.16);
  color: var(--color-danger-text);
}

.notice.success {
  background: var(--color-success-bg);
  border-color: rgba(4, 120, 87, 0.18);
  color: var(--color-success-text);
}

/* ---------------------------------------------------------------- vazio & carregando */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: 36px var(--space-5);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--color-brand-subtle);
  color: var(--color-brand);
}

.empty-icon svg {
  width: 23px;
  height: 23px;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 750;
  color: var(--color-ink);
}

.empty-text {
  max-width: 44ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--space-8) var(--space-4);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--color-text-secondary);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(34, 89, 245, 0.2);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
  flex: 0 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  display: block;
  border-radius: 10px;
  background: linear-gradient(90deg, #e8eef8 25%, #f5f8fd 37%, #e8eef8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ---------------------------------------------------------------- foto */

.photo-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 430px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-neutral-bg);
}

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

.photo-frame.is-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: var(--space-5);
  border: 1.5px dashed var(--color-border-strong);
  background: linear-gradient(180deg, var(--color-surface-muted) 0%, #f1f5fc 100%);
  color: var(--color-text-secondary);
  text-align: center;
}

.photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px;
  background: linear-gradient(to top, rgba(10, 16, 30, 0.8), rgba(10, 16, 30, 0));
}

.photo-overlay .btn {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-color: transparent;
  color: var(--color-ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.photo-overlay .btn:hover {
  background: #fff;
  color: var(--color-brand);
}

.photo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-uploading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(10, 16, 30, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
}

.photo-uploading .spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

.btn .spinner {
  width: 17px;
  height: 17px;
  border-width: 2px;
}

.btn-primary .spinner,
.btn-danger .spinner {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

/* ---------------------------------------------------------------- financeiro */

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

.stat-grid > .stat:last-child {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid > .stat:last-child {
    grid-column: auto;
  }
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

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

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  flex: 0 0 auto;
}

.stat-positive .stat-icon {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.stat-negative .stat-icon {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(21px, 4.5vw, 25px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-ink);
}

.stat-value.positive {
  color: var(--color-success-text);
}

.stat-value.negative {
  color: var(--color-danger-text);
}

.stat-note {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.balance-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  padding: 22px 24px;
  border-radius: var(--radius-feature);
  background: linear-gradient(135deg, #0d162b 0%, var(--color-ink) 56%, #0c1f54 100%);
  color: #fff;
  box-shadow: var(--shadow-feature);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -35%;
  right: -18%;
  width: 65%;
  height: 170%;
  background: radial-gradient(circle, rgba(34, 89, 245, 0.45) 0%, transparent 66%);
  pointer-events: none;
}

.balance-card > * {
  position: relative;
  z-index: 1;
}

.balance-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-focus-on-dark);
}

.balance-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 6.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.balance-hint {
  font-size: 12.5px;
  color: var(--color-on-dark-muted);
}

.balance-meter {
  margin-top: 10px;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.balance-meter-in {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-brand), #60a5fa);
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.ledger-card {
  overflow: hidden;
  padding: 0;
}

.ledger th {
  padding: 12px 16px;
  border-bottom: var(--border);
  background: var(--color-surface-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: left;
}

.ledger th.num,
.ledger td.num {
  text-align: right;
}

.ledger td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.ledger tbody tr {
  transition: background 120ms var(--ease);
}

.ledger tbody tr:hover {
  background: #f9fbff;
}

.ledger tr:last-child td {
  border-bottom: 0;
}

.ledger .value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ledger .value.in {
  color: var(--color-success-text);
}

.ledger .value.out {
  color: var(--color-danger-text);
}

.ledger .value.refund {
  color: #b45309;
}

.ledger-actions {
  width: 1%;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ledger thead {
    display: none;
  }

  .ledger,
  .ledger tbody {
    display: block;
  }

  .ledger tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'desc value'
      'date actions';
    gap: 3px 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
  }

  .ledger tr:last-child {
    border-bottom: 0;
  }

  .ledger td {
    display: block;
    padding: 0;
    border: 0;
  }

  .ledger td.ledger-desc {
    grid-area: desc;
    font-weight: 600;
  }

  .ledger td.ledger-date {
    grid-area: date;
    font-size: 12px;
    color: var(--color-text-muted);
  }

  .ledger td.ledger-method {
    display: none;
  }

  .ledger td.num.ledger-value {
    grid-area: value;
    text-align: right;
    align-self: start;
    padding-top: 1px;
  }

  .ledger td.num.ledger-actions {
    grid-area: actions;
    justify-self: end;
    display: flex;
    gap: 6px;
  }

  .ledger td.num.ledger-actions:empty {
    display: none;
  }
}

/* ---------------------------------------------------------------- diálogo */

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 16, 30, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 160ms var(--ease);
}

.dialog {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-overlay);
  animation: sheet-in 240ms var(--ease);
}

.dialog::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
}

@keyframes sheet-in {
  from {
    transform: translateY(20px);
    opacity: 0.4;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.dialog-title {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--color-ink);
}

.dialog-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.dialog-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 9px;
  margin-top: var(--space-5);
}

.dialog-actions .btn {
  width: 100%;
}

.dialog-consequence {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--color-danger-bg);
  border: 1px solid rgba(185, 28, 28, 0.14);
  color: var(--color-danger-text);
  font-size: 13.5px;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .dialog-backdrop {
    align-items: center;
    padding: var(--space-6);
  }

  .dialog {
    padding: var(--space-6);
    border-radius: var(--radius-feature);
  }

  .dialog::before {
    display: none;
  }

  .dialog-title {
    font-size: 21px;
  }

  .dialog-actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .dialog-actions .btn {
    width: auto;
  }

  .dialog-actions .grow {
    margin-right: auto;
  }
}

/* ---------------------------------------------------------------- toast */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottomnav-height) + env(safe-area-inset-bottom) + 12px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .toast-region {
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: none;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--color-ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: var(--shadow-overlay);
  pointer-events: auto;
  animation: toast-in 200ms var(--ease);
}

.toast svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.toast.success svg {
  color: #34d399;
}

.toast.info svg {
  color: var(--color-focus-on-dark);
}

.toast.error {
  background: var(--color-danger-text);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- login */

.login-screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
  background: radial-gradient(120% 90% at 10% 0%, #132146 0%, var(--color-ink) 58%, #070b15 100%);
  color: #fff;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -28%;
  right: -18%;
  width: 78vw;
  height: 78vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(circle, rgba(34, 89, 245, 0.42) 0%, rgba(34, 89, 245, 0) 64%);
  pointer-events: none;
}

.login-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(75% 65% at 32% 28%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(75% 65% at 32% 28%, #000 0%, transparent 78%);
  pointer-events: none;
}

.login-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: var(--space-8) var(--space-4) var(--space-10);
}

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

.login-brand-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.login-brand .brand-name {
  font-size: 19px;
  color: #fff;
}

.login-tag {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(34, 89, 245, 0.26);
  border: 1px solid rgba(147, 184, 255, 0.26);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #cfe0ff;
}

.login-copy h1 {
  margin-top: var(--space-5);
  font-size: clamp(27px, 7vw, 36px);
  font-weight: 800;
  line-height: 1.09;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.login-copy p {
  margin-top: var(--space-3);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-on-dark-muted);
  max-width: 44ch;
}

.login-flow {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-5);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: fit-content;
}

.login-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-on-dark-muted);
  background: rgba(255, 255, 255, 0.06);
}

.login-flow-step.is-done {
  color: #86efac;
  background: rgba(16, 185, 129, 0.16);
}

.login-flow-step.is-active {
  color: #fff;
  background: var(--color-brand);
  box-shadow: 0 0 18px rgba(34, 89, 245, 0.55);
}

.login-flow-line {
  width: 16px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.22);
}

.login-points {
  display: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  gap: 12px;
  flex-direction: column;
  font-size: 13.5px;
  color: #dbe4f7;
}

.login-points li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-point-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(34, 89, 245, 0.22);
  border: 1px solid rgba(147, 184, 255, 0.2);
  color: #93b8ff;
  flex: 0 0 auto;
}

.login-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 26px 24px;
  border-radius: var(--radius-feature);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 28px 68px -12px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.login-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-ink);
}

.login-card p.small {
  margin-top: -8px;
}

.login-demo {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: var(--space-4);
  border-top: var(--border);
}

.login-demo-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

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

.demo-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-muted);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease), transform 120ms var(--ease);
}

.demo-btn:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-subtle);
  transform: translateY(-1px);
}

.demo-btn span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (min-width: 560px) {
  .login-points {
    display: flex;
  }

  .login-flow {
    display: inline-flex;
  }
}

@media (min-width: 960px) {
  .login-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 416px;
    align-items: center;
    gap: 56px;
    max-width: 1100px;
    padding: var(--space-10) var(--space-8);
  }

  .login-copy h1 {
    font-size: 46px;
    max-width: 15ch;
  }

  .login-copy p {
    font-size: 15.5px;
  }

  .login-card {
    padding: 30px;
  }
}

/* ---------------------------------------------------------------- página pública (acompanhamento) */

.public-body {
  min-height: 100dvh;
  background: var(--color-canvas);
  background-image:
    radial-gradient(75% 48% at 50% -6%, rgba(34, 89, 245, 0.11) 0%, transparent 72%),
    radial-gradient(50% 40% at 95% 15%, rgba(34, 89, 245, 0.06) 0%, transparent 65%);
}

.public-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  animation: page-in 260ms var(--ease);
}

.public-shell-center {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 18px;
}

.public-empty-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 24px;
  border-radius: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.public-empty-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--color-ink);
}

.public-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.public-col-primary,
.public-col-secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.public-col-secondary {
  padding: 0 16px;
}

.public-col-primary > .public-photo {
  margin: 0 16px;
}

/* Hero cartão de estúdio */
.public-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 24px;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(148deg, #0e1832 0%, var(--color-ink) 56%, #0c2260 100%);
  color: #fff;
  box-shadow: 0 24px 52px -18px rgba(10, 16, 30, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.public-hero::before {
  content: '';
  position: absolute;
  top: -42%;
  right: -20%;
  width: 72%;
  height: 185%;
  background: linear-gradient(155deg, rgba(34, 89, 245, 0.56), rgba(34, 89, 245, 0) 68%);
  clip-path: polygon(46% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.public-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(80% 70% at 85% 15%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 70% at 85% 15%, #000 0%, transparent 78%);
  pointer-events: none;
}

.public-hero.is-ready::before {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.42), rgba(34, 89, 245, 0.22) 48%, transparent 72%);
}

.public-hero.is-cancelled::before {
  background: linear-gradient(155deg, rgba(239, 68, 68, 0.34), transparent 68%);
}

.public-hero > * {
  position: relative;
  z-index: 1;
}

.public-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  max-width: 100%;
}

.public-brand-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.public-brand .public-studio {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(34, 89, 245, 0.34);
  border: 1px solid rgba(147, 184, 255, 0.34);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.public-status-pill.ready {
  background: #ecfdf5;
  border-color: transparent;
  color: #047857;
}

.public-status-pill.ready .live-dot {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
}

.public-status-pill.cancelled {
  background: #fef2f2;
  border-color: transparent;
  color: #b91c1c;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  flex: 0 0 auto;
  animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.65);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(96, 165, 250, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
}

.public-vehicle-block {
  margin-top: 22px;
}

.public-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-focus-on-dark);
}

.public-vehicle {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.public-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 550;
  color: #e2ecff;
  max-width: 100%;
}

.public-service-chip svg {
  color: #7ca8ff;
  flex: 0 0 auto;
}

.public-pickup {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.public-pickup-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.public-pickup-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-focus-on-dark);
}

.public-pickup-time {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: clamp(36px, 11vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.public-pickup-time.is-compact {
  font-size: 28px;
  line-height: 1.15;
}

.public-pickup-day {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-on-dark-muted);
}

/* Barra segmentada de etapas */
.public-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.public-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #dbe8ff;
}

.public-segments {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}

.public-seg {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  transition: background 240ms var(--ease);
}

.public-seg.is-done {
  background: var(--color-brand);
}

.public-seg.is-current {
  background: linear-gradient(90deg, var(--color-brand), #60a5fa, var(--color-brand));
  background-size: 200% 100%;
  animation: seg-shimmer 2.2s ease infinite;
  box-shadow: 0 0 12px rgba(34, 89, 245, 0.6);
}

.public-seg.is-ready {
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.55);
}

@keyframes seg-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: -100% 50%;
  }
}

/* Foto do veículo + Lightbox */
.public-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.public-photo-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.public-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 320ms var(--ease);
}

.public-photo-btn:hover img {
  transform: scale(1.02);
}

.public-photo-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(10, 16, 30, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}

.public-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 11, 21, 0.88);
  backdrop-filter: blur(10px);
  animation: fade-in 160ms var(--ease);
}

.public-lightbox img {
  max-width: min(94vw, 960px);
  max-height: 86dvh;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.public-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  cursor: pointer;
}

.public-lightbox-close:hover {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

/* Banner de destaque (pronto / entregue / cancelado) */
.public-callout {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-xs);
}

.public-callout.is-ready {
  background: linear-gradient(135deg, #ecfdf5 0%, #eef4ff 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.public-callout.is-delivered {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.26);
}

.public-callout.is-cancelled {
  background: var(--color-danger-bg);
  border-color: rgba(185, 28, 28, 0.2);
}

.public-callout-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  color: var(--color-success-text);
  box-shadow: var(--shadow-xs);
  flex: 0 0 auto;
}

.public-callout.is-cancelled .public-callout-icon {
  color: var(--color-danger-text);
}

.public-callout-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.public-callout-body strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 750;
  color: var(--color-ink);
}

.public-callout-body span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

/* Card de andamento + trilha moderna */
.public-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.public-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.public-card h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-ink);
}

.public-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease), background 150ms var(--ease);
}

.public-refresh-btn:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background: var(--color-brand-subtle);
}

.public-refresh-btn.is-spinning svg {
  animation: spin 700ms linear infinite;
}

.track-steps {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
}

.track-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.track-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
  margin-top: 8px;
}

.track-line {
  width: 2px;
  flex: 1 1 auto;
  min-height: 18px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--color-border);
}

.track-step.is-done .track-dot {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: #fff;
}

.track-step.is-done .track-line {
  background: var(--color-brand);
}

.track-step.is-current .track-dot {
  border-color: var(--color-brand);
  background: var(--color-brand-subtle);
  box-shadow: 0 0 0 5px var(--color-brand-glow);
}

.track-step.is-current .live-dot {
  background: var(--color-brand);
}

.track-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 15px;
  border: 1px solid transparent;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.track-step.is-last .track-content {
  margin-bottom: 0;
}

.track-step.is-current .track-content {
  background: linear-gradient(135deg, #f3f7ff 0%, var(--color-brand-subtle) 100%);
  border-color: rgba(34, 89, 245, 0.24);
  box-shadow: 0 4px 16px -6px rgba(34, 89, 245, 0.18);
}

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

.track-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.3;
}

.track-step.is-next .track-title {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.track-sub {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.track-step.is-current .track-sub {
  color: var(--color-brand-hover);
  font-weight: 550;
}

.track-pill {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.track-pill.is-live {
  background: var(--color-brand);
  color: #fff;
}

.track-pill.is-done {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

/* Cartão de contato / WhatsApp */
.public-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.public-cta-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
}

.public-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.public-cta-copy strong {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 750;
  color: var(--color-ink);
}

.public-cta-copy span {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.public-cta-card .btn {
  width: 100%;
  min-height: 50px;
  font-size: 15px;
}

.public-legal-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
}

.public-legal {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: center;
}

.public-powered {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.public-skeleton {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

@media (min-width: 600px) {
  .public-shell {
    padding: 28px 20px 48px;
  }

  .public-hero {
    border-radius: 26px;
    padding: 26px;
  }

  .public-col-secondary {
    padding: 0;
  }

  .public-col-primary > .public-photo {
    margin: 0;
  }
}

@media (min-width: 880px) {
  .public-shell {
    max-width: 980px;
    padding: 40px 28px 56px;
  }

  .public-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .public-col-primary {
    position: sticky;
    top: 28px;
  }

  .public-hero {
    padding: 28px;
  }

  .public-card {
    padding: 26px;
  }
}

/* ---------------------------------------------------------------- utilitários */

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

.small {
  font-size: 13px;
  line-height: 1.5;
}

.tiny {
  font-size: 11.5px;
  line-height: 1.45;
}

.strong {
  font-weight: 650;
}

.time,
.money,
.num,
.tnum {
  font-variant-numeric: tabular-nums;
}

.grow {
  flex: 1 1 auto;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-done,
.is-current,
.is-next,
.is-active {
  isolation: auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================
   Contenção de largura (evita rolagem lateral no celular)

   Só muda como os blocos encolhem e quebram linha: nenhuma cor,
   espaçamento, tipografia ou posição do design é alterada.
   ================================================================ */

/* 1. Grades de uma coluna não podem ser esticadas pelo conteúdo.
      Sem `minmax(0, 1fr)` a coluna implícita assume o min-content do maior
      item (um valor sem quebra, um selo) e empurra a página para a direita. */
@media (max-width: 1023px) {
  .grid-2,
  .agenda-month {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 899px) {
  .finance-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 639px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.grid-2 > *,
.agenda-month > *,
.finance-top > *,
.field-grid > * {
  min-width: 0;
}

/* 2. Controles que devem quebrar linha em vez de esticar a página. */
.between,
.feature-top {
  flex-wrap: wrap;
  row-gap: 8px;
}

.seg {
  flex-wrap: wrap;
  max-width: 100%;
}

.seg-btn {
  flex: 0 1 auto;
  min-width: 0;
}

/* 3. Textos que podem chegar sem ponto de quebra: URL do link de
      acompanhamento, nome do estúdio, nome do cliente. */
.page-title,
.public-vehicle,
.stat-value,
.balance-value,
.empty-title {
  overflow-wrap: anywhere;
}

.notice,
.dialog-body,
.field-hint,
.field-error,
.public-legal,
.tl-title,
.tl-note,
.stat-note,
.balance-hint,
.choice-sub,
.empty-text {
  overflow-wrap: anywhere;
}

.public-brand .public-studio {
  min-width: 0;
}

/* 4. Trio de valores da ordem: duas colunas no celular, para o valor
      monetário não vazar da célula. */
@media (max-width: 519px) {
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-grid > div:last-child {
    grid-column: 1 / -1;
  }
}

/* 5. Rede de segurança: `clip` não cria contexto de rolagem, então os
      elementos fixos/sticky continuam se comportando como antes. */
body {
  overflow-x: clip;
}


/* ================================================================
   Estoque e galeria de fotos
   ================================================================ */

.stock-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  flex: 0 0 auto;
}

.stock-mark svg {
  width: 18px;
  height: 18px;
}

.stock-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stock-current-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stock-delta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.stock-delta.is-up {
  color: var(--color-success-text);
}

.stock-delta.is-down {
  color: var(--color-danger-text);
}

.stock-history {
  padding-top: var(--space-4);
  border-top: var(--border);
}

.stock-history-row {
  padding: 7px 0;
  border-bottom: 1px dashed var(--color-border);
}

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

/* ---------- galeria de fotos de entrada ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-photo);
  background: var(--color-surface-muted);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 16, 30, 0.62);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.gallery-remove:hover {
  background: var(--color-danger-text);
}

.gallery-cover {
  position: absolute;
  left: 5px;
  bottom: 5px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(10, 16, 30, 0.66);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-add {
  display: grid;
  place-items: center;
  gap: 5px;
  aspect-ratio: 1 / 1;
  padding: 8px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-photo);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

.gallery-add:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-subtle);
  color: var(--color-brand);
}

.gallery-add svg {
  width: 20px;
  height: 20px;
}

/* ---------- galeria pública ---------- */

.public-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.public-gallery button {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-photo);
  overflow: hidden;
}

.public-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------------------------------------------------------------- plano da loja */

.nav-foot-meta.is-warning {
  color: var(--color-warning-text);
  font-weight: 600;
}

.nav-foot-meta.is-danger {
  color: var(--color-danger-text);
  font-weight: 600;
}

.plan-kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  margin: 0;
  font-size: 13.5px;
}

.plan-kv dt {
  color: var(--color-text-muted);
}

.plan-kv dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  color: var(--color-text);
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.plan-features svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex: 0 0 auto;
  color: var(--color-success-text);
}

/* Ação do aviso (pronto/cancelado): botão sólido sobre cartão claro. */
.public-callout-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  align-self: flex-start;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(34, 89, 245, 0.65);
  transition: background 140ms var(--ease), transform 140ms var(--ease), box-shadow 140ms var(--ease);
}

.public-callout-cta:hover {
  background: var(--color-brand-hover);
  box-shadow: 0 10px 22px -8px rgba(34, 89, 245, 0.7);
}

.public-callout-cta:active {
  background: var(--color-brand-pressed);
  transform: translateY(1px);
}

.public-callout-cta:focus-visible {
  outline: 3px solid var(--color-brand-glow);
  outline-offset: 2px;
}

.public-callout-cta svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 520px) {
  .public-callout-cta {
    width: 100%;
  }
}

.public-callout-body {
  min-width: 0;
}

.public-callout-body strong {
  font-size: 15px;
  font-weight: 750;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}


/* ---------------------------------------------------------------- aviso de status
   Mesmo idioma dos cartões da página (branco, borda suave, raio 22) com uma
   barra de estado à esquerda. Substitui o gradiente verde-água anterior. */

.public-callout,
.public-callout.is-ready,
.public-callout.is-delivered,
.public-callout.is-cancelled {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 18px 18px 18px 22px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.public-callout::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--color-border-strong);
}

.public-callout.is-ready::before,
.public-callout.is-delivered::before {
  background: #10b981;
}

.public-callout.is-cancelled::before {
  background: #ef4444;
}

.public-callout-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--color-success-bg);
  color: var(--color-success-text);
  box-shadow: none;
  flex: 0 0 auto;
}

.public-callout.is-cancelled .public-callout-icon {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.public-callout-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.public-callout-body strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}

.public-callout-body > span {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.public-callout-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  align-self: flex-start;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(34, 89, 245, 0.65);
  transition: background 140ms var(--ease), transform 140ms var(--ease), box-shadow 140ms var(--ease);
}

.public-callout-cta:hover {
  background: var(--color-brand-hover);
  box-shadow: 0 10px 22px -8px rgba(34, 89, 245, 0.7);
}

.public-callout-cta:active {
  background: var(--color-brand-pressed);
  transform: translateY(1px);
}

.public-callout-cta:focus-visible {
  outline: 3px solid var(--color-brand-glow);
  outline-offset: 2px;
}

.public-callout-cta svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 520px) {
  .public-callout-cta {
    width: 100%;
  }
}
