/* ============================================================
   ZERO EIGHT CRM · Design System
   Preto profundo · grafite · branco · verde neon
   ============================================================ */

/* ---------------------------------------------- tokens: dark (padrao) */
:root {
  --ink-1000: #050605;
  --ink-950:  #080908;
  --ink-900:  #0C0E0C;
  --ink-880:  #101210;
  --ink-850:  #141714;
  --ink-800:  #191C19;
  --ink-750:  #202420;
  --ink-700:  #2A2F2A;

  --surface:        var(--ink-900);
  --surface-raised: var(--ink-850);
  --surface-sunken: var(--ink-950);
  --surface-hover:  var(--ink-800);
  --canvas:         var(--ink-1000);

  --line:        rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --line-lime:   rgba(163, 230, 53, 0.28);

  --text:      #F2F5F0;
  --text-soft: #A8B0A4;
  --text-dim:  #6B7268;
  --text-invert: #0A0B0A;

  --lime:       #A3E635;
  --lime-bright:#BEF264;
  --lime-deep:  #84CC16;
  --lime-glow:  rgba(163, 230, 53, 0.16);
  --lime-faint: rgba(163, 230, 53, 0.08);

  --danger:  #F87171;
  --danger-faint: rgba(248, 113, 113, 0.12);
  --warn:    #FBBF24;
  --warn-faint: rgba(251, 191, 36, 0.12);
  --info:    #38BDF8;
  --info-faint: rgba(56, 189, 248, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:    0 4px 16px -4px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.8);
  --shadow-lime: 0 8px 28px -10px rgba(163, 230, 53, 0.35);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --sidebar-w: 244px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 240ms;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  color-scheme: dark;
}

/* ------------------------------------------------------ tokens: light */
[data-theme='light'] {
  --surface:        #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-sunken: #F1F3EF;
  --surface-hover:  #F5F7F2;
  --canvas:         #F7F8F5;

  --line:        rgba(10, 12, 10, 0.09);
  --line-strong: rgba(10, 12, 10, 0.16);
  --line-lime:   rgba(101, 163, 13, 0.35);

  --text:      #10130F;
  --text-soft: #4E554A;
  --text-dim:  #848C7F;
  --text-invert: #0A0B0A;

  --lime:       #65A30D;
  --lime-bright:#84CC16;
  --lime-deep:  #4D7C0F;
  --lime-glow:  rgba(101, 163, 13, 0.14);
  --lime-faint: rgba(101, 163, 13, 0.08);

  --danger: #DC2626;
  --danger-faint: rgba(220, 38, 38, 0.10);
  --warn:   #D97706;
  --warn-faint: rgba(217, 119, 6, 0.12);
  --info:   #0284C7;
  --info-faint: rgba(2, 132, 199, 0.10);

  --shadow-sm: 0 1px 2px rgba(16, 19, 15, 0.06);
  --shadow:    0 4px 18px -6px rgba(16, 19, 15, 0.14);
  --shadow-lg: 0 24px 60px -20px rgba(16, 19, 15, 0.22);
  --shadow-lime: 0 8px 28px -12px rgba(101, 163, 13, 0.4);

  color-scheme: light;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'tnum';
  overscroll-behavior-y: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

::selection { background: var(--lime); color: var(--text-invert); }

h1, h2, h3, h4, p, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

/* --------------------------------------------------------- scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--ink-700) transparent; }
[data-theme='light'] * { scrollbar-color: #CBD2C4 transparent; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); background-clip: content-box; }

/* ============================================ tipografia utilitaria */
.brand-word {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

/* Emblema da marca: o PNG tem fundo preto quadrado e o recorte circular
   entrega um badge limpo sobre qualquer fundo, claro ou escuro. */
.ze-logo {
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: #0A0B0A;
  box-shadow: 0 4px 16px -6px rgba(163, 230, 53, 0.45);
  user-select: none;
  -webkit-user-drag: none;
}
[data-theme='light'] .ze-logo {
  box-shadow: 0 4px 14px -6px rgba(16, 19, 15, 0.35);
}
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.section-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* --------------------------------------------- cabecalho das paginas */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-header__text { min-width: 0; }
.page-header__crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.page-header__title {
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.page-header__subtitle {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 5px;
}
.page-header__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================================================== superficies/cards */
.ze-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.ze-card--hover:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.ze-card--glass {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.ze-card--accent {
  border-color: var(--line-lime);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--lime-faint);
}

/* Brilho sutil no topo do card (acabamento premium) */
.ze-card--sheen { position: relative; overflow: hidden; }
.ze-card--sheen::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-lime), transparent);
  opacity: 0.7;
}

.ze-divider { height: 1px; background: var(--line); border: 0; }

/* ========================================================== botoes */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 560;
  letter-spacing: -0.005em;
  white-space: nowrap;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  transition: transform 140ms var(--ease), filter 180ms var(--ease),
              background 180ms var(--ease), border-color 180ms var(--ease),
              box-shadow 180ms var(--ease), opacity 180ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(0.972); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.btn--primary {
  --btn-bg: var(--lime);
  --btn-fg: #0A0F05;
  --btn-border: transparent;
  font-weight: 640;
  box-shadow: var(--shadow-lime);
}
.btn--primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn--ghost { --btn-border: transparent; --btn-fg: var(--text-soft); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }

.btn--outline { --btn-bg: var(--surface); }
.btn--outline:hover:not(:disabled) {
  border-color: var(--line-lime);
  background: var(--surface-hover);
}

.btn--danger { --btn-bg: var(--danger-faint); --btn-fg: var(--danger); --btn-border: transparent; }
.btn--danger:hover:not(:disabled) { background: var(--danger); color: #fff; }

.btn--sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn--block { width: 100%; }

.btn__spinner {
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ze-spin 700ms linear infinite;
}

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

.field__label {
  font-size: 12px;
  font-weight: 550;
  color: var(--text-soft);
  letter-spacing: -0.005em;
}
.field__hint { font-size: 11.5px; color: var(--text-dim); }
.field__error { font-size: 11.5px; color: var(--danger); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 160ms var(--ease), background 160ms var(--ease),
              box-shadow 160ms var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--lime);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--lime-glow);
}
.input[aria-invalid='true'] { border-color: var(--danger); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.55; }

.select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7268' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.select option { background: var(--surface); color: var(--text); }

.input-group { position: relative; display: flex; align-items: center; }
.input-group__icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
  transition: color 160ms var(--ease);
}
.input-group__icon--right { left: auto; right: 12px; pointer-events: auto; }
.input-group .input { padding-left: 38px; }
.input-group .input--right-pad { padding-right: 38px; }
.input-group:focus-within .input-group__icon { color: var(--lime); }

.input-prefix {
  position: absolute;
  left: 13px;
  font-size: 13px;
  color: var(--text-dim);
  pointer-events: none;
}
.input--money { padding-left: 38px; font-variant-numeric: tabular-nums; }

/* switch */
.switch {
  position: relative;
  width: 42px; height: 24px;
  border-radius: 99px;
  background: var(--ink-750);
  border: 1px solid var(--line);
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
  flex-shrink: 0;
}
[data-theme='light'] .switch { background: #D9DED3; }
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-soft);
  transition: transform 240ms var(--ease), background 200ms var(--ease);
}
.switch[aria-checked='true'] { background: var(--lime); border-color: transparent; }
.switch[aria-checked='true']::after { transform: translateX(18px); background: #0A0F05; }

/* checkbox */
.checkbox {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-sunken);
  display: grid;
  place-items: center;
  transition: all 160ms var(--ease);
  flex-shrink: 0;
}
.checkbox[aria-checked='true'] { background: var(--lime); border-color: var(--lime); }
.checkbox svg { opacity: 0; transform: scale(0.5); transition: all 160ms var(--ease); color: #0A0F05; }
.checkbox[aria-checked='true'] svg { opacity: 1; transform: scale(1); }

/* segmented control */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.segmented__item {
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-soft);
  transition: all 180ms var(--ease);
  white-space: nowrap;
}
.segmented__item:hover { color: var(--text); }
.segmented__item[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.segmented__item[aria-selected='true'].is-accent {
  background: var(--lime); color: #0A0F05;
}

/* ========================================================== badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--surface-hover);
  color: var(--text-soft);
  border: 1px solid transparent;
}
.badge--lime   { background: var(--lime-faint); color: var(--lime); border-color: var(--line-lime); }
.badge--danger { background: var(--danger-faint); color: var(--danger); }
.badge--warn   { background: var(--warn-faint); color: var(--warn); }
.badge--info   { background: var(--info-faint); color: var(--info); }
.badge--solid  { background: var(--lime); color: #0A0F05; }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill-count {
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--lime);
  color: #0A0F05;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.pill-count--danger { background: var(--danger); color: #fff; }

/* ============================================== trend (delta cards) */
.trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.trend--up   { color: var(--lime); }
.trend--down { color: var(--danger); }
.trend--flat { color: var(--text-dim); }

/* ======================================================== tabelas */
.ze-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.ze-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ze-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  vertical-align: middle;
}
.ze-table tbody tr { transition: background 140ms var(--ease); }
.ze-table tbody tr:hover td { background: var(--surface-hover); }
.ze-table tbody tr:last-child td { border-bottom: 0; }
.ze-table td.is-strong { color: var(--text); font-weight: 550; }
.ze-table td.is-num, .ze-table th.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.ze-table--clickable tbody tr { cursor: pointer; }

.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

/* ------------------------------- versao em cards (mobile) das tabelas */
.data-cards { display: none; }

.data-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}
.data-card:active { transform: scale(0.99); border-color: var(--line-lime); }

.data-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.data-card__title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 570;
  color: var(--text);
  line-height: 1.35;
}
.data-card__actions { flex-shrink: 0; margin: -5px -6px 0 0; }

.data-card__body {
  display: grid;
  gap: 7px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.data-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  min-height: 20px;
}
.data-card__label { color: var(--text-dim); flex-shrink: 0; }
.data-card__value {
  color: var(--text);
  font-weight: 520;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================================================== empty states */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
  gap: 6px;
}
.empty__art {
  width: 68px; height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: var(--lime-faint);
  border: 1px solid var(--line-lime);
  color: var(--lime);
  animation: ze-float 4.5s var(--ease-in-out) infinite;
}
.empty__title { font-size: 15px; font-weight: 620; color: var(--text); }
.empty__text { font-size: 13px; color: var(--text-dim); max-width: 320px; line-height: 1.6; }

/* ====================================================== skeletons */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-hover);
  border-radius: 7px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg, transparent, color-mix(in srgb, var(--text) 7%, transparent), transparent
  );
  animation: ze-shimmer 1.5s infinite;
}
.skeleton--text { height: 12px; }
.skeleton--title { height: 22px; width: 55%; }
.skeleton--line { height: 14px; }

/* ========================================================= layout */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  transition: width 300ms var(--ease), transform 300ms var(--ease);
}
.sidebar.is-collapsed { width: var(--sidebar-w-collapsed); }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  margin: 1px 10px;
  padding: 0 11px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 520;
  transition: background 180ms var(--ease), color 180ms var(--ease);
  overflow: hidden;
  white-space: nowrap;
}
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.is-active { background: var(--lime-faint); color: var(--lime); font-weight: 600; }
.nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--lime);
}
.nav-item__icon { flex-shrink: 0; width: 19px; }
.nav-item__label { flex: 1; opacity: 1; transition: opacity 180ms var(--ease); }
.sidebar.is-collapsed .nav-item__label,
.sidebar.is-collapsed .nav-item .pill-count,
.sidebar.is-collapsed .nav-section__title { opacity: 0; pointer-events: none; }
.sidebar.is-collapsed .nav-item { justify-content: center; padding: 0; }

.nav-section__title {
  padding: 16px 21px 6px;
  font-size: 10px;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: opacity 180ms var(--ease);
}

.main-area {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  transition: margin-left 300ms var(--ease);
}
.main-area.is-collapsed { margin-left: var(--sidebar-w-collapsed); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}

.page { padding: 22px 20px 96px; max-width: 1560px; width: 100%; margin: 0 auto; }

/* ------------------------------------------------- controles da topbar */
/* O hamburguer so existe no mobile (regra na media query). */
.topbar-menu { display: none; }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  /* `margin-right:auto` empurra os demais controles para a direita sem
     precisar de um espacador com flex concorrente. */
  flex: 1 1 auto;
  min-width: 0;
  max-width: 400px;
  margin-right: auto;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.topbar-search:hover { border-color: var(--line-lime); background: var(--surface-hover); }
.topbar-search:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.topbar-search__label {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: nowrap;      /* nunca quebrar em duas linhas */
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-search__kbd { display: flex; gap: 3px; flex-shrink: 0; }

.topbar-period { max-width: 100%; min-width: 0; }
.topbar-period span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------- mobile bottom nav */
.mobile-nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: space-around;
  height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid var(--line);
}
.mobile-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  font-size: 10px;
  font-weight: 560;
  color: var(--text-dim);
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}
.mobile-nav__item.is-active { color: var(--lime); }
.mobile-nav__item:active { transform: scale(0.9); }

.mobile-fab {
  width: 52px; height: 52px;
  margin-top: -22px;
  border-radius: 17px;
  background: var(--lime);
  color: #0A0F05;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lime);
  transition: transform 200ms var(--ease);
}
.mobile-fab:active { transform: scale(0.9); }

/* ========================================================== modais */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 4, 3, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: ze-fade 200ms var(--ease);
}
.overlay.is-closing { animation: ze-fade 160ms var(--ease) reverse forwards; }
.overlay--top { align-items: flex-start; padding-top: 12vh; }

.modal {
  width: 100%;
  max-width: 520px;
  max-height: min(86vh, 860px);
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: ze-modal-in 300ms var(--ease);
  overflow: hidden;
}
.overlay.is-closing .modal { animation: ze-modal-in 160ms var(--ease) reverse forwards; }
.modal--wide { max-width: 780px; }
.modal--xl { max-width: 1040px; }

.modal__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.modal__title { font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }
.modal__subtitle { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.modal__body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal__footer {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* ======================================================== toasts */
.toast-stack {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(400px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  animation: ze-toast-in 380ms var(--ease);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}
.toast.is-closing { animation: ze-toast-out 240ms var(--ease) forwards; }
.toast__icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.toast__title { font-size: 13.5px; font-weight: 600; }
.toast__text { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.5; }
.toast__bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.4;
  animation: ze-progress linear forwards;
}
.toast--success .toast__icon { background: var(--lime-faint); color: var(--lime); }
.toast--success .toast__bar { color: var(--lime); }
.toast--error .toast__icon { background: var(--danger-faint); color: var(--danger); }
.toast--error .toast__bar { color: var(--danger); }
.toast--warning .toast__icon { background: var(--warn-faint); color: var(--warn); }
.toast--warning .toast__bar { color: var(--warn); }
.toast--info .toast__icon { background: var(--info-faint); color: var(--info); }
.toast--info .toast__bar { color: var(--info); }

/* ============================================== command palette */
.palette {
  width: 100%;
  max-width: 640px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: ze-modal-in 260ms var(--ease);
}
.palette__input {
  width: 100%;
  height: 56px;
  padding: 0 18px 0 46px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  outline: none;
}
.palette__results { max-height: 58vh; overflow-y: auto; padding: 7px; }
.palette__group-title {
  padding: 10px 12px 5px;
  font-size: 10px;
  font-weight: 620;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.palette__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  text-align: left;
  transition: background 120ms var(--ease);
}
.palette__item.is-active { background: var(--lime-faint); }
.palette__item.is-active .palette__item-title { color: var(--lime); }
.palette__item-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--surface-hover);
  display: grid;
  place-items: center;
  color: var(--text-soft);
  flex-shrink: 0;
}
.palette__item-title { font-size: 13.5px; font-weight: 550; }
.palette__item-sub { font-size: 11.5px; color: var(--text-dim); }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-dim);
}

/* ======================================================== dropdown */
.dropdown {
  position: absolute;
  z-index: 70;
  min-width: 190px;
  padding: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  animation: ze-dropdown 200ms var(--ease);
  transform-origin: top right;
}
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-soft);
  text-align: left;
  transition: background 130ms var(--ease), color 130ms var(--ease);
}
.dropdown__item:hover { background: var(--surface-hover); color: var(--text); }
.dropdown__item.is-danger { color: var(--danger); }
.dropdown__item.is-active { color: var(--lime); }
.dropdown__sep { height: 1px; margin: 5px 4px; background: var(--line); }

/* =================================================== progress bar */
.progress {
  height: 7px;
  border-radius: 99px;
  background: var(--surface-hover);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--lime-deep), var(--lime-bright));
  width: 0;
  transition: width 900ms var(--ease);
  position: relative;
}
.progress__fill.is-complete {
  box-shadow: 0 0 14px var(--lime-glow);
}
.progress--danger .progress__fill { background: linear-gradient(90deg, #B91C1C, var(--danger)); }

/* ====================================================== POS / PDV */
.pos-grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 372px;
  gap: 14px;
  height: calc(100vh - var(--topbar-h) - 34px);
  min-height: 520px;
}
.pos-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pos-col__head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.pos-col__body { flex: 1; overflow-y: auto; min-height: 0; }
.pos-col__foot { border-top: 1px solid var(--line); padding: 14px 15px; flex-shrink: 0; }

.pos-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-sunken);
  text-align: left;
  transition: all 180ms var(--ease);
  overflow: hidden;
}
.pos-card:hover:not(:disabled) {
  border-color: var(--line-lime);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.pos-card:active:not(:disabled) { transform: scale(0.97); }
.pos-card:disabled { opacity: 0.42; cursor: not-allowed; }
.pos-card__name {
  font-size: 13px;
  font-weight: 570;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pos-card__price { font-size: 15px; font-weight: 680; color: var(--lime); font-variant-numeric: tabular-nums; }

.cart-item {
  display: grid;
  gap: 7px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  animation: ze-slide-in 260ms var(--ease);
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.qty-stepper button {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  transition: background 140ms var(--ease), color 140ms var(--ease);
}
.qty-stepper button:hover { background: var(--surface-hover); color: var(--lime); }
.qty-stepper input {
  width: 40px;
  height: 28px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
}

/* ------------------------- PDV mobile: gaveta do carrinho + barra fixa */
.pos-cart-bar,
.pos-cart-scrim,
.pos-cart-close { display: none; }

/* ========================================================= charts */
.chart-tooltip {
  position: fixed;
  z-index: 90;
  padding: 9px 11px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -108%) scale(0.96);
  transition: opacity 130ms var(--ease), transform 130ms var(--ease);
  white-space: nowrap;
}
.chart-tooltip.is-visible { opacity: 1; transform: translate(-50%, -114%) scale(1); }
.chart-tooltip__label { color: var(--text-dim); font-size: 10.5px; margin-bottom: 4px;
  letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; }
.chart-tooltip__row { display: flex; align-items: center; gap: 7px; }
.chart-tooltip__row + .chart-tooltip__row { margin-top: 3px; }
.chart-tooltip__swatch { width: 8px; height: 8px; border-radius: 2px; }
.chart-tooltip__value { font-weight: 650; font-variant-numeric: tabular-nums; margin-left: auto; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-soft);
  transition: opacity 160ms var(--ease);
}
.chart-legend__item.is-off { opacity: 0.35; }
.chart-legend__swatch { width: 9px; height: 9px; border-radius: 3px; }

.chart-svg { width: 100%; display: block; overflow: visible; }
.chart-svg .grid-line { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis-label { fill: var(--text-dim); font-size: 10px; font-family: var(--font); }
.chart-svg .hover-band { fill: var(--text); opacity: 0; transition: opacity 130ms; }
.chart-svg .hover-band.is-on { opacity: 0.04; }

.chart-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart-bar { transition: opacity 160ms var(--ease); }
.chart-bar:hover { opacity: 0.82; }

/* --------------------------------------------- valores ocultos (olho) */
.is-masked {
  filter: blur(7px);
  user-select: none;
  transition: filter 220ms var(--ease);
}
.is-masked:hover { filter: blur(4.5px); }

/* Com os valores ocultos, os graficos tambem nao podem entregar numeros. */
.values-hidden .chart-svg .axis-label,
.values-hidden .chart-tooltip__value,
.values-hidden .chart-legend__item .tabular {
  filter: blur(4px);
  user-select: none;
}

/* ===================================================== animacoes */
@keyframes ze-spin { to { transform: rotate(360deg); } }

@keyframes ze-shimmer { 100% { transform: translateX(100%); } }

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

@keyframes ze-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.975); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ze-dropdown {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ze-toast-in {
  from { opacity: 0; transform: translateX(28px) scale(0.94); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes ze-toast-out {
  to { opacity: 0; transform: translateX(28px) scale(0.94); }
}

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

@keyframes ze-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ze-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes ze-progress { from { width: 100%; } to { width: 0; } }

@keyframes ze-pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--lime-glow); }
  70%  { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.animate-rise { animation: ze-rise 420ms var(--ease) both; }
.animate-fade { animation: ze-fade 320ms var(--ease) both; }
.pulse-ring { animation: ze-pulse-ring 2.4s infinite; }

/* Entrada escalonada de listas/cards */
.stagger > * { animation: ze-rise 460ms var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: 20ms; }
.stagger > *:nth-child(2) { animation-delay: 55ms; }
.stagger > *:nth-child(3) { animation-delay: 90ms; }
.stagger > *:nth-child(4) { animation-delay: 125ms; }
.stagger > *:nth-child(5) { animation-delay: 160ms; }
.stagger > *:nth-child(6) { animation-delay: 195ms; }
.stagger > *:nth-child(7) { animation-delay: 230ms; }
.stagger > *:nth-child(8) { animation-delay: 265ms; }
.stagger > *:nth-child(n + 9) { animation-delay: 300ms; }

/* ========================================================= login */
.login-shell { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; min-height: 100dvh; }

.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px;
  background: var(--ink-1000);
  color: #F2F5F0;
}
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(163, 230, 53, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 230, 53, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 65% at 42% 42%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 42% 42%, #000 25%, transparent 78%);
}
.login-brand::after {
  content: '';
  position: absolute;
  width: 620px; height: 620px;
  left: -190px; bottom: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.16), transparent 66%);
  filter: blur(46px);
  animation: ze-float 9s var(--ease-in-out) infinite;
}
.login-brand > * { position: relative; z-index: 1; }

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  background: var(--surface);
}

/* Marca no topo do formulario - so aparece quando o painel lateral some */
.login-mobile-brand { display: none; }

@media (max-width: 1024px) {
  .login-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    text-align: center;
  }
}

/* ===================================================== responsivo */
@media (max-width: 1280px) {
  .pos-grid { grid-template-columns: 200px minmax(0, 1fr) 330px; }
}

@media (max-width: 1180px) {
  /* Dashboard: coluna lateral desce para baixo do conteudo principal */
  .dash-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 1024px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .pos-grid { grid-template-columns: minmax(0, 1fr) 330px; height: auto; }
  .pos-grid > .pos-col:first-child { display: none; }
}

/* --------------------------------- tabelas viram cards no toque */
@media (max-width: 720px) {
  .data-view > .table-wrap { display: none; }
  .data-cards { display: grid; gap: 9px; }

  /* Filtros e abas rolam na horizontal em vez de quebrar a tela */
  .segmented {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented__item { flex-shrink: 0; }

  /* Alvos de toque maiores */
  .btn { height: 42px; }
  .btn--sm { height: 36px; }
  .btn--icon { width: 42px; }
  .btn--icon.btn--sm { width: 36px; }
  .input, .select, .textarea { min-height: 46px; font-size: 16px; } /* evita zoom no iOS */
  .ze-table tbody td { padding: 14px; }

  /* Cabecalho da pagina: acoes ganham uma linha propria e rolam se preciso */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
    margin-bottom: 16px;
  }
  .page-header__subtitle { font-size: 12.5px; }
  .page-header__actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .page-header__actions::-webkit-scrollbar { display: none; }
  .page-header__actions > * { flex-shrink: 0; }

  .ze-card { border-radius: 13px; }
  .modal__body { padding: 16px; }
  .modal__footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal__footer .btn { flex: 1; }

  /* Formularios de duas colunas viram uma so.
     O seletor casa com o atributo style serializado pelo `el()`. */
  .modal__body [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    /* No mobile a sidebar e off-canvas: ignora o estado "recolhida". */
    width: var(--sidebar-w);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar.is-collapsed { width: var(--sidebar-w); }
  .sidebar.is-collapsed .nav-item { justify-content: flex-start; padding: 0 11px; }
  .sidebar.is-collapsed .nav-item__label,
  .sidebar.is-collapsed .nav-item .pill-count,
  .sidebar.is-collapsed .nav-section__title { opacity: 1; pointer-events: auto; }
  .sidebar-collapse-btn { display: none; }

  .main-area, .main-area.is-collapsed { margin-left: 0; }
  .mobile-nav { display: flex; }
  .page { padding: 16px 14px 108px; }

  /* Topbar compacta: busca vira so o icone e o tema vai para o menu do usuario */
  .topbar { padding: 0 10px; gap: 7px; }
  .topbar-menu { display: inline-flex; }
  .topbar-theme { display: none; }
  .topbar-search {
    flex: 0 0 auto;
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .topbar-search__label,
  .topbar-search__kbd { display: none; }
  .topbar-period { max-width: 148px; }
  .pos-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
  .pos-grid > .pos-col:first-child { display: none; }

  /* Carrinho vira gaveta: a lista de produtos ocupa a tela inteira */
  .pos-col--cart {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 70;
    max-height: 86dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: 0;
    transform: translateY(101%);
    transition: transform 320ms var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .pos-col--cart.is-open { transform: translateY(0); }
  .pos-col--cart .pos-col__foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .pos-cart-close { display: inline-flex; }

  .pos-cart-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 69;
    background: rgba(3, 4, 3, 0.62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms var(--ease);
  }
  .pos-cart-scrim.is-open { opacity: 1; pointer-events: auto; }

  /* Barra de resumo acima da navegacao inferior */
  .pos-cart-bar {
    position: fixed;
    left: 10px; right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 56;
    align-items: center;
    gap: 11px;
    height: 58px;
    padding: 0 14px;
    border-radius: 15px;
    background: var(--lime);
    color: #0A0F05;
    box-shadow: var(--shadow-lime), var(--shadow-lg);
    transition: transform 180ms var(--ease);
  }
  .pos-cart-bar.is-visible { display: flex; animation: ze-rise 300ms var(--ease); }
  .pos-cart-bar:active { transform: scale(0.98); }
  .pos-cart-bar__badge {
    min-width: 27px; height: 27px;
    padding: 0 6px;
    border-radius: 9px;
    background: rgba(10, 15, 5, 0.17);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
  }

  .toast-stack { right: 12px; left: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); max-width: none; }
  .modal { max-width: none; max-height: 92vh; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation: ze-sheet-in 320ms var(--ease); }
  .overlay--top { align-items: flex-start; padding-top: 8vh; }
  .overlay--top .modal, .overlay--top .palette { border-radius: var(--radius-lg); }
}

/* Telas bem estreitas (iPhone SE e similares) */
@media (max-width: 400px) {
  .topbar { padding: 0 8px; gap: 4px; }
  .topbar-period { max-width: 116px; padding: 0 8px; }
  .topbar-period svg:last-child { display: none; }  /* esconde a setinha */
  .page { padding: 14px 11px 108px; }
}

@keyframes ze-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

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

/* --------------------------------------------------------- print */
@media print {
  .sidebar, .topbar, .mobile-nav, .toast-stack, .btn { display: none !important; }
  .main-area { margin-left: 0 !important; }
  body { background: #fff; color: #000; }
}
