@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --naranja: #E8521A;
  --naranja-oscuro: #C43D0D;
  --crema: #FDF6EC;
  --cafe: #2C1A0E;
  --cafe-medio: #5C3D2E;
  --dorado: #D4A017;
  --verde: #2D6A4F;
  --rojo: #C0392B;
  --gris: #F4F0EB;
  --blanco: #FFFFFF;
  --sombra: 0 4px 24px rgba(44,26,14,0.10);
  --sombra-fuerte: 0 8px 40px rgba(44,26,14,0.18);
  --radio: 16px;
  --radio-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--crema);
  color: var(--cafe);
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

a { text-decoration: none; color: inherit; }

/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: rgba(253,246,236,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(44,26,14,0.08);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 900;
  color: var(--naranja);
  letter-spacing: -0.5px;
}

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--cafe-medio);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--naranja); }

.nav-actions { display: flex; gap: 12px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s;
}
.btn-primary { background: var(--naranja); color: white; }
.btn-primary:hover { background: var(--naranja-oscuro); transform: translateY(-1px); box-shadow: var(--sombra); }
.btn-outline { background: transparent; color: var(--cafe); border: 1.5px solid rgba(44,26,14,0.2); }
.btn-outline:hover { border-color: var(--naranja); color: var(--naranja); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-verde { background: var(--verde); color: white; }
.btn-verde:hover { background: #1e4d38; transform: translateY(-1px); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 5% 60px;
  background: var(--crema);
  position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; right: -100px; top: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,82,26,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content { max-width: 560px; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,82,26,0.1); color: var(--naranja);
  padding: 6px 14px; border-radius: 50px;
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.1; color: var(--cafe);
  margin-bottom: 20px;
}

.hero h1 span { color: var(--naranja); }

.hero p {
  font-size: 1.05rem; color: var(--cafe-medio);
  line-height: 1.7; margin-bottom: 36px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-img {
  position: absolute; right: 5%; top: 50%;
  transform: translateY(-50%);
  width: 480px; height: 480px;
  background: rgba(232,82,26,0.06);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12rem;
}

/* ── SECCIONES ── */
section { padding: 80px 5%; }

.section-label {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--naranja);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--cafe); margin-bottom: 48px;
}

/* ── PRODUCTOS GRID ── */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.producto-card {
  background: white; border-radius: var(--radio);
  overflow: hidden; box-shadow: var(--sombra);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.producto-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-fuerte); }

.producto-img {
  width: 100%; height: 200px; object-fit: cover;
  background: var(--gris);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}

.producto-info { padding: 18px 20px; }

.producto-nombre {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-weight: 700;
  color: var(--cafe); margin-bottom: 6px;
}

.producto-desc {
  font-size: 0.85rem; color: var(--cafe-medio);
  line-height: 1.5; margin-bottom: 14px;
}

.producto-footer {
  display: flex; align-items: center; justify-content: space-between;
}

.producto-precio {
  font-size: 1.2rem; font-weight: 700; color: var(--naranja);
}

.btn-add {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--naranja); color: white;
  border: none; font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-add:hover { background: var(--naranja-oscuro); transform: scale(1.1); }

/* ── CARRITO FLOTANTE ── */
.carrito-btn {
  position: fixed; bottom: 30px; right: 30px; z-index: 900;
  background: var(--naranja); color: white;
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(232,82,26,0.4);
  transition: all 0.2s; border: none;
}
.carrito-btn:hover { transform: scale(1.1); }

.carrito-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--cafe); color: white;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── MODAL CARRITO ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(44,26,14,0.5);
  display: none; align-items: flex-end; justify-content: flex-end;
}
.modal-overlay.active { display: flex; }

.carrito-panel {
  background: white; width: 420px; height: 100vh;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.carrito-header {
  padding: 24px; border-bottom: 1px solid var(--gris);
  display: flex; align-items: center; justify-content: space-between;
}

.carrito-header h2 { font-size: 1.3rem; }

.close-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gris); border: none; cursor: pointer;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
}

.carrito-items { flex: 1; overflow-y: auto; padding: 20px 24px; }

.carrito-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--gris);
}

.carrito-item-emoji { font-size: 2.5rem; }

.carrito-item-info { flex: 1; }
.carrito-item-nombre { font-weight: 600; font-size: 0.95rem; }
.carrito-item-precio { font-size: 0.85rem; color: var(--naranja); font-weight: 600; }

.qty-controls { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gris); border: none; cursor: pointer;
  font-size: 1rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.qty-num { font-weight: 600; min-width: 20px; text-align: center; }

.carrito-footer { padding: 20px 24px; border-top: 1px solid var(--gris); }

.carrito-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.carrito-total span:first-child { font-size: 0.95rem; color: var(--cafe-medio); }
.carrito-total span:last-child { font-size: 1.4rem; font-weight: 700; color: var(--cafe); }

/* ── CHECKOUT ── */
.checkout-container {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 400px; gap: 40px;
  padding: 100px 5% 60px;
}

.form-card {
  background: white; border-radius: var(--radio);
  padding: 32px; box-shadow: var(--sombra);
}

.form-card h2 { font-size: 1.5rem; margin-bottom: 28px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--cafe-medio); margin-bottom: 8px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid rgba(44,26,14,0.12);
  border-radius: var(--radio-sm);
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
  color: var(--cafe); background: var(--crema);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--naranja);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pago-metodos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }

.pago-opcion {
  border: 2px solid rgba(44,26,14,0.12);
  border-radius: var(--radio-sm);
  padding: 16px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: all 0.2s; text-align: center;
}
.pago-opcion:hover { border-color: var(--naranja); }
.pago-opcion.activo { border-color: var(--naranja); background: rgba(232,82,26,0.05); }
.pago-opcion .icono { font-size: 2rem; }
.pago-opcion .nombre { font-size: 0.88rem; font-weight: 600; }

.resumen-card {
  background: white; border-radius: var(--radio);
  padding: 28px; box-shadow: var(--sombra);
  position: sticky; top: 90px; height: fit-content;
}

.resumen-card h3 { font-size: 1.2rem; margin-bottom: 20px; }

.resumen-item {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--gris);
  font-size: 0.9rem;
}
.resumen-item:last-of-type { border-bottom: none; }

.resumen-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 16px;
  border-top: 2px solid var(--cafe);
}
.resumen-total span:first-child { font-weight: 700; }
.resumen-total span:last-child { font-size: 1.5rem; font-weight: 700; color: var(--naranja); }

/* ── LOGIN ── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--cafe);
  padding: 20px;
}

.login-card {
  background: white; border-radius: 24px;
  padding: 48px 40px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  text-align: center; margin-bottom: 32px;
}
.login-logo h1 { color: var(--naranja); font-size: 1.8rem; }
.login-logo p { color: var(--cafe-medio); font-size: 0.9rem; margin-top: 4px; }

.role-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 28px;
}

.role-tab {
  padding: 8px 4px; border-radius: 8px;
  background: var(--gris); border: 2px solid transparent;
  cursor: pointer; text-align: center; font-size: 0.72rem;
  font-weight: 600; color: var(--cafe-medio); transition: all 0.2s;
}
.role-tab .role-icon { font-size: 1.4rem; display: block; margin-bottom: 3px; }
.role-tab.activo { border-color: var(--naranja); background: rgba(232,82,26,0.07); color: var(--naranja); }

/* ── DASHBOARD ADMIN ── */
.dashboard {
  display: flex; min-height: 100vh;
}

.sidebar {
  width: 260px; background: var(--cafe);
  padding: 24px 0; flex-shrink: 0;
  display: flex; flex-direction: column;
}

.sidebar-logo {
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; color: white; font-weight: 900;
}
.sidebar-logo span { color: var(--naranja); }

.sidebar-menu { padding: 20px 0; flex: 1; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; color: rgba(255,255,255,0.6);
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s; border-left: 3px solid transparent;
}
.sidebar-item:hover { color: white; background: rgba(255,255,255,0.05); }
.sidebar-item.activo { color: white; border-left-color: var(--naranja); background: rgba(232,82,26,0.1); }
.sidebar-item .icon { font-size: 1.1rem; width: 20px; }

.sidebar-role {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); font-size: 0.8rem;
}
.sidebar-role strong { color: white; display: block; margin-bottom: 2px; }

.main-content { flex: 1; background: var(--gris); overflow-y: auto; }

.main-header {
  background: white; padding: 20px 32px;
  border-bottom: 1px solid rgba(44,26,14,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.main-header h1 { font-size: 1.4rem; }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; padding: 28px 32px 0;
}

.stat-card {
  background: white; border-radius: var(--radio);
  padding: 22px 24px; box-shadow: var(--sombra);
}
.stat-label { font-size: 0.8rem; color: var(--cafe-medio); font-weight: 500; margin-bottom: 8px; }
.stat-valor { font-size: 2rem; font-weight: 700; color: var(--cafe); }
.stat-sub { font-size: 0.78rem; color: var(--verde); margin-top: 4px; }

.pedidos-section { padding: 28px 32px; }
.pedidos-section h2 { font-size: 1.2rem; margin-bottom: 20px; }

.pedido-card {
  background: white; border-radius: var(--radio);
  padding: 20px 24px; margin-bottom: 14px;
  box-shadow: var(--sombra);
  display: flex; align-items: center; gap: 20px;
  transition: box-shadow 0.2s;
}
.pedido-card:hover { box-shadow: var(--sombra-fuerte); }

.pedido-num { font-size: 0.8rem; color: var(--cafe-medio); }
.pedido-nombre { font-weight: 700; font-size: 1rem; }
.pedido-items { font-size: 0.85rem; color: var(--cafe-medio); margin-top: 2px; }

.pedido-info { flex: 1; }
.pedido-monto { font-size: 1.1rem; font-weight: 700; color: var(--naranja); }
.pedido-pago { font-size: 0.78rem; color: var(--cafe-medio); }

.badge {
  padding: 5px 12px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-nuevo { background: rgba(232,82,26,0.1); color: var(--naranja); }
.badge-cocinando { background: rgba(212,160,23,0.15); color: #A07010; }
.badge-listo { background: rgba(45,106,79,0.1); color: var(--verde); }
.badge-camino { background: rgba(41,128,185,0.1); color: #2980B9; }
.badge-entregado { background: rgba(44,26,14,0.08); color: var(--cafe-medio); }

.pedido-acciones { display: flex; gap: 8px; }

/* ── NOTIFICACION ── */
.notif {
  position: fixed; top: 80px; right: 20px; z-index: 3000;
  background: var(--cafe); color: white;
  padding: 14px 20px; border-radius: 12px;
  font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--sombra-fuerte);
  transform: translateX(120%); transition: transform 0.3s;
  max-width: 300px;
}
.notif.show { transform: translateX(0); }

/* ── FOOTER ── */
footer {
  background: var(--cafe); color: rgba(255,255,255,0.7);
  padding: 48px 5% 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand h3 { color: var(--naranja); font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; }
.footer-col h4 { color: white; font-size: 0.9rem; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.85rem; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--naranja); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.82rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-img { display: none; }
  .checkout-container { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .sidebar { width: 200px; }
}

@media (max-width: 600px) {
  .carrito-panel { width: 100vw; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .role-tabs { grid-template-columns: repeat(2,1fr); }
  .dashboard { flex-direction: column; }
  .sidebar { width: 100%; height: auto; }
}


/* ═══════════════════════════════════════════════════════
   V2 · PANEL DE CLIENTE, RESEÑAS, PAGO RESTRINGIDO, ADMIN
   ═══════════════════════════════════════════════════════ */

/* ── Estados nuevos ── */
.badge-esperando_pago { background: rgba(142,68,173,0.13); color: #7B3FA0; }
.badge-cancelado      { background: rgba(192,57,43,0.12);  color: #C0392B; }

/* ── Botón extra ── */
.btn-morado { background: #8E44AD; color: white; }
.btn-morado:hover { background: #703688; transform: translateY(-1px); }
.btn-peligro { background: rgba(192,57,43,0.1); color: #C0392B; border: 1.5px solid rgba(192,57,43,0.25); }
.btn-peligro:hover { background: #C0392B; color: white; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }

/* ── Aviso de pago restringido (checkout y panel cliente) ── */
.aviso-pago {
  background: #FFF1C9; border-left: 5px solid #F2C21B; color: #7A5C00;
  border-radius: 14px; padding: 16px 18px; margin: 0 0 18px; font-size: 0.95rem; line-height: 1.6;
}
.aviso-pago strong { color: #6B4F00; }
.aviso-pago .progreso { margin-top: 8px; font-size: 0.88rem; }
.aviso-barra { height: 8px; border-radius: 8px; background: rgba(122,92,0,0.15); margin-top: 8px; overflow: hidden; }
.aviso-barra > span { display: block; height: 100%; background: #D68910; border-radius: 8px; transition: width .4s; }

.pago-opcion { position: relative; }
.pago-opcion.bloqueado { opacity: .5; cursor: not-allowed; background: rgba(44,26,14,0.03); }
.pago-opcion.bloqueado:hover { border-color: rgba(44,26,14,0.12); }
.pago-opcion .candado {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(232,82,26,0.22); display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}

/* ═══ PANEL DEL CLIENTE ═══ */
.cli-header { background: white; padding: 22px 40px; border-bottom: 1px solid rgba(44,26,14,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cli-header h1 { font-size: 1.7rem; display: flex; align-items: center; gap: 12px; }
.cli-body { padding: 0 40px 48px; }

.cli-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 36px 0 28px; }
.cli-stat {
  background: #FAF7F2; border-radius: 22px; border-top: 3px solid var(--c, var(--naranja));
  text-align: center; padding: 26px 12px 24px; box-shadow: var(--sombra);
}
.cli-stat .lbl { font-size: 0.9rem; color: var(--cafe-medio); margin-bottom: 10px; }
.cli-stat .val { font-size: 2.4rem; font-weight: 600; color: var(--cafe); line-height: 1.1; }

.cli-card {
  position: relative; overflow: hidden; background: #FAF7F2; border-radius: 22px;
  border-left: 6px solid var(--c, var(--naranja)); box-shadow: var(--sombra);
  padding: 28px 90px 28px 30px; margin-bottom: 20px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px 28px; align-items: center;
  transition: transform .2s, box-shadow .2s;
}
.cli-card:hover { transform: translateY(-2px); box-shadow: var(--sombra-fuerte); }
.cli-card.activo-estado { background: linear-gradient(90deg, rgba(52,152,219,0.08), #FAF7F2 60%); }
.cli-acciones { display: flex; flex-direction: column; gap: 10px; }
.btn-detalle { background: var(--naranja); color: white; padding: 14px 26px; border-radius: 50px; border: none;
  font-weight: 700; font-size: 0.95rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif; transition: all .2s; white-space: nowrap; }
.btn-detalle:hover { background: var(--naranja-oscuro); }
.btn-cancelar-cli { background: transparent; color: #C0392B; border: 1.5px solid rgba(192,57,43,0.35);
  padding: 9px 22px; border-radius: 50px; font-weight: 600; font-size: 0.85rem; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all .2s; white-space: nowrap; }
.btn-cancelar-cli:hover { background: #C0392B; color: white; }

.cli-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cli-num { font-family: 'Playfair Display', serif; font-size: 1.45rem; font-weight: 700; }
.cli-num small { font-size: .9rem; color: var(--cafe-medio); font-weight: 400; }
.cli-monto { font-size: 1.6rem; font-weight: 700; color: var(--naranja); }
.cli-fecha { font-size: 0.85rem; color: var(--cafe-medio); margin-top: 6px; }
.cli-msg { font-size: 0.95rem; color: var(--cafe-medio); margin-top: 10px; }
.cli-dir { font-size: 1rem; color: var(--cafe-medio); max-width: 220px; text-align: left; }

.chip-estado { padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 700; white-space: nowrap;
  background: var(--chip-bg); color: var(--chip-fg); }

.cli-ribbon {
  position: absolute; top: 24px; right: -48px; width: 190px; text-align: center; transform: rotate(45deg);
  padding: 6px 0; font-size: 0.66rem; font-weight: 800; letter-spacing: 1.2px; color: white;
  background: var(--c, #3498DB); box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* colores por estado (variables) */
.est-esperando_pago { --c:#8E44AD; --chip-bg:rgba(142,68,173,.14); --chip-fg:#7B3FA0; }
.est-nuevo          { --c:#3498DB; --chip-bg:rgba(52,152,219,.16); --chip-fg:#2E86C1; }
.est-cocinando      { --c:#D4A017; --chip-bg:rgba(212,160,23,.18); --chip-fg:#9A7210; }
.est-listo          { --c:#2D6A4F; --chip-bg:rgba(45,106,79,.14);  --chip-fg:#2D6A4F; }
.est-camino         { --c:#2980B9; --chip-bg:rgba(41,128,185,.16); --chip-fg:#2471A3; }
.est-entregado      { --c:#95A5A6; --chip-bg:rgba(46,204,113,.2);  --chip-fg:#239B56; }
.est-cancelado      { --c:#C0392B; --chip-bg:rgba(192,57,43,.14);  --chip-fg:#C0392B; }

.cli-vacio { text-align: center; padding: 60px 20px; color: #999; }
.cli-vacio .emoji { font-size: 3.4rem; }

/* ── Panel de detalle (cajón lateral) ── */
.drawer-fondo { position: fixed; inset: 0; z-index: 3500; background: rgba(44,26,14,0.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-fondo.abierto { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); z-index: 3600; background: #F4F0EB;
  box-shadow: -10px 0 40px rgba(0,0,0,.25); transform: translateX(105%); transition: transform .3s ease; overflow-y: auto; padding: 28px 28px 40px; }
.drawer.abierto { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.drawer-head h2 { font-size: 1.6rem; }
.drawer-cerrar { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--cafe); line-height: 1; padding: 4px 10px; }
.dato-fila { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 1rem; color: var(--cafe-medio); }
.dato-fila b { color: var(--cafe); text-align: right; }
.det-items { background: white; border-radius: 16px; padding: 12px 18px; margin: 16px 0 6px; }
.det-item { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--gris); font-size: .92rem; }
.det-item:last-child { border-bottom: none; }
.det-total { display: flex; justify-content: space-between; padding: 10px 4px 0; font-weight: 700; font-size: 1.05rem; }
.det-total span:last-child { color: var(--naranja); }
.progreso-titulo { text-align: center; font-size: .82rem; letter-spacing: 2px; color: var(--cafe-medio); margin: 26px 0 16px; text-transform: uppercase; }

.paso { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 16px; margin-bottom: 12px;
  border-left: 5px solid transparent; background: rgba(255,255,255,.65); }
.paso .ico { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: white; background: #BDB5AB; }
.paso .txt { flex: 1; }
.paso .txt b { display: block; font-size: 1.05rem; color: var(--cafe); }
.paso .txt span { font-size: .85rem; color: var(--cafe-medio); }
.paso .estado { font-size: .85rem; font-weight: 700; white-space: nowrap; color: #9a9187; }
.paso.hecho { background: #E0EBDD; border-left-color: var(--verde); }
.paso.hecho .ico { background: linear-gradient(135deg, #4CC38A, #2E9E5B); }
.paso.hecho .estado { color: var(--verde); }
.paso.actual { background: #FBE3D6; border-left-color: var(--naranja); }
.paso.actual .ico { background: radial-gradient(circle at 35% 30%, #FFB27A, var(--naranja)); border-radius: 50%; }
.paso.actual .estado { color: var(--naranja); }
.paso.actual { animation: pulso 2s ease-in-out infinite; }
@keyframes pulso { 50% { box-shadow: 0 0 0 5px rgba(232,82,26,.12); } }
.paso.cancelado { background: #EBD8D0; border-left-color: var(--naranja); animation: none; }
.paso.cancelado .txt b, .paso.cancelado .estado { color: var(--naranja); }
.nota-cancelar { font-size: .85rem; color: var(--cafe-medio); text-align: center; margin: 18px 0 10px; }

/* ── Ventanas (calificar / confirmar) ── */
.vent-fondo { position: fixed; inset: 0; z-index: 4000; background: rgba(44,26,14,0.72); display: none;
  align-items: center; justify-content: center; padding: 20px; }
.vent-fondo.abierto { display: flex; }
.vent { background: white; border-radius: 28px; width: min(600px, 100%); max-height: 94vh; overflow-y: auto;
  padding: 34px 36px; box-shadow: 0 24px 70px rgba(0,0,0,.35); animation: subir .25s ease; text-align: center; }
@keyframes subir { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.vent .estrella { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.vent h3 { font-size: 1.6rem; margin-bottom: 4px; }
.vent .sub { color: var(--cafe-medio); font-size: 1rem; margin-bottom: 22px; }
.vent .sub b { color: var(--cafe); }
.vent .preg { font-weight: 700; margin: 14px 0 12px; font-size: 1rem; }
.cal-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.cal-op { border: 2px solid rgba(44,26,14,.1); background: white; border-radius: 18px; padding: 16px 10px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: all .15s; }
.cal-op .est { font-size: .8rem; letter-spacing: -2px; }
.cal-op.bueno { color: #27AE60; } .cal-op.malo { color: #E67E22; }
.cal-op:hover { transform: translateY(-1px); }
.cal-op.sel.bueno { border-color: #27AE60; background: rgba(39,174,96,.1); }
.cal-op.sel.malo  { border-color: #E67E22; background: rgba(230,126,34,.12); }
.si-no { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 10px 14px;
  background: var(--gris); border-radius: 14px; margin-bottom: 8px; font-size: .92rem; }
.si-no .par { display: flex; gap: 6px; flex-shrink: 0; }
.si-no button { border: 1.5px solid rgba(44,26,14,.15); background: white; border-radius: 50px; padding: 6px 16px; cursor: pointer;
  font-weight: 700; font-size: .82rem; font-family: 'DM Sans', sans-serif; color: var(--cafe-medio); }
.si-no button.sel.si { background: var(--verde); color: white; border-color: var(--verde); }
.si-no button.sel.no { background: #C0392B; color: white; border-color: #C0392B; }
.vent textarea { width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid transparent;
  background: var(--gris); font-family: 'DM Sans', sans-serif; font-size: .95rem; resize: vertical; min-height: 70px; outline: none; }
.vent textarea:focus { border-color: var(--naranja); }
.vent-botones { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; margin-top: 22px; }
.vent-botones .btn { justify-content: center; padding: 14px 20px; font-size: 1rem; }

/* ═══ PANEL ADMIN (V2) ═══ */
.chips-filtro { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chip-f { padding: 9px 18px; border-radius: 50px; border: 1.5px solid rgba(44,26,14,0.18); background: transparent;
  font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 600; color: var(--cafe); cursor: pointer; transition: all .15s; }
.chip-f:hover { border-color: var(--naranja); }
.chip-f.activo { border: 2px solid var(--cafe); background: white; }
.sec-titulo-fila { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-titulo-fila h2 { margin: 0 !important; }

.adm-card { background: white; border-radius: 18px; padding: 22px 28px; margin-bottom: 16px; box-shadow: var(--sombra);
  border-left: 5px solid var(--c, var(--naranja)); display: grid; grid-template-columns: 1.3fr .6fr 1fr; gap: 20px; align-items: start; }
.adm-card .t { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.adm-card .l { font-size: .9rem; color: var(--cafe-medio); margin-top: 3px; }
.adm-card .monto { font-size: 1.15rem; font-weight: 700; }
.adm-card .pago { font-size: .82rem; font-weight: 700; color: var(--naranja); margin-top: 6px; letter-spacing: .5px; text-transform: uppercase; }
.adm-card .acc { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.adm-card .acc .btn { padding: 9px 18px; font-size: .85rem; }
.estado-pill { padding: 5px 14px; border-radius: 50px; font-size: .72rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  background: var(--chip-bg); color: var(--chip-fg); display: inline-block; }
.cli-flag { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--gris); color: var(--cafe-medio); display: inline-block; }
.cli-flag.malo { background: rgba(192,57,43,.1); color: #C0392B; }
.cli-flag.bueno { background: rgba(39,174,96,.12); color: #1E8449; }

.stat-card.stat-sm .stat-valor { font-size: 2.2rem; }
.stat-card .stat-valor.c-verde { color: #27AE60; } .stat-card .stat-valor.c-naranja { color: #E67E22; }
.stat-card .stat-valor.c-rojo { color: #C0392B; } .stat-card .stat-valor.c-morado { color: #8E44AD; }

.cal-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; padding: 28px 32px 0; }
.cal-stat { background: white; border-radius: 18px; padding: 20px 22px; box-shadow: var(--sombra); text-align: center; border-top: 4px solid var(--c, var(--naranja)); }
.cal-stat .val { font-size: 2.2rem; font-weight: 700; color: var(--c, var(--cafe)); }
.cal-stat .lbl { font-size: .85rem; color: var(--cafe-medio); margin-top: 4px; }
.cal-barra { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 24px 32px 0; }
.buscador { padding: 11px 18px; border-radius: 50px; border: 1.5px solid rgba(44,26,14,.15); background: white; min-width: 240px;
  font-family: 'DM Sans', sans-serif; font-size: .9rem; outline: none; }
.buscador:focus { border-color: var(--naranja); }
.tabla-wrap { margin: 20px 32px 32px; background: white; border-radius: 18px; box-shadow: var(--sombra); overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; min-width: 760px; }
.tabla th { text-align: left; font-size: .72rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cafe-medio);
  background: #EFE9E1; padding: 16px 18px; }
.tabla td { padding: 14px 18px; border-bottom: 1px solid var(--gris); font-size: .9rem; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: none; }
.tabla .sub { font-size: .78rem; color: #8a7d72; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: .78rem; font-weight: 700; }
.pill.buena { background: rgba(39,174,96,.14); color: #1E8449; }
.pill.mala { background: rgba(192,57,43,.12); color: #C0392B; }
.pill.sin { background: var(--gris); color: #8a7d72; }
.pill.rojo { background: rgba(192,57,43,.12); color: #C0392B; }
.pill.verde { background: rgba(39,174,96,.14); color: #1E8449; }
.pill.gris { background: var(--gris); color: var(--cafe-medio); }
.vacio-fila { text-align: center; padding: 48px 20px !important; color: #999; font-size: 1rem !important; }

/* Reportes */
.rep-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; padding: 28px 32px; }
.rep-card { background: white; border-radius: 18px; padding: 22px 24px; box-shadow: var(--sombra); }
.rep-card h3 { font-size: 1.1rem; margin-bottom: 16px; }
.barras { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.barra-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.barra { width: 100%; max-width: 46px; background: var(--naranja); border-radius: 8px 8px 0 0; min-height: 3px; }
.barra-col small { font-size: .7rem; color: var(--cafe-medio); white-space: nowrap; }
.barra-col .v { font-size: .72rem; font-weight: 700; }
.lista-simple .fila { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--gris); font-size: .92rem; }
.lista-simple .fila:last-child { border-bottom: none; }

/* Selector de rol en sesión: enlace de panel */
.nav-link-panel { font-size: .85rem; font-weight: 600; color: var(--naranja); }

/* ── Responsive V2 ── */
@media (max-width: 900px) {
  .cli-stats { grid-template-columns: repeat(2, 1fr); }
  .cli-card { grid-template-columns: 1fr; padding: 26px 24px 24px 26px; }
  .cli-dir { max-width: none; }
  .cli-header, .cli-body { padding-left: 20px; padding-right: 20px; }
  .adm-card { grid-template-columns: 1fr; }
  .rep-grid { grid-template-columns: 1fr; }
  .cal-stats, .cal-barra, .rep-grid { padding-left: 16px; padding-right: 16px; }
  .tabla-wrap { margin-left: 16px; margin-right: 16px; }
  .chips-filtro { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .vent { padding: 26px 20px; }
  .cal-ops { grid-template-columns: 1fr 1fr; }
  .cli-stat .val { font-size: 1.9rem; }
  .cli-ribbon { display: none; }
  .cli-card { padding-right: 24px; }
}

/* El aviso emergente oculto ya no asoma en el borde de la pantalla */
.notif { opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s; }
.notif.show { opacity: 1; }

/* ── VENTANA DE PAGO POR TRANSFERENCIA ── */
.pago-modal-overlay {
  position: fixed; inset: 0; z-index: 3000; background: rgba(44,26,14,0.6);
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
}
.pago-modal {
  background: white; border-radius: 24px; padding: 28px; width: 100%; max-width: 460px;
  max-height: 95vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: popIn 0.25s ease;
}
@keyframes popIn { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pago-modal-head { text-align: center; margin-bottom: 18px; }
.pago-modal-head h2 { font-size: 1.4rem; color: var(--cafe); margin: 6px 0; }
.pago-modal-head p { color: var(--cafe-medio); font-size: 0.92rem; }
.paso { display: flex; gap: 14px; margin-bottom: 16px; font-size: 0.9rem; color: var(--cafe-medio); }
.paso strong { color: var(--cafe); display: block; margin-bottom: 4px; }
.paso p { margin: 0; line-height: 1.5; }
.paso-num {
  flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--naranja); color: white;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.paso-datos { background: var(--gris); border-radius: 12px; padding: 12px 14px; line-height: 1.9; word-break: break-word; }
.btn-copiar {
  margin-left: 6px; border: 1px solid var(--naranja); color: var(--naranja); background: white;
  border-radius: 8px; font-size: 0.75rem; padding: 2px 10px; cursor: pointer;
}
.btn-whatsapp {
  display: block; text-align: center; background: #25D366; color: white; font-weight: 700;
  padding: 14px; border-radius: 50px; text-decoration: none; margin-top: 8px;
}
.btn-whatsapp:hover { background: #1ebe5b; }
