/* Painel administrativo — tema claro/escuro por html[data-theme] (escolha salva no navegador). */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --hover: #f1f4f8;
  --text: #0f172a;
  --text-2: #526071;
  --text-3: #8a96a6;
  --line: #e4e8ee;
  --brand: #28352F;
  --brand-rgb: 40, 53, 47;
  --accent: #C9A96A;
  --accent-rgb: 201, 169, 106;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --violet: #7c3aed;
  --wa: #1fa855;
  --side: #0b1722;
  --side-2: #12212f;
  --side-text: #aebccb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html[data-theme="escuro"] {
  --bg: #0b1016;
  --surface: #121922;
  --surface-2: #161f2a;
  --hover: #1a2430;
  --text: #e8edf3;
  --text-2: #a2afbd;
  --text-3: #6f7d8c;
  --line: #222d3a;
  --side: #080d12;
  --side-2: #101821;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: .98rem; font-weight: 700; }
p { margin: 0 0 1em; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--text-3); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ------------------------------------------------ estrutura */
.app { display: flex; min-height: 100vh; }
.side {
  width: 250px; flex-shrink: 0; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #2a3947 transparent;
}
.side__brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: #fff; }
.side__brand .mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; }
.side__brand .mark .ic { width: 22px; height: 22px; }
.side__brand img { max-height: 40px; max-width: 170px; object-fit: contain; }
.side__brand strong { display: block; font-size: .95rem; line-height: 1.2; }
.side__brand small { font-size: .74rem; color: var(--side-text); }
.side__group { padding: 6px 12px; }
.side__label { display: block; padding: 14px 10px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5f7183; }
.side a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px;
  font-weight: 500; font-size: .9rem; color: var(--side-text); transition: background-color .15s, color .15s;
}
.side a:hover { background: var(--side-2); color: #fff; }
.side a.is-active { background: rgba(var(--accent-rgb), .16); color: #fff; }
.side a.is-active .ic { color: var(--accent); }
.side .badge { margin-left: auto; }
.side__foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar__search { flex: 1; max-width: 460px; position: relative; }
.topbar__search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.topbar__search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.topbar__search input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(var(--accent-rgb), .18); color: var(--accent); font-weight: 700; font-size: .82rem; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip strong { font-size: .86rem; font-weight: 600; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-2); transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn--sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn--sm .ic { width: 16px; height: 16px; }
.icon-btn--danger:hover { color: var(--red); border-color: rgba(220, 38, 38, .35); }
[data-theme-toggle] .ic-sol { display: none; }
html[data-theme="escuro"] [data-theme-toggle] .ic-sol { display: block; }
html[data-theme="escuro"] [data-theme-toggle] .ic-lua { display: none; }
.side-toggle { display: none; }

.content { padding: 28px; max-width: 1400px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--text-2); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb { font-size: .82rem; color: var(--text-3); margin-bottom: 6px; }
.breadcrumb a:hover { color: var(--text); }

/* ------------------------------------------------ componentes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card__head h2 { margin: 0; font-size: 1rem; }
.card__body { padding: 20px; }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.stat__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(37, 99, 235, .1); color: var(--blue); flex-shrink: 0; }
.stat__icon--green { background: rgba(22, 163, 74, .12); color: var(--green); }
.stat__icon--amber { background: rgba(217, 119, 6, .12); color: var(--amber); }
.stat__icon--violet { background: rgba(124, 58, 237, .12); color: var(--violet); }
.stat__icon--accent { background: rgba(var(--accent-rgb), .15); color: var(--accent); }
.stat small { display: block; color: var(--text-3); font-weight: 500; font-size: .8rem; }
.stat strong { display: block; font-size: 1.55rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.stat span { font-size: .78rem; color: var(--text-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: .86rem; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--hover); }
.btn .ic { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: #163a54; }
html[data-theme="escuro"] .btn--primary { background: var(--accent); border-color: var(--accent); color: #111; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn--wa:hover { background: #178a45; }
.btn--danger { color: var(--red); }
.btn--danger:hover { background: rgba(220, 38, 38, .08); border-color: rgba(220, 38, 38, .3); }
.btn--sm { height: 32px; padding: 0 11px; font-size: .8rem; border-radius: 8px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--hover); color: var(--text-2); white-space: nowrap; }
.badge--blue { background: rgba(37, 99, 235, .1); color: var(--blue); }
.badge--green { background: rgba(22, 163, 74, .12); color: var(--green); }
.badge--amber { background: rgba(217, 119, 6, .13); color: var(--amber); }
.badge--red { background: rgba(220, 38, 38, .1); color: var(--red); }
.badge--violet { background: rgba(124, 58, 237, .1); color: var(--violet); }
.badge--accent { background: rgba(var(--accent-rgb), .16); color: var(--accent); }
.badge--solid { background: var(--red); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* tabela */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
.td-thumb { width: 72px; }
.thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--hover); display: block; }
.td-actions { width: 1%; white-space: nowrap; text-align: right; }
.td-actions form { display: inline; }
.cell-title { font-weight: 600; display: block; }
.cell-title:hover { color: var(--blue); }
.cell-sub { display: block; font-size: .8rem; color: var(--text-3); }
.empty { padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty .ic { width: 36px; height: 36px; margin: 0 auto 10px; display: block; color: var(--text-3); }

/* filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.filters input, .filters select { height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.filters input[type="search"] { min-width: 220px; flex: 1; max-width: 320px; }
.tabs-line { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 0 12px; }
.tabs-line a, .tabs-line button { padding: 13px 12px; font-weight: 600; font-size: .86rem; color: var(--text-3); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs-line a:hover, .tabs-line button:hover { color: var(--text); }
.tabs-line .is-active { color: var(--text); border-color: var(--accent); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--text-3); }
.pager div { display: flex; gap: 6px; }

/* formulários */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.col-12 { grid-column: span 12; } .col-9 { grid-column: span 9; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
.field label, .label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field label small { font-weight: 500; color: var(--text-3); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), .field select, .field textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field textarea.tall { min-height: 220px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.field input[disabled], .field textarea[disabled] { background: var(--hover); color: var(--text-3); cursor: not-allowed; }
.help { display: block; font-size: .76rem; color: var(--text-3); margin-top: 5px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: .86rem; }
.input-prefix input { padding-left: 34px !important; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; padding: 4px 0; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch input + span { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background-color .2s; flex-shrink: 0; }
.switch input + span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; }
.chip-add { display: inline-flex; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); font-size: .78rem; cursor: pointer; background: none; color: var(--text-2); margin: 0 4px 6px 0; }
.chip-add:hover { border-color: var(--accent); color: var(--accent); }
.chip-add.is-on { border-style: solid; border-color: var(--green); color: var(--green); }
.section-title { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 8px 0 12px; grid-column: span 12; padding-top: 10px; border-top: 1px dashed var(--line); }
.section-title:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.color-field { display: flex; gap: 10px; align-items: center; }
.color-field input[type="color"] { width: 46px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.flash--ok { background: rgba(22, 163, 74, .08); border-color: rgba(22, 163, 74, .25); color: #166534; }
.flash--erro { background: rgba(220, 38, 38, .07); border-color: rgba(220, 38, 38, .25); color: #991b1b; }
.flash--info { background: rgba(217, 119, 6, .08); border-color: rgba(217, 119, 6, .25); color: #92400e; }
html[data-theme="escuro"] .flash--ok { color: #86efac; }
html[data-theme="escuro"] .flash--erro { color: #fca5a5; }
html[data-theme="escuro"] .flash--info { color: #fcd34d; }

/* galeria de fotos */
.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.foto-item { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: grab; }
.foto-item.is-dragging { opacity: .4; }
.foto-item.is-over { outline: 2px dashed var(--accent); }
.foto-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; pointer-events: none; }
.foto-item__bar { display: flex; align-items: center; gap: 4px; padding: 6px; }
.foto-item__bar input { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); font-size: .78rem; }
.foto-item__capa { position: absolute; top: 8px; left: 8px; }
.foto-item__del { position: absolute; top: 8px; right: 8px; }
.foto-item__del .icon-btn { background: rgba(255, 255, 255, .92); color: #b91c1c; border: 0; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; color: var(--text-2); cursor: pointer; transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: rgba(var(--accent-rgb), .05); }
.dropzone .ic { width: 30px; height: 30px; color: var(--accent); }
.dropzone input { display: none; }
.upload-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.upload-list img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

/* lista de itens simples (vídeos, cidades, slides) */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list__main { flex: 1; min-width: 0; }
.slide-thumb { width: 140px; height: 74px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }

/* atendimentos */
.lead-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.lead-item:last-child { border-bottom: 0; }
.lead-item:hover { background: var(--surface-2); }
.lead-item__body { flex: 1; min-width: 0; }
.lead-item__msg { color: var(--text-2); font-size: .86rem; margin: 3px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--text-3); font-weight: 500; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
/* As fichas usam <div><small>rótulo</small><strong>valor</strong></div> em vez de dt/dd:
   cada div ocupa a linha inteira, com o rótulo à esquerda e o valor à direita. */
.kv > div { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.kv > div small { color: var(--text-3); font-weight: 500; }
.kv > div strong { font-weight: 600; text-align: right; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline li:last-child { border-color: transparent; }

/* permissões */
.perm-table td, .perm-table th { padding: 10px 12px; }
.perm-table td:not(:first-child), .perm-table th:not(:first-child) { text-align: center; width: 90px; }
.perm-table input { width: 17px; height: 17px; accent-color: var(--accent); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.login__art { position: relative; background: linear-gradient(160deg, rgba(var(--brand-rgb), .6), rgba(11, 23, 34, .95)), var(--login-img, none) center / cover; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; }
.login__art h2 { font-size: 2rem; font-weight: 700; max-width: 440px; letter-spacing: -.02em; }
.login__art p { color: rgba(255, 255, 255, .75); max-width: 420px; }
.login__form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login__box { width: 100%; max-width: 380px; }
.login__box h1 { font-size: 1.6rem; }
.login__box .field { margin-bottom: 14px; }
.login__box .btn { height: 44px; }

/* diversos */
.list-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.progress { height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .84rem; }
.pendencias li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pendencias li:last-child { border-bottom: 0; }
.pendencias .ic { color: var(--amber); margin-top: 1px; }
.pendencias a { font-weight: 600; color: var(--blue); }
.color-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid var(--line); }
.demo-note { background: rgba(217, 119, 6, .08); border: 1px solid rgba(217, 119, 6, .25); color: #92400e; padding: 10px 14px; border-radius: 10px; font-size: .84rem; margin-bottom: 18px; }
html[data-theme="escuro"] .demo-note { color: #fcd34d; }
.locked { display: inline-flex; gap: 4px; align-items: center; font-size: .74rem; color: var(--amber); font-weight: 600; margin-left: 6px; }
.locked .ic { width: 13px; height: 13px; }

/* responsivo */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .25s; }
  .side.is-open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .side-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid > [class^="col-"] { grid-column: span 12; }
  .login { grid-template-columns: 1fr; }
  .login__art { display: none; }
  .user-chip strong { display: none; }
  .user-chip { padding: 3px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .topbar__search { display: none; }
  .hide-sm { display: none; }
}
.grid > .card + .card { margin-top: 0; }
.tabs-line { overflow-y: hidden; scrollbar-width: thin; }
.foto-item__capa { background: var(--accent) !important; color: #fff !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

/* financeiro */
.mes-nav { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; }
.mes-nav strong { font-size: 1.05rem; min-width: 170px; text-align: center; }
a.card.stat:hover { border-color: var(--accent); }
.stat__icon--red { background: rgba(220, 38, 38, .1); color: var(--red); }
.val-pos { color: var(--green); }
.val-neg { color: var(--red); }
.cell-sub.val-pos, .cell-sub.val-neg { font-weight: 600; }
.tipo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.tipo-dot--receita { background: var(--green); }
.tipo-dot--despesa { background: var(--red); }
.row-atrasado td { background: rgba(220, 38, 38, .035); }
.fin-table tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); }
.fin-table td { vertical-align: top; }
.fin-table .badge .ic { width: 13px; height: 13px; }
.lote { position: sticky; bottom: 0; }
.dialog { border: 0; padding: 0; border-radius: var(--radius); width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.dialog::backdrop { background: rgba(8, 14, 20, .55); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; background: var(--surface-2); }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-weight: 600; color: var(--text-2); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

/* gráfico do fluxo de caixa (paleta validada para daltonismo nos dois temas) */
.viz { --serie-entrada: #2a78d6; --serie-saida: #eb6834; --grid: #e7e9ee; --eixo: #8a96a6; position: relative; }
html[data-theme="escuro"] .viz { --serie-entrada: #3987e5; --serie-saida: #d95926; --grid: #232e3a; --eixo: #75818c; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz .grade line { stroke: var(--grid); stroke-width: 1; }
.viz .grade line.zero { stroke: var(--eixo); }
.viz .eixo text { fill: var(--eixo); font-size: 11px; }
.viz .mes text { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.viz .mes.is-atual text { fill: var(--text); font-weight: 700; }
.viz .col-entrada { fill: var(--serie-entrada); }
.viz .col-saida { fill: var(--serie-saida); }
.viz .col-aberto-entrada { fill: url(#hachura-entrada); }
.viz .col-aberto-saida { fill: url(#hachura-saida); }
.viz .hachura-entrada-cor { stroke: var(--serie-entrada); }
.viz .hachura-saida-cor { stroke: var(--serie-saida); }
.viz .alvo { fill: transparent; cursor: pointer; }
.viz .alvo:hover, .viz .alvo:focus { fill: var(--text); fill-opacity: .045; outline: none; }
.viz .saldo-linha { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz .saldo-ponto { fill: var(--text-2); stroke: var(--surface); stroke-width: 2; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .82rem; color: var(--text-2); margin-bottom: 12px; }
.legenda span { display: inline-flex; align-items: center; gap: 7px; }
.legenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legenda .l-entrada { background: var(--serie-entrada); }
.legenda .l-saida { background: var(--serie-saida); }
.legenda .l-aberto { background: repeating-linear-gradient(45deg, var(--text-3) 0 2px, transparent 2px 5px); border: 1px solid var(--text-3); }
.legenda .l-saldo { width: 16px; height: 2px; border-radius: 1px; background: var(--text-2); }
.viz-tip { position: absolute; pointer-events: none; z-index: 5; min-width: 210px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-size: .8rem; }
.viz-tip strong { display: block; margin-bottom: 4px; font-size: .86rem; }
.viz-tip div { display: flex; justify-content: space-between; gap: 14px; }
.viz-tip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.fluxo-table td, .fluxo-table th { text-align: right; }
.fluxo-table td:first-child, .fluxo-table th:first-child { text-align: left; }
.fluxo-table tr.is-atual td { background: rgba(var(--accent-rgb), .07); }
.fluxo-table tr.is-futuro td { color: var(--text-2); }

/* ------------------------------------------------ agenda */
.agenda-grade { display: flex; overflow-x: auto; padding: 0 20px 20px; gap: 0; }
.agenda-horas { flex: 0 0 62px; }
.agenda-hora { display: block; height: 90px; font-size: .75rem; color: var(--text-3); padding-top: 2px; }
.agenda-col { flex: 1 1 200px; min-width: 190px; border-left: 1px solid var(--line); }
.agenda-col__topo {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px;
  font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 1px solid var(--line);
}
.agenda-horas .agenda-col__topo { border-bottom: 1px solid var(--line); }
.agenda-col__pista { position: relative; height: var(--altura); }
.agenda-linha { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.agenda-item {
  position: absolute; left: 4px; right: 4px; overflow: hidden;
  padding: 6px 9px; border-radius: 8px; border-left: 3px solid var(--text-3);
  background: var(--surface-2); color: inherit; font-size: .8rem; line-height: 1.25;
  box-shadow: var(--shadow); transition: transform .15s ease;
}
.agenda-item:hover { transform: translateX(2px); z-index: 2; }
.agenda-item strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item small { color: var(--text-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item--confirmado { background: rgba(22, 163, 74, .12); }
.agenda-item--aguardando_sinal { background: rgba(217, 119, 6, .14); }
.agenda-item--atendido { background: rgba(37, 99, 235, .12); }
.agenda-item--faltou { background: rgba(220, 38, 38, .12); }
.agenda-item--cancelado { background: var(--surface-2); opacity: .55; text-decoration: line-through; }

.agenda-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.agenda-dia { background: var(--surface); min-height: 160px; display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.agenda-dia.is-hoje { background: rgba(var(--accent-rgb), .06); }
.agenda-dia__head { display: flex; flex-direction: column; padding: 10px 12px; border-bottom: 1px solid var(--line); color: inherit; }
.agenda-dia__head strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.agenda-dia__head span { font-size: .78rem; color: var(--text-3); }
.agenda-chip { display: block; margin: 0 8px; padding: 7px 9px; border-radius: 8px; border-left: 3px solid var(--text-3); background: var(--surface-2); color: inherit; font-size: .78rem; }
.agenda-chip strong { margin-right: 5px; }
.agenda-chip span { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-chip small { color: var(--text-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
  .agenda-semana { grid-template-columns: 1fr; }
  .agenda-dia { min-height: 0; }
}
.ic-voltar { transform: rotate(180deg); }
.agenda-fechado { padding: 28px 20px; text-align: center; color: var(--text-2); }
/* Variante em links (a agenda alterna Dia/Semana navegando, não com input). */
.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-weight: 600; color: var(--text-2); }
.seg a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ------------------------------------------------ fila de mensagens */
.msg-card { padding: 16px 20px; margin-bottom: 12px; }
.msg-card__topo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.msg-card__quem { flex: 1; min-width: 180px; }
.msg-card__quem strong { display: block; }
.msg-card__acoes { display: flex; align-items: center; gap: 8px; }
.msg-card__texto {
  margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; border-top-left-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .9rem; color: var(--text-2); white-space: pre-line;
}

/* ------------------------------------------------ escolha de horário */
.horarios { display: flex; flex-wrap: wrap; gap: 8px; }
.horario { position: relative; cursor: pointer; }
.horario input { position: absolute; opacity: 0; }
.horario span {
  display: inline-block; padding: 9px 15px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color .15s, border-color .15s, color .15s;
}
.horario:hover span { border-color: var(--accent); }
.horario input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.horario input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Nos relatórios o rótulo é longo e o valor é dinheiro: mais espaço nas pontas. */
.card__body > .bar-row { grid-template-columns: minmax(0, 1fr) 90px auto; gap: 14px; margin-bottom: 14px; }
.card__body > .bar-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__body > .bar-row > strong { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ escolha de modo (agendamento) */
.modos { display: grid; gap: 10px; }
.modo { position: relative; cursor: pointer; }
.modo input { position: absolute; opacity: 0; }
.modo > span {
  display: block; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2);
  transition: border-color .15s, background-color .15s;
}
.modo strong { display: block; font-size: .92rem; }
.modo small { display: block; color: var(--text-2); margin-top: 3px; }
.modo:hover > span { border-color: var(--accent); }
.modo input:checked + span { border-color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.modo input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Rodapé de licença (cp/includes/layout-bottom.php) e tela de Licença.
   É sinalização, não trava: discreto, mas presente em todas as telas do painel. */
.licenca-rodape {
  margin: 26px 0 0;
  padding: 14px 2px 20px;
  border-top: 1px solid var(--linha, #e2e8f0);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.licenca-rodape b { color: var(--text); font-weight: 600; }
.licenca-rodape a { color: var(--text-2); }
.licenca-rodape__aviso { color: #b45309; font-weight: 600; }

.licenca-lista { margin: 6px 0 14px; padding-left: 20px; line-height: 1.65; }
.licenca-lista li { margin-bottom: 4px; }
.licenca-lista--nao li::marker { color: #b45309; }

/* ================================================ Delivery (2026-09-30) */
:root { --brand: #1C1917; --brand-rgb: 28, 25, 23; }
[data-som] .ic-som-off { display: none; }
[data-som].is-mudo .ic-som { display: none; }
[data-som].is-mudo .ic-som-off { display: block; }

/* quadro de pedidos */
.quadro { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.coluna { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); min-height: 200px; }
.coluna__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.coluna__head h2 { margin: 0; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.coluna__head .dot { width: 9px; height: 9px; }
.coluna__lista { padding: 10px; display: grid; gap: 10px; }
.ped { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; box-shadow: var(--shadow); transition: border-color .15s; }
.ped:hover { border-color: var(--accent); }
.ped.is-novo { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.ped__topo { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ped__num { font-weight: 800; font-size: 1rem; }
.ped__tempo { font-size: .78rem; color: var(--text-3); font-weight: 600; white-space: nowrap; }
.ped__tempo.is-atrasado { color: var(--red); }
.ped__cliente { font-weight: 600; margin: 2px 0 6px; }
.ped__itens { font-size: .8rem; color: var(--text-2); margin: 0 0 8px; line-height: 1.45; }
.ped__rodape { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.ped__total { font-weight: 800; }
.ped__acoes { display: flex; gap: 6px; margin-top: 10px; }
.ped__acoes form { flex: 1; display: flex; }
.ped__acoes .btn { flex: 1; }
.ped__end { font-size: .78rem; color: var(--text-3); display: flex; gap: 5px; align-items: flex-start; margin-bottom: 6px; }
.ped__end .ic { width: 14px; height: 14px; margin-top: 2px; }
.ped__agendado { font-size: .76rem; font-weight: 700; color: var(--violet); display: block; margin-bottom: 4px; }

/* ficha do pedido */
.itens-pedido td { vertical-align: top; }
.acoes-pedido { display: grid; gap: 8px; }
.acoes-pedido .btn { width: 100%; height: 44px; font-size: .92rem; }
.acoes-pedido form { display: block; }
.linha-tempo { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .84rem; }
.linha-tempo li { display: flex; justify-content: space-between; gap: 10px; color: var(--text-3); }
.linha-tempo li.is-feito { color: var(--text); font-weight: 600; }
.linha-tempo li span:first-child { flex: 1; }

/* mapa de mesas */
.mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mesa { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--line); background: var(--surface); min-height: 112px; transition: border-color .15s, transform .15s; cursor: pointer; text-align: left; width: 100%; }
.mesa:hover { border-color: var(--accent); transform: translateY(-2px); }
.mesa strong { font-size: 1.05rem; }
.mesa small { color: var(--text-3); font-size: .78rem; }
.mesa.is-ocupada { border-style: solid; border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .08); }
.mesa__total { font-weight: 800; font-size: 1.1rem; margin-top: auto; }
.mesa__livre { margin-top: auto; color: var(--green); font-weight: 700; font-size: .82rem; }
.mesa__alerta { font-size: .74rem; font-weight: 700; color: var(--red); }
.mesas form { display: contents; }

/* tela de venda (mesa, balcão, pedido por telefone) */
.venda { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.catalogo-pdv__busca { display: flex; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); }
.catalogo-pdv__busca input { flex: 1; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.cat-pdv { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cat-pdv button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--text-2); }
.cat-pdv button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-theme="escuro"] .cat-pdv button.is-active { background: var(--accent); border-color: var(--accent); color: #111; }
.prod-pdv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px; max-height: 66vh; overflow-y: auto; }
.prod-pdv form { display: contents; }
.prod-pdv button { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 4px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; overflow: hidden; transition: border-color .15s, transform .1s; color: var(--text); }
.prod-pdv button:hover { border-color: var(--accent); }
.prod-pdv button:active { transform: scale(.97); }
.prod-pdv img { width: 100%; height: 78px; object-fit: cover; background: var(--hover); }
.prod-pdv span { padding: 0 10px; font-size: .8rem; font-weight: 600; line-height: 1.25; }
.prod-pdv b { padding: 0 10px 10px; font-size: .86rem; }
.prod-pdv button[disabled] { opacity: .45; cursor: not-allowed; }
.prod-pdv small { padding: 0 10px; color: var(--red); font-size: .72rem; font-weight: 700; }
.conta { position: sticky; top: 80px; }
.conta__itens { max-height: 44vh; overflow-y: auto; }
.conta-item { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.conta-item strong { display: block; font-size: .86rem; }
.conta-item .cell-sub { font-size: .76rem; }
.conta-item form { display: inline; }
.tag-novo { margin-left: 6px; font-size: .64rem; font-weight: 800; text-transform: uppercase; color: var(--red); letter-spacing: .06em; }
.conta__totais { padding: 14px 16px; display: grid; gap: 6px; font-size: .88rem; }
.conta__totais div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.conta__totais .total { font-size: 1.3rem; font-weight: 800; padding-top: 6px; border-top: 1px dashed var(--line); }
.conta__acoes { padding: 0 16px 16px; display: grid; gap: 8px; }
.pag-linha { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; margin-bottom: 8px; }
.pag-linha select, .pag-linha input { height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.troco { font-weight: 700; color: var(--green); }

/* alerta de pedido novo (todas as telas) */
.alerta-pedido { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #1C1917; color: #fff; font-weight: 600; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.alerta-pedido .ic { color: #fb923c; width: 22px; height: 22px; }

@media (max-width: 1100px) {
  .venda { grid-template-columns: 1fr; }
  .conta { position: static; }
}
@media (max-width: 760px) {
  .quadro { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .coluna { scroll-snap-align: start; }
}
.coluna, .ped { min-width: 0; }
.ped__acoes { min-width: 0; }
.ped__acoes form { min-width: 0; }
.ped__acoes select { min-width: 0; width: 100%; }
.ped__acoes > .btn { flex: 0 0 auto; }

/* Interruptor dentro de .field: o label do campo é block e escondia o trilho do interruptor. */
.field label.switch { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 0; color: var(--text); font-size: .86rem; }

/* ---------------------------------------------------------------- loja virtual (grade, fotos, PDV, frete) */
.col-5 { grid-column: span 5; } .col-10 { grid-column: span 10; }
@media (max-width: 760px) { .col-5, .col-10 { grid-column: span 12; } }
.tabela-grade td { padding: 6px 8px; }
.tabela-grade .input { height: 32px; }
.input.is-zero { border-color: var(--red); color: var(--red); }
.fotos-prod { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.fotos-prod figure { margin: 0; }
.fotos-prod img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--hover); }
.fotos-prod figcaption { font-size: .76rem; color: var(--text-3); margin-top: 6px; }
.prod-pdv > div { position: relative; }
.grade-pdv { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg, 0 12px 30px rgba(0,0,0,.18)); padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; min-width: 220px; }
.grade-pdv button { height: auto !important; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .8rem; font-weight: 600; cursor: pointer; }
.grade-pdv button:hover { border-color: var(--accent); }
.grade-pdv button small { display: block; font-weight: 400; color: var(--text-3); }
.grade-pdv button.is-zero { opacity: .5; }
.opcao-adm { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.opcao-adm:has(input:checked) { border-color: var(--accent); background: rgba(var(--accent-rgb), .06); }
.opcao-adm span { flex: 1; }
.opcao-adm small { display: block; color: var(--text-3); }
.chips-grade { display: flex; flex-wrap: wrap; gap: 4px; }
.chips-grade span { font-size: .74rem; padding: 3px 7px; border-radius: 6px; background: var(--hover); white-space: nowrap; }
.chips-grade span.is-zero { background: rgba(220, 38, 38, .1); color: var(--red); }
.chips-grade span.is-baixo { background: rgba(217, 119, 6, .12); color: var(--amber); }
.grade-lancar { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.grade-lancar label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; font-weight: 600; }
.grade-lancar small { display: block; font-weight: 400; color: var(--text-3); }
.grade-lancar .input { width: 80px; height: 34px; text-align: right; }
i.legenda { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.tabela-grade th, .tabela-grade td { padding: 6px 5px !important; } .tabela-grade { font-size: .84rem; }
.prod-pdv .grade-pdv { position: static; margin: 0 6px 8px; box-shadow: none; min-width: 0; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); background: var(--hover); }
.prod-pdv > div:has(.grade-pdv:not([hidden])) { grid-column: span 2; border-color: var(--accent); }
.grade-pdv[hidden] { display: none !important; }
.prod-pdv > div:has(.grade-pdv:not([hidden])) [data-abrir-grade] { height: auto !important; }
.passos-canal { margin: 4px 0 14px; padding-left: 20px; line-height: 1.55; font-size: .88rem; } .passos-canal li { margin-bottom: 6px; }

/* Quadros de ações do pedido (Próximo passo, Envio): botão com texto comprido ("Gerar etiqueta Jadlog .Package",
   "Etiqueta própria (postagem no balcão)") quebra a linha em vez de passar da borda do quadro (09/11). */
.acoes-pedido { grid-template-columns: minmax(0, 1fr); }
.acoes-pedido .btn { white-space: normal; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; text-align: center; }
.acoes-pedido form input { min-width: 0; }
.card input[type="file"] { max-width: 100%; }
/* Fotos do produto arrastáveis (09/11). */
.fotos-prod[data-sortable] .foto-item { cursor: grab; }
.fotos-prod[data-sortable] .foto-item:active { cursor: grabbing; }
.fotos-prod .foto-item.is-over img { outline: 2px dashed var(--accent); outline-offset: 2px; }
.fotos-prod .foto-item__capa { display: inline-block; font-weight: 700; color: var(--accent); }
.fotos-prod .foto-item__capa[hidden] { display: none; }
/* Estrela de destaque na lista de produtos (09/11). */
.td-star { width: 40px; text-align: center; }
th.td-star .ic { width: 16px; height: 16px; color: var(--text-3); }
.estrela-destaque { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--text-3); }
.estrela-destaque:hover { background: var(--hover); color: #e0a100; }
.estrela-destaque .ic { width: 19px; height: 19px; }
.estrela-destaque.is-on { color: #f2a900; }
.estrela-destaque.is-on .ic { fill: currentColor; }
/* Prévia das fotos escolhidas no produto, antes de salvar (10/11). */
.fotos-prod .foto-item.is-nova { position: relative; }
.fotos-prod .foto-item.is-nova img { outline: 2px dashed var(--accent); outline-offset: -2px; }
.foto-item__nova { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 6px; background: #f59e0b; color: #fff; font-size: .7rem; font-weight: 700; }
.foto-item__tirar { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.foto-item__tirar:hover { background: #b91c1c; }
.foto-item--nova { cursor: default !important; }
/* Editor das páginas (cp/pagina-editar.php, 10/11). */
.editor-html { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.editor-html__barra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.editor-html__barra button, .editor-html__barra select { height: 32px; min-width: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: .82rem; cursor: pointer; }
.editor-html__barra button:hover { border-color: var(--accent); color: var(--accent); }
.editor-html__barra select { width: auto; flex: none; padding: 0 28px 0 8px; }
.editor-html__sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.editor-html__codigo-btn { margin-left: auto; font-weight: 700; }
.editor-html.is-codigo .editor-html__barra > :not([data-ed-codigo]) { opacity: .35; pointer-events: none; }
.editor-html__area { min-height: 420px; max-height: 70vh; overflow-y: auto; padding: 18px 22px; outline: none; line-height: 1.7; font-size: .95rem; }
.editor-html__area:focus { box-shadow: inset 0 0 0 2px rgba(22, 163, 74, .25); }
.editor-html__codigo { display: block; width: 100%; min-height: 420px; max-height: 70vh; border: 0; border-radius: 0; padding: 16px; font: .82rem/1.6 ui-monospace, Consolas, monospace; background: #0f172a; color: #e2e8f0; resize: vertical; }
.editor-html__codigo[hidden], .editor-html__area[hidden] { display: none; }
.conteudo-html h2 { font-size: 1.35rem; margin: 1.2em 0 .5em; }
.conteudo-html h3 { font-size: 1.15rem; margin: 1.1em 0 .4em; }
.conteudo-html h4 { font-size: 1rem; margin: 1em 0 .3em; }
.conteudo-html p { margin: 0 0 .9em; }
.conteudo-html ul, .conteudo-html ol { margin: 0 0 1em; padding-left: 1.4em; }
.conteudo-html blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.conteudo-html img { max-width: 100%; height: auto; border-radius: 8px; }
.conteudo-html a { color: var(--accent); text-decoration: underline; }
.conteudo-html table { border-collapse: collapse; margin: 0 0 1em; }
.conteudo-html th, .conteudo-html td { border: 1px solid var(--line); padding: 6px 10px; }
/* Fotos das avaliações no painel (10/11). */
.av-fotos-cp { display: flex; flex-wrap: wrap; gap: 10px; }
.av-fotos-cp__item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .78rem; color: var(--text-2); cursor: pointer; }
.av-fotos-cp__item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
/* Atributos de variação do produto (10/11). */
.atr-lista { display: grid; gap: 10px; margin-bottom: 10px; }
.atr-linha { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.6fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.atr-linha .field { margin: 0; }
.atr-linha textarea { min-height: 0; resize: vertical; }
.atr-linha__acoes { display: flex; flex-direction: column; gap: 8px; padding-top: 24px; white-space: nowrap; }
@media (max-width: 700px) { .atr-linha { grid-template-columns: 1fr; } .atr-linha__acoes { flex-direction: row; padding-top: 0; } }
.var-passo { margin: 0 0 10px; font-size: .9rem; }
.var-combo { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.var-combo span { padding: 3px 9px; border-radius: 999px; background: var(--hover); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.atr-linha__acoes { padding-top: 0; }
.atr-linha__acoes .field select { min-width: 190px; }
.cor-bolinha { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .78rem; color: var(--text-2); }
.cor-bolinha input[type="color"] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.cor-bolinha span { display: inline-flex; align-items: center; gap: 4px; }
/* Painel de precificação do produto (10/11). */
.prec-desconto label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; }
.prec-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prec-painel { padding: 16px; border: 1px solid rgba(22, 163, 74, .25); border-radius: 14px; background: rgba(22, 163, 74, .05); }
.prec-painel__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.prec-painel__head strong { display: inline-flex; align-items: center; gap: 8px; }
.prec-painel__head .ic { width: 18px; height: 18px; color: var(--green); }
.prec-cards { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.prec-cards > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; text-align: center; }
.prec-cards > div + div { border-left: 1px solid var(--line); }
.prec-cards span { font-size: .8rem; color: var(--text-2); }
.prec-cards b { font-size: 1.3rem; }
.prec-cards b.is-pos, .prec-pix { color: var(--green); }
.prec-cards b.is-neg, .prec-pix.is-neg { color: var(--red); }
.prec-pix { margin: 10px 0 0; font-weight: 600; }
.prec-ajustes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; font-size: .85rem; }
.prec-ajustes label { display: inline-flex; align-items: center; gap: 6px; }
.prec-ajustes .input { width: 76px; height: 34px; }
.prec-sugerido { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 600px) { .prec-cards b { font-size: 1.05rem; } }
/* Etiquetas do produto (11/11): ficha colorida na lista, na prévia e no cadastro do produto. */
.etq-chip { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.3; }
.list__main .etq-chip { align-self: flex-start; }
.etq-escolha { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.etq-escolha__item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.etq-escolha__item.is-fora .etq-chip { opacity: .55; }
.etq-escolha__item small { color: var(--text-3); }
/* Etiqueta de imagem/GIF (11/11). */
.etq-img-lista { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; }
.etq-img-lista img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 / 10px 10px; }
[data-so-texto][hidden], [data-so-imagem][hidden] { display: none !important; }
/* Tela de login com a imagem sem a camada escura (Configurações → Aparência → Escurecer a imagem, 12/11). */
.login__art--clara { background: var(--login-img, linear-gradient(160deg, rgba(var(--brand-rgb), .6), rgba(11, 23, 34, .95))) center / cover; }
.login__art--clara h2, .login__art--clara p { text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
