@import url("/css/fontes.css");

/* Good Sistema de Gestão — visual 2026: verde da logo, menu escuro esverdeado, cantos arredondados, fonte Inter */
:root {
  --brand: #0e9f6e;
  --brand-dark: #047857;
  --brand-soft: #e3f6ee;
  --brand-ring: rgba(14, 159, 110, .22);
  --side: #0b1c17;
  --side-2: #14302a;
  --side-text: #a8bdb5;
  --bg: #f4f6f5;
  --card: #ffffff;
  --text: #15201c;
  --muted: #65736d;
  --line: #e3e9e6;
  --line-2: #eef2f0;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --info: #2563eb;
  --info-soft: #e6efff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 30, 25, .04), 0 2px 10px rgba(15, 30, 25, .04);
  --shadow-lg: 0 18px 50px rgba(15, 30, 25, .18);
  --titulo: "Jakarta", "Inter", "Segoe UI", system-ui, sans-serif;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--brand-dark); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; font-family: var(--titulo); letter-spacing: -.01em; }
::selection { background: var(--brand-soft); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0d241d 0%, var(--side) 55%); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 0 10px 24px;
  scrollbar-width: thin; scrollbar-color: #24443b transparent; }
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 10px 16px; color: #fff; font-family: var(--titulo); font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 14px rgba(14, 159, 110, .35); }
.brand small { display: block; font-family: "Inter", sans-serif; font-size: 10.5px; font-weight: 500; color: var(--side-text); letter-spacing: .2px; margin-top: 2px; }
.nav-group { padding: 8px 0 2px; }
.nav-group > span { display: block; padding: 8px 10px 4px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #5f7d72; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; color: var(--side-text); border-radius: 9px; font-weight: 500; transition: background .12s, color .12s; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.active { background: rgba(14, 159, 110, .18); color: #fff; box-shadow: inset 3px 0 0 #34d399; }
.nav a.active svg { color: #34d399; opacity: 1; }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .8; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.topbar .empresa { font-family: var(--titulo); font-weight: 700; font-size: 15px; }
.topbar .spacer { flex: 1; }
.topbar select { height: 36px; }
.avatar { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; padding: 3px 12px 3px 3px; border-radius: 99px; border: 1px solid var(--line); background: #fff; }
.avatar:hover { border-color: #cfd8d4; }
.avatar i { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #34d399, var(--brand-dark)); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.topbar .menu-btn { display: none; font-size: 18px; padding: 0 10px; }
.content { padding: 26px 28px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.02em; }
.page-head .spacer { flex: 1; }
.trial { background: var(--warn-soft); color: var(--warn); padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; }

/* ---------- Componentes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card h3 { font-size: 15.5px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.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)); }
.mt { margin-top: 16px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -26px; top: -26px; width: 86px; height: 86px; border-radius: 50%; background: var(--line-2); }
.kpi > * { position: relative; z-index: 1; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.kpi .valor { font-family: var(--titulo); font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.kpi.verde .valor { color: var(--brand-dark); }
.kpi.verde::after { background: var(--brand-soft); }
.kpi.vermelho .valor { color: var(--danger); }
.kpi.vermelho::after { background: var(--danger-soft); }
.kpi.amarelo .valor { color: var(--warn); }
.kpi.amarelo::after { background: var(--warn-soft); }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; }
.btn:hover { background: #f7f9f8; border-color: #d3dcd8; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.btn.primary { background: linear-gradient(180deg, #12ad79, var(--brand)); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(4, 120, 87, .3), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #f3c9c9; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.grid > a.btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #3c4a44; font-weight: 600; }
input, select, textarea { font: inherit; height: 38px; padding: 0 11px; border: 1px solid #d6dedb; border-radius: 10px; background-color: #fff; color: var(--text); width: 100%; min-width: 0; transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: #9aa7a1; }
textarea { height: auto; min-height: 70px; padding: 9px 11px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #c2ccc8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
input.invalido { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }
input:disabled, select:disabled, textarea:disabled, input[readonly] { background-color: #f7f9f8; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); box-shadow: none; }
.senha { position: relative; display: block; }
.senha input { padding-right: 40px; }
.olho { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 34px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.olho:hover { color: var(--text); }
.olho svg { width: 18px; height: 18px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .c1 { grid-column: span 1; } .form-grid .c2 { grid-column: span 2; } .form-grid .c3 { grid-column: span 3; }
.form-grid .c4 { grid-column: span 4; } .form-grid .c5 { grid-column: span 5; } .form-grid .c6 { grid-column: span 6; }
.form-grid .c7 { grid-column: span 7; } .form-grid .c8 { grid-column: span 8; } .form-grid .c9 { grid-column: span 9; }
.form-grid .c10 { grid-column: span 10; } .form-grid .c11 { grid-column: span 11; } .form-grid .c12 { grid-column: span 12; }
.form-section { grid-column: span 12; display: flex; align-items: center; gap: 8px; font-family: var(--titulo); font-weight: 700; font-size: 13.5px; color: var(--text); padding: 10px 0 2px; margin-top: 6px; }
.form-section::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--brand); flex: none; }
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters input, .filters select { width: auto; }
.filters .busca { min-width: 240px; flex: 1; max-width: 400px; padding-left: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2365736d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 11px center / 16px no-repeat; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f8faf9; white-space: nowrap; }
.card > .table-wrap:first-child table.t thead th:first-child, .card > table.t:first-child thead th:first-child { border-top-left-radius: var(--radius); }
.card > .table-wrap:first-child table.t thead th:last-child, .card > table.t:first-child thead th:last-child { border-top-right-radius: var(--radius); }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover { background: #f3faf7; }
table.t tfoot td { font-weight: 700; background: #f8faf9; border-top: 1px solid var(--line); }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vazio { padding: 48px 20px; text-align: center; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: #eef1f0; color: #4b5853; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.verde { background: var(--brand-soft); color: var(--brand-dark); }
.badge.vermelho { background: var(--danger-soft); color: var(--danger); }
.badge.amarelo { background: var(--warn-soft); color: var(--warn); }
.badge.azul { background: var(--info-soft); color: var(--info); }

.tabs { display: flex; width: fit-content; max-width: 100%; gap: 2px; background: #e9eeec; padding: 4px; border-radius: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; color: var(--muted); border-radius: 9px; font-weight: 600; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); background: #fff; box-shadow: 0 1px 3px rgba(15, 30, 25, .1); }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(8, 20, 16, .45); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 100; overflow-y: auto; animation: aparece .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 640px; box-shadow: var(--shadow-lg); animation: sobe .18s ease-out; }
.modal.lg { max-width: 920px; } .modal.xl { max-width: 1180px; } .modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; flex: 1; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: #f8faf9; border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.x { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; width: 34px; height: 34px; border-radius: 9px; }
.x:hover { background: var(--line-2); color: var(--text); }
@keyframes aparece { from { opacity: 0; } }
@keyframes sobe { from { transform: translateY(10px) scale(.99); opacity: 0; } }

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: #12201b; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); max-width: 400px; font-weight: 500; animation: entra .2s; }
.toast.erro { background: var(--danger); }
.toast.ok { background: var(--brand-dark); }
@keyframes entra { from { transform: translateY(8px); opacity: 0; } }

/* Autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); z-index: 50; max-height: 280px; overflow-y: auto; }
.ac-list div { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.ac-list div:hover, .ac-list div.sel { background: #f0faf6; }

/* Itens de documentos */
.itens td input { height: 32px; }
.totais { display: flex; justify-content: flex-end; gap: 22px; padding: 12px 4px; flex-wrap: wrap; align-items: center; }
.totais .total { font-size: 20px; font-weight: 700; color: var(--brand-dark); }

/* Login */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(700px 420px at 100% 0%, rgba(52, 211, 153, .28), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(14, 159, 110, .22), transparent 60%), var(--side); }
.auth-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 60% 40%, #000, transparent 75%); pointer-events: none; }
.auth-hero > * { position: relative; }
.auth-hero .brand { font-size: 20px !important; }
.auth-hero h1 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -.03em; margin: 28px 0 16px; max-width: 560px; }
.auth-hero h1 em { font-style: normal; color: #34d399; }
.auth-hero p { color: #b9cdc5; font-size: 16px; max-width: 520px; line-height: 1.6; }
.auth-hero ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 540px; }
.auth-hero li { display: flex; align-items: center; gap: 10px; color: #dbe7e2; }
.auth-hero li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: rgba(52, 211, 153, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.auth-box { display: flex; align-items: center; justify-content: center; padding: 32px; background: radial-gradient(500px 300px at 50% 0%, #e9f7f1, transparent 70%), var(--bg); }
.auth-box .card { width: 100%; max-width: 430px; padding: 34px; border-radius: 20px; box-shadow: 0 20px 60px rgba(15, 30, 25, .1); }
.auth-box h2 { font-size: 24px; margin-bottom: 6px; letter-spacing: -.02em; }
.auth-box form { display: grid; gap: 14px; margin-top: 22px; }
.auth-box input { height: 44px; }
.auth-box .btn { height: 46px; justify-content: center; font-size: 15px; }

/* PDV */
.pdv { display: grid; grid-template-columns: 1fr 380px; gap: 14px; height: calc(100vh - 56px - 44px); }
.pdv-left { display: flex; flex-direction: column; min-height: 0; }
.pdv-busca input { height: 56px; font-size: 18px; border-radius: 14px; }
.pdv-itens { flex: 1; overflow-y: auto; margin-top: 12px; }
.pdv-right { display: flex; flex-direction: column; gap: 12px; }
.pdv-total { background: radial-gradient(400px 200px at 100% 0%, rgba(52, 211, 153, .25), transparent 70%), var(--side); color: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 12px 30px rgba(11, 28, 23, .2); }
.pdv-total .v { font-family: var(--titulo); font-size: 42px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pdv-atalhos { font-size: 12px; color: var(--muted); }
.kbd { display: inline-block; border: 1px solid #cbd2dc; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; background: #fff; }
.offline { background: var(--warn-soft); color: var(--warn); padding: 6px 12px; border-radius: 8px; font-weight: 600; }

/* Gráfico */
.chart { width: 100%; height: 220px; }
.chart rect.bar { fill: var(--brand); rx: 4px; }
.chart rect.bar:hover { fill: var(--brand-dark); }
.chart text { font-size: 10px; fill: var(--muted); }
.chart line { stroke: var(--line-2); }

/* DRE */
.dre td { padding: 7px 12px; }
.dre .grupo td { font-weight: 600; background: #f8faf9; }
.dre .resultado td { font-weight: 700; border-top: 2px solid var(--line); }

/* ---------- Comandas ---------- */
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cmd-card { padding: 16px; cursor: pointer; border-left: 4px solid var(--line); transition: box-shadow .15s, transform .15s; }
.cmd-card:hover { box-shadow: 0 10px 26px rgba(15, 30, 25, .1); transform: translateY(-1px); }
.cmd-card.conta { border-left-color: var(--info); }
.cmd-card.tem-pronto { border-left-color: var(--brand); }
.cmd-topo { display: flex; gap: 8px; align-items: baseline; }
.cmd-topo b { font-size: 18px; }
.cmd-topo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cmd-total { font-family: var(--titulo); font-size: 24px; font-weight: 800; margin: 6px 0 2px; }
.cmd-rodape { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; }
.cmd-info { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.cmd-add { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cmd-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
tr.riscado td { color: var(--muted); text-decoration: line-through; }
tr.riscado td .badge, tr.riscado td div { text-decoration: none; }
.obs { font-size: 12.5px; color: var(--warn); font-weight: 600; }
.mesas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.mesa-btn { height: 52px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-weight: 600; }
.mesa-btn.ocupada { background: var(--warn-soft); border-color: #f3d9a4; }
.mesa-btn.sel { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.troco-box { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-top: 6px; }
/* Mapa de mesas */
.legenda { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--line); background: var(--card); }
.legenda i.ocupada { background: var(--warn-soft); border-color: #f3c46b; }
.legenda i.conta { background: var(--info-soft); border-color: #93b4f5; }
.legenda i.pronto { background: var(--brand-soft); border-color: var(--brand); }
.mapa-mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mesa-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 120px; padding: 14px; text-align: left;
  border: 2px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; font: inherit; color: var(--text); transition: transform .1s, box-shadow .15s; }
.mesa-tile:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .12); transform: translateY(-1px); }
.mesa-tile .mt-nome { font-size: 17px; font-weight: 800; }
.mesa-tile .mt-total { font-size: 20px; font-weight: 700; }
.mesa-tile .mt-info { font-size: 12.5px; color: var(--muted); }
.mesa-tile .mt-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.mesa-tile .mt-acao { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.mesa-tile.livre { border-style: dashed; }
.mesa-tile.ocupada { background: var(--warn-soft); border-color: #f3c46b; }
.mesa-tile.conta { background: var(--info-soft); border-color: #93b4f5; }
.mesa-tile.tem-pronto { box-shadow: 0 0 0 3px var(--brand-soft), inset 0 0 0 1px var(--brand); }
.escolha-cmd { display: flex; flex-direction: column; gap: 8px; }
.escolha-cmd .btn { display: flex; gap: 8px; justify-content: flex-start; }
/* Cardápio visual (lançar itens na comanda) */
.cardapio-erp { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.cardapio-erp #cq { width: 100%; }
.cats-erp { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.cats-erp button { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font: inherit; font-weight: 600; cursor: pointer; }
.cats-erp button.sel { background: var(--side); color: #fff; border-color: transparent; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 56vh; overflow-y: auto; padding: 2px; }
.prod-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 78px; padding: 10px; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font: inherit; color: var(--text); }
.prod-tile:hover { border-color: var(--brand); }
.prod-tile:active { transform: scale(.98); }
.prod-tile.no-pedido { border-color: var(--brand); background: var(--brand-soft); }
.prod-tile .pt-nome { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.prod-tile .pt-preco { font-weight: 700; color: var(--brand-dark); }
.prod-tile .pt-qtd { position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--brand); color: #fff;
  font-size: 12.5px; font-weight: 800; display: grid; place-items: center; }
.pedido-box { background: var(--bg); border-radius: 12px; padding: 12px; position: sticky; top: 0; }
.pedido-box h3 { font-size: 15px; margin-bottom: 8px; }
.ped-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ped-linha { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ped-item input { width: 100%; margin-top: 6px; height: 32px; font-size: 13px; }
.qtd-ctrl { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.qtd-ctrl button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 17px; font-weight: 700; cursor: pointer; }
.qtd-ctrl span { min-width: 22px; text-align: center; font-weight: 700; }
.pedido-total { margin-top: 10px; display: flex; justify-content: space-between; font-size: 15px; }
.kds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.kds h3 { font-size: 15px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.kds-card { padding: 12px; margin-bottom: 10px; border-left: 4px solid var(--line); }
.kds-card.atencao { border-left-color: #f59e0b; }
.kds-card.atrasado { border-left-color: var(--danger); background: #fff7f7; }
.kds-topo { display: flex; gap: 6px; align-items: baseline; font-size: 15px; }
.kds-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 15px; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdv { grid-template-columns: 1fr; height: auto; }
}
@media (max-width: 860px) {
  .kds { grid-template-columns: 1fr; }
  .cmd-info { flex-direction: column; }
  .cardapio-erp { grid-template-columns: 1fr; }
  .mapa-mesas { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; width: 264px; z-index: 60; transition: left .22s ease, box-shadow .22s; }
  .sidebar.open { left: 0; box-shadow: 0 0 0 100vmax rgba(8, 20, 16, .45); }
  .topbar { padding: 0 12px; }
  .avatar span { display: none; }
  .avatar { padding: 3px; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 16px 14px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-grid > * { grid-column: span 12 !important; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 22px; }
  .auth-hero ul, .auth-hero h1 + p { display: none; }
  .auth-hero ul { grid-template-columns: 1fr; }
  .topbar .empresa { display: none; }
}

@media print {
  .sidebar, .topbar, .no-print, .filters, .page-head .btn { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
}

/* Desenho da mesa (mesa-svg.js): cores pela situação */
.mesa-svg { display: block; width: 100%; height: 76px; margin-bottom: 6px; }
.mesa-svg .tampo { fill: #e9eef4; stroke: #b6c1ce; stroke-width: 2; }
.mesa-svg .cadeira { fill: #cdd5df; }
.mesa-svg .rotulo { font: 800 16px "Jakarta", "Segoe UI", system-ui, sans-serif; fill: #475569; }
.mesa-tile.ocupada .mesa-svg .tampo { fill: #fcd34d; stroke: #d97706; }
.mesa-tile.ocupada .mesa-svg .cadeira { fill: #f59e0b; }
.mesa-tile.ocupada .mesa-svg .rotulo { fill: #78350f; }
.mesa-tile.conta .mesa-svg .tampo { fill: #93c5fd; stroke: #2563eb; }
.mesa-tile.conta .mesa-svg .cadeira { fill: #60a5fa; }
.mesa-tile.conta .mesa-svg .rotulo { fill: #1e3a8a; }
.mesa-tile.tem-pronto .mesa-svg .cadeira { fill: var(--brand); }
.mesa-tile.inativa { opacity: .55; }
.mesa-previa { background: var(--bg); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.mesa-previa .mesa-svg { height: 110px; margin: 0; }
