/* =====================================================================
   Doce Agenda — sistema visual
   Rosé + champanhe sobre marfim, tinta cacau. Serifa nos títulos, sans no texto.
   ===================================================================== */
:root {
  --primary: #c97c8d;
  --primary-soft: #f7e8eb;
  --primary-ink: #8e4a5b;
  --accent: #e7cfa6;
  --bg: #fbf8f5;
  --bg-2: #f5efea;
  --card: #ffffff;
  --line: #eee5df;
  --line-2: #e4d8d0;
  --ink: #2f2226;
  --ink-2: #5b4a4f;
  --muted: #9a8a8e;
  --ok: #4f9e7c;
  --ok-soft: #e7f4ee;
  --warn: #d49a46;
  --warn-soft: #fbf0e0;
  --bad: #cf6767;
  --bad-soft: #fbe9e9;
  --info: #6b8fc4;
  --info-soft: #eaf0f9;
  --lilac: #9b84c9;
  --lilac-soft: #f1ecf9;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(47, 34, 38, .04), 0 1px 1px rgba(47, 34, 38, .03);
  --shadow: 0 1px 2px rgba(47, 34, 38, .04), 0 10px 30px -12px rgba(47, 34, 38, .12);
  --shadow-lg: 0 2px 6px rgba(47, 34, 38, .05), 0 30px 60px -20px rgba(47, 34, 38, .25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'DM Serif Display', 'Playfair Display', Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2 { font-family: var(--display); font-weight: 400; margin: 0 0 .35em; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; }
h3 { font-family: var(--font); font-weight: 700; font-size: .98rem; margin: 0 0 .7em; letter-spacing: -.005em; display: flex; align-items: center; gap: 8px; }
h3 .ic { color: var(--primary); }
a { color: var(--primary-ink); text-underline-offset: 3px; }
img { max-width: 100%; }
::selection { background: var(--primary-soft); }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .grid { gap: 14px; } }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-ink); }

/* ------------------------------------------------ botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 999px;
  padding: 9px 18px; font: 600 .88rem var(--font); letter-spacing: .005em; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 92%, #fff), var(--primary)); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 16px -8px color-mix(in srgb, var(--primary) 80%, transparent);
  transition: transform .12s var(--ease), box-shadow .2s, background .2s, filter .2s; }
.btn:hover { filter: brightness(1.04); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 22px -10px color-mix(in srgb, var(--primary) 90%, transparent); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn .ic { width: 16px; height: 16px; }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary-ink); }
.btn.soft { background: var(--primary-soft); color: var(--primary-ink); box-shadow: none; }
.btn.danger { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.btn.ok { background: linear-gradient(180deg, #5cae8b, var(--ok)); box-shadow: 0 6px 16px -8px rgba(79, 158, 124, .7); }
.btn.wa { background: linear-gradient(180deg, #3fcf7a, #25b864); box-shadow: 0 6px 16px -8px rgba(37, 184, 100, .7); }
.btn.dark { background: var(--ink); box-shadow: 0 8px 20px -10px rgba(47, 34, 38, .6); }
.btn.sm { padding: 6px 13px; font-size: .8rem; }
.btn.icon { padding: 0; width: 36px; height: 36px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .01em; }
.field { margin-bottom: 14px; }
input, select, textarea { width: 100%; font: inherit; font-size: .92rem; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 13px; outline: none; transition: border .15s, box-shadow .15s; box-shadow: var(--shadow-sm); }
input::placeholder, textarea::placeholder { color: #b9abaf; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
input[disabled] { background: var(--bg); color: var(--muted); }
textarea { resize: vertical; min-height: 76px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); box-shadow: none; margin: 0; }
input[type=color] { padding: 3px; height: 42px; cursor: pointer; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink); font-size: .9rem; cursor: pointer; margin: 0; }

/* ------------------------------------------------ cartões e listas */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }
.stat { display: flex; flex-direction: column; gap: 3px; position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--primary-soft), transparent 70%); }
.stat .label { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stat .value { font-family: var(--display); font-size: 1.85rem; line-height: 1.15; letter-spacing: -.01em; }
.stat .hint { font-size: .8rem; color: var(--muted); }
.stat .ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 10px; background: var(--primary-soft); color: var(--primary-ink); position: relative; z-index: 1; }
.stat .ico .ic { width: 20px; height: 20px; }
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item.click { cursor: pointer; border-radius: 14px; padding-inline: 10px; transition: background .15s; }
.item.click:hover { background: var(--bg); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--accent) 45%, #fff)); color: var(--primary-ink);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; letter-spacing: .02em; }
.thumb { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--primary-soft); display: grid; place-items: center; font-size: 1.3rem; flex: none; color: var(--primary-ink); }
.empty { text-align: center; padding: 34px 12px; color: var(--muted); font-size: .9rem; }
.empty .big { font-size: 2rem; margin-bottom: 6px; opacity: .8; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); font-weight: 700; }
td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.item.click:hover td { background: var(--bg); }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--primary-soft); color: var(--primary-ink); white-space: nowrap; letter-spacing: .01em; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-solicitado { background: var(--lilac-soft); color: #7a63ad; }
.b-confirmado, .b-enviado { background: var(--info-soft); color: #4f74ab; }
.b-producao, .b-parcial, .b-rascunho, .b-aguardando_sinal { background: var(--warn-soft); color: #a8742a; }
.b-sinal_pago { background: var(--info-soft); color: #4f74ab; }
.b-pronto { background: var(--primary-soft); color: var(--primary-ink); }
.b-entregue, .b-pago, .b-aprovado, .b-entrada { background: var(--ok-soft); color: #3b8566; }
.b-cancelado, .b-pendente, .b-recusado, .b-saida { background: var(--bad-soft); color: #b65252; }
.pos { color: #3b8566; } .neg { color: var(--bad); }

/* ------------------------------------------------ layout do app */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand .logo { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; overflow: hidden; flex: none; box-shadow: var(--shadow); }
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.brand .logo .ic { width: 22px; height: 22px; }
.brand b { font-family: var(--display); font-weight: 400; font-size: 1.12rem; display: block; line-height: 1.15; }
.brand span { font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .9rem; margin-bottom: 2px; transition: background .15s, color .15s; }
.nav a .ic { color: var(--muted); transition: color .15s; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.nav a.active .ic, .nav a:hover .ic { color: var(--primary-ink); }
.nav .sep { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 18px 12px 6px; font-weight: 700; }
.side .foot { margin-top: auto; padding-top: 18px; }
.linkbox { background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--accent) 35%, #fff)); border-radius: 16px; padding: 14px; font-size: .78rem; word-break: break-all; }
.linkbox b { display: flex; align-items: center; gap: 6px; font-size: .8rem; margin-bottom: 4px; color: var(--ink); }
.logout { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 10px; color: var(--muted); text-decoration: none; font-size: .84rem; border-radius: 10px; }
.logout:hover { color: var(--ink); background: var(--bg); }
.main { padding: 34px 40px 70px; min-width: 0; max-width: 1360px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin: 0; color: var(--muted); }
.topbar { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .25s var(--ease); background: #fff; box-shadow: var(--shadow-lg); }
  .app.menu-open .side { transform: none; }
  .app.menu-open::after { content: ''; position: fixed; inset: 0; background: rgba(47, 34, 38, .3); backdrop-filter: blur(2px); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .topbar b { font-family: var(--display); font-weight: 400; font-size: 1.1rem; }
  .main { padding: 22px 16px 80px; }
  h1 { font-size: 1.65rem; }
}

.tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font: 600 .82rem var(--font); color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--ink); color: #fff; }

/* ------------------------------------------------ agenda / calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: .68rem; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .1em; padding-bottom: 6px; }
.cal .day { background: #fff; border: 1px solid var(--line); border-radius: 14px; min-height: 96px; padding: 7px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.cal .day:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.cal .day.out { opacity: .4; }
.cal .day.today .num { background: var(--ink); color: #fff; border-radius: 8px; padding: 0 6px; }
.cal .day.sel { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.cal .num { font-weight: 700; font-size: .82rem; }
.cal .ev { font-size: .68rem; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal .ev.b-entregue { opacity: .6; }
.cal .more { font-size: .68rem; color: var(--muted); font-weight: 700; }
.cal .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal .dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.cal .dtop { display: flex; justify-content: space-between; align-items: center; gap: 2px; }
.capt { font-size: .6rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.capt.ok { background: var(--ok-soft); color: #3b8566; }
.capt.warn { background: var(--warn-soft); color: #a8742a; }
.capt.full, .capt.over { background: var(--bad-soft); color: var(--bad); }
.capt.closed { background: var(--bg-2); color: var(--muted); }
.cal .day.closed { background: repeating-linear-gradient(135deg, #faf6f3 0 7px, #fff 7px 14px); }
.cal .day.full { border-color: #efc6c6; }
@media (max-width: 600px) { .cal .day { min-height: 54px; padding: 5px; } .cal .ev, .cal .more, .capt { display: none; } .cal .dot { display: block; } }

/* ------------------------------------------------ modal e toast */
.modal-bg { position: fixed; inset: 0; background: rgba(47, 34, 38, .32); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 100; animation: fade .18s; }
.modal { background: #fff; border-radius: 26px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; box-shadow: var(--shadow-lg); animation: pop .22s var(--ease); }
.modal.wide { width: min(880px, 100%); }
.modal .mhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.modal .mhead h2 { margin: 0; }
.modal .mfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.x { border: 1px solid var(--line); background: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--muted); flex: none; transition: color .15s, border-color .15s; }
.x:hover { color: var(--ink); border-color: var(--line-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .86rem; animation: pop .25s var(--ease); box-shadow: var(--shadow-lg); }
.toast.err { background: var(--bad); }

/* ------------------------------------------------ editor de itens */
.items-ed .it { display: grid; grid-template-columns: 1fr 80px 110px 100px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.items-ed .it .sub { text-align: right; font-weight: 700; }
@media (max-width: 600px) { .items-ed .it { grid-template-columns: 1fr 64px 90px 36px; } .items-ed .it .sub { display: none; } }
.totals { margin-left: auto; width: min(300px, 100%); }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { font-family: var(--display); font-size: 1.45rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* ------------------------------------------------ gráficos */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bars .col { width: 100%; max-width: 32px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #fff)); min-height: 2px; position: relative; }
.bars .col.alt { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; width: 100%; justify-content: center; height: 100%; }
.bars .pair .col { max-width: 15px; }
.bars .lbl { font-size: .68rem; color: var(--muted); font-weight: 600; }
.bars .col:hover::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .7rem; padding: 3px 8px; border-radius: 8px; white-space: nowrap; margin-bottom: 6px; z-index: 2; }
.hbar { margin-bottom: 12px; }
.hbar .top { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: 5px; gap: 8px; }
.hbar .track { height: 7px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ------------------------------------------------ login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth .hero { position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(1200px 600px at -10% -10%, color-mix(in srgb, var(--primary) 30%, #fff) 0%, transparent 55%),
              radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--accent) 55%, #fff) 0%, transparent 60%), var(--bg-2); }
.auth .hero::before { content: ''; position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(color-mix(in srgb, var(--primary) 25%, transparent) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 70%); }
.auth .hero > * { position: relative; }
.auth .mark { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); margin-bottom: 22px; }
.auth .mark .ic { width: 28px; height: 28px; }
.auth .hero h1 { font-size: 3.1rem; line-height: 1.05; max-width: 520px; }
.auth .hero h1 em { font-style: italic; color: var(--primary-ink); }
.auth .feat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; max-width: 620px; }
.auth .feat div { background: rgba(255, 255, 255, .72); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .9); border-radius: 16px; padding: 14px 16px; font-size: .84rem; color: var(--ink-2); display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow-sm); }
.auth .feat .ic { color: var(--primary-ink); margin-top: 2px; }
.auth .feat b { display: block; color: var(--ink); margin-bottom: 1px; }
.auth .box { display: grid; place-items: center; padding: 32px 20px; background: #fff; }
.auth form { width: min(390px, 100%); }
.auth form h2 { font-size: 1.9rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .hero { padding: 34px 20px 26px; } .auth .hero h1 { font-size: 2.1rem; } .auth .feat { display: none; } }

/* ------------------------------------------------ capacidade, turnos, sinal e saldo */
.capbox { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, #fff); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.capbox.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, #fff); color: #a54848; }
.capbar { height: 7px; background: rgba(255, 255, 255, .9); border-radius: 99px; overflow: hidden; }
.capbar > div { height: 100%; background: var(--ok); border-radius: 99px; }
.capbar > div.warn { background: var(--warn); }
.capbar > div.over { background: var(--bad); }
.paybox { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.payrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.payrow + .payrow { border-top: 1px dashed var(--line-2); }
.paylist { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.paylist .btn.icon { width: 26px; height: 26px; font-size: .7rem; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 99px; font-weight: 600; color: var(--ink-2); cursor: pointer; margin: 0; font-size: .84rem; background: #fff; transition: all .15s; }
.chip:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); }
.shrow { display: grid; grid-template-columns: 1fr 104px 104px 72px 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 600px) { .shrow { grid-template-columns: 1fr 84px 84px; } .shrow > :nth-child(4) { grid-column: 1 / 3; } }
.vrow { display: grid; grid-template-columns: 1fr 130px 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
.pixbox { background: var(--primary-soft); border: 1px dashed var(--primary); border-radius: 16px; padding: 14px; margin: 12px 0; text-align: left; }

/* ------------------------------------------------ escolha de data/turno (cardápio público) */
.daychips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.daychip { flex: none; scroll-snap-align: start; width: 64px; padding: 9px 4px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; text-align: center; cursor: pointer; font: 600 .76rem var(--font); color: var(--ink-2); transition: all .15s; }
.daychip b { display: block; font-size: 1.25rem; font-family: var(--display); font-weight: 400; color: var(--ink); line-height: 1.2; }
.daychip small { display: block; font-size: .64rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.daychip:hover:not(:disabled) { border-color: var(--primary); }
.daychip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.daychip.on b, .daychip.on small { color: #fff; }
.daychip:disabled { opacity: .4; cursor: not-allowed; background: repeating-linear-gradient(135deg, #faf6f3 0 5px, #fff 5px 10px); }
.shiftchips { display: flex; gap: 8px; flex-wrap: wrap; }
.shiftchips button { padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; font: 600 .84rem var(--font); color: var(--ink); cursor: pointer; transition: all .15s; }
.shiftchips button small { color: var(--muted); font-weight: 500; }
.shiftchips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.shiftchips button.on small { color: rgba(255, 255, 255, .75); }
.shiftchips button:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* ------------------------------------------------ impressão */
@media print {
  .side, .topbar, .no-print, .btn { display: none !important; }
  .app { display: block; } .main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
.big-ic { width: 44px; height: 44px; color: var(--primary); opacity: .7; }

/* ------------------------------------------------ celular: nada passa da largura da tela */
.app > div { min-width: 0; }
.modal-bg { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.modal { max-height: calc(100dvh - 32px); }
@keyframes sheet { from { transform: translateY(48px); opacity: 0; } }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .page-head > .row, .page-head > .btn { width: 100%; }
  .page-head > .row .btn { flex: 1; }
  .tabs { max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: none; }
  /* janelas viram uma gaveta que sobe do rodapé, com os botões sempre à vista */
  .modal-bg { padding: 0; align-items: end; }
  .modal, .modal.wide { width: 100%; border-radius: 24px 24px 0 0; padding: 22px 18px 0; max-height: 94dvh; animation: sheet .28s var(--ease); }
  .modal .mfoot { position: sticky; bottom: 0; z-index: 2; background: #fff; margin: 16px -18px 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .modal > :last-child:not(.mfoot):not(form) { margin-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .modal form { padding-bottom: 1px; }
  .modal .mfoot .row { flex: 1; justify-content: flex-end; }
  .modal h2 { font-size: 1.3rem; }
  .payrow > .grow { min-width: 140px; }
  .totals { width: 100%; }
}

.item > .grow { min-width: 0; }
@media (max-width: 600px) {
  .tabs { min-width: 0; }
  .item { flex-wrap: wrap; row-gap: 8px; }
  .item > .grow { flex: 1 1 140px; }
}
.modal .mfoot { align-items: center; }
@media (max-width: 380px) { .modal .mfoot .btn.sm { padding: 6px 11px; } .modal .mfoot .row { gap: 6px; } }

/* textos longos (links, e-mails, nomes) quebram a linha em vez de sair da tela */
.urlbox { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; font-size: .85rem; color: var(--ink-2); overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.card, .modal, .linkbox, .item, td { overflow-wrap: anywhere; }
.row > div { min-width: 0; }
.topbar b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .btn { flex: none; }
.topbar .grow { display: none; }

/* ------------------------------------------------ assinatura */
.navlock { width: 14px !important; height: 14px !important; opacity: .6; }
.trialchip { display: flex; gap: 10px; align-items: center; margin: 14px 4px 0; padding: 10px 12px; border-radius: 14px; background: var(--info-soft); color: #4f74ab; text-decoration: none; font-size: .8rem; }
.trialchip b { display: block; color: var(--ink); font-size: .82rem; }
.bbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 40px 0; padding: 12px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-2); font-size: .88rem; color: var(--ink-2); }
.bbar.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, #fff); color: #855d22; }
.bbar.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, #fff); color: #9b3f3f; }
#bbar:empty { display: none; }
@media (max-width: 860px) { .bbar { margin: 14px 16px 0; } }
.billhero { background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--accent) 35%, #fff)); border: 0; }
.billhero h2 { font-size: 1.9rem; margin: 6px 0; }
.billhero p { margin: 0 0 4px; max-width: 620px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 860px; margin: 0 auto; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 28px; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; gap: 6px; }
.plan.featured { background: linear-gradient(160deg, #2f2226, #4a353c); color: #fff; border: 0; box-shadow: var(--shadow-lg); }
.plan.featured .muted, .plan.featured small { color: rgba(255, 255, 255, .65); }
.plan.featured h2 { color: #fff; }
.plan.featured .btn:not(.ghost) { background: linear-gradient(180deg, #f1ddb9, var(--accent)); color: #2f2226; }
.plan h2 { margin: 0; font-size: 1.7rem; }
.ptag { position: absolute; top: 20px; right: 20px; background: var(--accent); color: #2f2226; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; }
.pprice { font-family: var(--display); font-size: 2.8rem; line-height: 1; margin-top: 14px; }
.pprice small { font-family: var(--font); font-size: .9rem; color: var(--muted); margin: 0 3px; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.plan li .ic { width: 17px; height: 17px; color: var(--ok); margin-top: 2px; }
.plan.featured li .ic { color: var(--accent); }
.faq { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--ink-2); }
.faq .ic { color: var(--primary); width: 22px; height: 22px; margin-bottom: 6px; }
.faq b { color: var(--ink); }
.locked { text-align: center; padding: 56px 24px; max-width: 640px; margin: 20px auto; }
.lockico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--primary-soft); color: var(--primary-ink); }
.lockico .ic { width: 28px; height: 28px; }
@media (max-width: 700px) { .plans { grid-template-columns: minmax(0, 1fr); } .pprice { font-size: 2.4rem; } }
.nav a .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------ pronta entrega (painel) */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ritem { padding: 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.ritem .rimg { aspect-ratio: 16 / 10; background: var(--primary-soft) center/cover; display: grid; place-items: center; position: relative; }
.ritem .rbody { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ritem .capbar { background: var(--bg-2); }
.ritem.soldout .rimg { filter: grayscale(.85); opacity: .7; }
.ritem .ribbon { position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; }

/* ------------------------------------------------ campo de senha com olho */
.pwwrap { position: relative; }
.pwwrap input { padding-right: 46px; }
.pweye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color .15s, background .15s; }
.pweye:hover, .pweye:focus-visible { color: var(--ink); background: var(--bg); outline: none; }
.pweye .ic { width: 19px; height: 19px; }
