/* ==========================================
   DEMD POS – PREMIUM HYBRID VERSION
========================================== */

:root{
  /* Paleta híbrida profesional */
  --bg:#f4f6fb;
  --card:#ffffff;
  --primary:#0f172a;         /* azul profundo */
  --accent:#2563eb;          /* azul acción */
  --success:#10b981;
  --danger:#ef4444;
  --text:#1e293b;
  --muted:#64748b;
  --border:#e2e8f0;
  --shadow:0 10px 30px rgba(0,0,0,0.08);
}

/* ================= BASE ================= */

body{
  margin:0;
  font-family:'Inter','Segoe UI',system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  transition:.3s;
  perspective:1400px;
  overflow-x:hidden;
}

body.dark{
  --bg:#020617;
  --card:#0f172a;
  --text:#f1f5f9;
  --muted:#94a3b8;
  --border:#1e293b;
  --shadow:0 8px 25px rgba(0,0,0,0.5);
}

/* ================= FLIP SCREEN ================= */

.app{
  min-height:100vh;
  transform-style:preserve-3d;
  transition:transform .6s cubic-bezier(.4,0,.2,1), opacity .4s;
}

.app.flip-out{
  transform:rotateY(90deg);
  opacity:0;
}

/* ================= HEADER ================= */

.main-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.9rem 2rem;
  background:var(--card);
  border-bottom:1px solid var(--border);
  box-shadow:0 1px 2px rgba(0,0,0,0.04);
  position:sticky;
  top:0;
  z-index:100;
  flex-wrap:wrap;
  gap:15px;
}

.logo-img{
  width:30px;
  border-radius:6px;
}

.brand{
  font-weight:800;
  letter-spacing:-0.4px;
  color:var(--primary);
  font-size:0.9rem;
  text-transform:uppercase;
}

.center-nav{
  display:flex;
  gap:25px;
  flex-wrap:wrap;
}

.center-nav a{
  text-decoration:none;
  font-weight:600;
  font-size:0.85rem;
  color:var(--muted);
  padding:8px 12px;
  border-radius:6px;
  transition:.2s;
  white-space:nowrap;
}

.center-nav a:hover{
  background:#f1f5f9;
}

.center-nav .active{
  background:#eff6ff;
  color:var(--accent);
}

.right{
  display:flex;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
}

/* ================= BOTONES ================= */

.btn{
  background:var(--accent);
  color:#fff;
  font-weight:600;
  font-size:0.85rem;
  padding:9px 18px;
  border-radius:6px;
  border:none;
  cursor:pointer;
  transition:.2s;
  white-space:nowrap;
}

.btn:hover{
  transform:translateY(-2px);
}

.btn-small{
  background:var(--accent);
  color:#fff;
  padding:6px 12px;
  border-radius:6px;
  font-size:0.75rem;
  text-decoration:none;
}

.btn-ghost{
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  font-size:0.85rem;
  padding:8px 14px;
  border-radius:6px;
}

.btn-ghost:hover{
  background:#f8fafc;
}

/* ================= CARDS ================= */

.card{
  background:var(--card);
  padding:1.5rem;
  border-radius:10px;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  transition:transform .2s, box-shadow .2s;
}

.biz-card:hover{
  transform:translateY(-4px);
  box-shadow:0 15px 25px rgba(0,0,0,0.08);
}

/* ================= GRID ================= */

.biz-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:20px;
}

.biz-actions{
  margin-top:15px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

/* ================= INPUTS ================= */

input, select{
  border:1px solid var(--border) !important;
  background:var(--bg);
  color:var(--text);
  padding:12px !important;
  font-size:0.9rem;
  border-radius:6px;
  outline:none;
}

input:focus, select:focus{
  border-color:var(--accent) !important;
  box-shadow:0 0 0 3px rgba(37,99,235,0.1);
}

/* ================= ALERT ================= */

.alert{
  background:#f0fdf4;
  border-left:4px solid var(--success);
  color:#166534;
  font-size:0.85rem;
  font-weight:500;
  padding:12px;
  border-radius:6px;
  margin-bottom:20px;
}

/* ================= MODAL ================= */

.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  justify-content:center;
  align-items:center;
  z-index:200;
}

.modal-content{
  background:var(--card);
  padding:30px;
  border-radius:10px;
  width:95%;
  max-width:400px;
  border:1px solid var(--border);
}

/* ================= RESPONSIVE ================= */

@media(max-width:1024px){

  .main-header{
    padding:0.8rem 1.2rem;
  }

}

@media(max-width:768px){

  .main-header{
    flex-direction:column;
    align-items:flex-start;
  }

  .center-nav{
    width:100%;
    gap:10px;
  }

  .biz-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .btn{
    width:100%;
    justify-content:center;
  }

}
