/* ============================================================
   Theme Variables - Light (default) & Dark
   ============================================================ */
:root {
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-surface: #fafafa;
  --bg-totalizador: #f7f8fc;
  --bg-header: #3f51b5;
  --bg-drawer: #fafafa;
  --bg-input: transparent;
  --bg-dialog: #ffffff;
  --bg-overlay: rgba(15, 17, 30, 0.82);
  --bg-card-consumo: #f5f6fa;
  --bg-card-actions: #eceef5;
  --bg-btn-opcoes: #fff;

  --text-primary: #212121;
  --text-secondary: #757575;
  --text-on-primary: #ffffff;
  --text-card: #000000;
  --text-label: rgba(0, 0, 0, 0.26);
  --text-title: #1a1f36;

  --border-color: #e0e3eb;
  --border-color-light: #dde1ea;
  --border-color-hr: #eef0f5;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);

  --color-primary: #3f51b5;
  --color-primary-dark: #303f9f;
  --color-accent: #ff4081;
  --color-quantidade: #3f51b5;
  --color-checkbox-label: #3f51b5;
  --color-link: #3f51b5;

  --processing-card-bg: #fff;
  --processing-title-color: #1a1f36;
  --processing-text-color: #8892b0;
  --processing-track: #e8ecf4;
  --processing-dots: #c5cae9;
}

[data-theme="dark"] {
  --bg-body: #121212;
  --bg-card: #1e1e1e;
  --bg-surface: #252525;
  --bg-totalizador: #1a1e3a;
  --bg-header: #1a237e;
  --bg-drawer: #1e1e1e;
  --bg-input: #2c2c2c;
  --bg-dialog: #2c2c2c;
  --bg-overlay: rgba(0, 0, 0, 0.9);
  --bg-card-consumo: #252525;
  --bg-card-actions: #2a2a2a;
  --bg-btn-opcoes: #333;

  --text-primary: #e0e0e0;
  --text-secondary: #aaaaaa;
  --text-on-primary: #ffffff;
  --text-card: #e0e0e0;
  --text-label: rgba(255, 255, 255, 0.5);
  --text-title: #e0e0e0;

  --border-color: #333333;
  --border-color-light: #444;
  --border-color-hr: #333;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);

  --color-primary: #5c6bc0;
  --color-primary-dark: #3949ab;
  --color-accent: #ff80ab;
  --color-quantidade: #7986cb;
  --color-checkbox-label: #7986cb;
  --color-link: #7986cb;

  --processing-card-bg: #1e1e1e;
  --processing-title-color: #e0e0e0;
  --processing-text-color: #888;
  --processing-track: #333;
  --processing-dots: #444;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.totalizador {
  background-color: var(--bg-totalizador);
}

/* ============================================================
   Dark Theme - MDL Overrides
   ============================================================ */
[data-theme="dark"] .mdl-layout__header {
  background-color: var(--bg-header);
}

[data-theme="dark"] .mdl-layout__drawer {
  background-color: var(--bg-drawer);
  border-right-color: var(--border-color);
}

[data-theme="dark"] .mdl-layout__drawer .mdl-layout-title {
  color: var(--text-primary);
}

[data-theme="dark"] .mdl-navigation__link {
  color: var(--text-primary);
}

[data-theme="dark"] .mdl-card {
  background-color: var(--bg-card);
  box-shadow: var(--shadow-card) !important;
}

[data-theme="dark"] .mdl-card__supporting-text,
[data-theme="dark"] .mdl-card__title-text {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .mdl-textfield__input {
  border-bottom-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .mdl-textfield__label {
  color: var(--text-label);
}

[data-theme="dark"] .mdl-textfield--floating-label.is-focused .mdl-textfield__label,
[data-theme="dark"] .mdl-textfield--floating-label.is-dirty .mdl-textfield__label {
  color: var(--color-primary);
}

[data-theme="dark"] .mdl-button--colored {
  background-color: var(--color-primary);
}

[data-theme="dark"] .mdl-dialog,
[data-theme="dark"] dialog {
  background-color: var(--bg-dialog);
  color: var(--text-primary);
}

[data-theme="dark"] .mdl-dialog__content,
[data-theme="dark"] .mdl-dialog__content p,
[data-theme="dark"] .mdl-dialog__content h5 {
  color: var(--text-primary);
}

[data-theme="dark"] select.select,
[data-theme="dark"] select.select-tamanho,
[data-theme="dark"] select.select-tamanho2 {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .mdl-data-table {
  background-color: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .mdl-data-table td,
[data-theme="dark"] .mdl-data-table th {
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .mdl-grid {
  color: var(--text-primary);
}

[data-theme="dark"] h4,
[data-theme="dark"] h3,
[data-theme="dark"] h5 {
  color: var(--text-primary);
}

[data-theme="dark"] span {
  color: var(--text-secondary);
}

[data-theme="dark"] hr {
  border-color: var(--border-color);
}

[data-theme="dark"] .mdl-layout__obfuscator.is-visible {
  background-color: rgba(0, 0, 0, 0.6);
}

/* ── Dark Theme - Cards, Actions, Borders ── */
[data-theme="dark"] .mdl-card__actions {
  background-color: var(--bg-card);
  border-top-color: var(--border-color);
}

[data-theme="dark"] .mdl-card--border {
  border-color: var(--border-color);
}

[data-theme="dark"] .wide-card {
  background-color: var(--bg-card);
}

[data-theme="dark"] .conteudo {
  background-color: var(--bg-card);
}

[data-theme="dark"] .mdl-card__actions p,
[data-theme="dark"] .mdl-card__actions .valor,
[data-theme="dark"] .mdl-card__actions label {
  color: var(--text-primary);
}

[data-theme="dark"] .mdl-card__actions .produto {
  color: var(--text-primary);
}

/* ── Dark Theme - Tabs ── */
[data-theme="dark"] .mdl-layout__tab-bar {
  background-color: var(--bg-header);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .mdl-layout__tab {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .mdl-layout__tab.is-active {
  color: #fff;
}

/* ── Dark Theme - Footer fixo ── */
[data-theme="dark"] .footer {
  background-color: #2a2a2a !important;
  border-top-color: var(--border-color);
}

[data-theme="dark"] .footer-fixo {
  background-color: #2a2a2a;
}

/* ── Dark Theme - Sub-titulo/texto ── */
[data-theme="dark"] p.sub-titulo,
[data-theme="dark"] .sub-texto {
  color: var(--text-secondary) !important;
}

/* ── Dark Theme - Inputs, quantity ── */
[data-theme="dark"] .quantidade {
  color: var(--color-quantidade);
}

[data-theme="dark"] .qtde-item {
  color: var(--text-primary);
  background: transparent;
}

/* ── Dark Theme - Checkbox/Radio labels ── */
[data-theme="dark"] label {
  color: var(--text-primary);
}

[data-theme="dark"] .mdl-checkbox__label {
  color: var(--color-checkbox-label);
}

/* ── Dark Theme - Badge ── */
[data-theme="dark"] .mdl-badge[data-badge]:after {
  background: var(--color-accent);
}

/* ── Dark Theme - Links ── */
[data-theme="dark"] .link-topo,
[data-theme="dark"] .link-icone-topo {
  color: var(--text-on-primary);
}

/* ── Dark Theme - Misc text overrides ── */
[data-theme="dark"] .card-valor span,
[data-theme="dark"] .card-valor .valor {
  color: var(--text-primary);
}

[data-theme="dark"] .text-black {
  color: var(--text-primary) !important;
}

/* ── Dark Theme - Sabores / etapa containers ── */
[data-theme="dark"] .etapas .mdl-card,
[data-theme="dark"] .etapas {
  background-color: var(--bg-card);
}

[data-theme="dark"] #box-opcionais .mdl-card,
[data-theme="dark"] #container-sabores {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

[data-theme="dark"] .sabores {
  color: var(--text-primary);
}

/* ── Dark Theme - Pesquisa wrapper dark ── */
[data-theme="dark"] .pesquisa-wrapper .pesquisa-input {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* ── Dark Theme - Print overlay ── */
[data-theme="dark"] .print-overlay {
  background: var(--bg-overlay);
}

/* ── Dark Theme - Modal sheet ── */
[data-theme="dark"] .modal-categorias-sheet {
  background: var(--bg-card);
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}

.theme-toggle:hover {
  background-color: var(--bg-surface);
}

.theme-toggle i {
  font-size: 24px;
  vertical-align: middle;
}

.theme-toggle .item-menu {
  vertical-align: text-bottom;
}

p {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

a {
  text-decoration: none;
}

i.material-icons {
  vertical-align: sub;
  font-size: 25px;
}

.mdl-layout__tab-bar-left-button {
  display: none;
}

.mdl-layout__tab-bar {
  padding: 0 0 0 0;
  width: 100%;
}

.mdl-card {
  width: calc(100% - 24px);
  margin: 8px 12px;
  min-height: 60px;
  border-radius: 12px !important;
  overflow: hidden;
}

.mdl-card__title-text {
  font-size: 15px;
}

.mdl-layout.is-upgraded .mdl-layout__tab.is-active::after {
  height: 5px;
  border-radius: 10px;
}

.text-red {
  color: #e74c3c !important;
}

.text-green {
  color: green !important;
}

.negrito {
  font-weight: bold;
}

.bk-red {
  background-color: #e74c3c !important;
}

.bk-red-2 {
  background-color: #f5c3c3 !important;
}

.bk-green {
  background-color: green !important;
}

.btn-qtde {
  font-size: 40px !important;
}

.container-qtde {
  width: 50px;
}

.container-qtde-peso {
  width: 85px;
}

.quantidade {
  text-align: center;
  color: var(--color-quantidade);
  font-size: 18px;
}

.valor {
  font-size: 14px;
}

.mdl-card__title {
  padding: 5px 5px 5px 16px;
}

.mdl-textfield .observacao {
  padding: 20px 0 5px;
}

.card-valor {
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  color: var(--text-card);
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: stretch;
  -webkit-justify-content: stretch;
  -ms-flex-pack: stretch;
  justify-content: stretch;
  line-height: normal;
  padding: 0 0 0 16px;
  box-sizing: border-box;
}

/* === CARDS CONSUMO (aba 1) === */
.card-consumo {
  border-radius: 12px !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card) !important;
  overflow: hidden;
  margin: 12px 12px;
  width: calc(100% - 24px);
  background: var(--bg-card-consumo);
}

.card-consumo .mdl-card__title {
  padding: 12px 16px 4px;
}

.card-consumo .mdl-card__title-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.card-consumo .card-valor {
  padding: 2px 16px 8px;
}

.card-consumo .card-valor .valor {
  font-size: 14px;
  font-weight: 700;
}

.card-consumo .mdl-card__actions.detalhe {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-card-actions);
  border-top: 1px solid var(--border-color);
}

.card-consumo .btn-opcoes {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
  min-height: 32px;
  background: var(--bg-btn-opcoes);
  border: 1px solid var(--border-color-light);
  color: var(--color-primary);
}

.card-consumo .btn-opcoes:active {
  background: #e8eaf6;
}

/* === CARDS REVISÃO / PENDENTE (aba 3) === */
.card-revisao {
  border-radius: 12px !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card) !important;
  overflow: hidden;
  margin: 12px 12px;
  width: calc(100% - 24px);
  background: var(--bg-card-consumo);
}

.card-revisao .mdl-card__title {
  padding: 12px 16px 8px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px;
  overflow: hidden;
}

.card-revisao .mdl-card__title .text-left {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  flex: 1 1 0 !important;
  min-width: 90px !important;
  width: auto !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  display: block !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
}

.card-revisao .mdl-card__title select,
.card-revisao .mdl-card__title a,
.card-revisao .mdl-card__title .container-qtde,
.card-revisao .mdl-card__title .container-qtde-peso {
  flex-shrink: 0;
}

.card-revisao .mdl-card__title .btn-qtde {
  font-size: 32px !important;
}

.card-revisao .mdl-card__title .container-qtde {
  width: 32px;
}

.card-revisao .mdl-card__title .quantidade {
  font-size: 14px;
}

.card-revisao .mdl-card__actions.detalhe {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-card-actions);
  border-top: 1px solid var(--border-color);
}

.card-revisao .btn-opcoes {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  min-height: 28px;
  background: var(--bg-btn-opcoes);
  border: 1px solid var(--border-color-light);
  color: var(--color-primary);
}

.card-revisao .btn-opcoes:active {
  background: #e8eaf6;
}

.card-revisao .btn-opcoes.text-red {
  color: #e74c3c;
  border-color: #f5d5d2;
}

.card-revisao .btn-opcoes.text-red:active {
  background: #fef0ef;
}

.card-revisao .box-etapa {
  padding: 4px 16px 8px;
}

.card-revisao .box-etapa hr {
  border: none;
  border-top: 1px solid var(--border-color-hr);
  margin: 4px 0;
}

/* === DETALHES / TOTALIZADORES === */
.card-detalhe-geral {
  border-radius: 12px !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card) !important;
  margin: 6px 12px;
  width: calc(100% - 24px);
  background: #f5f6fa;
}

.card-detalhe-geral .mdl-card__title {
  padding: 14px 16px 6px;
}

.card-detalhe-geral .totalizador {
  background: var(--bg-card-actions);
  padding: 12px 16px;
}

/* === FOOTER FIXO (botões Pré-Fechamento / Limpar / Finalizar) === */
.footer-fixo {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
}

.footer-fixo .btn-footer {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  height: 50px;
  border: none;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 10px;
}

.footer-fixo .btn-footer i {
  font-size: 20px;
}

.footer-fixo .btn-footer:active {
  filter: brightness(0.88);
}

.btn-footer-primary {
  background: #3f51b5;
}

.btn-footer-danger {
  background: #e74c3c;
}

.btn-footer-success {
  background: #2e7d32;
}

.footer-fixo .btn-footer.btn-finalizar {
  animation: pulseFinalizar 1.4s ease-in-out infinite;
  background: #2e7d32;
  position: relative;
  overflow: hidden;
}

.footer-fixo .btn-footer.btn-finalizar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmerFinalizar 1.6s ease-in-out infinite;
}

@keyframes pulseFinalizar {
  0% {
    background-color: #2e7d32;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4);
  }

  25% {
    background-color: #43a047;
    transform: scale(1.04);
    box-shadow: 0 0 16px 4px rgba(67, 160, 71, 0.4);
  }

  50% {
    background-color: #66bb6a;
    transform: scale(1.06);
    box-shadow: 0 0 22px 6px rgba(102, 187, 106, 0.45);
  }

  75% {
    background-color: #43a047;
    transform: scale(1.04);
    box-shadow: 0 0 16px 4px rgba(67, 160, 71, 0.4);
  }

  100% {
    background-color: #2e7d32;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4);
  }
}

@keyframes shimmerFinalizar {
  0% {
    left: -100%;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  50%,
  100% {
    left: 100%;
    opacity: 0;
  }
}

.btn-footer-full {
  width: 100%;
  flex: none;
}

/* === BOTTOM SHEET CATEGORIAS === */
.modal-categorias-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 17, 30, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  transition: opacity 0.25s ease;
}

.modal-categorias-overlay.ativo {
  display: block;
}

.modal-categorias-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--bg-card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.modal-categorias-sheet.ativo {
  transform: translateY(0);
}

.bottomsheet-handle {
  width: 36px;
  height: 4px;
  background: #d0d0d0;
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.modal-categorias-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  flex-shrink: 0;
}

.modal-categorias-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #3f51b5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-categorias-header h5 i {
  font-size: 20px;
}

.modal-categorias-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f0f0f3;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-categorias-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px 20px;
}

.modal-cat-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-cat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  background: #fafafa;
  font-size: 14px;
  font-weight: 600;
  color: #424242;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.modal-cat-chip:active {
  transform: scale(0.98);
}

.modal-cat-chip.ativo {
  background: #3f51b5;
  border-color: #3f51b5;
  color: #fff;
  box-shadow: 0 2px 8px rgba(63, 81, 181, 0.3);
}

.modal-cat-chip i {
  font-size: 18px;
}

.modal-cat-chip .cat-chip-nome {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-cat-chip .cat-chip-count {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
  margin-left: auto;
  flex-shrink: 0;
}

.modal-cat-chip.ativo .cat-chip-count {
  opacity: 0.85;
}

@keyframes pulseFilterBtn {

  0%,
  100% {
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.35);
  }

  50% {
    box-shadow: 0 0 16px 4px rgba(255, 87, 34, 0.5);
  }
}

.mdl-checkbox {
  width: auto;
}

.text-right {
  float: right !important;
  display: block;
}

.text-left {
  float: left !important;
  display: block;
}

.mdl-layout__header-row {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 55px !important;
  overflow: hidden;
}

.mdl-layout__header-row.login {
  padding: 20px 16px 0 55px !important;
}

.mdl-layout__drawer-button {
  height: 35px;
  width: 40px;
}

.mdl-layout__title,
.mdl-layout-title {
  display: inline;
}

.margem-direita-md {
  margin-right: 20px;
}

.mdl-card__actions.detalhe {
  padding: 0px;
}

.container-scroll {
  overflow-x: auto !important;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0;
}

.container-scroll::-webkit-scrollbar {
  display: none;
}

.container-categorias {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  width: max-content;
}

.btn-categoria {
  margin: 0;
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  background: #f0f0f3 !important;
  color: #555 !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
  min-width: auto !important;
  height: 36px !important;
  line-height: 36px !important;
}

.btn-categoria:hover,
.btn-categoria:active {
  background: #e8eaf6 !important;
  border-color: #3f51b5 !important;
  color: #3f51b5 !important;
}

.btn-categoria.mdl-button--colored {
  background: #3f51b5 !important;
  color: #fff !important;
  border-color: #3f51b5 !important;
  box-shadow: 0 2px 8px rgba(63, 81, 181, 0.3) !important;
}

i.material-icons.icon-add {
  color: #fff;
  font-size: 40px;
}

.btn-opcoes {
  padding: 0 3px;
  font-size: 12px;
}

.mdl-checkbox__label {
  color: var(--color-checkbox-label);
  font-size: 13px;
  font-weight: 500;
}

span.item-menu {
  vertical-align: text-bottom;
}

.select {
  width: 100%;
  padding: 10px;
}

.select-tamanho {
  width: auto;
  max-width: 110px;
  padding: 4px 4px;
  margin: 0;
  font-size: 12px;
}

.select-tamanho2 {
  width: auto;
  max-width: 60px;
  padding: 4px 4px;
  font-size: 12px;
}

.mdl-data-table td {
  padding: 10px 10px 0px 0;
  vertical-align: initial;
  height: 0;
}

.mdl-data-table td:first-of-type,
.mdl-data-table th:first-of-type {
  padding-left: 5px;
}

.ckb-opcional {
  transform: scale(1.5);
  margin: 15px 10px 15px 10px;
}

.card-produto {
  display: block;
  border-radius: 12px !important;
  border: 1px solid #e0e3eb;
  overflow: hidden;
  transition: all 0.15s ease;
  background: #f5f6fa;
}

.card-produto:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
}

.titulo-produto {
  float: none;
  padding: 14px 16px !important;
}

.titulo-produto .text-black {
  font-size: 14px;
  font-weight: 600;
  color: #212121 !important;
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.titulo-produto .text-gray {
  font-size: 12px;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.titulo-produto .text-red {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.container-adicionar {
  display: block;
  text-decoration: none !important;
  margin: 0 12px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.container-adicionar:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08) !important;
}

.icon-add {
  margin-top: 9px;
}

.text-center {
  text-align: center;
}

.mostra {
  display: block;
}

.footer-fixo.mostra {
  display: flex;
}

.esconde {
  display: none;
}

.visivel {
  visibility: visible;
}

.not-visivel {
  visibility: hidden;
}

.bk-blue {
  background-color: var(--color-primary);
}

.text-blue {
  color: var(--color-primary);
}

.text-white {
  color: #fff;
}

.text-black {
  color: #000;
}

.text-gray {
  color: #a4a4a4 !important;
}

.link-topo {
  text-decoration: none;
  margin: 0 10px;
}

.pesquisa {
  width: auto;
  margin: 0 12px 4px;
}

.pesquisa-wrapper {
  position: relative;
  margin: 0 12px 8px;
}

.pesquisa-wrapper .pesquisa-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9e9e9e;
  font-size: 20px;
  pointer-events: none;
  z-index: 1;
}

.pesquisa-wrapper .pesquisa-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-surface);
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.pesquisa-wrapper .pesquisa-input:focus {
  border-color: var(--color-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.pesquisa-wrapper .pesquisa-input::placeholder {
  color: var(--text-label);
}

.acao-div-categoria {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin: 0 !important;
  padding: 8px 0 !important;
  width: 100% !important;
  font-weight: 600;
  text-decoration: none;
  color: #3f51b5;
  text-transform: uppercase;
}

.acao-div-categoria span {
  display: inline;
  vertical-align: super;
}

a.btn-mesa {
  margin: 0;
  min-width: unset !important;
  width: 100%;
  height: 56px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.btn-mesa:active {
  transform: scale(0.96);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-red {
  color: #fff !important;
  background: #e74c3c !important;
}

.btn-yellow {
  background: #d0d041 !important;
}

.block-center {
  text-align: center;
  margin: 0 auto;
}

.linha-5 {
  display: inline-block;
  height: 5px;
}

.inpt-cliente {
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  padding: 12px 10px;
  border: 2px solid #dde1ea;
  border-radius: 10px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
  letter-spacing: 1px;
}

.inpt-cliente:focus {
  border-color: #3085d6;
  box-shadow: 0 0 0 3px rgba(48, 133, 214, 0.15);
}

.inpt-cliente::placeholder {
  font-size: 16px;
  font-weight: 400;
  color: #aab2bd;
  letter-spacing: 0;
}

a.link-comanda,
.container-comandas {
  text-decoration: none;
}

.icone-detalhes {
  font-size: 45px !important;
  position: absolute;
  left: 85%;
  top: 10px;
}

.btn-rodape-azul {
  background-color: #e74c3c;
  color: #fff;
  height: 50px;
  width: 100%;
  border: none;
  border-radius: 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-transform: uppercase;
  overflow: hidden;
  animation: pulseRodape 1.4s ease-in-out infinite;
}

.btn-rodape-azul::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmerRodape 1.6s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulseRodape {
  0% {
    background-color: #e74c3c;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
  }

  25% {
    background-color: #ff7043;
    transform: scale(1.04);
    box-shadow: 0 0 16px 4px rgba(255, 112, 67, 0.4);
  }

  50% {
    background-color: #ff5722;
    transform: scale(1.06);
    box-shadow: 0 0 22px 6px rgba(255, 87, 34, 0.45);
  }

  75% {
    background-color: #f44336;
    transform: scale(1.04);
    box-shadow: 0 0 16px 4px rgba(244, 67, 54, 0.4);
  }

  100% {
    background-color: #e74c3c;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
  }
}

@keyframes shimmerRodape {
  0% {
    left: -100%;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  50%,
  100% {
    left: 100%;
    opacity: 0;
  }
}

div#container-categoria {
  height: 40px !important;
  min-height: 0;
}

.clearfix::after {
  content: '';
  display: block;
  clear: both;
}

hr {
  margin: 0 !important;
}

/* ── Filter chips & sections (mesas / comandas) ─────────────── */

.filtros-wrapper {
  display: flex;
  gap: 8px;
  padding: 0 12px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filtros-wrapper::-webkit-scrollbar {
  display: none;
}

.chip-filtro.ativo {
  background: #3f51b5 !important;
  color: #fff !important;
  border-color: #3f51b5 !important;
  box-shadow: 0 2px 8px rgba(63, 81, 181, 0.3) !important;
}

.chip-aberta.ativo {
  background: #3f51b5 !important;
  border-color: #3f51b5 !important;
  box-shadow: 0 2px 8px rgba(63, 81, 181, 0.3) !important;
}

.chip-pre-fechada.ativo {
  background: #d0a000 !important;
  border-color: #b08000 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(208, 160, 0, 0.3) !important;
}

.chip-livre.ativo {
  background: #3f51b5 !important;
  border-color: #3f51b5 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(63, 81, 181, 0.3) !important;
}

.secao-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 6px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.secao-header:not(:first-child) {
  margin-top: 6px;
  border-top: 1px solid #f0f0f0;
}

.secao-header .material-icons {
  font-size: 18px;
}

.secao-aberta {
  color: #e74c3c;
}

.secao-pre-fechada {
  color: #b08000;
}

.secao-livre {
  color: #27ae60;
}

.secao-count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 12px;
  margin-left: 2px;
}

.secao-vazia {
  padding: 4px 16px 12px;
  font-size: 13px;
  color: #bdbdbd;
}

#btn-toggle-view {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* ── Comanda grid (square cards) ─────────────────────────────── */

.box-comandas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  padding: 8px 12px 12px;
}

.box-comandas-grid a.btn-mesa {
  margin: 0;
  min-width: unset !important;
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 100% !important;
  padding-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 0 !important;
  font-weight: 700;
  border-radius: 10px !important;
  position: relative;
  line-height: 1 !important;
  overflow: hidden;
  color: transparent !important;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.box-comandas-grid a.btn-mesa:active {
  transform: scale(0.96);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.box-comandas-grid a.btn-mesa::after {
  content: attr(data-numero);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

/* ── Comanda flex (name cards) ───────────────────────────────── */

.box-comandas-flex {
  display: flex;
  flex-wrap: wrap;
  padding: 4px 8px 12px;
  gap: 8px;
}

.box-comandas-flex a.btn-comanda {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  min-height: 72px;
  height: auto;
  padding: 6px 4px !important;
  border-radius: 10px !important;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  gap: 1px;
}

.box-comandas-flex a.btn-comanda:active {
  transform: scale(0.96);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.box-comandas-flex .texto-comanda {
  font-size: 22px !important;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.box-comandas-flex .texto-mesa {
  font-size: 10px !important;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
}

.box-comandas-flex .texto-cliente {
  font-size: 9px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62px;
  opacity: 1;
  display: flex;
  align-items: center;
  gap: 1px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.80);
  font-style: italic;
}

.box-comandas-flex .texto-cliente i {
  font-size: 9px !important;
  flex-shrink: 0;
}

.box-comandas-flex .valor {
  font-size: 10px !important;
  font-weight: 600;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.88);
}

.box-comandas-flex .texto-tempo {
  font-size: 10px !important;
  white-space: nowrap;
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 1px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: auto;
  text-transform: lowercase;
  line-height: 1;
}

.box-comandas-flex .texto-tempo i {
  font-size: 10px !important;
  flex-shrink: 0;
}

/* ============================================================
   SweetAlert2 - Modern Override
   ============================================================ */
.swal2-popup {
  border-radius: 20px !important;
  padding: 32px 24px 24px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18) !important;
  font-family: inherit !important;
  max-width: 360px !important;
  width: 90% !important;
}

.swal2-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1a1f36 !important;
  padding: 0 0 4px !important;
  margin: 0 !important;
}

.swal2-content,
#swal2-content {
  font-size: 14px !important;
  color: #6b7394 !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  padding: 0 !important;
  margin: 8px 0 0 !important;
}

/* Icon sizing */
.swal2-icon {
  transform: scale(0.7) !important;
  margin: -8px auto 4px !important;
  border-width: 3px !important;
}

.swal2-icon .swal2-icon-text {
  font-size: 32px !important;
}

.swal2-icon.swal2-question {
  border-color: #7986cb !important;
  color: #3f51b5 !important;
}

.swal2-icon.swal2-warning {
  border-color: #ffb74d !important;
  color: #f57c00 !important;
}

.swal2-icon.swal2-error {
  border-color: #ef5350 !important;
}

.swal2-icon.swal2-success {
  border-color: #66bb6a !important;
}

.swal2-icon.swal2-success .swal2-success-line-tip,
.swal2-icon.swal2-success .swal2-success-line-long {
  background-color: #66bb6a !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(102, 187, 106, 0.3) !important;
}

/* Buttons */
.swal2-actions {
  margin-top: 20px !important;
  gap: 10px !important;
}

.swal2-popup .btn,
.swal2-styled {
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
  min-width: 120px !important;
  transition: all 0.2s ease !important;
  border: none !important;
  letter-spacing: 0.3px !important;
  box-shadow: none !important;
}

.swal2-popup .btn-success,
.swal2-styled.swal2-confirm {
  background: linear-gradient(135deg, #3f51b5, #5c6bc0) !important;
  color: #fff !important;
}

.swal2-popup .btn-success:active,
.swal2-styled.swal2-confirm:active {
  background: linear-gradient(135deg, #303f9f, #3f51b5) !important;
  transform: scale(0.97);
}

.swal2-popup .btn-danger {
  background: linear-gradient(135deg, #e53935, #ef5350) !important;
  color: #fff !important;
}

.swal2-popup .btn-danger:active {
  background: linear-gradient(135deg, #c62828, #e53935) !important;
  transform: scale(0.97);
}

.swal2-popup .btn:not(.btn-success):not(.btn-danger),
.swal2-styled.swal2-cancel {
  background: #f0f1f5 !important;
  color: #5a607a !important;
}

.swal2-popup .btn:not(.btn-success):not(.btn-danger):active,
.swal2-styled.swal2-cancel:active {
  background: #e4e5ec !important;
  transform: scale(0.97);
}

/* Overlay */
.swal2-container {
  background: rgba(15, 17, 30, 0.55) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Animation */
.swal2-show {
  animation: swalPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
}

@keyframes swalPopIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.swal2-hide {
  animation: swalPopOut 0.15s ease-in both !important;
}

@keyframes swalPopOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* Input inside swal */
.swal2-popup input,
.swal2-popup select {
  border-radius: 10px !important;
  border: 1.5px solid #e0e3eb !important;
  padding: 10px 14px !important;
  font-size: 15px !important;
  outline: none !important;
  transition: border-color 0.2s !important;
}

.swal2-popup input:focus,
.swal2-popup select:focus {
  border-color: #3f51b5 !important;
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1) !important;
}

/* ============================================================
   Processing Modal - Modern Overlay
   ============================================================ */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 30, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.processing-overlay.active {
  opacity: 1;
  visibility: visible;
}

.processing-card {
  background: var(--processing-card-bg);
  border-radius: 20px;
  padding: 36px 32px 32px;
  width: 88%;
  max-width: 300px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.processing-overlay.active .processing-card {
  transform: translateY(0) scale(1);
}

/* Animated circle */
.processing-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  position: relative;
}

.processing-ring svg {
  width: 100%;
  height: 100%;
  animation: processingRotate 2s linear infinite;
}

.processing-ring svg circle {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.processing-ring svg circle.track {
  stroke: var(--processing-track);
}

.processing-ring svg circle.progress {
  stroke: url(#processingGrad);
  stroke-dasharray: 150;
  stroke-dashoffset: 40;
  animation: processingDash 1.5s ease-in-out infinite;
}

@keyframes processingRotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes processingDash {
  0% {
    stroke-dashoffset: 150;
  }

  50% {
    stroke-dashoffset: 40;
  }

  100% {
    stroke-dashoffset: 150;
  }
}

.processing-icon-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #3f51b5;
  animation: processingIconSpin 2s linear infinite;
  transform-origin: center center;
}

@keyframes processingIconSpin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 1;
  }

  25% {
    transform: translate(-50%, -50%) rotate(90deg) scale(0.85);
    opacity: 0.7;
  }

  50% {
    transform: translate(-50%, -50%) rotate(180deg) scale(1);
    opacity: 1;
  }

  75% {
    transform: translate(-50%, -50%) rotate(270deg) scale(0.85);
    opacity: 0.7;
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
    opacity: 1;
  }
}

.processing-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--processing-title-color);
  margin: 0 0 6px;
}

.processing-text {
  font-size: 13px;
  color: var(--processing-text-color);
  margin: 0 0 20px;
  font-weight: 500;
  line-height: 1.4;
}

.processing-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.processing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--processing-dots);
  animation: processingBounce 1.4s ease-in-out infinite;
}

.processing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.processing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes processingBounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    background: #c5cae9;
  }

  40% {
    transform: scale(1);
    background: #3f51b5;
  }
}

/* Success state */
.processing-overlay.success .processing-ring svg circle.progress {
  stroke: #66bb6a;
  stroke-dashoffset: 0;
  animation: none;
}

.processing-overlay.success .processing-ring svg {
  animation: none;
}

.processing-overlay.success .processing-icon-center {
  color: #43a047;
  animation: none;
  transform: translate(-50%, -50%) scale(1.1);
}

.processing-overlay.success .processing-dots span {
  background: #66bb6a;
  animation: none;
  transform: scale(1);
}

/* Error state */
.processing-overlay.error .processing-ring svg circle.progress {
  stroke: #ef5350;
  stroke-dashoffset: 0;
  animation: none;
}

.processing-overlay.error .processing-ring svg {
  animation: none;
}

.processing-overlay.error .processing-icon-center {
  color: #e53935;
  animation: none;
  transform: translate(-50%, -50%) scale(1.1);
}

.processing-overlay.error .processing-dots span {
  background: #ef5350;
  animation: none;
  transform: scale(1);
}

/* OK Button - shown in error/has-btn state */
.processing-btn-ok {
  display: none;
  margin-top: 8px;
  padding: 10px 48px;
  border: none;
  border-radius: 12px;
  background: #3f51b5;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.processing-btn-ok:active {
  transform: scale(0.96);
}

.processing-overlay.has-btn .processing-btn-ok {
  display: inline-block;
}

.processing-overlay.has-btn .processing-dots {
  display: none;
}

/* Error state: more spacing between texts */
.processing-overlay.error .processing-title {
  margin-bottom: 12px;
  font-size: 18px;
}

.processing-overlay.error .processing-text {
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
  padding: 0 4px;
}

.processing-overlay.error .processing-btn-ok {
  background: #e53935;
}

.processing-overlay.error .processing-btn-ok:hover {
  background: #c62828;
}

/* ============================================================
   Dark Theme - Product Cards, Categories, Filters, SweetAlert
   ============================================================ */

/* Product cards */
[data-theme="dark"] .card-produto {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .card-produto:active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .titulo-produto .text-black {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .titulo-produto .text-gray {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .container-adicionar {
  box-shadow: var(--shadow-card) !important;
}

[data-theme="dark"] .container-adicionar:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25) !important;
}

/* Category chips (horizontal & vertical) */
[data-theme="dark"] .btn-categoria {
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .btn-categoria:hover,
[data-theme="dark"] .btn-categoria:active {
  background: #1a237e !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
}

[data-theme="dark"] .btn-categoria.mdl-button--colored {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

/* Filter chips (mesas/comandas) */
[data-theme="dark"] .chip-filtro {
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .chip-filtro.ativo {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

[data-theme="dark"] .chip-aberta.ativo {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

/* Section headers (mesas/comandas) */
[data-theme="dark"] .secao-header:not(:first-child) {
  border-top-color: var(--border-color);
}

[data-theme="dark"] .secao-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

[data-theme="dark"] .secao-vazia {
  color: var(--text-label);
}

/* Tempo filter modal (inline styles need class-based overrides) */
[data-theme="dark"] .tempo-opt {
  background: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--color-primary) !important;
}

[data-theme="dark"] .tempo-opt:hover,
[data-theme="dark"] .tempo-opt.ativo {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

/* Favoritos button */
[data-theme="dark"] .btn-filtro-favoritos {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-label) !important;
}

[data-theme="dark"] .btn-filtro-favoritos.ativo {
  background: #3e2c00 !important;
  color: #f9a825 !important;
  border-color: #f9a825 !important;
}

/* SweetAlert2 - Dark */
[data-theme="dark"] .swal2-popup {
  background: var(--bg-card) !important;
}

[data-theme="dark"] .swal2-title {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .swal2-content,
[data-theme="dark"] #swal2-content,
[data-theme="dark"] .swal2-html-container {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .swal2-popup .btn:not(.btn-success):not(.btn-danger),
[data-theme="dark"] .swal2-styled.swal2-cancel {
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .swal2-container {
  background: rgba(0, 0, 0, 0.7) !important;
}

/* Card config (configuracao, enviar_texto) */
[data-theme="dark"] .card-config {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-card) !important;
}

[data-theme="dark"] .card-config .mdl-card__title {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .card-config .mdl-card__title-text {
  color: var(--color-primary);
}

[data-theme="dark"] .config-label,
[data-theme="dark"] .config-row label {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .config-row select {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .config-nota {
  color: var(--text-label);
}

[data-theme="dark"] .config-divider {
  border-top-color: var(--border-color);
}

[data-theme="dark"] .config-check-row {
  background: var(--bg-surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .config-check-row span {
  color: var(--text-primary);
}

/* Card config body (enviar_texto textarea, impressoras) */
[data-theme="dark"] .card-config-body textarea {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .impressoras-list label {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* Processing overlay dark */
[data-theme="dark"] .processing-card {
  background: var(--processing-card-bg);
}

[data-theme="dark"] .processing-title {
  color: var(--processing-title-color);
}

[data-theme="dark"] .processing-text {
  color: var(--processing-text-color);
}

[data-theme="dark"] .processing-dots span {
  background: var(--processing-dots);
}

/* ── Dark Theme - Modal Categorias (bottom sheet) ── */
[data-theme="dark"] .bottomsheet-handle {
  background: #555;
}

[data-theme="dark"] .modal-categorias-header h5 {
  color: var(--color-primary);
}

[data-theme="dark"] .modal-categorias-close {
  background: var(--bg-surface);
  color: var(--text-secondary);
}

[data-theme="dark"] .modal-cat-chip {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .modal-cat-chip:active {
  background: #1a237e;
}

[data-theme="dark"] .modal-cat-chip.ativo {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ── Dark Theme - Card Detalhe Geral (consumo tab) ── */
[data-theme="dark"] .card-detalhe-geral {
  background: var(--bg-card) !important;
}

[data-theme="dark"] .card-detalhe-geral .mdl-card__title-text {
  color: #ef5350 !important;
}

[data-theme="dark"] .card-detalhe-geral .totalizador {
  color: var(--text-primary);
}

[data-theme="dark"] .card-detalhe-geral .totalizador p {
  color: var(--text-secondary);
}

[data-theme="dark"] .card-detalhe-geral .totalizador hr {
  border-color: var(--border-color);
}

/* ── Dark Theme - Card Consumo action button active ── */
[data-theme="dark"] .card-consumo .btn-opcoes:active {
  background: #1a237e !important;
}

[data-theme="dark"] .card-revisao .btn-opcoes.text-red {
  border-color: #5c2020 !important;
}

/* ── Dark Theme - Input Cliente ── */
[data-theme="dark"] .inpt-cliente {
  border-color: var(--border-color) !important;
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
}