html, body {
  overflow-x: hidden;
}

/* ========================
   RESET GLOBAL
======================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f4f6f9;
  color: #1f2937;
}

/* ========================
   LAYOUT BASE
======================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ========================
   SIDEBAR
======================== */

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  color: white;
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  transition: all 0.3s ease;
}

.sidebar h2 {
  font-size: 20px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar nav a {
  text-decoration: none;
  color: #cbd5e1;
  padding: 12px 14px;
  border-radius: 14px;
  transition: 0.25s ease;
}

.sidebar nav a:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(4px);
}

.sidebar nav a.active {
  background: #facc15;
  color: black;
  font-weight: 600;
}

/* ========================
   MAIN CONTENT
======================== */

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: none;
  align-items: center;
  padding: 15px 20px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.topbar button {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

.content {
  padding: 25px;
}

/* ========================
   CARDS
======================== */

.card {
  background: white;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

/* ========================
   BOTONES
======================== */

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: black;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
}

/* ========================
   RESPONSIVE
======================== */

@media (max-width: 768px) {

  .topbar {
    display: flex;
    justify-content: space-between;
  }

  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100%;
    z-index: 1000;
    box-shadow: 8px 0 25px rgba(0,0,0,0.2);
  }

  .sidebar.active {
    left: 0;
  }

  .content {
    padding: 20px;
  }
}
/* ========================
   DASHBOARD KPI
======================== */

.grid-kpis {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .grid-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
}

.kpi {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi small {
  color: #6b7280;
}

.kpi h2 {
  font-size: 22px;
  margin-top: 4px;
}

.kpi span {
  font-size: 30px;
}

.kpi.warning {
  border-left: 5px solid #f59e0b;
}

.kpi.success {
  border-left: 5px solid #22c55e;
}
/* ========================
   PEDIDOS
======================== */

.orders-grid {

  display:grid;

  grid-template-columns:repeat(1,1fr);

  gap:20px;

  margin-top:20px;
}

/* TABLET */

@media(min-width:768px){

  .orders-grid{

    grid-template-columns:repeat(2,1fr);

  }

}

/* DESKTOP */

@media(min-width:1200px){

  .orders-grid{

    grid-template-columns:repeat(4,1fr);

  }

}

.order-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-top {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.order-middle {
  font-weight: 600;
}

.order-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* BADGES */

.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge.pendiente {
  background: #fef3c7;
  color: #92400e;
}

.badge.completado {
  background: #dcfce7;
  color: #166534;
}

.badge.cancelado {
  background: #fee2e2;
  color: #991b1b;
}

/* Botón pequeño */

.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
}
/* ========================
   VER PEDIDO
======================== */

.pedido-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.estado-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.estado-form select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.estado-form button {
  padding: 10px 16px;
}
/* ========================
   PRODUCTOS
======================== */

.productos-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .productos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.producto-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.producto-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

/* En desktop que sea más compacta */
@media (min-width: 768px) {
  .producto-img {
    max-height: 180px;
  }
}


.producto-img.placeholder {
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
}

.producto-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.producto-precio {
  font-weight: 600;
}

/* BADGES PRODUCTOS */

.badge.activo {
  background: #dcfce7;
  color: #166534;
}

.badge.inactivo {
  background: #fee2e2;
  color: #991b1b;
}
/* ========================
   FORM CARD FIX MOBILE
======================== */

.form-card {
  max-width: 600px;
  margin: 0 auto;       /* 👈 centra la card */
  width: 100%;
  overflow: hidden;     /* 👈 evita que la imagen empuje */
}

.preview-img {
  width: 100%;
  display: flex;
  justify-content: center;  /* 👈 centra imagen */
}

.preview-img img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
/* ========================
   AUTH PAGES
======================== */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.auth-card {
  text-align: center;
}

.auth-card h2 {
  margin-bottom: 20px;
  color: #1f2937;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 14px;
}
/* ========================
   FAB (Carrito flotante)
======================== */

.fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: black;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: 0.25s ease;
  z-index: 999;
}

.fab:hover {
  transform: scale(1.1);
}
.btn-mercado {
  background: #009ee3;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-mercado:hover {
  background: #007eb5;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.extras-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  background: #f9fafb;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #eee;
}

.extra-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-full {
  width: 100%;
  margin-top: 15px;
}
/* ===== HOME CLIENTE ===== */

.welcome-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.welcome-text h1 {
    margin-bottom: 10px;
}

.welcome-text p {
    color: #6b7280;
    max-width: 500px;
}

.welcome-logo {
    flex: 0 0 auto;
    max-width: 180px;
}

.welcome-logo img {
    width: 100%;
    height: auto;
    display: block;
}
.welcome-box {
    align-items: center;
    overflow: hidden;
}



.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    padding: 25px;
    transition: 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.badge-coming {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 20px;
    background: #f3f4f6;
    color: #6b7280;
}

/* ===== RESPONSIVE ===== */

@media(max-width:768px){
    .welcome-box {
        flex-direction: column;
        text-align: center;
    }

    .welcome-logo img {
        max-width: 140px;
    }
}
/* ========================
   FORM GRID CLIENTE
======================== */

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition: 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.2);
}

/* Botón centrado */
.form-grid button {
  margin-top: 10px;
}
.auth-card {
  border-radius: 20px;
  padding: 30px;
}
/* ========================
   ADMIN HEADER
======================== */

.admin-header {
  margin-bottom: 20px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-brand img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.admin-brand h1 {
  margin: 0;
  font-size: 22px;
}

.admin-brand small {
  color: #6b7280;
  font-size: 13px;
}
.producto-card img {
    transition: transform 0.3s ease;
}

.producto-card:hover img {
    transform: scale(1.05);
}

.pedido-badge{

    background:#ef4444;

    color:white;

    font-size:12px;

    font-weight:700;

    min-width:22px;
    height:22px;

    border-radius:999px;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    margin-left:auto;

    padding:0 6px;

    box-shadow:
    0 4px 12px rgba(239,68,68,.35);
}
.menu-section{
    margin-top:25px;
    padding-top:15px;
    border-top:1px solid rgba(255,255,255,0.08);
}

.menu-title{
    display:block;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:1px;
    color:#7de3bf;
    margin-bottom:10px;
    padding-left:10px;
    font-weight:bold;
}



