/* Direção visual profissional — Restaurante Antigravity
   Camada de apresentação; não altera contratos nem comportamento da SPA. */
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  --font-ui: "Roboto", "Noto Sans", sans-serif;
  --font-display: "Roboto", "Noto Sans", sans-serif;
  --bg-main: #252b30;
  --bg-card: #30383e;
  --bg-card-hover: #39434a;
  --bg-input: #1e252a;
  --border-color: #465158;
  --text-primary: #f7fafc;
  --text-muted: #aeb8bf;
  --primary: #20a8f4;
  --primary-hover: #48b9ff;
  --success: #9be35a;
  --success-hover: #b6f276;
  --warning: #f1c46f;
  --danger: #df786f;
  --danger-hover: #ef8d83;
  --accent: #9be35a;
  --radius: 12px;
  --shadow: 0 16px 40px rgba(0, 0, 0, .18);
}

body {
  background:
    radial-gradient(circle at 85% -10%, rgba(201, 166, 107, .10), transparent 32rem),
    var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-kerning: normal;
  font-feature-settings: "cv11" 1, "liga" 1;
  letter-spacing: 0;
  line-height: 1.5;
  font-synthesis: none;
}

.app-container [hidden] { display: none !important; }
.auth-screen[hidden], .app-container[hidden] { display: none !important; }

button, input, textarea, select { font-family: var(--font-ui); }

.topbar {
  background: rgba(13, 17, 15, .96);
  border-bottom: 1px solid rgba(201, 166, 107, .17);
  padding: 18px clamp(20px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand { gap: 13px; }
.logo-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 166, 107, .50);
  border-radius: 13px;
  background: linear-gradient(145deg, #2a251c, #151912);
  color: var(--primary);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 4px rgba(201, 166, 107, .06);
}
.logo-letter {
  position: relative;
  z-index: 1;
  color: #e6c98f;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.08em;
  line-height: 1;
}
.logo-icon::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: -13px;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(201, 166, 107, .45);
  border-radius: 50%;
}
.brand h1 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.sub-brand { color: #87938b; font-size: 11px; letter-spacing: .04em; }
.system-status { gap: 8px; }
.status-badge {
  background: #111713;
  border: 1px solid #29352e;
  border-radius: 8px;
  color: #c8d0c9;
  padding: 7px 10px;
  font-size: 11px;
}
.status-dot { width: 6px; height: 6px; }
.profile-selector {
  position: relative;
  background: #111713;
  border-color: #354239;
  border-radius: 8px;
  padding: 5px 9px;
}
.profile-selector label { color: #87938b; font-size: 11px; }
.profile-selector select { color: var(--text-primary); font-size: 12px; }
.role-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.role-trigger {
  width: 100%;
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid #3d5144;
  border-radius: 7px;
  background: #0b100d;
  color: #f1eadf;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.role-trigger:hover, .role-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  background: #151d18;
}
.role-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.5px solid #d9b978;
  border-bottom: 1.5px solid #d9b978;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.role-trigger[aria-expanded="true"] .role-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}
.role-menu {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid #536757;
  border-radius: 10px;
  background: #151d18;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .45), 0 0 0 1px rgba(201, 166, 107, .08);
}
.role-option {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #bcc7bf;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}
.role-option span { color: #738178; font-size: 9px; font-weight: 500; }
.role-option:hover, .role-option.selected { background: rgba(201, 166, 107, .14); color: #f0d6a3; }
.role-option.selected span { color: #b9985e; }

.nav-tabs {
  background: #101511;
  border-bottom: 1px solid #26322b;
  padding: 0 clamp(20px, 4vw, 56px);
  gap: 4px;
}
.nav-btn {
  border-bottom: 2px solid transparent;
  color: #7f8d84;
  padding: 14px 16px 13px;
  font-size: 12px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.nav-btn:hover { color: #e2d8c8; background: rgba(201, 166, 107, .05); }
.nav-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-icon { color: #8f9b91; opacity: .78; }
.badge-count { background: var(--primary); color: #201a10; font-weight: 800; }

.main-content { max-width: 1480px; width: 100%; margin: 0 auto; padding: clamp(20px, 3vw, 38px) clamp(20px, 4vw, 56px) 64px; }
.pane-grid, .pane-grid-half { grid-template-columns: minmax(320px, 380px) minmax(0, 1fr); gap: 22px; }
.panel-box, .kds-column, .admin-card, .cashier-panel {
  background: linear-gradient(145deg, #303a42, #29343b);
  border: 1px solid #465760;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.panel-box { padding: 22px; gap: 18px; }
.panel-header { border-bottom-color: #2a3630; padding-bottom: 15px; }
.panel-header h2, .kds-header h2, .shift-status-bar h2 { font-size: 18px; letter-spacing: -.01em; }
.section-subheading { color: #bfad8d; font-size: 10px; letter-spacing: .14em; margin-top: 7px; }

.btn {
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: .015em;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #211a10; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: #202a23; border-color: #3a4a40; color: #d8ded8; }
.btn-success { background: var(--success); border-color: var(--success); color: #102218; }

.tables-grid { grid-template-columns: repeat(5, minmax(58px, 1fr)); gap: 9px; }
.table-card {
  background: #263238;
  border: 1px solid #4a606a;
  border-radius: 12px;
  min-height: 74px;
  padding: 12px 5px 9px;
  position: relative;
}
.table-card::before { content: ""; position: absolute; left: 9px; right: 9px; top: 7px; height: 2px; border-radius: 3px; background: #5b6c5f; }
.table-card.available::before { background: var(--success); }
.table-card.occupied::before { background: var(--warning); }
.table-card:hover { border-color: var(--primary); background: #2c3b43; transform: translateY(-2px); }
.table-card .num { margin-top: 4px; font-size: 17px; }
.table-card .cap { color: #839087; font-size: 10px; }

.tabs-list { gap: 10px; }
.tab-item-card { background: #222d33; border: 1px solid #3f515a; border-radius: 10px; padding: 12px; box-shadow: 0 6px 14px rgba(0, 0, 0, .10); }
.tab-item-card:hover { border-color: rgba(32, 168, 244, .72); background: #28363d; }
.order-builder-panel { min-width: 0; }
.selected-tab-indicator { color: var(--primary); font-size: 12px; font-weight: 700; }
.catalog-filters { gap: 8px; }
.chip-btn {
  background: #202b31;
  border: 1px solid #435660;
  border-radius: 999px;
  color: #9daaa0;
  font-size: 11px;
  padding: 8px 13px;
}
.chip-btn:hover, .chip-btn.active { background: rgba(201, 166, 107, .14); border-color: var(--primary); color: #efd9ad; }
.catalog-products-grid { gap: 12px; }
.product-card {
  background: #222d33;
  border: 1px solid #3f515a;
  border-radius: 12px;
  padding: 15px;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.product-card:hover { background: #28363d; border-color: #20a8f4; transform: translateY(-2px); }
.product-card h4 { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.product-card p { color: #87948b; font-size: 11px; line-height: 1.55; }
.product-card .price { color: var(--primary); font-size: 16px; font-weight: 800; }
.product-card .btn { background: #26352c; border-color: #48604e; color: #dbe5dc; }
.product-card .btn:hover { background: var(--primary); border-color: var(--primary); color: #211a10; }
.order-summary-box { background: #222d33; border: 1px solid #3f515a; border-radius: 12px; padding: 18px; }
.order-summary-box h3 { color: #e9e1d4; font-family: var(--font-display); font-size: 16px; }
.order-notes-row input, input, textarea, select { background: #0b100d; border-color: #35443a; border-radius: 8px; color: var(--text-primary); }
.order-totals-bar { border-top-color: #2a3730; }
.total-label span { color: #87948b; font-size: 10px; text-transform: uppercase; letter-spacing: .10em; }
.total-value { color: var(--primary); font-size: 21px; }

.kds-header { margin-bottom: 22px; }
.kds-header p, .text-muted { color: #87948b; }
.kds-summary-bar { gap: 12px; margin-bottom: 18px; }
.kds-stat-card {
  background: #263238;
  border: 1px solid #42545d;
  border-radius: 12px;
  box-shadow: none;
  padding: 15px 16px;
}
.kds-stat-card .stat-label { color: #8b988e; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.kds-stat-card .stat-val { color: #eee6d8; font-size: 25px; }
.kds-stat-card.alert { border-color: rgba(223, 120, 111, .55); background: rgba(110, 35, 31, .15); }
.kds-board { gap: 14px; }
.kds-column { padding: 12px; }
.kds-column-header { border-radius: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.kds-column-header.bg-yellow { background: rgba(228, 174, 97, .14); color: #e7bf7c; }
.kds-column-header.bg-blue { background: rgba(111, 156, 198, .14); color: #9bbddd; }
.kds-column-header.bg-green { background: rgba(112, 198, 154, .14); color: #9fddbb; }
.kds-card { background: #222d33; border-color: #40535c; border-radius: 10px; }

/* Hierarquia tipográfica revisada para leitura rápida em operação. */
.panel-header h2,
.kds-header h2,
.shift-status-bar h2 { font-weight: 700; line-height: 1.25; }
.table-card .num { font-weight: 800; letter-spacing: -.02em; }
.tab-item-card strong { font-weight: 700; line-height: 1.3; }
.product-card h4,
.kds-card h4 { font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.product-card p { font-size: 12px; line-height: 1.5; }
.product-card .price { font-weight: 800; letter-spacing: -.015em; }
.kds-stat-card .stat-val { font-weight: 800; letter-spacing: -.03em; }

.shift-status-bar { background: linear-gradient(145deg, #181f1a, #121814); border: 1px solid #34443a; border-radius: 14px; box-shadow: var(--shadow); }
.shift-badge { border-radius: 999px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.shift-badge.open { background: rgba(112, 198, 154, .13); color: #9fddbb; }
.shift-badge.closed { background: rgba(156, 168, 159, .12); color: #aab5ac; }
.cashier-panel, .admin-card { padding: 20px; }

@media (max-width: 900px) {
  .topbar { align-items: flex-start; }
  .system-status { width: 100%; }
  .profile-selector { margin-left: auto; }
  .role-menu { top: calc(100% + 8px); }
  .main-content { padding-inline: 16px; }
  .tables-grid { grid-template-columns: repeat(5, minmax(52px, 1fr)); }
}
@media (max-width: 560px) {
  .topbar { padding: 15px; }
  .brand h1 { font-size: 18px; }
  .sub-brand { display: none; }
  .system-status { gap: 5px; }
  .status-badge { flex: 1; justify-content: center; padding-inline: 6px; }
  .profile-selector { width: 100%; margin-left: 0; justify-content: space-between; }
  .nav-tabs { padding-inline: 10px; }
  .nav-btn { flex: 1; justify-content: center; padding-inline: 7px; font-size: 10px; }
  .tab-icon { display: none; }
  .main-content { padding: 14px 10px 40px; }
  .panel-box { padding: 15px; border-radius: 13px; }
  .tables-grid { gap: 6px; }
  .table-card { min-height: 64px; }
}

/* Desktop POS shell: contexto permanente, operação no centro. */
@media (min-width: 901px) {
  .app-container {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
  }
  .topbar {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 100vh;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    padding: 28px 18px 20px;
    position: sticky;
    height: 100vh;
    border-right: 1px solid rgba(201, 166, 107, .18);
    border-bottom: 0;
  }
  .brand { align-items: flex-start; padding: 0 8px 26px; }
  .brand h1 { font-size: 18px; line-height: 1.15; }
  .sub-brand { display: block; margin-top: 7px; line-height: 1.5; }
  .system-status {
    flex-direction: column;
    align-items: stretch;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #29362e;
  }
  .status-badge, .profile-selector { justify-content: flex-start; }
  .profile-selector { flex-wrap: wrap; }
  .profile-selector select { width: 100%; }
  .role-menu { bottom: calc(100% + 8px); }
  .nav-tabs {
    grid-column: 2;
    grid-row: 1;
    min-height: 67px;
    align-items: center;
    padding: 0 clamp(22px, 4vw, 52px);
    border-left: 0;
  }
  .nav-btn { padding: 14px 16px; }
  .main-content { grid-column: 2; grid-row: 2; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .app-container { grid-template-columns: 205px minmax(0, 1fr); }
  .topbar { padding-inline: 14px; }
  .brand { padding-inline: 3px; }
  .brand h1 { font-size: 16px; }
  .nav-btn { padding-inline: 10px; font-size: 10px; }
  .main-content { padding-inline: 24px; }
  .pane-grid, .pane-grid-half, .admin-grid { grid-template-columns: 1fr; }
}

/* Menos ornamento, mais leitura: tickets com identidade de operação. */
.kds-card {
  border-left: 3px solid var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}
.kds-card.critical, .kds-card.delay-critical { border-left-color: var(--danger); }
.kds-card.warning, .kds-card.delay-warning { border-left-color: var(--warning); }
.kds-cards-container { padding: 4px 2px 12px; }
.kds-column { min-height: 390px; }
.kds-column-header { min-height: 40px; padding-inline: 13px; }

/* Remove a aparência de template: textos curtos, densidade e contraste de POS. */
.empty-state { color: #76847a; font-size: 12px; }
.panel-box::before, .kds-header::before {
  content: "OPERAÇÃO";
  display: block;
  color: #8c7650;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  margin-bottom: -10px;
}
.kds-header::before { content: "PRODUÇÃO"; margin-bottom: 8px; }

/* Iconografia proprietária: traço único, sem emojis do sistema operacional. */
.ui-icon, .tab-icon, .state-icon, .sla-icon {
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
  vertical-align: -0.12em;
  color: currentColor;
}
.ui-icon, .state-icon { width: 14px; height: 14px; margin-right: 6px; }
.tab-icon { width: 16px; height: 16px; margin-right: 7px; vertical-align: -0.2em; }
.icon-profile::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 5px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}
.icon-profile::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 1px;
  width: 11px;
  height: 6px;
  border: 1.4px solid currentColor;
  border-radius: 8px 8px 3px 3px;
}
.icon-salon { border: 1.4px solid currentColor; border-radius: 50%; }
.icon-salon::after { content: ""; position: absolute; width: 4px; height: 4px; left: 4px; top: 4px; border: 1px solid currentColor; border-radius: 50%; }
.icon-kitchen::before, .icon-kitchen::after { content: ""; position: absolute; left: 1px; width: 14px; height: 1.5px; background: currentColor; border-radius: 2px; }
.icon-kitchen::before { top: 4px; box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor; }
.icon-cashier { border: 1.4px solid currentColor; border-radius: 2px; height: 11px; top: 1px; }
.icon-cashier::after { content: ""; position: absolute; left: 3px; right: 3px; top: 4px; height: 1.5px; background: currentColor; box-shadow: 0 3px 0 currentColor; }
.icon-admin::before, .icon-admin::after { content: ""; position: absolute; left: 1px; width: 13px; height: 1.4px; background: currentColor; box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor; }
.icon-admin::before { top: 2px; }
.icon-admin::after { width: 3px; height: 3px; left: 4px; top: 1px; border: 1px solid currentColor; background: #111713; box-shadow: 5px 4px 0 -1px #111713, 5px 4px 0 0 currentColor, -1px 8px 0 -1px #111713, -1px 8px 0 0 currentColor; }
.icon-alert { width: 13px; height: 13px; }
.icon-alert::before { content: ""; position: absolute; left: 1px; top: 1px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid currentColor; }
.icon-alert::after { content: "!"; position: absolute; left: 5px; top: 4px; color: #111713; font-size: 8px; font-weight: 800; line-height: 1; }
.icon-refresh { border: 1.5px solid currentColor; border-left-color: transparent; border-radius: 50%; width: 13px; height: 13px; }
.icon-refresh::after { content: ""; position: absolute; right: -1px; top: -2px; border-left: 4px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.icon-deliver::before { content: ""; position: absolute; left: 1px; top: 6px; width: 10px; height: 1.5px; background: currentColor; }
.icon-deliver::after { content: ""; position: absolute; right: 0; top: 3px; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.icon-pay { width: 15px; height: 11px; border: 1.4px solid currentColor; border-radius: 2px; }
.icon-pay::after { content: "$"; position: absolute; left: 4px; top: -2px; font-size: 9px; font-weight: 800; line-height: 12px; }
.icon-settle { width: 14px; height: 14px; border: 1.4px solid currentColor; border-radius: 50%; }
.icon-settle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 5px; height: 3px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.icon-send::before { content: ""; position: absolute; left: 1px; top: 2px; width: 11px; height: 9px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: skewY(-27deg) rotate(17deg); }
.icon-send::after { content: ""; position: absolute; left: 3px; top: 7px; width: 8px; height: 1.5px; background: currentColor; transform: rotate(-27deg); }
.icon-discount { width: 14px; height: 14px; border: 1.4px solid currentColor; border-radius: 3px; transform: rotate(45deg) scale(.82); }
.icon-discount::before, .icon-discount::after { content: ""; position: absolute; background: currentColor; }
.icon-discount::before { width: 1.4px; height: 9px; left: 5px; top: 1px; transform: rotate(45deg); }
.icon-discount::after { width: 3px; height: 3px; border-radius: 50%; left: 4px; top: 4px; box-shadow: 4px 4px 0 currentColor; }
.icon-edit::before { content: ""; position: absolute; left: 5px; top: 1px; width: 4px; height: 11px; border: 1.4px solid currentColor; border-radius: 1px; transform: rotate(45deg); }
.icon-edit::after { content: ""; position: absolute; left: 1px; bottom: 1px; width: 5px; height: 1.4px; background: currentColor; transform: rotate(-45deg); }
.state-icon { width: 13px; height: 13px; border: 1.4px solid currentColor; border-radius: 2px; }
.state-locked::before, .state-open::before { content: ""; position: absolute; left: 2px; top: -5px; width: 6px; height: 7px; border: 1.4px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; }
.state-open::before { border-right-color: transparent; transform: rotate(25deg); transform-origin: right bottom; }
.sla-icon { width: 11px; height: 11px; margin-right: 4px; border: 1.4px solid currentColor; border-radius: 50%; }
.sla-icon::before { content: ""; position: absolute; left: 4px; top: 2px; width: 1.2px; height: 4px; background: currentColor; }
.sla-icon::after { content: ""; position: absolute; left: 4px; top: 5px; width: 3px; height: 1.2px; background: currentColor; transform: rotate(25deg); transform-origin: left center; }
.status-label { display: inline-flex; align-items: center; gap: 7px; }
.status-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.status-received { color: #e7bf7c; }
.status-preparing { color: #9bbddd; }
.status-ready { color: #9fddbb; }
.shift-badge .state-icon { margin-right: 7px; }

/* Identidade ATENDE+: azul de atendimento, verde de ação e grafite de operação. */
body {
  background:
    radial-gradient(circle at 78% -8%, rgba(32, 168, 244, .18), transparent 31rem),
    radial-gradient(circle at 12% 108%, rgba(155, 227, 90, .10), transparent 28rem),
    var(--bg-main);
}
.topbar, .nav-tabs { background: rgba(35, 42, 47, .97); border-color: rgba(32, 168, 244, .22); }
.brand { min-width: 0; }
.brand-logo-wrap { display: flex; width: 100%; max-width: 192px; height: 62px; align-items: center; overflow: visible; border-radius: 8px; }
.brand-logo { display: block; width: 100%; max-width: 100%; height: auto; transform: none; filter: drop-shadow(0 8px 18px rgba(32, 168, 244, .16)); }
.theme-logo { transition: opacity .15s ease, filter .15s ease; }
.theme-logo-switching { opacity: 0; }
.brand h1 { color: #ffffff; }
.sub-brand { color: #aab5bc; }
.panel-box, .kds-column, .admin-card, .cashier-panel, .shift-status-bar {
  background: linear-gradient(145deg, rgba(48, 56, 62, .98), rgba(38, 45, 50, .98));
  border-color: #4b5860;
}
.status-badge { background: #20272c; border-color: #4a5961; color: #dce6eb; }
.status-badge { display: none !important; }

.auth-recovery-link {
  display: block;
  margin: .85rem auto 0;
  border: 0;
  background: transparent;
  color: var(--accent-primary, #1677ff);
  font: inherit;
  font-size: .84rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-recovery-link:hover { color: var(--accent-secondary, #77d64c); }

.user-row .btn { white-space: nowrap; }

.section-heading-row,
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding-inline: 5px;
  place-items: center;
  border: 1px solid rgba(32, 168, 244, .26);
  border-radius: 999px;
  background: rgba(32, 168, 244, .10);
  color: var(--primary, #20a8f4);
  font-size: 11px;
  font-weight: 800;
}

.section-search {
  width: min(100%, 220px);
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border-color, #32444d);
  border-radius: 9px;
  background: var(--bg-input, rgba(255, 255, 255, .04));
  color: var(--text-main, #f4f7f8);
  font: inherit;
  font-size: 12px;
}

.section-search:focus { outline: 2px solid rgba(32, 168, 244, .28); outline-offset: 1px; }

.catalog-toolbar { align-items: flex-start; flex-wrap: wrap; }
.catalog-toolbar .catalog-filters { flex: 1; min-width: 0; }
.product-search { flex: 0 1 220px; }

body[data-role="attendant"] .tabs-list {
  max-height: 270px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.nav-btn.active { color: #58c1ff; border-bottom-color: #20a8f4; }
.nav-btn:hover { color: #eaf8ff; background: rgba(32, 168, 244, .08); }
.btn-primary { background: #20a8f4; border-color: #20a8f4; color: #071820; }
.btn-primary:hover { background: #48b9ff; border-color: #48b9ff; }
.btn-success { background: #9be35a; border-color: #9be35a; color: #15200b; }
.btn-secondary { background: #3a464d; border-color: #5a6871; color: #edf4f7; }
.table-card:hover, .product-card:hover { border-color: #20a8f4; }
.table-card.available::before { background: #9be35a; }
.table-card.occupied::before { background: #f1c46f; }
.total-value, .product-card .price, .selected-tab-indicator { color: #58c1ff; }
.role-trigger, input, textarea, select { background: #1e252a; border-color: #53636c; }

.session-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #46555e;
  border-radius: 9px;
  background: #20272c;
}
.session-label { color: #94a4ad; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.session-user-name { color: #ffffff; font-size: 12px; font-weight: 800; line-height: 1.25; }
.session-role { color: #9be35a; font-size: 10px; font-weight: 700; }
.session-logout {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #52616a;
  border-radius: 6px;
  background: transparent;
  color: #c4d0d6;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.session-logout:hover { border-color: #20a8f4; color: #ffffff; background: rgba(32, 168, 244, .08); }

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 28% 20%, rgba(32, 168, 244, .22), transparent 25rem),
    radial-gradient(circle at 74% 82%, rgba(155, 227, 90, .14), transparent 23rem),
    #252b30;
}
.auth-card {
  width: min(100%, 420px);
  padding: 34px;
  border: 1px solid #56646c;
  border-radius: 18px;
  background: rgba(42, 50, 56, .94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
  overflow: hidden;
}
.auth-logo { display: block; width: 100%; max-width: 100%; height: auto; margin: -2px 0 24px; filter: drop-shadow(0 10px 22px rgba(32, 168, 244, .20)); }
.auth-kicker { color: #9be35a; font-size: 10px; font-weight: 800; letter-spacing: .20em; }
.auth-card h1 { margin: 8px 0 6px; color: #ffffff; font-size: 26px; }
.auth-description { margin: 0 0 24px; color: #b7c2c8; font-size: 13px; line-height: 1.6; }
.auth-form { display: grid; gap: 14px; }
.auth-form .form-group { display: grid; gap: 6px; }
.auth-form label { color: #dce5ea; font-size: 12px; font-weight: 700; }
.auth-form input { width: 100%; min-height: 42px; }
.auth-submit { width: 100%; min-height: 44px; margin-top: 6px; }
.auth-feedback { min-height: 18px; color: #ffaaa2; font-size: 12px; }

#user-management-panel { grid-column: 1 / -1; }
.user-management-panel .panel-header { align-items: flex-end; }
.user-management-panel .panel-header h2 { margin-top: 4px; }
.users-list { display: grid; gap: 8px; margin-top: 16px; }
.user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 120px 90px 90px;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #4b5961;
  border-radius: 9px;
  background: rgba(29, 36, 41, .62);
}
.user-row strong { color: #ffffff; font-size: 12px; }
.user-row .user-email, .user-row .user-created { color: #aebbc2; font-size: 11px; }
.user-role-badge { color: #9be35a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.user-status-active { color: #9be35a; font-size: 10px; font-weight: 800; }
.user-status-inactive { color: #ffaaa2; font-size: 10px; font-weight: 800; }

@media (min-width: 901px) {
  .brand { flex-direction: column; align-items: flex-start; }
  .system-status { gap: 9px; }
}
@media (max-width: 720px) {
  .auth-card { padding: 26px 20px; }
  .user-row { grid-template-columns: 1fr 1fr; }
  .user-row .user-email { grid-column: 1 / -1; }
}

/* Alternância de tema: o padrão permanece escuro e o modo claro usa a mesma
   identidade azul/verde, com superfícies mais leves para uso durante o dia. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid #52616a;
  border-radius: 7px;
  background: #182126;
  color: #c8d4da;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.theme-toggle:hover { border-color: #20a8f4; color: #ffffff; background: rgba(32, 168, 244, .10); }
.theme-toggle-icon { width: 16px; height: 16px; border: 0; position: relative; display: inline-grid; place-items: center; line-height: 1; }
.theme-toggle-icon::before { content: "☀"; color: currentColor; font-family: "Segoe UI Symbol", "Noto Sans Symbols", sans-serif; font-size: 16px; font-weight: 400; }
.theme-toggle-icon::after { display: none; }
.theme-toggle-auth { position: absolute; top: 18px; right: 18px; }
.auth-card { position: relative; }
.session-card .theme-toggle { width: 100%; margin-top: 4px; justify-content: flex-start; }

body.theme-light {
  color-scheme: light;
  --bg-main: #f3f7f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f8fc;
  --bg-input: #ffffff;
  --border-color: #d6e1e7;
  --text-primary: #21313a;
  --text-muted: #60727d;
  --primary: #138fd6;
  --primary-hover: #0d79b8;
  --success: #659f32;
  --success-hover: #538b27;
  --warning: #a86e1e;
  --danger: #b45249;
  --danger-hover: #963e37;
  --accent: #659f32;
  --shadow: 0 16px 38px rgba(41, 75, 91, .12);
  background: #f3f7f9;
  color: var(--text-primary);
}
body.theme-light {
  background:
    radial-gradient(circle at 80% -8%, rgba(32, 168, 244, .12), transparent 32rem),
    radial-gradient(circle at 8% 108%, rgba(155, 227, 90, .10), transparent 28rem),
    var(--bg-main);
}
body.theme-light .topbar,
body.theme-light .nav-tabs { background: rgba(255, 255, 255, .92); border-color: #d5e4eb; }
body.theme-light .brand h1 { color: #21313a; }
body.theme-light .sub-brand { color: #6b7d87; }
body.theme-light .status-badge { background: #f7fbfc; border-color: #d5e1e6; color: #526872; }
body.theme-light .session-card { background: #f8fbfc; border-color: #d5e1e6; }
body.theme-light .session-label { color: #6b7d87; }
body.theme-light .session-user-name { color: #21313a; }
body.theme-light .session-logout,
body.theme-light .theme-toggle { background: #ffffff; border-color: #c9d9e1; color: #4f6570; }
body.theme-light .theme-toggle:hover,
body.theme-light .session-logout:hover { background: #eef8fd; border-color: #138fd6; color: #0d79b8; }
body.theme-light .theme-toggle-icon::before { content: "☾"; font-size: 18px; }
body.theme-light .nav-btn { color: #60727d; }
body.theme-light .nav-btn:hover { color: #0d79b8; background: rgba(19, 143, 214, .07); }
body.theme-light .nav-btn.active { color: #0d79b8; border-bottom-color: #138fd6; }
body.theme-light .panel-box,
body.theme-light .kds-column,
body.theme-light .admin-card,
body.theme-light .cashier-panel,
body.theme-light .shift-status-bar { background: linear-gradient(145deg, #ffffff, #f8fbfc); border-color: #d5e1e6; box-shadow: 0 12px 28px rgba(41, 75, 91, .07); }
body.theme-light .panel-header { border-bottom-color: #e0e9ed; }
body.theme-light .panel-header h2,
body.theme-light .kds-header h2,
body.theme-light .shift-status-bar h2,
body.theme-light .section-subheading,
body.theme-light .kds-column-header { color: #314650; }
body.theme-light .kds-header p,
body.theme-light .text-muted,
body.theme-light .empty-state,
body.theme-light .product-card p { color: #6b7d87; }
body.theme-light .table-card,
body.theme-light .product-card,
body.theme-light .kds-card,
body.theme-light .user-row { background: #f7fbfc; border-color: #d7e3e8; }
body.theme-light .tab-item-card,
body.theme-light .order-summary-box { background: #f7fbfc; border-color: #d7e3e8; }
body.theme-light .tab-item-card:hover { border-color: #8ec9e7; background: #f0f9fd; }
body.theme-light .tab-item-card strong,
body.theme-light .order-summary-box h3 { color: #263a44; }
body.theme-light .tab-item-card .text-muted { color: #6b7d87; }
body.theme-light .table-card:hover,
body.theme-light .product-card:hover { border-color: #138fd6; background: #f0f9fd; }
body.theme-light .table-card .table-number,
body.theme-light .product-card h4,
body.theme-light .kds-card h4,
body.theme-light .user-row strong { color: #263a44; }
body.theme-light .table-card .table-capacity,
body.theme-light .product-card .description,
body.theme-light .user-row .user-email,
body.theme-light .user-row .user-created { color: #6b7d87; }
body.theme-light .role-trigger,
body.theme-light input,
body.theme-light textarea,
body.theme-light select { background: #ffffff; border-color: #cbdbe2; color: #263a44; }
body.theme-light input::placeholder,
body.theme-light textarea::placeholder { color: #8a9aa2; }
body.theme-light .btn-secondary { background: #eef4f6; border-color: #cbdbe2; color: #405761; }
body.theme-light .btn-secondary:hover { background: #e2edf1; border-color: #aebfc8; }
body.theme-light .btn-primary { background: #138fd6; border-color: #138fd6; color: #ffffff; }
body.theme-light .btn-primary:hover { background: #0d79b8; border-color: #0d79b8; }
body.theme-light .btn-success { background: #75ad42; border-color: #75ad42; color: #ffffff; }
body.theme-light .product-card .btn { background: #e6f1f5; border-color: #bfd3dc; color: #31515f; }
body.theme-light .product-card .btn:hover { background: #138fd6; border-color: #138fd6; color: #ffffff; }
body.theme-light .auth-screen { background: radial-gradient(circle at 28% 20%, rgba(32, 168, 244, .16), transparent 25rem), radial-gradient(circle at 74% 82%, rgba(155, 227, 90, .14), transparent 23rem), #f3f7f9; }
body.theme-light .auth-card { background: rgba(255, 255, 255, .94); border-color: #d1e0e6; box-shadow: 0 28px 80px rgba(41, 75, 91, .15); }
body.theme-light .auth-card h1 { color: #21313a; }
body.theme-light .auth-description,
body.theme-light .auth-form label { color: #60727d; }
body.theme-light .auth-feedback { color: #b45249; }
body.theme-light .user-status-active,
body.theme-light .user-role-badge { color: #5d982f; }
body.theme-light .user-status-inactive { color: #b45249; }

/* ========================================================================
   Garcom no celular: fluxo de toque mesa -> comanda -> item -> envio.
   A navegacao fica ao alcance do polegar e o catalogo deixa de criar
   uma segunda area de rolagem dentro da pagina.
   ======================================================================== */
.nav-label-mobile { display: none; }
.mobile-service-bar { display: none; }

@media (max-width: 720px) {
  body[data-role="attendant"] {
    --mobile-bottom-nav: 74px;
  }

  body[data-role="attendant"] .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }
  body[data-role="attendant"] .brand {
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 8px;
    padding: 0;
  }
  body[data-role="attendant"] .brand-logo-wrap {
    width: 82px;
    max-width: 82px;
    height: 30px;
    border-radius: 6px;
  }
  body[data-role="attendant"] .brand h1 {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-role="attendant"] .sub-brand,
  body[data-role="attendant"] .status-badge,
  body[data-role="attendant"] .session-label,
  body[data-role="attendant"] .session-role { display: none; }
  body[data-role="attendant"] .system-status {
    width: auto;
    flex: 0 0 auto;
    gap: 6px;
  }
  body[data-role="attendant"] .session-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  body[data-role="attendant"] .session-user-name { display: none; }
  body[data-role="attendant"] .session-card .theme-toggle {
    width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
  }
  body[data-role="attendant"] .session-card .theme-toggle-label { display: none; }
  body[data-role="attendant"] .session-logout {
    width: auto;
    min-height: 36px;
    margin: 0;
    padding: 7px 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  body[data-role="attendant"] .nav-tabs {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    height: calc(var(--mobile-bottom-nav) + env(safe-area-inset-bottom));
    padding: 6px 10px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(32, 168, 244, .24);
    border-bottom: 0;
    box-shadow: 0 -10px 26px rgba(7, 18, 24, .22);
  }
  body[data-role="attendant"] .nav-btn {
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
  }
  body[data-role="attendant"] .nav-btn.active {
    background: rgba(32, 168, 244, .12);
    border-color: rgba(32, 168, 244, .30);
  }
  body[data-role="attendant"] .nav-label-default { display: none; }
  body[data-role="attendant"] .nav-label-mobile { display: inline; }
  body[data-role="attendant"] .tab-icon {
    display: block;
    width: 17px;
    height: 17px;
    margin: 0;
  }
  body[data-role="attendant"] .badge-count {
    position: absolute;
    top: 7px;
    right: calc(25% - 25px);
    padding: 1px 5px;
    font-size: 10px;
  }

  body[data-role="attendant"] .main-content {
    padding: 12px 10px calc(var(--mobile-bottom-nav) + env(safe-area-inset-bottom) + 18px);
  }
  body[data-role="attendant"] .pane-grid {
    display: block;
  }
  body[data-role="attendant"] .panel-box {
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 14px;
  }
  body[data-role="attendant"] .mobile-service-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(32, 168, 244, .28);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(32, 168, 244, .14), rgba(155, 227, 90, .08));
  }
  body[data-role="attendant"] .mobile-service-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
  }
  body[data-role="attendant"] .mobile-service-kicker {
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
  }
  body[data-role="attendant"] .mobile-service-copy strong {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-role="attendant"] .mobile-service-copy span:last-child {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-role="attendant"] .mobile-service-bar .btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding-inline: 12px;
  }
  body[data-role="attendant"] #tab-salao .panel-header .btn { display: none; }
  body[data-role="attendant"] .panel-header {
    align-items: center;
    padding-bottom: 11px;
  }
  body[data-role="attendant"] .panel-header h2 { font-size: 16px; }
  body[data-role="attendant"] .section-subheading { margin-top: 2px; }
  body[data-role="attendant"] .tables-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  body[data-role="attendant"] .table-card {
    min-height: 82px;
    padding: 15px 8px 11px;
  }
  body[data-role="attendant"] .table-card .num { font-size: 19px; }
  body[data-role="attendant"] .table-card .cap { font-size: 11px; }
  body[data-role="attendant"] .tabs-list {
    max-height: 230px;
    gap: 8px;
  }
  body[data-role="attendant"] .section-heading-row { align-items: stretch; flex-direction: column; gap: 8px; }
  body[data-role="attendant"] .section-search { width: 100%; min-height: 42px; }
  body[data-role="attendant"] .catalog-toolbar { display: block; }
  body[data-role="attendant"] .catalog-toolbar .product-search { width: 100%; margin-top: 8px; }
  body[data-role="attendant"] .tab-item-card {
    min-height: 58px;
    padding: 11px 12px;
  }
  body[data-role="attendant"] .catalog-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    gap: 8px;
  }
  body[data-role="attendant"] .product-card {
    min-width: 0;
    min-height: 158px;
    padding: 11px;
  }
  body[data-role="attendant"] .product-card h4 { font-size: 14px; }
  body[data-role="attendant"] .product-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body[data-role="attendant"] .product-options-row { gap: 5px; }
  body[data-role="attendant"] .opt-checkbox-label { font-size: 10px; line-height: 1.25; }
  body[data-role="attendant"] .product-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  body[data-role="attendant"] .product-price { font-size: 15px; }
  body[data-role="attendant"] .btn { min-height: 42px; }
  body[data-role="attendant"] .btn-sm { min-height: 36px; }
  body[data-role="attendant"] input,
  body[data-role="attendant"] select,
  body[data-role="attendant"] textarea { min-height: 44px; }
  body[data-role="attendant"] .order-summary-box {
    padding: 12px;
  }
  body[data-role="attendant"] .order-items-list { max-height: none; }
  body[data-role="attendant"] .order-builder-item {
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }
  body[data-role="attendant"] .order-totals-bar {
    position: sticky;
    bottom: calc(var(--mobile-bottom-nav) + env(safe-area-inset-bottom));
    z-index: 10;
    gap: 10px;
    margin: 4px -12px -12px;
    padding: 12px;
    background: var(--bg-card);
    box-shadow: 0 -8px 18px rgba(7, 18, 24, .18);
  }
  body[data-role="attendant"] .total-label { min-width: 0; }
  body[data-role="attendant"] .total-label span { white-space: nowrap; }
  body[data-role="attendant"] .total-value { font-size: 19px; }
  body[data-role="attendant"] #btn-submit-order {
    min-width: 0;
    flex: 1;
    padding-inline: 10px;
    font-size: 11px;
  }
}

/* Os simbolos de tema devem comunicar a proxima acao: sol = claro, lua = escuro. */
body.theme-light .theme-toggle-icon::before { content: "☾"; }

/* Areas administrativas e operacionais tambem precisam de alvos confortaveis
   no celular, sem alterar a hierarquia especifica do garcom. */
@media (max-width: 720px) {
  .btn { min-height: 42px; }
  .btn-sm { min-height: 36px; }
  input, textarea, select { min-height: 44px; }
  .main-content { padding-bottom: 28px; }
  .panel-box, .cashier-panel, .admin-card { margin-bottom: 12px; }
}

/* Ajustes de contraste nos elementos que nao usam apenas variaveis. */
body.theme-light .product-price,
body.theme-light .total-value,
body.theme-light .selected-tab-indicator { color: #0d79b8; }
body.theme-light .tab-info .tab-code { color: #0d79b8; }
body.theme-light .table-card .num,
body.theme-light .product-card h4,
body.theme-light .order-summary-box h3 { color: #263a44; }
body.theme-light .table-card .cap,
body.theme-light .tab-info .tab-client,
body.theme-light .product-card p,
body.theme-light .empty-state { color: #60727d; }
body.theme-light .table-card.available { background: #f3faef; border-color: #a8cc91; }
body.theme-light .table-card.occupied { background: #fff8eb; border-color: #e4bf82; }
body.theme-light .chip-btn { background: #f4f8fa; border-color: #cbdbe2; color: #526872; }
body.theme-light .chip-btn.active,
body.theme-light .chip-btn:hover { background: #138fd6; border-color: #138fd6; color: #fff; }
body.theme-light .order-totals-bar { border-top-color: #dbe6ea; }
body.theme-light .toast { box-shadow: 0 12px 28px rgba(41, 75, 91, .16); }
body.theme-light .mobile-service-bar { background: linear-gradient(135deg, #eef8fd, #f4faee); border-color: #b7ddec; }

@media (max-width: 720px) {
  body.theme-light[data-role="attendant"] .nav-tabs {
    background: rgba(255, 255, 255, .96);
    border-top-color: #d5e4eb;
    box-shadow: 0 -10px 26px rgba(41, 75, 91, .12);
  }
body.theme-light[data-role="attendant"] .order-totals-bar {
    background: #ffffff;
    box-shadow: 0 -8px 18px rgba(41, 75, 91, .12);
  }
}

/* Orientação operacional: uma leitura rápida do próximo passo por perfil. */
.technical-status { display: none !important; }
.workflow-banner {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(0, 1.8fr) auto;
  align-items: center;
  gap: 18px;
  max-width: 1480px;
  margin: 16px auto 0;
  padding: 16px clamp(20px, 4vw, 56px);
  border: 1px solid rgba(32, 168, 244, .24);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(32, 168, 244, .10), rgba(155, 227, 90, .06));
}
.workflow-copy { min-width: 0; }
.workflow-kicker { display: block; color: var(--primary, #20a8f4); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.workflow-banner h2 { margin: 4px 0 3px; color: var(--text-primary, #f4f7f8); font-size: 17px; letter-spacing: -.02em; }
.workflow-banner p { margin: 0; color: var(--text-muted, #8b988e); font-size: 12px; line-height: 1.45; }
.workflow-steps { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.workflow-steps li { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--text-primary, #f4f7f8); font-size: 11px; white-space: nowrap; }
.workflow-step-number { display: inline-grid; width: 22px; height: 22px; place-items: center; border: 1px solid rgba(32, 168, 244, .32); border-radius: 50%; background: rgba(32, 168, 244, .13); color: var(--primary, #20a8f4); font-size: 10px; font-weight: 800; }
.workflow-help-btn { white-space: nowrap; }
.cashier-next-step { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -4px 0 16px; padding: 13px 15px; border: 1px solid rgba(32, 168, 244, .28); border-radius: 12px; background: rgba(32, 168, 244, .08); }
.cashier-next-step strong, .cashier-next-step span:last-child { display: block; }
.cashier-next-step strong { margin-top: 3px; color: var(--text-primary, #f4f7f8); font-size: 14px; }
.cashier-next-step span:last-child { margin-top: 3px; color: var(--text-muted, #8b988e); font-size: 12px; }
.guided-empty-state { display: grid; justify-items: start; gap: 5px; min-height: 104px; align-content: center; text-align: left; }
.guided-empty-state strong { color: var(--text-primary, #f4f7f8); font-size: 13px; }
.guided-empty-state span { color: var(--text-muted, #8b988e); font-size: 11px; line-height: 1.45; }
.guided-empty-state .btn { margin-top: 5px; }
.profile-help-card { width: min(100%, 520px); }
.profile-help-steps { display: grid; gap: 10px; margin: 18px 0 0; padding-left: 25px; color: var(--text-primary, #f4f7f8); font-size: 13px; }
.profile-help-steps li::marker { color: var(--primary, #20a8f4); font-weight: 800; }

/* Listas densas rolam dentro do painel, preservando contexto e cabeçalho. */
#tabs-list, #cashier-tabs-list { max-height: 330px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#catalog-products-list { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.kds-cards-container { max-height: 54vh; min-height: 180px; scrollbar-width: thin; overscroll-behavior: contain; }
.admin-table-container, .audit-list { scrollbar-width: thin; overscroll-behavior: contain; }
.admin-table-container { max-height: 480px; overflow: auto; }
.audit-list { max-height: 420px; }

body.theme-light .workflow-banner { border-color: #c4e0ec; background: linear-gradient(110deg, #eef8fd, #f4faee); }
body.theme-light .workflow-banner h2,
body.theme-light .cashier-next-step strong,
body.theme-light .guided-empty-state strong,
body.theme-light .profile-help-steps { color: #263a44; }
body.theme-light .cashier-next-step { border-color: #b7ddec; background: #eef8fd; }

@media (max-width: 720px) {
  .workflow-banner { grid-template-columns: 1fr auto; gap: 11px; margin-top: 10px; padding: 13px 16px; }
  .workflow-copy { grid-column: 1 / -1; }
  .workflow-steps { grid-column: 1 / -1; padding-bottom: 2px; }
  .workflow-help-btn { grid-column: 1 / -1; width: 100%; }
  .cashier-next-step { align-items: stretch; flex-direction: column; }
  #tabs-list, #cashier-tabs-list { max-height: 270px; }
  body[data-role="attendant"] #catalog-products-list { max-height: 52vh; overflow-y: auto; }
  .kds-cards-container { max-height: 48vh; }
}
