:root {
  --primary: #b8965c;
  --primary-dark: #9a7a42;
  --primary-light: #f7f0e2;
  --primary-rgb: 184, 150, 92;
  --sidebar-width: 240px;
  --sidebar-bg: #1c1306;
  --sidebar-text: #e2c98a;
  --sidebar-active: #b8965c;

  /* Bootstrap 5 overrides */
  --bs-primary: var(--primary);
  --bs-primary-rgb: var(--primary-rgb);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-dark);
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-focus-shadow-rgb: var(--primary-rgb);
  color: #fff;
}

.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-bg: var(--primary-dark);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand a {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sidebar-nav {
  padding: 1rem 0;
  list-style: none;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav .nav-section {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(199,210,254,.45);
  padding: .75rem 1.5rem .25rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .9rem;
  border-radius: 0;
  transition: background .15s, color .15s;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: #fff;
}

.sidebar-nav a .bi {
  font-size: 1rem;
  width: 1.2rem;
  text-align: center;
}

.sidebar-logo {
  height: 36px;
  width: auto;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
  color: var(--sidebar-text);
}

.sidebar-footer a {
  color: var(--sidebar-text);
  text-decoration: none;
}

.sidebar-footer a:hover { color: #fff; }

/* ── Main layout ── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: #f8fafc;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}

.page-content {
  padding: 1.75rem 2rem;
}

/* ── Stat cards ── */
.stat-card {
  background: #fff;
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-label { font-size: .8rem; color: #64748b; margin-bottom: .15rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: #1e293b; line-height: 1; }

/* ── Badges de estado ── */
.badge-pendiente  { background: #fef3c7; color: #92400e; }
.badge-confirmado { background: #dbeafe; color: #1e40af; }
.badge-completado { background: #d1fae5; color: #065f46; }
.badge-cancelado  { background: #fee2e2; color: #991b1b; }
.badge-ausente    { background: #f1f5f9; color: #475569; }

/* ── Calendario ── */
#calendar { background: #fff; border-radius: .75rem; padding: 1rem; border: 1px solid #e2e8f0; }

/* ── POS ── */
.pos-item { border-bottom: 1px solid #f1f5f9; }
.pos-total { background: var(--primary-light); border-radius: .5rem; }

/* ── Stock bajo ── */
.stock-bajo { color: #dc2626; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
}

/* ── Landing pública ── */
.landing-hero {
  background: linear-gradient(135deg, #1c1306 0%, var(--primary) 100%);
  color: #fff;
  padding: 5rem 0 4rem;
}

.precio-card {
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  transition: border-color .2s, box-shadow .2s;
}

.precio-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb),.25);
}
