/* GymPlusPro — Estilos base */
:root {
  --brand:      #0ea5e9;
  --brand-2:    #0369a1;
  --brand-dk:   #0b1220;
  --accent:     #22d3ee;
  --success:    #16a34a;
  --warning:    #f59e0b;
  --danger:     #dc2626;
  --ink:        #0f172a;
  --muted:      #64748b;
  --line:       #e2e8f0;
  --bg:         #f8fafc;
  --card:       #ffffff;
  --radius:     12px;
  --shadow:     0 1px 2px rgba(15,23,42,0.06), 0 4px 16px rgba(15,23,42,0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; background: var(--brand); color:#fff; padding:.65rem 1.1rem; border-radius: 10px; font-weight:600; cursor:pointer; text-decoration:none; transition: all .2s; font-size: .9rem; }
.btn:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--line); color: var(--ink); }
.btn-danger  { background: var(--danger); }
.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); color: #111; }
.btn-sm { padding: .4rem .7rem; font-size: .82rem; }
.btn-xs { padding: .25rem .55rem; font-size: .75rem; border-radius: 8px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1.25rem; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); display:flex; align-items:center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.input, select.input, textarea.input {
  width: 100%; padding: .6rem .85rem; border:1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
label.lbl { display:block; font-weight: 600; color: var(--ink); font-size: .82rem; margin-bottom: .35rem; }
.form-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.badge { display:inline-flex; align-items:center; padding: .2rem .55rem; border-radius: 999px; background: var(--line); color: var(--ink); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.badge.active, .badge.trial { background: #dcfce7; color: #166534; }
.badge.expired, .badge.suspended, .badge.cancelled, .badge.past_due { background: #fee2e2; color: #991b1b; }
.badge.frozen, .badge.pending { background: #fef3c7; color: #854d0e; }
.badge.info { background: #dbeafe; color: #1e40af; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align:left; padding: .75rem 1rem; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #f8fafc; }
.stat { display:flex; flex-direction:column; gap:.2rem; }
.stat .lbl { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .num { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.sidebar { background: var(--brand-dk); color: #e2e8f0; min-height: 100vh; width: 260px; padding: 1.25rem .75rem; position: sticky; top: 0; display: flex; flex-direction: column; }
.sidebar .brand { display:flex; align-items:center; gap: .5rem; padding: .5rem .75rem 1.25rem; font-weight: 800; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1rem; }
.sidebar .brand .dot { width: 10px; height: 10px; background: var(--brand); border-radius: 50%; box-shadow: 0 0 0 3px rgba(14,165,233,.2); }
.sidebar a { display:flex; align-items:center; gap: .6rem; padding: .55rem .75rem; color: #cbd5e1; text-decoration: none; border-radius: 8px; margin-bottom: .1rem; font-size: .92rem; }
.sidebar a:hover, .sidebar a.active { background: rgba(14,165,233,.15); color: #fff; }
.sidebar .sec-title { padding: .75rem .75rem .35rem; font-size: .7rem; color: #64748b; text-transform: uppercase; letter-spacing: .08em; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: .85rem 1.5rem; display:flex; align-items:center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 10; }
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; transition: left .25s; z-index: 100; }
  .sidebar.open { left: 0; }
}
.container-app { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.flex { display:flex; align-items: center; gap: .75rem; }
.flex-wrap { flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.text-muted { color: var(--muted); }
.text-sm { font-size: .82rem; }
.text-xs { font-size: .72rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.pill { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--line); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 1000; }
.modal { background: #fff; border-radius: var(--radius); max-width: 640px; width: 100%; box-shadow: var(--shadow); max-height: 90vh; display: flex; flex-direction: column; }
.modal-lg { max-width: 960px; }
.modal-header, .modal-footer { padding: 1rem 1.25rem; }
.modal-header { border-bottom: 1px solid var(--line); display:flex; align-items:center; justify-content: space-between; }
.modal-footer { border-top: 1px solid var(--line); display:flex; justify-content: flex-end; gap: .5rem; }
.modal-body { padding: 1.25rem; overflow-y: auto; }
.toast-container { position: fixed; top: 1rem; right: 1rem; display:flex; flex-direction: column; gap: .5rem; z-index: 2000; }
.toast { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); padding: .8rem 1rem; border-radius: 10px; box-shadow: var(--shadow); min-width: 280px; font-size: .9rem; }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--brand); }
.loader { width:18px; height:18px; border:2px solid #e2e8f0; border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.kbd { background: #f1f5f9; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: .75rem; font-family: monospace; }
.scrollable { overflow-y: auto; }
.hidden { display: none !important; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-page .hero { background: linear-gradient(135deg, #0c4a6e 0%, #0ea5e9 100%); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.auth-page .hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 1rem; }
.auth-page .hero p  { font-size: 1.05rem; opacity: .95; max-width: 460px; }
.auth-page .form-side { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-form { width: 100%; max-width: 420px; }
@media (max-width: 900px) { .auth-page { grid-template-columns: 1fr; } .auth-page .hero { padding: 2rem; } }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state svg { width: 64px; height: 64px; opacity: .3; margin-bottom: 1rem; }
.pos { display: grid; grid-template-columns: 1fr 360px; gap: 1rem; height: calc(100vh - 130px); }
.pos .products-list { overflow-y: auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.pos .cart { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); display: flex; flex-direction: column; }
.pos .product-card { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.pos .product-card:hover { background: #f8fafc; }
.pos .product-card.disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; height: auto; } }
