/*
 * Diretório: /style.css
 * Criado em: 02/10/2026 00:12
 * Ajuste em: 02/10/2026 01:00
 * Versão: 2.0.0
 */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e5e9f2;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-soft: #eaf1ff;
  --ok: #059669;
  --ok-soft: #e7f8f1;
  --warn: #b45309;
  --warn-soft: #fff4e0;
  --err: #dc2626;
  --err-soft: #fdecec;
  --info: #4f46e5;
  --info-soft: #eef0ff;
  --side: #0f172a;
  --side-text: #cbd5e1;
  --side-active: #1e293b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111827;
    --surface-2: #0f172a;
    --line: #1f2937;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --primary: #3b82f6;
    --primary-2: #2563eb;
    --primary-soft: #172554;
    --ok: #34d399;
    --ok-soft: #052e22;
    --warn: #fbbf24;
    --warn-soft: #3a2a06;
    --err: #f87171;
    --err-soft: #3b0d0d;
    --info: #a5b4fc;
    --info-soft: #1e1b4b;
    --side: #070b16;
    --side-active: #162033;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
body.noscroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== Layout ===== */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--side); color: var(--side-text);
  z-index: 40;
}
.brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; }
.brand a, .brand.big { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
.brand b { color: #60a5fa; font-weight: 800; }
.brand svg { width: 32px; height: 32px; color: var(--primary); }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-width: thin; }
.nav-group { margin-top: 14px; }
.nav-group > span {
  display: block; padding: 0 10px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  color: var(--side-text); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--side-active); color: #fff; }
.nav a.active { background: var(--primary); color: #fff; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-top: 1px solid #1e293b; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: #64748b; font-size: 12px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 13px;
}
.side-foot .icon-btn { color: var(--side-text); }
.overlay { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.gsearch { flex: 1; max-width: 560px; position: relative; }
.gsearch span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.gsearch input { width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.top-actions { margin-left: auto; display: flex; gap: 6px; }
.top-actions .icon-btn { position: relative; }
.dot-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--err); color: #fff; font-size: 10px; font-style: normal; font-weight: 700;
  display: grid; place-items: center;
}
.view { padding: 24px; width: 100%; max-width: 1480px; margin: 0 auto; }
.only-mobile { display: none !important; }

/* ===== Cabeçalho de página ===== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer;
  font-weight: 600; white-space: nowrap; text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.danger { background: var(--err-soft); color: var(--err); }
.btn.ok { background: var(--ok-soft); color: var(--ok); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.icon-btn.sm { width: 32px; height: 32px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--primary-soft); color: var(--primary); }

/* ===== Métricas e painéis ===== */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.metric {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none !important;
}
a.metric[href]:hover { border-color: var(--primary); }
.metric span { font-size: 12px; font-weight: 600; color: var(--muted); }
.metric strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.metric small { color: var(--muted); font-size: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: 15px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--text); margin-bottom: 16px; }
.notice.warn { background: var(--warn-soft); }
.notice .ic { color: var(--info); margin-top: 2px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ===== Toolbar ===== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 420px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px !important; }
.toolbar select, .toolbar input, .field input, .field select, .field textarea {
  width: 100%; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
}
.toolbar select { width: auto; min-width: 170px; }
.field textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--primary-soft); }

/* ===== Tabelas ===== */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .acoes { text-align: right; white-space: nowrap; }
.tbl .acoes > * { margin-left: 2px; }
.cell-sub { display: block; color: var(--muted); font-size: 12px; }
.trunc { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.info { background: var(--info-soft); color: var(--info); }

/* ===== Kanban ===== */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.kcol { flex: 0 0 280px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); scroll-snap-align: start; }
.kcol.over { border-color: var(--primary); background: var(--primary-soft); }
.kcol header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; font-size: 13px; }
.kcol header b { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.kcol header small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.kcards { padding: 0 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); cursor: grab; }
.kcard.dragging { opacity: .5; }
.kcard p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.kc-title { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; font-weight: 700; color: var(--text); cursor: pointer; }
.kc-title:hover { color: var(--primary); }
.kc-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.kmove { width: 100%; margin-top: 10px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 12px; }
.kempty { text-align: center; color: var(--muted); font-size: 12px; padding: 14px 0; margin: 0; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); }
.modal.open { display: flex; }
.modal-box { width: 100%; max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); animation: pop .16s ease-out; }
.modal-box.lg { max-width: 940px; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-box > header h3 { font-size: 17px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-box > footer { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sp { flex: 1; }

/* ===== Formulários ===== */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full, .form-grid > .full { grid-column: 1 / -1; }
.field label, .lbl { font-size: 13px; font-weight: 600; }
.field small { color: var(--muted); font-size: 12px; }
.pass { position: relative; }
.pass input { padding-right: 46px !important; }
.pass .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pass .eye:hover { color: var(--primary); }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 26px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }
.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.item-rows, .link-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.item-row { display: grid; grid-template-columns: 1fr 90px 38px; gap: 8px; }
.link-row { display: grid; grid-template-columns: 160px 1fr 1.3fr 38px; gap: 8px; }
.item-row select, .item-row input, .link-row select, .link-row input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); width: 100%; }
.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.checklist label { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.checklist input { width: 18px; height: 18px; accent-color: var(--primary); }
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 8px; }

/* ===== Toasts ===== */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); font-weight: 500; animation: pop .2s ease-out; }
.toast.erro { background: var(--err); color: #fff; }

/* ===== Login ===== */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 10% -10%, var(--primary-soft), transparent), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.login-card .brand { padding: 0; }
.login-card .brand.big { color: var(--text); }
.login-card h1 { font-size: 22px; }
.login-card > p { margin: -10px 0 0; color: var(--muted); }

/* ===== Abas ===== */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 20px 0 16px; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

/* ===== Cliente 360 ===== */
.c360-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.c360-head .avatar { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
.prod-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.prod-card { padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.prod-card h4 { font-size: 15px; margin-bottom: 6px; }
.prod-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; word-break: break-word; }
.upsell { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px dashed var(--primary); border-radius: 12px; background: var(--primary-soft); flex-wrap: wrap; }
.upsell + .upsell { margin-top: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline small { color: var(--muted); display: block; }

/* ===== Gráficos ===== */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 34px; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar span { font-size: 10px; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank li > div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.duo { display: flex; gap: 2px; align-items: flex-end; width: 100%; height: 100%; justify-content: center; }
.duo i { width: 45%; max-width: 18px; }
.duo i.b { background: var(--err); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* ===== Calendário ===== */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal > div { background: var(--surface); min-height: 112px; padding: 6px; }
.cal .dow { min-height: auto; background: var(--surface-2); text-align: center; font-weight: 700; font-size: 12px; color: var(--muted); padding: 8px; }
.cal .out { background: var(--surface-2); }
.cal .today .dnum { background: var(--primary); color: #fff; }
.dnum { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.ev { display: block; font-size: 11px; padding: 2px 6px; border-radius: 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text) !important; text-decoration: none !important; }
.ev.receber { background: var(--ok-soft); }
.ev.pagar { background: var(--err-soft); }
.ev.demanda { background: var(--warn-soft); }
.ev.entrega { background: var(--info-soft); }
.agenda { display: none; }

/* ===== Placas / QR / Integrações ===== */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.qr-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.qr-card img { width: 150px; height: 150px; background: #fff; border-radius: 8px; padding: 6px; }
.qr-card b { display: block; margin-top: 8px; }
.qr-card small { display: block; color: var(--muted); word-break: break-all; }
.int-card { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.int-card + .int-card { margin-top: 10px; }
.keybox { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.keybox code { padding: 7px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.redir { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 16px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.e404 { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 16px; }
.e404 strong { display: block; font-size: 88px; font-weight: 800; color: var(--primary); line-height: 1; }
.e404 p { color: var(--muted); }

/* ===== Status de gravação ===== */
.sync { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 0 6px; }
.sync.salvando { color: var(--warn); }
.sync.erro { color: var(--err); }
.side-foot > div:last-child { display: flex; }

/* ===== Editor da página AvaliaTap Link ===== */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.editor-form .panel + .panel { margin-top: 16px; }
.editor-prev { position: sticky; top: 80px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.editor-prev > .lbl { align-self: flex-start; color: var(--muted); }
.phone { width: 100%; max-width: 360px; height: 680px; padding: 12px; border-radius: 42px; background: #0f172a; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); }
.phone-screen { width: 100%; height: 100%; border-radius: 31px; overflow-x: hidden; overflow-y: auto; background: #f5f7fb; scrollbar-width: none; }
.phone-screen::-webkit-scrollbar { display: none; }
.phone-screen .pub { min-height: 100%; }
.phone-screen .pub-btn { pointer-events: none; }
.prev-acoes { width: 100%; max-width: 360px; display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.prev-acoes img { width: 84px; height: 84px; flex-shrink: 0; padding: 4px; border-radius: 8px; background: #fff; }
.prev-acoes p { margin: 2px 0 8px; font-size: 12px; }
.slug-box { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.slug-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.slug-box span { display: flex; align-items: center; max-width: 60%; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--surface-2); border-right: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.field .slug-box input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0; box-shadow: none !important; }
.slug-st { font-weight: 600; }
.slug-st.ok { color: var(--ok) !important; }
.slug-st.err { color: var(--err) !important; }
.img-field { display: flex; gap: 12px; align-items: center; }
.img-thumb { width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; border: 1px dashed var(--line); background: var(--surface-2) center / cover no-repeat; color: var(--muted); }
.img-thumb.capa { width: 112px; }
.img-field .acts { display: flex; gap: 6px; flex-wrap: wrap; }
label.btn.carregando { opacity: .6; pointer-events: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--primary); }
.field .swatches input[type=color] { width: 44px; min-height: 34px; height: 34px; padding: 2px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.led { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.led + .led { margin-top: 8px; }
.led.sem-url { border-style: dashed; }
.led select, .led input { width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.led-acts { display: flex; gap: 2px; }

/* ===== Proposta (impressão) ===== */
.print-area h2 { font-size: 22px; }
.print-area .tbl { margin: 14px 0; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; padding: 24px; color: #000; }
  .modal { background: none; }
}

/* ===== Responsivo ===== */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor { grid-template-columns: 1fr; }
  .editor-prev { position: static; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .22s ease; }
  .app.menu-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
  .app.menu-open .overlay { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 35; }
  .only-mobile { display: inline-grid !important; }
  .topbar { padding: 10px 16px; }
  .view { padding: 18px 16px; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 20px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric strong { font-size: 20px; }
  .toolbar select { width: 100%; }
  .search { max-width: none; }
  .table-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 0; box-shadow: var(--shadow); }
  .tbl td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 7px 14px; text-align: right; }
  .tbl td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; flex-shrink: 0; }
  .tbl .acoes { justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
  .tbl .acoes::before { display: none; }
  .trunc { max-width: 170px; }
  .kcol { flex-basis: 84vw; max-height: none; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal-box > footer .btn { flex: 1; }
  .modal-box > footer .sp { display: none; }
  .link-row { grid-template-columns: 1fr 38px; }
  .link-row select { grid-column: 1 / 2; }
  .link-row input { grid-column: 1 / 2; }
  .link-row .icon-btn { grid-column: 2; grid-row: 1; }
  .cal { display: none; }
  .agenda { display: block; }
  .int-card { grid-template-columns: 1fr; }
  .gsearch input { font-size: 16px; }
  .sync { display: none; }
  .led { grid-template-columns: 1fr; }
  .led-acts { justify-content: flex-end; }
  .phone { height: 600px; border-radius: 36px; padding: 10px; }
  .phone-screen { border-radius: 27px; }
  .slug-box span { max-width: 48%; font-size: 12px; }
}
@media (max-width: 380px) {
  .metrics { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
