/* ============================================
   Mobile Components - PDV/Comanda Redesign
   Phase 1-4: Bottom Tab, Search, Stepper, etc.
   ============================================ */

/* ── Bottom Tab Bar ──────────────────────── */
.bottom-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1060;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.bottom-tab-bar .tab-bar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-tab-bar .tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px;
  min-width: 64px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  position: relative;
}

.bottom-tab-bar .tab-item .tab-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-tab-bar .tab-item .tab-icon svg {
  width: 22px;
  height: 22px;
}

.bottom-tab-bar .tab-item.active {
  color: var(--primary);
  background: var(--blue-muted);
}

.bottom-tab-bar .tab-item:active {
  background: var(--bg-elevated);
}

.bottom-tab-bar .tab-item .tab-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* ── Search Bar (Mobile-first) ───────────── */
.mobile-search-bar {
  position: relative;
  margin-bottom: var(--mobile-spacing, 16px);
}

.mobile-search-bar .search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 48px 0 48px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-heading);
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mobile-search-bar .search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  outline: none;
}

.mobile-search-bar .search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.mobile-search-bar .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.mobile-search-bar .search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.mobile-search-bar .search-clear:active {
  background: var(--border);
}

.mobile-search-bar .voice-btn {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.mobile-search-bar .voice-btn.listening {
  color: var(--red);
  border-color: var(--red);
  animation: voice-pulse 1.2s ease-in-out infinite;
}

.mobile-search-bar .voice-status {
  position: absolute;
  right: 92px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: var(--red);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.mobile-search-bar .voice-status.active {
  opacity: 1;
}

.mobile-search-bar .search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1055;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  display: none;
}

.mobile-search-bar .search-dropdown.open {
  display: block;
}

.mobile-search-bar .search-dropdown .dropdown-category {
  padding: 8px 16px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  font-weight: 600;
}

.mobile-search-bar .search-dropdown .dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text-body);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.1s;
  min-height: 52px;
}

.mobile-search-bar .search-dropdown .dropdown-item:active,
.mobile-search-bar .search-dropdown .dropdown-item.active {
  background: var(--blue-muted);
  color: var(--text-heading);
}

.mobile-search-bar .search-dropdown .dropdown-item .item-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
}

.mobile-search-bar .search-dropdown .dropdown-item .item-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.mobile-search-bar .search-dropdown .dropdown-item .item-price {
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  font-weight: 600;
}

.mobile-search-bar .search-dropdown .dropdown-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Action Card ─────────────────────────── */
.action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  min-height: 64px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-body);
}

.action-card:active {
  transform: scale(0.97);
  background: var(--bg-elevated);
}

.action-card .action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--blue-muted);
  color: var(--primary);
}

.action-card .action-icon.green { background: var(--green-muted); color: var(--green); }
.action-card .action-icon.red { background: var(--red-muted); color: var(--red); }
.action-card .action-icon.yellow { background: var(--yellow-muted); color: var(--yellow); }
.action-card .action-icon.purple { background: var(--purple-muted); color: var(--purple); }

.action-card .action-text {
  flex: 1;
}

.action-card .action-text .action-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-heading);
}

.action-card .action-text .action-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.action-card .action-arrow {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Quantity Stepper ────────────────────── */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.qty-stepper button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-heading);
  font-size: 18px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: background 0.1s;
  cursor: pointer;
}

.qty-stepper button:active {
  background: var(--primary);
  color: #fff;
}

.qty-stepper .qty-value {
  width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-heading);
}

/* ── Method Card (Pagamento) ─────────────── */
.method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  min-height: 88px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.method-card:active {
  transform: scale(0.97);
}

.method-card.selected {
  border-color: var(--primary);
  background: var(--blue-muted);
}

.method-card .method-icon {
  font-size: 28px;
  line-height: 1;
}

.method-card .method-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary, var(--text-muted));
}

.method-card.selected .method-label {
  color: var(--primary);
  font-weight: 600;
}

/* ── Sub Tabs (Comanda) ──────────────────── */
.sub-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: var(--mobile-spacing, 16px);
}

.sub-tabs .sub-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
}

.sub-tabs .sub-tab:active {
  background: var(--bg-card);
}

.sub-tabs .sub-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sub-tabs .sub-tab svg {
  width: 16px;
  height: 16px;
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
}

/* ── Toast Notifications ─────────────────── */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  width: 100%;
}

.toast-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  color: var(--text-heading);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  backdrop-filter: blur(12px);
  min-height: 48px;
}

.toast-item.toast-success { border-left: 4px solid var(--green); }
.toast-item.toast-error { border-left: 4px solid var(--red); }
.toast-item.toast-info { border-left: 4px solid var(--primary); }

.toast-item .toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.toast-item.toast-success .toast-icon { background: var(--green-muted); color: var(--green); }
.toast-item.toast-error .toast-icon { background: var(--red-muted); color: var(--red); }
.toast-item.toast-info .toast-icon { background: var(--blue-muted); color: var(--primary); }

.toast-item.toast-exiting {
  animation: toastSlideOut 0.25s ease-in forwards;
}

@keyframes toastSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(20px); opacity: 0; }
}

/* ── Mobile Status Bar ───────────────────── */
.mobile-status-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1040;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
}

.mobile-status-bar .status-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-status-bar .status-left {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.mobile-status-bar .status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-status-bar .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.mobile-status-bar .status-chip.open {
  background: var(--green-muted);
  color: var(--green);
}

.mobile-status-bar .status-chip.closed {
  background: var(--red-muted);
  color: var(--red);
}

/* ── Table Map Card (Mobile) ─────────────── */
.table-grid-mobile {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.table-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  min-height: 100px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: var(--text-body);
  position: relative;
  gap: 4px;
}

.table-cell:active {
  transform: scale(0.96);
}

.table-cell .table-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.table-cell .table-info {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.table-cell .table-total {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green);
  margin-top: 2px;
}

.table-cell.available {
  border-color: var(--green);
}

.table-cell.occupied {
  border-color: var(--yellow);
  background: var(--yellow-muted);
}

.table-cell.reserved {
  border-color: var(--primary);
  background: var(--blue-muted);
}

.table-cell .status-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.table-cell.available .status-dot { background: var(--green); }
.table-cell.occupied .status-dot { background: var(--yellow); }
.table-cell.reserved .status-dot { background: var(--primary); }

/* ── Skeleton Loading (Additional) ───────── */
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.skeleton-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.skeleton-lines {
  flex: 1;
}

.skeleton-line {
  height: 12px;
  margin-bottom: 6px;
  border-radius: 4px;
}

.skeleton-line:last-child { width: 60%; margin-bottom: 0; }

/* ── Empty State ─────────────────────────── */
.mobile-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  gap: 12px;
}

.mobile-empty-state .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
}

.mobile-empty-state .empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
}

.mobile-empty-state .empty-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* ============================================
   Responsive: Mobile Overrides
   ============================================ */
@media (max-width: 767px) {
  .bottom-tab-bar {
    display: block;
  }

  .mobile-status-bar {
    display: block;
  }

  body {
    padding-bottom: 70px;
  }

  .navbar {
    display: none !important;
  }

  .toast-container {
    bottom: 80px;
  }
}

@media (min-width: 768px) {
  .bottom-tab-bar {
    display: none !important;
  }

  .mobile-status-bar {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .table-grid-mobile {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .table-cell {
    min-height: 90px;
    padding: 12px 6px;
  }

  .table-cell .table-number {
    font-size: 1.1rem;
  }

  .sub-tabs .sub-tab {
    font-size: 0.75rem;
    padding: 8px 6px;
  }

  .method-card {
    min-height: 80px;
    padding: 16px 8px;
  }
}

/* ── Modal Overrides (Mobile) ─────────────── */
@media (max-width: 767px) {
  .modal-dialog {
    margin: 12px;
    max-width: calc(100vw - 24px);
  }
  .modal-content {
    border-radius: var(--mobile-radius) !important;
  }
  .modal-header {
    padding: 16px 18px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-footer {
    padding: 16px 18px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .modal-footer .btn {
    flex: 1;
    min-width: 120px;
  }

  .transfer-modal .table-option {
    min-height: 48px;
    border-radius: var(--mobile-radius-sm);
    font-weight: 500;
  }
}

@media (max-width: 480px) {
  .transfer-modal .row.g-2 {
    --bs-gutter-y: 0.5rem;
  }
}

/* ── Order Item Card (Compact Mobile) ──── */
.order-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.order-item:last-child {
  border-bottom: none;
}

.order-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.order-item-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-heading);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.order-item-price {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}
.order-item-price strong {
  color: var(--text-heading);
  font-weight: 700;
}

.order-item-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
  padding-right: 4px;
}

.order-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* ── Compact Stepper ───────────────────── */
.order-item-stepper {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 2px;
}
.order-item-stepper button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-heading);
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.order-item-stepper button:active {
  background: var(--primary);
  color: #fff;
}
.order-item-stepper .stepper-value {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-heading);
  padding: 0 2px;
}

/* ── Ghost Remove Button ──────────────── */
.order-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.125rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.order-item-remove:active {
  background: var(--red-muted);
  color: var(--red);
}

/* ── Items Search Compact ─────────────── */
.order-items-search {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Touch devices — transform no :hover (que move o elemento sob o dedo e engole o
   primeiro toque no Chrome Android) fica restrito a dispositivos com mouse real. */
@media (hover: none) and (pointer: coarse) {
  .order-item-remove:hover { background: transparent; color: var(--text-muted); }
  .order-item-stepper button:hover { background: transparent; color: var(--text-heading); }
}

@media (max-width: 480px) {
  .order-item { padding: 8px 0; }
  .order-item-name { font-size: 0.875rem; }
  .order-item-price { font-size: 0.75rem; }
  .order-item-notes { font-size: 0.6875rem; }
  .order-item-stepper button { width: 28px; height: 28px; font-size: 14px; }
  .order-item-stepper .stepper-value { min-width: 24px; font-size: 0.8125rem; }
  .order-item-remove { width: 28px; height: 28px; font-size: 1rem; }
}

/* ============================================================
   BRC Components (aditivos) - F0 do padrao visual
   Nao substitui nada existente; adocao gradual por tela.
   Docs: docs/UI_ANALISE_E_PADRAO_VISUAL.md
   ============================================================ */

/* ---------- Botao ---------- */
.brc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--brc-space-2);
  min-height: var(--brc-touch-min);
  padding: 10px 20px;
  border: none;
  border-radius: var(--brc-radius-md);
  font-size: var(--brc-font-size-md);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.brc-btn:active { transform: scale(0.97); }
.brc-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.brc-btn--primary { background: var(--brc-primary); color: #fff; }
.brc-btn--primary:hover:not(:disabled) { background: var(--brc-primary-hover); }

.brc-btn--success { background: var(--brc-success); color: #fff; }
.brc-btn--danger { background: var(--brc-danger); color: #fff; }

.brc-btn--ghost {
  background: transparent;
  color: var(--brc-text-body);
  border: 1px solid var(--brc-border);
}
.brc-btn--ghost:hover:not(:disabled) { background: var(--brc-bg-elevated); }

.brc-btn--block { display: flex; width: 100%; }
.brc-btn--sm { min-height: 36px; padding: 6px 14px; font-size: var(--brc-font-size-sm); border-radius: var(--brc-radius-sm); }
.brc-btn--lg { min-height: 52px; padding: 14px 28px; font-size: var(--brc-font-size-lg); border-radius: var(--brc-radius-md); }

/* ---------- Card ---------- */
.brc-card {
  background: var(--brc-bg-card);
  border: 1px solid var(--brc-border);
  border-radius: var(--brc-radius-lg);
  padding: var(--brc-space-4);
  box-shadow: var(--brc-shadow-1);
}
.brc-card__title {
  margin: 0 0 var(--brc-space-3);
  font-size: var(--brc-font-size-lg);
  font-weight: 700;
  color: var(--brc-text-heading);
}

/* ---------- Campo de formulario ---------- */
.brc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--brc-space-4); }
.brc-field > label {
  font-size: var(--brc-font-size-sm);
  font-weight: 600;
  color: var(--brc-text-muted);
}
.brc-field input,
.brc-field select,
.brc-field textarea {
  width: 100%;
  min-height: var(--brc-touch-min);
  padding: 10px 14px;
  border: 1px solid var(--brc-border);
  border-radius: var(--brc-radius-md);
  background: var(--brc-bg-input);
  color: var(--brc-text-heading);
  font-size: var(--brc-font-size-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.brc-field input:focus,
.brc-field select:focus,
.brc-field textarea:focus {
  outline: none;
  border-color: var(--brc-border-focus);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.brc-field .brc-field__error { color: var(--brc-danger); font-size: var(--brc-font-size-xs); }

/* ---------- Section title ---------- */
.brc-section-title {
  display: flex;
  align-items: center;
  gap: var(--brc-space-2);
  margin: var(--brc-space-5) 0 var(--brc-space-3);
  font-size: var(--brc-font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brc-text-muted);
}

/* ---------- Bottom sheet (mobile) ----------
   Uso futuro em migracoes: markup
   <div class="brc-sheet-backdrop"></div>
   <div class="brc-sheet"><div class="brc-sheet__handle"></div>...</div>
   Abertura via classe .is-open (JS da tela controla)               */
.brc-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--brc-z-sheet);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.brc-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: calc(var(--brc-z-sheet) + 1);
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--brc-bg-card);
  border-radius: var(--brc-radius-lg) var(--brc-radius-lg) 0 0;
  padding: var(--brc-space-4) var(--brc-space-4) calc(var(--brc-space-5) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--brc-shadow-3);
}
.brc-sheet.is-open { transform: translateY(0); }
.brc-sheet-backdrop.is-open { opacity: 1; visibility: visible; }
.brc-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--brc-border);
  margin: 0 auto var(--brc-space-4);
}
@media (min-width: 768px) {
  .brc-sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 480px;
    max-width: 92vw;
    border-radius: var(--brc-radius-lg);
    transform: translate(-50%, -46%) scale(0.96);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .brc-sheet.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ============================================================
 * BRC Toast (F5 - padrao unico de feedback rapido)
 * Uso: <div class="brc-toast" id="toast">Mensagem</div>
 * JS: el.classList.add('is-open') ... setTimeout remove
 * ============================================================ */
.brc-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 5.5rem);
  transform: translateX(-50%) translateY(8px);
  z-index: 1080;
  max-width: min(92vw, 420px);
  padding: 0.75rem 1.1rem;
  border-radius: var(--brc-radius-md);
  border: 1px solid var(--brc-border);
  background: var(--brc-bg-elevated);
  color: var(--brc-text-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.brc-toast.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.brc-toast.status-available { border-color: rgba(34,197,94,.4); color: #4ADE80; }
.brc-toast.status-occupied { border-color: rgba(245,158,11,.4); color: #FBBF24; }
.brc-toast.status-reserved { border-color: rgba(59,130,246,.4); color: #60A5FA; }
