/* =========================================================
   Anime no Seichi — Corte de Caja
   Tema oscuro moderno con acentos violeta/rosa (estilo anime)
   ========================================================= */

:root{
  --bg: #0f0f18;
  --bg-soft: #16162406;
  --panel: #1a1a2a;
  --panel-2: #20203354;
  --border: #2b2b40;
  --text: #eceafc;
  --text-dim: #9b98b8;
  --primary: #8b5cf6;
  --primary-2: #d946ef;
  --accent: #22d3ee;
  --success: #22c55e;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }

body{
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(217,70,239,.14), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  min-height:100vh;
}

a{ text-decoration:none; }

/* ---------- Topbar ---------- */
.topbar{
  background: rgba(26,26,42,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.5rem;
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:50;
}
.brand{
  display:flex; align-items:center; gap:.6rem;
  font-weight:700; font-size:1.1rem;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.brand .logo-dot{
  width:34px; height:34px; border-radius:10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:800; box-shadow: var(--shadow);
}
.user-chip{
  display:flex; align-items:center; gap:.6rem;
  background: var(--panel-2);
  border:1px solid var(--border);
  padding:.4rem .8rem; border-radius:999px;
  font-size:.85rem;
}
.badge-rol{
  padding:.15rem .6rem; border-radius:999px; font-size:.7rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.03em;
}
.badge-rol.admin{ background:rgba(217,70,239,.18); color:#f0abfc; }
.badge-rol.caja{ background:rgba(34,211,238,.18); color:#67e8f9; }

/* ---------- Layout ---------- */
.layout{ display:flex; min-height: calc(100vh - 64px); }
.sidebar{
  width: 230px; flex-shrink:0;
  background: var(--panel);
  border-right:1px solid var(--border);
  padding: 1.2rem .8rem;
}
.sidebar .nav-link{
  color: var(--text-dim);
  padding:.65rem .9rem; border-radius:12px;
  display:flex; align-items:center; gap:.6rem;
  font-size:.92rem; margin-bottom:.25rem;
  transition: all .15s ease;
}
.sidebar .nav-link:hover{ background: var(--panel-2); color: var(--text); }
.sidebar .nav-link.active{
  background: linear-gradient(90deg, rgba(139,92,246,.25), rgba(217,70,239,.15));
  color:#fff; border:1px solid rgba(139,92,246,.4);
}
.main-content{ flex:1; padding: 1.8rem; max-width: 1400px; }

/* ---------- Cards ---------- */
.card-panel{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}
.stat-card{
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  position:relative; overflow:hidden;
}
.stat-card::after{
  content:''; position:absolute; right:-30px; top:-30px;
  width:100px; height:100px; border-radius:50%;
  background: radial-gradient(circle, rgba(139,92,246,.25), transparent 70%);
}
.stat-card .label{ color:var(--text-dim); font-size:.8rem; text-transform:uppercase; letter-spacing:.04em; }
.stat-card .value{ font-size:1.6rem; font-weight:700; margin-top:.2rem; }

/* ---------- Forms ---------- */
.form-control, .form-select{
  background: var(--panel-2);
  border:1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
}
.form-control:focus, .form-select:focus{
  background: var(--panel-2);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 .2rem rgba(139,92,246,.25);
}
.form-control::placeholder{ color:#6b6890; }
label{ color: var(--text-dim); font-size:.85rem; margin-bottom:.3rem; }

.denom-row{
  display:flex; align-items:center; justify-content:space-between;
  background: var(--panel-2);
  border:1px solid var(--border);
  border-radius:12px;
  padding:.6rem .9rem; margin-bottom:.5rem;
}
.denom-label{ font-weight:600; display:flex; align-items:center; gap:.5rem; }
.denom-input{ width:90px; text-align:center; }
.denom-subtotal{ min-width:100px; text-align:right; color:var(--accent); font-weight:600; }

/* ---------- Buttons ---------- */
.btn-primary-gradient{
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border:none; color:#fff; font-weight:600;
  border-radius:10px; padding:.55rem 1.3rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary-gradient:hover{ transform: translateY(-1px); box-shadow:0 8px 20px rgba(139,92,246,.35); color:#fff; }
.btn-outline-soft{
  background: transparent; border:1px solid var(--border); color: var(--text);
  border-radius:10px;
}
.btn-outline-soft:hover{ background: var(--panel-2); color:#fff; }

/* ---------- Table ---------- */
.table-dark-soft{ color: var(--text); }
.table-dark-soft th{ color: var(--text-dim); font-weight:600; font-size:.8rem; text-transform:uppercase; border-color: var(--border); }
.table-dark-soft td{ border-color: var(--border); vertical-align:middle; }

.badge-estado{ padding:.3rem .7rem; border-radius:999px; font-size:.75rem; font-weight:600; }
.badge-estado.positivo{ background:rgba(34,197,94,.15); color:#4ade80; }
.badge-estado.negativo{ background:rgba(244,63,94,.15); color:#fb7185; }
.badge-estado.neutro{ background:rgba(148,163,184,.15); color:#cbd5e1; }

.login-wrapper{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
}
.login-card{
  width: 100%; max-width: 400px;
  background: var(--panel);
  border:1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 2.2rem;
}
.reloj-vivo{ font-variant-numeric: tabular-nums; color: var(--accent); font-weight:600; }
