﻿:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#2d7ff9;
  --line:#e6eef8;
  --chip:#eef5ff;
  --shadow:0 8px 24px rgba(15,23,42,.08);
  --radius:14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* ===== AUTH (login/register) ===== */
.auth-wrap{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}
.auth-card{
  width:min(420px, 100%);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:28px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  margin-bottom:16px;
}
.logo{
  width:38px;height:38px;border-radius:10px;
  background:linear-gradient(135deg, #2d7ff9, #72b6ff);
  display:grid; place-items:center;
  color:white; font-weight:700;
}
.auth-card h2{margin:6px 0 6px}
.sub{color:var(--muted); margin:0 0 18px; font-size:14px}

.field{display:flex; flex-direction:column; gap:6px; margin:12px 0}
label{font-size:13px; color:var(--muted)}
input, select{
  border:1px solid var(--line);
  border-radius:12px;
  padding:11px 12px;
  outline:none;
  background:#fbfdff;
}
input:focus, select:focus{border-color:#b8d3ff; box-shadow:0 0 0 4px rgba(45,127,249,.12)}
.btn{
  width:100%;
  border:none;
  border-radius:12px;
  padding:12px 14px;
  background:var(--primary);
  color:white;
  cursor:pointer;
  font-weight:700;
  margin-top:10px;
}
.btn.secondary{
  background:white;
  color:var(--primary);
  border:1px solid #cfe2ff;
}
.row{display:grid; gap:12px}
.row.two{grid-template-columns:1fr 1fr}
.link{
  color:var(--primary);
  text-decoration:none;
  font-weight:700;
}
.small{
  font-size:13px; color:var(--muted); margin-top:14px; text-align:center;
}

/* ===== APP SHELL ===== */
.app{
  display:grid;
  grid-template-columns: 260px 1fr;
  min-height:100vh;
}
.sidebar{
  background:white;
  border-right:1px solid var(--line);
  padding:18px 14px;
  position:sticky; top:0; height:100vh;
}
.side-top{display:flex; align-items:center; gap:10px; padding:6px 8px 14px}
.side-user{
  display:flex; gap:10px; align-items:center;
  padding:14px 10px;
  border:1px solid var(--line);
  border-radius:16px;
  margin:10px 6px 14px;
  background:#fbfdff;
}
.avatar{
  width:38px;height:38px;border-radius:12px;
  background:var(--chip);
  display:grid; place-items:center;
  color:var(--primary);
  font-weight:700;
}
.side-user .name{font-weight:700}
.side-user .meta{font-size:12px;color:var(--muted); margin-top:2px}

.nav{display:flex; flex-direction:column; gap:8px; padding:0 6px}
.nav a{
  display:flex; align-items:center; gap:10px;
  padding:11px 12px;
  border-radius:14px;
  text-decoration:none;
  color:var(--text);
  border:1px solid transparent;
}
.nav a i{
  width:18px;
  text-align:center;
  font-size:14px;
}
.nav a:hover{background:#f3f8ff}
.nav a.active{
  background:var(--chip);
  border-color:#cfe2ff;
  color:#0b3d91;
  font-weight:700;
}

.main{
  padding:20px 24px;
}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.title h1{margin:0; font-size:22px}
.title p{margin:4px 0 0; color:var(--muted); font-size:13px}
.top-actions{display:flex; gap:10px; align-items:center}
.pill{
  background:white;
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:999px;
  color:var(--muted);
  font-size:13px;
}
.pill i{margin-right:6px}
.actions .btn-sm i{margin-right:6px}
.content-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
}
.card h3{margin:0 0 10px; font-size:16px}
.muted{color:var(--muted)}
.kpi{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:10px;
}
.kpi .value{font-size:28px; font-weight:800}
.kpi .tag{background:var(--chip); color:#0b3d91; padding:6px 10px; border-radius:999px; font-size:12px; font-weight:700}

.table{
  width:100%;
  border-collapse:collapse;
}
.table th, .table td{
  border-bottom:1px solid var(--line);
  padding:10px 8px;
  text-align:left;
  font-size:13px;
}
.table th{color:var(--muted); font-weight:700}

.actions{display:flex; gap:10px; flex-wrap:wrap}
.btn-sm{
  border:1px solid #cfe2ff;
  background:white;
  color:var(--primary);
  padding:9px 10px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}
.btn-sm.primary{
  background:var(--primary);
  color:white;
  border-color:transparent;
}

.tabs{
  display:flex; gap:8px;
  background:#f3f8ff;
  padding:6px;
  border-radius:14px;
  border:1px solid #dbeafe;
  width:max-content;
}
.tab{
  border:none;
  background:transparent;
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  color:#0f172a;
  font-weight:700;
  font-size:13px;
}
.tab.active{background:white; border:1px solid var(--line); box-shadow:0 6px 18px rgba(15,23,42,.06)}

.badge{
  background:#ecfeff;
  color:#155e75;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid #cffafe;
}

/* simple “chart” bars */
.bars{display:flex; gap:8px; align-items:flex-end; height:90px; margin-top:10px}
.bar{
  width:14px; border-radius:8px;
  background:rgba(45,127,249,.25);
  border:1px solid rgba(45,127,249,.25);
}
.bar > div{height:50%; border-radius:8px; background:rgba(45,127,249,.75)}

/* modal */
.modal-backdrop{
  position:fixed; inset:0;
  background:rgba(2,6,23,.45);
  display:none;
  align-items:center; justify-content:center;
  padding:18px;
}
.modal{
  width:min(520px, 100%);
  background:white;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  padding:16px;
}
.modal-head{display:flex; justify-content:space-between; align-items:center}
.close{border:none; background:#f1f5f9; border-radius:10px; padding:8px 10px; cursor:pointer}
.grid-two{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.keypad{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
}
.keypad button{
  border:1px solid var(--line);
  background:#fbfdff;
  padding:12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
}

@media (max-width: 980px){
  .app{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto}
  .content-grid{grid-template-columns:1fr}
}
/* =============== POS MODAL ================= */

.pos-modal {
  background: white;
  width: 100%;
  max-width: 360px;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}

.pos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-pos {
  background: #f1f5f9;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.pos-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
}

.pos-summary {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
  margin-bottom: 12px;
}

.row-pos {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.row-pos.total {
  font-size: 18px;
}

.pos-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pos-keypad button {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.btn-cobrar-pos {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: #14b8a6;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

/* =========================================== */
