/* Boca de Expendio v2 – UI base (unificación inicial)
   Versión: 20260211_2
*/

:root {
  --brand-primary: #7A0C0C;
  --brand-primary-dark: #5E0909;

  --bg-app: #F6F7F8;
  --bg-card: #FFFFFF;

  --border-soft: #E2E4E7;

  --text-main: #1F2933;
  --text-muted: #6B7280;

  --success: #2E7D32;
  --warning: #C77800;
  --error: #B71C1C;
  --info: #1565C0;

  /* Header */
  --header-bg: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  --header-shadow: 0 10px 20px rgba(2, 6, 23, .10);
}

* { box-sizing: border-box; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  padding-top: var(--header-h, 86px);
}

a{ color: inherit; }

/* =========================
   Header (header-*.html)
   ========================= */
header.be2-header{
  left: 0; right: 0; width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  color: #fff;
  padding: 14px 22px;
  box-shadow: var(--header-shadow);
}

header.be2-header .hWrap{
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header.be2-header .hLeft{ min-width: 0; }

header.be2-header .hTitle{
  font-weight: 800;
  font-size: 24px;
  letter-spacing: .2px;
  line-height: 1.1;
  margin: 0;
}

header.be2-header .hRow{
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

header.be2-header .chip{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.15);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  max-width: 100%;
  white-space: nowrap;
  color: #fff;
}

header.be2-header .chip .k,
header.be2-header .chip .v{ color: #fff; }

header.be2-header .chip .k{ opacity: .9; font-weight: 700; }
header.be2-header .chip .v{ font-weight: 800; }

header.be2-header .hActions{
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

header.be2-header .btnTop{
  appearance: none;
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
  color: var(--brand-primary);
  box-shadow: 0 10px 20px rgba(2,6,23,.18);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
}

/* =========================
   Layout + componentes básicos
   ========================= */
.be2-wrap{
  max-width: 980px;
  margin: 18px auto;
  padding: 0 16px;
}

.be2-card{
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(2,6,23,.06);
}

.be2-muted{
  color: var(--text-muted);
  font-size: 12px;
}

.be2-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media(min-width: 860px){
  .be2-grid{ grid-template-columns: 1fr 1fr; }
}

.be2-link{
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 750;
}

.be2-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 850;
  font-size: 14px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(122,12,12,.25);
}
.be2-btn:hover{ background: var(--brand-primary-dark); }

.be2-btn.secondary{
  background: #EEF2F7;
  color: var(--text-main);
  box-shadow: none;
  border: 1px solid var(--border-soft);
}
.be2-btn.secondary:hover{ background: #E5E9F0; }

.be2-btn.small{
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.be2-disabled{
  pointer-events: none !important;
  opacity: .55 !important;
}

/* =========================
   Toasts (opt-in)
   ========================= */
.toastHost{
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
}

.toast{
  pointer-events: auto;
  min-width: 280px;
  max-width: 440px;
  border-radius: 16px;
  padding: 12px 12px;
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 24px rgba(2,6,23,.14);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: toastIn .16s ease-out;
}

@keyframes toastIn{
  from{ transform: translateY(8px); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}

.toast .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 4px;
  background: var(--info);
  flex: 0 0 auto;
}

.toast.ok .dot{ background: var(--success); }
.toast.warn .dot{ background: var(--warning); }
.toast.err .dot{ background: var(--error); }

.toast .title{ font-weight: 950; font-size: 13px; }
.toast .body{
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: pre-wrap;
}