/* ============ SAMMYFITNESSONERD — Design System ============ */
:root {
  /* Tema basado en logo: negro + cian turquesa + plata */
  --navy-900: #060808;
  --navy-800: #0c1110;
  --navy-700: #151c1b;
  --navy-600: #1f2928;
  --panel: #0e1413;
  --panel-2: #121a19;
  --line: #2a3635;
  --line-soft: #1b2322;
  --ink: #eef5f4;
  --ink-soft: #a4b6b4;
  --ink-mute: #647877;
  --accent: #00e5d2;
  --accent-2: #00b3a4;
  --accent-glow: rgba(0,229,210,.32);
  --silver: #c4d0cf;
  --ring: #5e8a8a;
  --green: #22c55e;
  --green-soft: rgba(34,197,94,.15);
  --yellow: #f5b73d;
  --yellow-soft: rgba(245,183,61,.15);
  --red: #ef4444;
  --red-soft: rgba(239,68,68,.15);
  --blue: #38bdf8;
  --blue-soft: rgba(56,189,248,.15);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.3);
  --sidebar-w: 256px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #0a2e2b 0%, transparent 60%), var(--navy-900);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

#app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ============ Sidebar ============ */
.sidebar {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #04332f);
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  box-shadow: 0 0 0 2px var(--ring), 0 6px 18px var(--accent-glow);
  position: relative; overflow: hidden; flex: none;
}
.brand-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brand-fallback { color: #042421; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 14px; letter-spacing: .3px; }
.brand-accent { color: var(--accent); }
.brand-sub { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: 0; color: var(--ink-soft);
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; text-align: left; transition: all .15s;
}
.nav-item:hover { background: var(--navy-700); color: var(--ink); }
.nav-item.active { background: linear-gradient(90deg, var(--accent-2), transparent); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-ico { width: 20px; text-align: center; font-size: 15px; opacity: .9; }

.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 0; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); padding: 7px 10px; border-radius: 8px; font-size: 12px; }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.version { font-size: 11px; color: var(--ink-mute); }

/* ============ Main / Topbar ============ */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 26px; border-bottom: 1px solid var(--line-soft);
  background: rgba(10,15,31,.7); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.hamburger { display: none; background: transparent; border: 0; color: var(--ink); font-size: 22px; }
.topbar-title { font-size: 19px; font-weight: 700; }
.topbar-search { margin-left: auto; }
.topbar-search input {
  width: 280px; max-width: 40vw; background: var(--navy-800); border: 1px solid var(--line);
  color: var(--ink); padding: 10px 14px; border-radius: 10px; font-size: 13px; outline: none; transition: border .15s;
}
.topbar-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.today { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

.content { padding: 26px; flex: 1; }

/* ============ Reusable ============ */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 14px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; font-weight: 800; }
.page-head p { color: var(--ink-mute); font-size: 13px; margin-top: 3px; }

.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #042421; border: 0; padding: 11px 18px; border-radius: 10px;
  font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 16px var(--accent-glow); transition: transform .12s, filter .12s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 13px; font-size: 12px; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); box-shadow: none; }
.btn-outline:hover { border-color: var(--accent); color: var(--ink); filter: none; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; box-shadow: 0 6px 16px rgba(239,68,68,.3); }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px;
  position: relative; overflow: hidden;
}
.stat::after { content: ''; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent-glow); opacity: .25; filter: blur(8px); }
.stat .s-label { font-size: 12px; color: var(--ink-mute); font-weight: 500; }
.stat .s-value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; }
.stat .s-foot { font-size: 12px; margin-top: 6px; color: var(--ink-soft); }
.stat.green .s-value { color: var(--green); } .stat.green::after { background: var(--green-soft); }
.stat.yellow .s-value { color: var(--yellow); } .stat.yellow::after { background: var(--yellow-soft); }
.stat.red .s-value { color: var(--red); } .stat.red::after { background: var(--red-soft); }
.stat.blue .s-value { color: var(--blue); } .stat.blue::after { background: var(--blue-soft); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge.green { background: var(--green-soft); color: #7ef0a6; } .badge.green .dot { background: var(--green); }
.badge.yellow { background: var(--yellow-soft); color: #ffd98a; } .badge.yellow .dot { background: var(--yellow); }
.badge.red { background: var(--red-soft); color: #ffa3a3; } .badge.red .dot { background: var(--red); }
.badge.blue { background: var(--blue-soft); color: #9bdcff; } .badge.blue .dot { background: var(--blue); }
.badge.gray { background: rgba(107,118,156,.18); color: var(--ink-soft); } .badge.gray .dot { background: var(--ink-mute); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
.tbl thead th {
  background: var(--navy-800); color: var(--ink-soft); text-align: left;
  padding: 13px 16px; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--navy-700); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .row-actions { display: flex; gap: 6px; }
.cell-strong { font-weight: 600; }
.cell-mute { color: var(--ink-mute); font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), #05423d); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; margin-right: 9px; vertical-align: middle; }
.name-cell { display: flex; align-items: center; }

/* Horarios de clientes */
.hz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.hz-card { display: flex; flex-direction: column; }
.hz-top { display: flex; align-items: center; gap: 10px; }
.hz-top .avatar { margin-right: 0; width: 38px; height: 38px; flex: 0 0 auto; }
.hz-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

/* Creador de facturas */
.fc-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.fc-row .fc-c { flex: 1; }
.fc-row .fc-m { width: 120px; }
.fc-row input { background: var(--navy-800); border: 1px solid var(--line); color: var(--ink); padding: 9px 11px; border-radius: 8px; font-size: 13px; }
.fc-total { margin-top: 14px; text-align: right; font-size: 15px; color: var(--ink-soft); }
.fc-total b { color: var(--accent); font-size: 19px; margin-left: 6px; }

/* Progress */
.progress { height: 8px; background: var(--navy-700); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #16a34a); border-radius: 999px; transition: width .4s; }
.progress.warn > span { background: linear-gradient(90deg, var(--yellow), #d97706); }
.progress.crit > span { background: linear-gradient(90deg, var(--red), #b91c1c); }

/* ============ Agenda grid ============ */
.agenda-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.legend i { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.lg-green { background: var(--green); } .lg-yellow { background: var(--yellow); } .lg-red { background: var(--red); } .lg-blue { background: var(--blue); }

.agenda-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.agenda { display: grid; grid-template-columns: 70px repeat(7, minmax(128px, 1fr)); min-width: 1040px; }
.agenda .ag-head { background: var(--navy-800); padding: 12px 8px; text-align: center; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.agenda .ag-time { background: var(--navy-800); padding: 10px 8px; text-align: center; font-size: 12px; color: var(--ink-soft); font-weight: 600; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center; }
.slot { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 7px; min-height: 64px; cursor: pointer; transition: background .12s; position: relative; }
.slot:hover { background: var(--navy-700); }
.slot .slot-state { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; }
.slot.s-green .slot-state { background: var(--green); } .slot.s-green { box-shadow: inset 3px 0 0 var(--green); }
.slot.s-yellow .slot-state { background: var(--yellow); } .slot.s-yellow { box-shadow: inset 3px 0 0 var(--yellow); }
.slot.s-red .slot-state { background: var(--red); } .slot.s-red { box-shadow: inset 3px 0 0 var(--red); }
.slot.s-blue .slot-state { background: var(--blue); } .slot.s-blue { box-shadow: inset 3px 0 0 var(--blue); }
.slot-client { font-size: 11.5px; background: var(--navy-600); border-radius: 6px; padding: 3px 7px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.slot-client .pdot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.slot-free { font-size: 11px; color: var(--ink-mute); padding: 2px 4px; }

/* ============ Modal ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(5,8,18,.7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal { background: linear-gradient(180deg, var(--panel), var(--navy-800)); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; overflow-x: hidden; box-shadow: var(--shadow); animation: pop .18s ease; }
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-head .sub { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.modal-close { background: transparent; border: 0; color: var(--ink-soft); font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--panel); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.field input, .field select, .field textarea {
  background: var(--navy-800); border: 1px solid var(--line); color: var(--ink);
  padding: 10px 12px; border-radius: 9px; font-size: 13px; outline: none; transition: border .15s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.field textarea { resize: vertical; min-height: 70px; }

/* Client detail */
.detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.detail-avatar { width: 60px; height: 60px; border-radius: 16px; background: linear-gradient(135deg, var(--accent-2), #05423d); display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.detail-meta h3 { font-size: 18px; }
.detail-meta .muted { color: var(--ink-mute); font-size: 13px; margin-top: 3px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 16px 0; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv .k { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .4px; }
.kv .v { font-size: 14px; font-weight: 600; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-mute); margin: 18px 0 10px; font-weight: 600; }

/* Tabs in modal */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.tab { background: transparent; border: 0; color: var(--ink-soft); padding: 9px 14px; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }

/* Filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters select, .filters input { background: var(--navy-800); border: 1px solid var(--line); color: var(--ink); padding: 9px 12px; border-radius: 9px; font-size: 13px; outline: none; }
.filters select:focus, .filters input:focus { border-color: var(--accent); }

/* Two-col layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Mini chart bars */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-radius: 7px 7px 0 0; min-height: 4px; transition: height .4s; position: relative; }
.bar:hover::after { content: attr(data-val); position: absolute; top: -22px; left: 50%; transform: translateX(-50%); background: var(--navy-900); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.bar-label { font-size: 11px; color: var(--ink-mute); }

/* Ranking list */
.rank { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: flex; align-items: center; gap: 12px; }
.rank-row .r-name { font-size: 13px; width: 130px; flex: none; color: var(--ink-soft); }
.rank-row .r-bar { flex: 1; height: 10px; background: var(--navy-700); border-radius: 999px; overflow: hidden; }
.rank-row .r-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.rank-row .r-val { font-size: 12px; font-weight: 600; width: 36px; text-align: right; }

/* Empty state */
.empty { text-align: center; padding: 50px 20px; color: var(--ink-mute); }
.empty .e-ico { font-size: 40px; opacity: .5; margin-bottom: 10px; }

/* Toast */
.toast-host { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 13px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); animation: slideIn .2s ease; min-width: 220px; }
.toast.ok { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--yellow); }
.toast.err { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }

/* Chips list (clients in slot) */
.chip-list { display: flex; flex-direction: column; gap: 8px; }
.chip { display: flex; align-items: center; gap: 10px; background: var(--navy-700); padding: 10px 12px; border-radius: 10px; }
.chip .c-info { flex: 1; min-width: 0; }
.chip .c-name { font-size: 13px; font-weight: 600; }
.chip .c-sub { font-size: 11px; color: var(--ink-mute); }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; }
.icon-btn:hover { border-color: var(--red); color: var(--red); }
.icon-btn.ok:hover { border-color: var(--green); color: var(--green); }

.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--navy-700); border-left: 3px solid var(--line); }
.alert-item.warn { border-left-color: var(--yellow); }
.alert-item.crit { border-left-color: var(--red); }
.alert-item .a-ico { font-size: 18px; }
.alert-item .a-txt { flex: 1; }
.alert-item .a-txt b { font-size: 13px; }
.alert-item .a-txt span { display: block; font-size: 11px; color: var(--ink-mute); margin-top: 2px; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s; width: 260px; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .hamburger { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .topbar-search input { width: 160px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
  .stat .s-value { font-size: 24px; }
  .topbar-search { display: none; }
  .legend { width: 100%; }

  /* Modal a pantalla casi completa, sin cortes */
  .modal-overlay { padding: 8px; place-items: start center; }
  .modal, .modal.wide { max-width: 100%; max-height: 94vh; }
  .modal-head, .modal-body { padding-left: 16px; padding-right: 16px; }
  .modal-head { padding-top: 14px; padding-bottom: 14px; }
  .modal-body { padding-top: 16px; padding-bottom: 16px; }
  .modal-foot { padding: 12px 16px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  .tab { padding: 8px 11px; font-size: 12px; }
  .detail-avatar { width: 48px; height: 48px; font-size: 19px; }

  /* Tablas -> tarjetas apiladas (con .tbl-cards en el contenedor) */
  .tbl-cards { overflow-x: visible; border: 0; }
  .tbl-cards table.tbl { min-width: 0; font-size: 13px; }
  .tbl-cards .tbl thead { display: none; }
  .tbl-cards .tbl, .tbl-cards .tbl tbody, .tbl-cards .tbl tr, .tbl-cards .tbl td { display: block; width: 100%; }
  .tbl-cards .tbl tr { border: 1px solid var(--line-soft); border-radius: 12px; margin-bottom: 10px; background: var(--panel-2); overflow: hidden; }
  .tbl-cards .tbl tr:hover { background: var(--panel-2); }
  .tbl-cards .tbl td { border: 0; border-bottom: 1px solid var(--line-soft); padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: right; min-width: 0 !important; }
  .tbl-cards .tbl td:last-child { border-bottom: 0; }
  .tbl-cards .tbl td::before { content: attr(data-label); color: var(--ink-mute); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; text-align: left; flex: none; }
  .tbl-cards .tbl td.td-main { display: block; text-align: left; background: var(--navy-700); padding: 11px 14px; }
  .tbl-cards .tbl td.td-main::before { display: none; }
  .tbl-cards .tbl td .progress { flex: 1; max-width: 150px; }
  .tbl-cards .tbl td .row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .tbl-cards .tbl td .row-actions .btn { flex: 1 1 auto; }
}

/* Backdrop for mobile sidebar */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; display: none; }
.backdrop.show { display: block; }

/* Tarjetas de planes (Lista de Precio) */
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.plan-card {
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  color: #04211e; box-shadow: 0 12px 30px rgba(0,0,0,.45); border: 1px solid rgba(0,0,0,.25);
}
.plan-head {
  background: #10201f; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .8px;
  text-transform: uppercase; text-align: center; padding: 11px 12px; margin: 14px 14px 0; border-radius: 10px;
}
.plan-feats { padding: 16px 18px 4px; text-align: center; display: flex; flex-direction: column; gap: 7px; font-size: 15px; font-weight: 600; color: #06302b; }
.plan-feats .pf-strong { font-size: 17px; font-weight: 800; letter-spacing: .4px; }
.plan-price { text-align: center; font-size: 28px; font-weight: 900; color: #062b27; padding: 4px 0 6px; }
.plan-price span { font-size: 15px; font-weight: 700; }
.plan-admin { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 14px 14px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.2); }
.plan-cnt { font-size: 12px; font-weight: 700; color: #04211e; background: rgba(0,0,0,.18); padding: 4px 10px; border-radius: 999px; }
.plan-admin .row-actions { display: flex; gap: 8px; }
.plan-admin .mini { background: rgba(0,0,0,.3); color: #fff; border: 0; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s; }
.plan-admin .mini:hover { background: rgba(0,0,0,.5); }
.plan-admin .mini.danger { background: rgba(140,18,18,.6); }
.plan-admin .mini.danger:hover { background: rgba(170,22,22,.85); }
@media (max-width: 720px) { .plan-grid { grid-template-columns: 1fr; } }

/* Horario personalizado en celda de agenda */
.slot-time { font-size: 11px; font-weight: 800; color: var(--accent); margin-bottom: 3px; letter-spacing: .2px; }

/* Pasar lista (asistencia de hoy) */
.roll-list { display: flex; flex-direction: column; gap: 8px; }
.roll-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--navy-700); border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 12px; }
.roll-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.roll-info .avatar.sm { width: 30px; height: 30px; font-size: 11px; margin-right: 0; flex: none; }
.roll-name { font-size: 13px; font-weight: 600; }
.roll-hora { font-size: 11px; color: var(--ink-mute); }
.roll-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.roll-actions .rb { width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--navy-800); font-size: 16px; cursor: pointer; transition: all .12s; }
.roll-actions .rb.ok:hover { border-color: var(--green); background: rgba(34,197,94,.15); }
.roll-actions .rb.late:hover { border-color: var(--yellow); background: rgba(234,179,8,.15); }
.roll-actions .rb.no:hover { border-color: var(--red); background: rgba(239,68,68,.15); }

/* Buscador de cliente (agenda) */
.search-results { display: flex; flex-direction: column; gap: 5px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.search-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--navy-700); border: 1px solid var(--line-soft); color: var(--ink); padding: 9px 12px; border-radius: 10px; cursor: pointer; transition: border .12s; }
.search-item:hover { border-color: var(--accent); }
.search-item .avatar.sm { width: 28px; height: 28px; font-size: 11px; flex: none; margin-right: 0; }
.search-item .si-name { flex: 1; font-size: 13px; font-weight: 600; }
.search-item .si-sub { font-size: 11px; color: var(--ink-mute); }

/* Login gate */
#authGate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 400px at 50% -10%, rgba(0,229,210,.16), transparent 60%), var(--navy-900); }
.auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, var(--panel), var(--navy-800)); border: 1px solid var(--line); border-radius: 18px; padding: 30px 24px; box-shadow: var(--shadow); text-align: center; }
.auth-logo img { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; background: #000; box-shadow: 0 0 0 2px var(--accent), 0 0 26px var(--accent-glow); }
.auth-card h2 { font-size: 21px; font-weight: 800; margin-top: 6px; }
.auth-sub { color: var(--ink-mute); font-size: 13px; margin-bottom: 6px; }
.auth-card input { background: var(--navy-800); border: 1px solid var(--line); color: var(--ink); padding: 12px 14px; border-radius: 10px; font-size: 14px; outline: none; }
.auth-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.auth-card .btn { margin-top: 4px; padding: 12px; font-size: 15px; }
.auth-remember { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; text-align: left; }
.auth-remember input { width: auto; accent-color: var(--accent); }
.auth-err { color: var(--red); font-size: 13px; min-height: 16px; }

/* Print */
@media print {
  .sidebar, .topbar, .btn, .filters, .page-head .btn { display: none !important; }
  #app { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; }
  .card, .stat { border: 1px solid #ccc; box-shadow: none; background: #fff; color: #000; }
}
