/* =========================================================
   RestoGestión PY — Estilos personalizados
   Paleta cálida (terracota) sin dependencias extra.
   ========================================================= */
:root {
  --brand: #9a3412;
  --brand-dark: #7c2d12;
  --brand-soft: #fff7ed;
}

.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}
.btn-outline-brand {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand);
  --bs-btn-active-border-color: var(--brand);
}
.bg-brand  { background-color: var(--brand) !important; }
.text-brand{ color: var(--brand) !important; }
.border-brand { border-color: var(--brand) !important; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.nav-pills .nav-link.active { background-color: var(--brand); }
.page-link { color: var(--brand); }
.page-item.active .page-link { background-color: var(--brand); border-color: var(--brand); }
.navbar-brand img { border-radius: 6px; }

/* Navegación con teclado (TAB) visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #d97706 !important;
  outline-offset: 2px;
}

/* ---------- Barra de pestañas (TAB) del módulo ---------- */
.tabstrip-wrap { position: relative; z-index: 1020; }
.tabstrip {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 0;
  scrollbar-width: thin;
}
.tabstrip .nav-link {
  white-space: nowrap;
  color: #57534e;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: .65rem .95rem;
  font-size: .925rem;
}
.tabstrip .nav-link:hover { color: var(--brand); border-bottom-color: #d6d3d1; }
.tabstrip .nav-link.active {
  color: var(--brand);
  font-weight: 600;
  background: transparent;
  border-bottom-color: var(--brand);
}
.tabstrip::-webkit-scrollbar { height: 6px; }
.tabstrip::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 3px; }

/* Inputs con separador de miles mientras se escribe (.js-miles) */
.js-miles { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Chat interno ---------- */
.chat-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1055;
  border-radius: 50%; width: 3.5rem; height: 3.5rem; padding: 0;
}
.chat-badge { position: absolute; top: -6px; right: -6px; }
.chat-panel {
  display: none;
  position: fixed; right: 1rem; bottom: 5.25rem; z-index: 1055;
  width: min(22rem, calc(100vw - 2rem));
  height: min(30rem, calc(100vh - 7rem));
}
.chat-panel.chat-open { display: flex; flex-direction: column; }
.chat-inline .chat-panel {
  display: flex; flex-direction: column;
  position: static; width: 100%; height: auto; max-height: 70vh;
}
.chat-mensajes { flex: 1; overflow-y: auto; background: #faf7f5; min-height: 200px; }
.chat-msg { margin-bottom: .5rem; max-width: 85%; }
.chat-msg.mine { margin-left: auto; text-align: right; }
.chat-burbuja {
  background: #fff; border: 1px solid #e7e0dc; border-radius: 1rem;
  padding: .4rem .65rem; font-size: .875rem; display: inline-block; text-align: left;
}
.chat-msg.mine .chat-burbuja { background: var(--brand); color: #fff; border-color: var(--brand); }
.chat-autor { font-size: .7rem; color: #8a7f79; display: block; }
.chat-hora  { font-size: .68rem; color: #a09690; }

/* ---------- Componentes propios ---------- */
.mesa-card { cursor: pointer; transition: transform .08s ease; }
.mesa-card:hover { transform: translateY(-2px); }
.lista-scroll { max-height: 420px; overflow-y: auto; }
.producto-img {
  width: 100%; height: 140px; object-fit: cover; border-radius: .5rem; background: var(--brand-soft);
}
.producto-icono {
  width: 100%; height: 140px; border-radius: .5rem; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 3rem;
}
.stat-card .stat-valor { font-size: 1.6rem; font-weight: 700; }
.kbd-demo { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 .3rem; }

/* ---------- Impresión ---------- */
@media print {
  .navbar, footer, .chat-fab, .chat-panel, .no-print, .btn, .alert { display: none !important; }
  main { padding: 0 !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  body { background: #fff !important; }
}
