@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fontes/plus-jakarta-sans.woff2) format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #07111d;
  --bg-2: #0b1828;
  --surface: #0e1f31;
  --surface-2: #132a41;
  --surface-3: #1a3550;
  --text: #f5f7fb;
  --text-2: #d7e1ee;
  --muted: #9fb3cd;
  --faint: #6f86a3;
  --primary: #63e5d0;
  --primary-2: #3dbfaa;
  --on-primary: #04211c;
  --brand: var(--primary);
  --brand-2: var(--primary-2);
  --on-brand: var(--on-primary);
  --line: rgba(99, 229, 208, .14);
  --line-2: rgba(159, 179, 205, .16);
  --line-3: rgba(159, 179, 205, .28);
  --yellow: #f5e642;
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --danger-2: #ef4444;
  --info: #60a5fa;
  --ok-bg: rgba(74, 222, 128, .12);
  --warn-bg: rgba(251, 191, 36, .12);
  --danger-bg: rgba(248, 113, 113, .12);
  --info-bg: rgba(96, 165, 250, .12);
  --brand-bg: rgba(99, 229, 208, .12);
  --mark-a: #0a8f2e;
  --mark-p: #d81e05;
  --bubble-mine: linear-gradient(135deg, #63e5d0, #3dbfaa);
  --bubble-other: #0e1f31;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --lh: 1.5;
  --lh-tight: 1.2;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 1px rgba(0, 0, 0, .2);
  --sh-2: 0 8px 24px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  --sh-3: 0 24px 60px rgba(0, 0, 0, .5), 0 8px 20px rgba(0, 0, 0, .3);
  --sh-glow: 0 10px 30px rgba(99, 229, 208, .22);
  --ring: 0 0 0 3px var(--bg), 0 0 0 5px var(--brand);

  --tap: 48px;
  --tap-sm: 38px;
  --tap-lg: 56px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: .15s;
  --t: .25s;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --max: 720px;
  --max-wide: 1200px;
  --z-bar: 20;
  --z-sheet: 50;
  --z-toast: 80;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: var(--lh-tight); font-weight: 750; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { text-wrap: pretty; }
p, li, h1, h2, h3, h4 { overflow-wrap: anywhere; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(99, 229, 208, .35); color: var(--text); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }

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

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.strong { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.accent { color: var(--primary); }
.eyebrow { font-size: var(--fs-xs); font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }

.brand-a { color: var(--mark-a); font-weight: 800; }
.brand-p1, .brand-p2 { color: var(--mark-p); font-weight: 800; }
.brand-accent { color: #ffdf00; font-weight: 800; background: linear-gradient(90deg, #00a63e 0%, #2cc44f 35%, #ffdf00 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand { display: inline-flex; align-items: baseline; gap: 0; font-weight: 800; font-size: var(--fs-lg); letter-spacing: -.01em; white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--sp-4); }
.wrap-wide { width: 100%; max-width: var(--max-wide); margin-inline: auto; padding-inline: var(--sp-4); }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--sp-6); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-sm { display: flex; align-items: center; gap: var(--sp-2); }
.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.grid-2 { display: grid; gap: var(--sp-3); grid-template-columns: 1fr 1fr; }
.divider { height: 1px; background: var(--line-2); border: 0; margin-block: var(--sp-3); }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }
.ico-xl { width: 32px; height: 32px; stroke-width: 1.75; }
[dir="rtl"] .ico-flip { transform: scaleX(-1); }

.topbar {
  position: sticky; top: 0; z-index: var(--z-bar);
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 60px; padding: calc(var(--sp-2) + var(--safe-t)) var(--sp-4) var(--sp-2);
  background: rgba(7, 17, 29, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.topbar-title { flex: 1 1 auto; min-width: 0; font-weight: 750; font-size: var(--fs-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottombar {
  position: sticky; bottom: 0; z-index: var(--z-bar);
  display: flex; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-b));
  background: rgba(7, 17, 29, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-2);
}

.btn {
  --b-bg: var(--surface-2);
  --b-fg: var(--text);
  --b-bd: var(--line-3);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: 0 var(--sp-5);
  border-radius: var(--r-md); border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 700; font-size: var(--fs-md); line-height: 1.1; text-decoration: none; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.btn:hover { --b-bg: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { box-shadow: var(--ring); border-radius: var(--r-md); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; transform: none; }
.btn-primary { --b-bg: linear-gradient(135deg, var(--brand), var(--brand-2)); --b-fg: var(--on-brand); --b-bd: transparent; box-shadow: var(--sh-glow); }
.btn-primary:hover { --b-bg: linear-gradient(135deg, var(--brand), var(--brand)); }
.btn-soft { --b-bg: var(--brand-bg); --b-fg: var(--brand); --b-bd: transparent; }
.btn-soft:hover { --b-bg: rgba(99, 229, 208, .2); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { --b-bg: rgba(159, 179, 205, .1); }
.btn-outline { --b-bg: transparent; --b-bd: var(--line-3); }
.btn-danger { --b-bg: var(--danger-2); --b-fg: #fff; --b-bd: transparent; }
.btn-danger:hover { --b-bg: #dc2626; }
.btn-danger-soft { --b-bg: var(--danger-bg); --b-fg: var(--danger); --b-bd: transparent; }
.btn-ok { --b-bg: var(--ok); --b-fg: #052e14; --b-bd: transparent; }
.btn-sm { min-height: var(--tap-sm); padding: 0 var(--sp-3); font-size: var(--fs-sm); border-radius: var(--r-sm); gap: 6px; }
.btn-sm:focus-visible { border-radius: var(--r-sm); }
.btn-lg { min-height: var(--tap-lg); padding: 0 var(--sp-6); font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-lg:focus-visible { border-radius: var(--r-lg); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: var(--tap); padding: 0; flex: none; }
.btn-icon.btn-sm { width: var(--tap-sm); }
.btn-icon.btn-lg { width: var(--tap-lg); }
.btn-round { border-radius: var(--r-full); }
.btn-round:focus-visible { border-radius: var(--r-full); }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--b-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-busy > * { visibility: hidden; }
.btn-mic { width: 72px; height: 72px; min-height: 0; padding: 0; border-radius: var(--r-full); }
.btn-mic .ico { width: 30px; height: 30px; }
.btn-mic.is-live { --b-bg: var(--danger-2); --b-fg: #fff; --b-bd: transparent; animation: pulse 1.4s var(--ease) infinite; }

.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); }
.hint { font-size: var(--fs-xs); color: var(--muted); }
.field-error { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap);
  padding: 0 var(--sp-4);
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-3); border-radius: var(--r-md);
  font-size: max(16px, var(--fs-md));
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  appearance: none; -webkit-appearance: none;
}
.textarea { min-height: 96px; padding: var(--sp-3) var(--sp-4); resize: vertical; line-height: var(--lh); }
.select {
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb3cd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: right 14px center;
}
[dir="rtl"] .select { background-position: left 14px center; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(159, 179, 205, .45); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 229, 208, .22); background: var(--surface); border-radius: var(--r-md); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .55; }
.input-code { font-size: 1.75rem; font-weight: 750; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; padding-inline-start: calc(var(--sp-4) + .4em); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .ico { position: absolute; inset-inline-start: 14px; color: var(--muted); pointer-events: none; }
.input-group > .input { padding-inline-start: 44px; }
.input-group > .btn { position: absolute; inset-inline-end: 4px; }
.check { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.switch { position: relative; display: inline-flex; flex: none; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-full); background: var(--surface-3); border: 1px solid var(--line-3); transition: background var(--t-fast); }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform var(--t-fast) var(--ease); }
.switch input:checked + span { background: var(--brand); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(20px); background: var(--on-brand); }
[dir="rtl"] .switch input:checked + span::after { transform: translateX(-20px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }
.stepper { display: inline-flex; align-items: center; gap: var(--sp-1); background: var(--bg-2); border: 1px solid var(--line-3); border-radius: var(--r-full); padding: 3px; }
.stepper .btn { min-height: 36px; width: 36px; padding: 0; border-radius: var(--r-full); --b-bd: transparent; }
.stepper output { min-width: 28px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: var(--sh-1);
}
.card-lg { padding: var(--sp-6); border-radius: var(--r-xl); }
.card-flat { box-shadow: none; background: var(--bg-2); }
.card-accent { border-color: var(--line); background: linear-gradient(180deg, rgba(99, 229, 208, .06), transparent 60%), var(--surface); }
.card-hit { display: block; width: 100%; text-align: start; color: inherit; text-decoration: none; transition: transform var(--t-fast) var(--ease), border-color var(--t-fast), background var(--t-fast); }
.card-hit:hover { border-color: var(--line-3); background: var(--surface-2); }
.card-hit:active { transform: scale(.985); }
.card-hit:focus-visible { border-radius: var(--r-lg); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.card-title { font-weight: 750; font-size: var(--fs-lg); }
.card.is-alert { border-color: rgba(251, 191, 36, .55); box-shadow: 0 0 0 1px rgba(251, 191, 36, .25), var(--sh-1); }
.card.is-new { animation: flash 1.2s var(--ease) 2; }
.thumb { width: 72px; height: 72px; flex: none; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); }
.thumb-lg { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: var(--r-full); display: grid; place-items: center; background: var(--brand-bg); color: var(--brand); font-weight: 750; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: var(--fs-2xl); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-label { font-size: var(--fs-sm); color: var(--muted); }

.chips { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-block: 2px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 36px; padding: 0 var(--sp-3);
  border-radius: var(--r-full); border: 1px solid var(--line-3);
  background: var(--bg-2); color: var(--text-2);
  font-size: var(--fs-sm); font-weight: 650; white-space: nowrap; scroll-snap-align: start;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
button.chip:hover, a.chip:hover { border-color: rgba(159, 179, 205, .5); color: var(--text); }
.chip:focus-visible { border-radius: var(--r-full); }
.chip .ico { width: 16px; height: 16px; }
.chip.is-on, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.chip-sm { min-height: 26px; padding: 0 10px; font-size: var(--fs-xs); }
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 750; line-height: 1; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge .ico { width: 13px; height: 13px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--brand-bg); color: var(--brand); }
.dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--danger-2); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.status-pending { background: var(--warn-bg); color: var(--warn); }
.status-confirmed { background: var(--info-bg); color: var(--info); }
.status-preparing { background: rgba(167, 139, 250, .14); color: #c4b5fd; }
.status-ready { background: var(--ok-bg); color: var(--ok); }
.status-delivered { background: var(--surface-3); color: var(--muted); }
.status-canceled { background: var(--danger-bg); color: var(--danger); }

.tabs { display: flex; gap: var(--sp-1); padding: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-full); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 var(--sp-4); border-radius: var(--r-full); color: var(--muted); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.tab:hover { color: var(--text); }
.tab:focus-visible { border-radius: var(--r-full); }
.tab.is-on, .tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: var(--sh-1); }
.tabbar { position: sticky; bottom: 0; z-index: var(--z-bar); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px var(--sp-2) calc(6px + var(--safe-b)); background: rgba(7, 17, 29, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line-2); }
.tabbar-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border-radius: var(--r-md); color: var(--muted); font-size: 11.5px; font-weight: 700; text-decoration: none; }
.tabbar-item .ico { width: 24px; height: 24px; }
.tabbar-item.is-on, .tabbar-item[aria-current="page"], .tabbar-item[aria-selected="true"] { color: var(--brand); }
.tabbar-item .dot { position: absolute; top: 4px; inset-inline-start: calc(50% + 6px); }
.tabbar-item:focus-visible { border-radius: var(--r-md); }

.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: var(--sp-3); min-height: 60px; padding: var(--sp-3) var(--sp-4); width: 100%; text-align: start; color: inherit; text-decoration: none; }
.list-item + .list-item { border-top: 1px solid var(--line-2); }
button.list-item:hover, a.list-item:hover { background: var(--surface-2); }
.list-item:focus-visible { border-radius: 0; box-shadow: inset 0 0 0 2px var(--brand); }
.list-item > .ico { color: var(--muted); }
.list-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-title { font-weight: 650; overflow-wrap: anywhere; }
.list-sub { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.list-end { flex: none; display: flex; align-items: center; gap: var(--sp-2); color: var(--muted); }
.list-plain { background: none; border: 0; border-radius: 0; }
.list-plain .list-item { padding-inline: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-sm); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.bubbles { display: flex; flex-direction: column; gap: var(--sp-2); }
.bubble { max-width: min(82%, 520px); padding: 10px 14px; border-radius: 18px; background: var(--bubble-other); border: 1px solid var(--line-2); align-self: flex-start; border-end-start-radius: 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.is-mine { align-self: flex-end; background: var(--bubble-mine); color: var(--on-primary); border-color: transparent; border-end-start-radius: 18px; border-end-end-radius: 6px; }
.bubble.is-local { border-style: dashed; }
.bubble-meta { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 11px; opacity: .72; }
.bubble-orig { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(159, 179, 205, .2); font-size: var(--fs-sm); opacity: .8; }
.bubble.is-mine .bubble-orig { border-top-color: rgba(4, 33, 28, .2); }
.bubble img { margin-top: 4px; border-radius: 12px; max-height: 280px; object-fit: cover; }
.bubble-sys { align-self: center; padding: 4px 12px; border-radius: var(--r-full); background: var(--bg-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 650; }

.sheet-backdrop { position: fixed; inset: 0; z-index: var(--z-sheet); background: rgba(2, 8, 15, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity var(--t) var(--ease); }
.sheet {
  position: fixed; z-index: calc(var(--z-sheet) + 1);
  inset-inline: 0; bottom: 0;
  display: flex; flex-direction: column;
  max-height: calc(100dvh - 40px - var(--safe-t));
  max-width: 640px; margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sh-3);
  transform: translateY(104%);
  transition: transform var(--t) var(--ease);
}
.sheet.is-open { transform: none; }
.sheet-backdrop.is-open { opacity: 1; }
.sheet::before { content: ""; align-self: center; flex: none; width: 40px; height: 4px; margin-top: 10px; border-radius: var(--r-full); background: var(--line-3); }
.sheet-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4) var(--sp-2) var(--sp-5); }
.sheet-title { flex: 1 1 auto; min-width: 0; font-size: var(--fs-lg); font-weight: 750; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-2) var(--sp-5) var(--sp-5); }
.sheet-foot { display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5) calc(var(--sp-4) + var(--safe-b)); border-top: 1px solid var(--line-2); }
.sheet-foot .btn { flex: 1 1 0; }
.sheet-full { max-height: none; height: calc(100dvh - 24px - var(--safe-t)); }
@media (min-width: 760px) {
  .sheet { bottom: auto; top: 50%; inset-inline: var(--sp-4); border-radius: var(--r-xl); border-bottom: 1px solid var(--line-2); max-height: min(86dvh, 820px); transform: translateY(-46%) scale(.97); opacity: 0; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }
  .sheet.is-open { transform: translateY(-50%); opacity: 1; }
  .sheet::before { display: none; }
  .sheet-head { padding-top: var(--sp-5); }
  .sheet-foot { padding-bottom: var(--sp-4); }
  .sheet-full { height: min(90dvh, 900px); }
  .sheet-side { top: 0; bottom: 0; inset-inline-start: auto; inset-inline-end: 0; margin: 0; width: min(560px, 100%); max-width: none; max-height: none; height: 100dvh; border-radius: 0; border: 0; border-inline-start: 1px solid var(--line-2); transform: translateX(104%); opacity: 1; }
  [dir="rtl"] .sheet-side { transform: translateX(-104%); }
  .sheet-side.is-open { transform: none; }
}
body.has-sheet { overflow: hidden; }

.toasts { position: fixed; z-index: var(--z-toast); inset-inline: 0; top: calc(var(--sp-3) + var(--safe-t)); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding-inline: var(--sp-4); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: var(--sp-3);
  max-width: min(480px, 100%); padding: 12px 16px;
  border-radius: var(--r-md); border: 1px solid var(--line-3);
  background: rgba(19, 42, 65, .97); color: var(--text);
  box-shadow: var(--sh-2); font-size: var(--fs-sm); font-weight: 650;
  pointer-events: auto;
  animation: toast-in var(--t) var(--ease);
}
.toast .ico { color: var(--brand); }
.toast-ok .ico { color: var(--ok); }
.toast-erro { border-color: rgba(248, 113, 113, .45); }
.toast-erro .ico { color: var(--danger); }
.toast-aviso .ico { color: var(--warn); }
.toast.is-out { animation: toast-out var(--t) var(--ease) forwards; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); padding: var(--sp-10) var(--sp-6); color: var(--muted); }
.empty-ico { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--sp-2); border-radius: var(--r-full); background: var(--brand-bg); color: var(--brand); }
.empty-ico .ico { width: 28px; height: 28px; stroke-width: 1.75; }
.empty-title { color: var(--text); font-weight: 750; font-size: var(--fs-lg); }
.empty-text { max-width: 34ch; font-size: var(--fs-sm); }
.empty .btn { margin-top: var(--sp-3); }

.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-3); border-top-color: var(--brand); animation: spin .7s linear infinite; flex: none; }
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3); padding: var(--sp-10) var(--sp-4); color: var(--muted); font-size: var(--fs-sm); }
.loading-page { min-height: 60vh; }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(159, 179, 205, .08), transparent); animation: shimmer 1.3s infinite; }
.skeleton-line { height: 14px; margin-block: 6px; }
.skeleton-card { height: 88px; border-radius: var(--r-lg); }
.offline { position: fixed; z-index: var(--z-toast); inset-inline: 0; bottom: calc(var(--sp-3) + var(--safe-b)); display: flex; justify-content: center; pointer-events: none; }
.offline span { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 8px 14px; border-radius: var(--r-full); background: var(--warn); color: #2a1d00; font-size: var(--fs-xs); font-weight: 750; box-shadow: var(--sh-2); }
.notice { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--info-bg); color: var(--text-2); font-size: var(--fs-sm); }
.notice > .ico { color: var(--info); margin-top: 1px; }
.notice-warn { background: var(--warn-bg); }
.notice-warn > .ico { color: var(--warn); }
.notice-danger { background: var(--danger-bg); }
.notice-danger > .ico { color: var(--danger); }
.notice-brand { background: var(--brand-bg); }
.notice-brand > .ico { color: var(--brand); }

.fullscreen { position: fixed; inset: 0; z-index: calc(var(--z-toast) - 1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-6); padding: calc(var(--sp-6) + var(--safe-t)) var(--sp-6) calc(var(--sp-6) + var(--safe-b)); background: var(--bg); text-align: center; }
.fullscreen-text { font-size: clamp(1.75rem, 7vw, 3.5rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); } 70% { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes flash { 0%, 100% { box-shadow: var(--sh-1); } 50% { box-shadow: 0 0 0 2px var(--yellow), var(--sh-2); } }

@media (min-width: 760px) {
  h1 { font-size: var(--fs-3xl); }
  .wrap, .wrap-wide { padding-inline: var(--sp-6); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .toasts { top: auto; bottom: calc(var(--sp-6) + var(--safe-b)); }
}

@media (forced-colors: active) {
  .btn, .chip, .input, .select, .textarea, .card, .tab { border: 1px solid CanvasText; }
  :focus-visible { outline: 2px solid Highlight; }
}

@media print {
  body { background: #fff; color: #000; }
  .topbar, .bottombar, .tabbar, .toasts, .offline, .no-print { display: none !important; }
}
