/* ============================================================
   RESET GENERAL
============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  color: #333;
  min-height: 100vh;
}



/* ============================================================
   GLASS UI — EFECTO VIDRIADO GENERAL
============================================================ */
.glass {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.28);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.glass-total {
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.65);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.45);
  text-align: right;
  margin-top: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.glass-total h1 {
  font-size: 2rem;
  font-weight: 900;
  color: #0f172a;
}

.glass-total h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #334155;
}



/* ============================================================
   LOGIN
============================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  backdrop-filter: blur(18px);
  background: rgba(255,255,255,0.4);
  padding: 2rem;
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.login-card h1 {
  margin-bottom: 1rem;
  text-align: center;
}

.login-card label {
  display:block;
  margin-top: 0.5rem;
}

.login-card input {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.25rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: rgba(255,255,255,0.7);
}

.login-card button {
  margin-top: 1rem;
  width: 100%;
  padding: 0.7rem;
  border-radius: 10px;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
}
.login-card button:hover {
  background: #4338ca;
}

.alert.error {
  background: #ffe3e3;
  color: #c0392b;
  padding: 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}



/* ============================================================
   LAYOUT GENERAL
============================================================ */
.topbar {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.logo {
  font-weight: 800;
  font-size: 1.3rem;
}

.user-info span {
  margin-right: 1rem;
}

.btn-logout {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  background: #ef4444;
  color: #fff;
  font-size: 0.9rem;
}

.layout {
  display: flex;
  min-height: calc(100vh - 60px);
}



/* ============================================================
   SIDEBAR VIDRIADO
============================================================ */
.sidebar {
  width: 230px;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.25);
  border-right: 1px solid rgba(255,255,255,0.4);
  padding: 1rem;
  box-shadow: 10px 0 20px rgba(0,0,0,0.05);
}

.sidebar nav a {
  display: block;
  padding: 0.7rem 1rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  color: #1e293b;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

.sidebar nav a:hover {
  background: rgba(255,255,255,0.55);
}

.content {
  flex: 1;
  padding: 1.5rem;
}



/* ============================================================
   CARDS
============================================================ */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card {
  background: rgba(255,255,255,0.55);
  padding: 1rem;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card h3 {
  margin-bottom: 0.5rem;
}



/* ============================================================
   FORMULARIOS
============================================================ */
.form-section {
  background: rgba(255,255,255,0.5);
  padding: 1rem;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
  margin-bottom: 1rem;
}

.form-section h2 {
  margin-bottom: 0.75rem;
}

.form-section input,
.form-section textarea,
.form-section select {
  width: 100%;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: rgba(255,255,255,0.85);
  margin-top: 0.15rem;
}

.form-section button {
  margin-top: 0.8rem;
  padding: 0.7rem 1.5rem;
  border-radius: 12px;
  border: none;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: 0.25s;
}
.form-section button:hover {
  background: #4338ca;
}



/* ============================================================
   TABLAS (MEJORADAS)
============================================================ */
.tabla {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.tabla th {
  background: rgba(255,255,255,0.65);
  text-align: left;
  padding: 1rem;
  font-weight: 700;
}

.tabla td {
  background: rgba(255,255,255,0.4);
  padding: 0.9rem;
}

.thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
}



/* ============================================================
   BOTONES PEQUEÑOS
============================================================ */
.btn-small {
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  border: none;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-small.danger {
  background: #dc2626;
}



/* ============================================================
   GRID
============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 1rem;
}



/* ============================================================
   PANEL DE VENTAS — MEJORADO + VIDRIADO
============================================================ */
.ventas-panel {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 350px) 1fr;
}

.ventas-busqueda,
.ventas-detalle {
  padding: 1.3rem;
  border-radius: 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.ventas-busqueda glass,
.ventas-detalle glass {
  backdrop-filter: blur(12px);
}

.sugerencias {
  list-style: none;
  border: 1px solid #ddd;
  border-radius: 12px;
  margin-top: 0.35rem;
  max-height: 220px;
  overflow-y: auto;
}

.sugerencias li {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  background: rgba(255,255,255,0.6);
}

.sugerencias li:hover {
  background: rgba(255,255,255,0.9);
}



/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
  }
  .ventas-panel {
    grid-template-columns: 1fr;
  }
}



/* ==== Extras para el panel de ventas mejorado ==== */

.titulo-panel {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
}

.vendedor-box {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.vendedor-box span {
  font-weight: 600;
}

/* Botones de métodos de pago */
.metodos-pago {
  margin-top: 0.75rem;
}

.btn-pago {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.4rem;
  margin-top: 0.35rem;
  transition: 0.2s;
}

.btn-pago.efectivo { background: #10b981; }
.btn-pago.efectivo:hover { background: #059669; }

.btn-pago.tarjeta { background: #4f46e5; }
.btn-pago.tarjeta:hover { background: #4338ca; }

.btn-pago.mp { background: #0284c7; }
.btn-pago.mp:hover { background: #0369a1; }

#metodoPagoSeleccionado {
  color: #0f172a;
}

/* --- Caja de búsqueda POS --- */
.buscar-line {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.btn-big {
    padding: .6rem 1rem;
    background: #4a68ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}
.btn-big:hover { background:#334be6; }

/* --- Tarjeta preview producto --- */
.producto-preview {
    display: flex;
    margin-top: 1rem;
    padding: 1rem;
    gap: 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.6);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.producto-preview img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.preview-info h3 {
    margin-bottom: .3rem;
}
.btn-green {
    margin-top: .5rem;
    padding: .5rem 1rem;
    background: #27ae60;
    color:#fff;
    border:none;
    border-radius:8px;
    cursor:pointer;
}
.btn-green:hover { background:#1e8f4e; }

.oculto { display: none; }

/* === PREVIEW PRODUCTO PROFESIONAL === */
.producto-preview {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(8px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.preview-img-box img {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.preview-info {
    flex: 1;
}

.preview-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.preview-desc {
    font-size: 0.9rem;
    margin-top: .5rem;
    color: #333;
}

/* Botón grande */
.btn-agregar {
    margin-top: .7rem;
    padding: .6rem 1.2rem;
    background: linear-gradient(135deg, #27ae60, #1e874b);
    color:#fff;
    border:none;
    font-weight:700;
    border-radius:10px;
    cursor:pointer;
    transition:.2s;
    font-size: 1rem;
}
.btn-agregar:hover {
    transform: scale(1.05);
}

.producto-preview {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(8px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.preview-img-box img {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.btn-agregar {
    margin-top: .7rem;
    padding: .6rem 1.2rem;
    background: linear-gradient(135deg,#27ae60,#1e874b);
    color:#fff;
    font-weight:700;
    border:none;
    border-radius:10px;
    cursor:pointer;
    font-size:1rem;
    transition:.2s;
}
.btn-agregar:hover { transform:scale(1.05); }

.oculto { display:none; }
.btn-big {
    padding:.6rem 1rem;
    background:#4a68ff;
    color:#fff;
    border:none;
    border-radius:8px;
    font-weight:600;
    cursor:pointer;
}
.btn-big:hover { background:#334be6; }

.oculto { display:none; }

.producto-preview {
    display:flex;
    gap:1rem;
    padding:1rem;
    border-radius:14px;
    background:rgba(255,255,255,0.65);
    backdrop-filter:blur(8px);
    margin-top:1rem;
}

.preview-img {
    width:120px;
    height:120px;
    border-radius:10px;
    object-fit:cover;
    box-shadow:0 3px 10px rgba(0,0,0,0.25);
}

.btn-big {
    padding:.6rem 1rem;
    background:#4a68ff;
    color:#fff;
    border:none;
    border-radius:8px;
    font-weight:600;
}

.btn-agregar {
    margin-top:.5rem;
    padding:.6rem 1.2rem;
    background:#28a745;
    color:#fff;
    border:none;
    border-radius:10px;
    font-weight:700;
}

.metodos-pago button {
    padding:.5rem 1rem;
    border-radius:8px;
    border:none;
    margin:.3rem;
}
/* INPUTS MODERNOS */
.input-modern {
    width: 100%;
    padding: .55rem .8rem;
    border-radius: 8px;
    border: 1px solid #d4d8e0;
    background: #f7f8fb;
    font-size: .95rem;
    margin-bottom: .6rem;
}

/* BOTONES MODERNOS */
.btn-modern {
    padding: .55rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-blue {
    background: #4a68ff;
    color: #fff;
}
.btn-blue:hover { background:#3349e6; }

.btn-confirmar {
    width: 100%;
    padding: .75rem;
    border-radius: 10px;
    background: #2ecc71;
    font-size: 1.1rem;
    color: #fff;
    border: none;
    font-weight: 700;
    margin-top: .8rem;
}
.btn-confirmar:hover { background:#28b463; }

/* BOTONES DE PAGOS */
.btn-pay {
    padding: .5rem 1.1rem;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    color: #fff;
}
.efectivo { background:#27ae60; }
.tarjeta { background:#6c5ce7; }
.mp       { background:#0984e3; }

/* PREVIEW */
.preview-box {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(10px);
    margin-top: 1rem;
}

.preview-img {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.label-preview { font-weight:700; }

.desc { margin-top:.4rem; }

/* ELIMINAR BTN */
.btn-del {
    background:#e74c3c;
    border:none;
    padding:.4rem .7rem;
    border-radius:50%;
    color:#fff;
    cursor:pointer;
}
.btn-del:hover { background:#c0392b; }

.oculto { display:none; }

/* INPUT DE CANTIDAD */
.input-cantidad {
    width: 60px;
    padding:.3rem;
    text-align:center;
}

