/* ═══════════════════════════════════════════════════════════════════════
   AX Archery — Design System Compartido
   Incluir con: <link rel="stylesheet" href="/ax.css">
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://api.fontshare.com/v2/css?f[]=clash-display@600,700&f[]=general-sans@400,500,600,700&display=swap');

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
  --display: "Clash Display","General Sans",system-ui,sans-serif;
  --body:    "General Sans",system-ui,-apple-system,sans-serif;
  --r: 10px; --r-lg: 14px;
}
[data-theme="night"] {
  --bg:       #08090A;
  --screen:   #0E0F11;
  --surface:  #15171A;
  --surface-2:#1B1E22;
  --line:     #2A2D32;
  --line-soft:#212429;
  --ink:      #F5F3EC;
  --ink-dim:  #D2D0C9;
  --ink-mute: #ABADB3;
  --gold:     #E8B23A;
  --gold-ink: #E8B23A;
  --blue:     #6F9BF2;
  --green:    #5FB87A;
  --amber:    #E0A93C;
  --red:      #E0795B;
  --edit-ink: #1a1405;
  --focus-bg: linear-gradient(#1a1610,#15140f);
  --focus-border: rgba(232,178,58,.4);
}
[data-theme="day"] {
  --bg:       #E7E4DC;
  --screen:   #FBFAF6;
  --surface:  #FFFFFF;
  --surface-2:#EEEBE3;
  --line:     #CFCBC1;
  --line-soft:#E2DFD6;
  --ink:      #121315;
  --ink-dim:  #2A2B2E;
  --ink-mute: #44464B;
  --gold:     #E8B23A;
  --gold-ink: #7A5400;
  --blue:     #1E4FB8;
  --green:    #1F6B3F;
  --amber:    #8A5A00;
  --red:      #B4452A;
  --edit-ink: #241900;
  --focus-bg: #FBF2D8;
  --focus-border: #C79410;
}

/* ── Reset base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
input, select, textarea { font-size: 16px !important; }

/* ── Header ──────────────────────────────────────────────────────────── */
.header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  background: var(--screen);
  position: sticky; top: 0; z-index: 10;
}
.header-back {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink-mute); text-decoration: none;
  font-size: 13px; padding: 6px 4px;
  border-radius: 8px; transition: color .15s; flex-shrink: 0;
  background: none; border: none; cursor: pointer; font-family: var(--body);
}
.header-back:hover { color: var(--ink); }
.header-back svg { width: 18px; height: 18px; }
.header-title {
  flex: 1; min-width: 0;
  font-family: var(--display); font-size: 17px; font-weight: 600;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-mute); padding: 7px 13px; border-radius: 8px;
  font-size: 13px; cursor: pointer; transition: all .15s;
  text-decoration: none; display: inline-flex; align-items: center;
  gap: 5px; font-family: var(--body); white-space: nowrap; min-height: 34px;
}
.btn:hover { color: var(--ink); border-color: var(--ink-mute); }
.btn-primary {
  background: var(--gold); border-color: var(--gold);
  color: var(--edit-ink); font-weight: 700;
}
.btn-primary:hover { opacity: .9; }
.btn-danger {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  border-color: color-mix(in srgb, var(--red) 30%, transparent);
  color: var(--red);
}
.btn-danger:hover { background: color-mix(in srgb, var(--red) 22%, transparent); }
.btn-sm { padding: 5px 10px; font-size: 12px; min-height: 28px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost-hdr {
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-mute); font-size: 16px; width: 36px; height: 36px;
  border-radius: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.btn-edit {
  background: var(--gold); color: var(--edit-ink);
  border: none; font-family: var(--body); font-weight: 700;
  font-size: 13px; padding: 8px 15px; border-radius: 9px; cursor: pointer;
}

/* ── Status pills ────────────────────────────────────────────────────── */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 20px;
  flex-shrink: 0;
}
.status-pill i { width: 6px; height: 6px; border-radius: 50%; }
.s-activo  { background: color-mix(in srgb,var(--green) 14%,transparent); color: var(--green); border: 1px solid color-mix(in srgb,var(--green) 28%,transparent); }
.s-activo i { background: var(--green); }
.s-pausado { background: color-mix(in srgb,var(--amber) 14%,transparent); color: var(--amber); border: 1px solid color-mix(in srgb,var(--amber) 28%,transparent); }
.s-pausado i { background: var(--amber); }
.s-inactivo { background: var(--surface-2); color: var(--ink-mute); border: 1px solid var(--line); }
.s-inactivo i { background: var(--ink-mute); }

/* ── Age / tag pills ─────────────────────────────────────────────────── */
.pill-0  { background: color-mix(in srgb,var(--green) 16%,transparent); color: var(--green); }
.pill-7  { background: color-mix(in srgb,var(--gold)  16%,transparent); color: var(--gold-ink); }
.pill-14 { background: color-mix(in srgb,var(--amber) 16%,transparent); color: var(--amber); }
.pill-30 { background: color-mix(in srgb,var(--blue)  16%,transparent); color: var(--blue); }
.pill-60 { background: color-mix(in srgb,var(--red)   16%,transparent); color: var(--red); }

/* ── States ──────────────────────────────────────────────────────────── */
.loading { text-align: center; padding: 4rem 1rem; color: var(--ink-mute); }
.error {
  margin: 16px; padding: 16px; border-radius: 10px; font-size: 14px; line-height: 1.6;
  color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, transparent);
}
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-mute); font-size: 14px; }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.72); z-index: 1000;
  align-items: flex-end; justify-content: center;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px 18px 0 0; padding: 20px 16px 32px;
  width: 100%; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal-handle { width: 36px; height: 4px; background: var(--line); border-radius: 2px; margin: 0 auto 18px; }
.modal h2 { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 18px; }

/* ── Form fields (modal) ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.field input, .field select, .field textarea {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  padding: 11px 12px; border-radius: 8px; font-size: 15px;
  font-family: var(--body); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 80px; }

/* ═══════════════════════════════════════════════════════════════════════
   Student Profile — Components
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tabs ────────────────────────────────────────────────────────────── */
.tab-bar-outer {
  display: flex; gap: 6px;
  padding: 10px 14px 0;
  background: var(--screen);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 57px; z-index: 9;
}
.tab {
  flex: 1; text-align: center;
  padding: 10px 0 9px;
  border: none; border-bottom: 2px solid transparent;
  font-weight: 600; font-size: 14px; color: var(--ink-mute);
  background: transparent; cursor: pointer; font-family: var(--body);
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab .badge {
  display: inline-block; margin-left: 5px;
  font-size: 13px; font-weight: 700; color: var(--gold-ink);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Page layout ─────────────────────────────────────────────────────── */
.page { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 600px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px; }
.section-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-mute); margin-bottom: 12px; font-weight: 700;
}

/* ── Identity block ──────────────────────────────────────────────────── */
.identity { padding: 4px 4px 20px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.id-top { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 50%, #4f86f7 0 34%, #3c6fd6 34% 58%, #2c54aa 58% 100%);
  font-family: var(--display); font-weight: 700; font-size: 19px; color: #fff;
}
.avatar::after {
  content:""; position: absolute; inset: -4px;
  border-radius: 50%; border: 1.5px solid var(--gold);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.avatar-upload { cursor: pointer; }
.avatar-cam {
  display: none; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); place-items: center; font-size: 20px;
}
.avatar.avatar-upload:hover .avatar-cam { display: grid; }
.id-name { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.1; letter-spacing: -.01em; color: var(--ink); }
.id-sub { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 13px; flex-wrap: wrap; }
.id-sub .lvl { color: var(--blue); font-weight: 700; }
.id-sub .dot { color: var(--ink-mute); }
.id-sub .mod { color: var(--ink-dim); font-weight: 500; }
.id-top .status-pill { margin-left: auto; align-self: flex-start; }
.id-data { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 18px; }
.data-k { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.data-v { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.data-v .u { color: var(--ink-dim); font-size: 13px; font-weight: 400; }

/* ── Collapsible sections ────────────────────────────────────────────── */
.sec-toggle {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; user-select: none;
  padding: 12px 0 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 2px;
}
.sec-toggle-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-mute); font-weight: 700; flex: 1;
}
.sec-caret {
  width: 16px; height: 16px; color: var(--ink-mute);
  transition: transform .2s ease; flex: none; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.sec-toggle.open .sec-caret { transform: rotate(180deg); }
.sec-collapsible { display: none; padding-top: 4px; }
.sec-collapsible.open { display: block; }

/* ── Plan / report fields ────────────────────────────────────────────── */
.plan-section-head {
  font-size: 13px; color: var(--ink-mute); text-transform: uppercase;
  letter-spacing: .07em; margin: 14px 0 7px; font-weight: 700;
}
.plan-field {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
}
.plan-field:last-of-type { border-bottom: none; }
.pf-label { flex: 1; font-size: 13.5px; color: var(--ink-dim); }
.pf-input {
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); padding: 6px 9px; border-radius: 7px;
  font-size: 14px; font-family: var(--body); width: 90px; text-align: right;
}
.pf-input:focus { outline: none; border-color: var(--gold); }
.pf-unit { font-size: 12px; color: var(--ink-mute); min-width: 20px; }
.plan-total-row {
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb,var(--gold) 10%,transparent);
  border: 1px solid color-mix(in srgb,var(--gold) 25%,transparent);
  border-radius: 8px; padding: 9px 13px; margin: 10px 0 4px;
}
.plan-total-label { font-size: 13px; color: var(--ink-mute); }
.plan-total-val { font-size: 1.3rem; font-weight: 700; color: var(--gold); }
.series-fields { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-mute); }
.series-fields input { width: 64px; }
.senti-row { display: flex; gap: 10px; align-items: center; }
.senti-btn {
  font-size: 1.5rem; background: none; border: 2px solid transparent;
  border-radius: 50%; width: 44px; height: 44px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.senti-btn.active { border-color: var(--gold); background: color-mix(in srgb,var(--gold) 12%,transparent); }
.senti-nota {
  width: 100%; margin-top: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); padding: 7px 10px; border-radius: 7px;
  font-size: 14px; font-family: var(--body); resize: none; min-height: 52px;
}
.senti-nota:focus { outline: none; border-color: var(--gold); }
.estado-row { display: flex; align-items: center; gap: 10px; }
.estado-input { width: 60px; text-align: center; }
.estado-hint { font-size: 13px; color: var(--ink-mute); }
.sec-footer { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plan-save-btn {
  background: var(--gold); border: none; color: var(--edit-ink);
  padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: var(--body);
}
.report-save-btn {
  background: var(--green); border: none; color: var(--edit-ink);
  padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: var(--body);
}
.fisico-toggle {
  font-size: 13px; color: var(--ink-mute); text-transform: uppercase;
  letter-spacing: .07em; cursor: pointer; padding: 12px 0 5px; user-select: none;
}

/* ── Plan log history ────────────────────────────────────────────────── */
.plan-log-section { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.plan-log-toggle {
  font-size: 12.5px; color: var(--ink-mute); cursor: pointer;
  display: flex; align-items: center; gap: 5px; padding: 2px 0;
}
.plan-log-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.plan-log-entry { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.ple-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.ple-week { font-size: 13px; font-weight: 600; color: var(--ink-dim); flex: 1; }
.ple-body { padding: 6px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.ple-item { font-size: 13px; color: var(--ink-mute); display: flex; gap: 8px; }
.ple-item .qty { color: var(--gold); }
.ple-actions { display: flex; gap: 6px; padding: 6px 12px 10px; border-top: 1px solid var(--line-soft); }

/* ── Technique cycle ─────────────────────────────────────────────────── */
.cycle-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 4px 16px; }
.cycle-head h2 { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--ink); }
.cycle-head .meta { font-size: 12px; color: var(--ink-mute); font-weight: 600; }
.cycle { position: relative; padding-left: 38px; display: flex; flex-direction: column; gap: 6px; }
.cycle::before {
  content:""; position: absolute; left: 14px; top: 13px; bottom: 13px;
  width: 2px; background: var(--line);
}
.stage { position: relative; }
.node {
  position: absolute; left: -38px; top: 13px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-family: var(--display);
  background: var(--screen); border: 2px solid var(--line);
  color: var(--ink-mute); z-index: 1;
}
.stage.done .node   { border-color: var(--green); color: var(--green); }
.stage.review .node { border-color: var(--amber); color: var(--amber); }
.stage.focus .node  { border-color: var(--gold); background: var(--gold); color: var(--edit-ink); }
.stage-card { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.stage.focus .stage-card { border: 1.5px solid var(--focus-border); background: var(--focus-bg); }
.stage-top { display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer; user-select: none; }
.stage-name { font-weight: 600; font-size: 15px; color: var(--ink); flex: 1; }
.st { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.st i { width: 7px; height: 7px; border-radius: 50%; }
.st.done   { color: var(--green); }  .st.done i   { background: var(--green); }
.st.review { color: var(--amber); }  .st.review i { background: var(--amber); }
.st.focus  { color: var(--gold-ink); } .st.focus i { background: var(--gold); }
.st.pend   { color: var(--ink-mute); } .st.pend i  { background: var(--ink-mute); }
.stage-note { display: none; padding: 0 14px 14px; font-size: 13.5px; color: var(--ink-dim); line-height: 1.55; }
.stage.open .stage-note { display: block; }
.stage.focus .stage-note { display: block; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 7px; }
.entry-meta-item { font-size: 12px; color: var(--ink-mute); }
.entry-meta-item span { color: var(--ink-dim); }
.entry-notas { font-size: 13.5px; color: var(--ink-dim); line-height: 1.6; white-space: pre-wrap; }
.entry-notas.empty { color: var(--ink-mute); font-style: italic; }
.entry-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.entry-date { font-size: 13px; color: var(--ink-mute); flex: 1; }
.hist-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: var(--surface-2); border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-mute); cursor: pointer;
}
.hist-list { background: var(--bg); border-top: 1px solid var(--line-soft); }
.hist-item { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 5px; }
.hist-item:last-child { border-bottom: none; }
.hist-head { display: flex; align-items: center; gap: 8px; }
.hist-date { font-size: 13px; color: var(--ink-mute); flex: 1; }
.hist-meta { font-size: 12px; color: var(--ink-mute); }
.hist-notas { font-size: 13px; color: var(--ink-dim); line-height: 1.5; white-space: pre-wrap; }
.hist-notas.empty { color: var(--ink-mute); font-style: italic; }

/* ── Profile detail fields ───────────────────────────────────────────── */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-full { grid-column: 1 / -1; }
.fl { font-size: 13px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.fv { font-size: 14.5px; color: var(--ink); font-weight: 500; margin-top: 3px; }
.fv.accent { color: var(--blue); }
.fv.green  { color: var(--green); }
.divider { border: none; border-top: 1px solid var(--line-soft); margin: 12px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.role-controls { display: flex; align-items: center; gap: 8px; }
.ci .cl { font-size: 13px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.ci .cv { font-size: 13.5px; color: var(--ink-dim); margin-top: 3px; }
.ci .cv a { color: var(--blue); text-decoration: none; }
.notes-block { margin-top: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--line-soft); }
.notes-label { font-size: 13px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; font-weight: 700; }
.notes-text { font-size: 13.5px; color: var(--ink-dim); line-height: 1.6; white-space: pre-wrap; }

/* ── QR ──────────────────────────────────────────────────────────────── */
.qr-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#qrCode { background: #fff; padding: 10px; border-radius: 8px; }
#qrCode canvas, #qrCode img { display: block; }
.qr-url { font-size: 10px; color: var(--ink-mute); text-align: center; word-break: break-all; font-family: monospace; }
.qr-actions { display: flex; gap: 8px; }

/* ── Modal form (.mf) ────────────────────────────────────────────────── */
.mform { display: flex; flex-direction: column; gap: 14px; }
.mf { display: flex; flex-direction: column; gap: 5px; }
.mf label { font-size: 13px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.mf input, .mf select, .mf textarea {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  padding: 11px 12px; border-radius: 8px; font-size: 15px;
  font-family: var(--body); width: 100%;
}
.mf input:focus, .mf select:focus, .mf textarea:focus { outline: none; border-color: var(--gold); }
.mf textarea { resize: vertical; min-height: 100px; }
.mf .hint { font-size: 13px; color: var(--gold-ink); margin-top: 3px; }
.modal-acts { display: flex; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.modal-acts .btn { flex: 1; justify-content: center; min-height: 44px; font-size: 14px; }

/* ── Schedule / class selectors ──────────────────────────────────────── */
.sched-section-lbl { font-size: 13px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 4px; font-weight: 700; }
.sched-grid { border-collapse: collapse; width: 100%; }
.sched-grid th { font-size: 13px; color: var(--ink-mute); padding: 2px 4px; text-align: center; font-weight: 500; }
.sched-day-lbl { font-size: 12px; color: var(--ink-mute); padding-right: 6px; white-space: nowrap; text-align: left; }
.slot-cell {
  width: 30px; height: 26px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 4px; cursor: pointer; display: block; margin: 2px auto; transition: background .12s, border-color .12s;
}
.slot-cell:hover { border-color: var(--gold); }
.slot-cell.on { background: var(--gold); border-color: var(--gold); }
.sched-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sched-chip {
  background: color-mix(in srgb,var(--gold) 12%,transparent);
  border: 1px solid color-mix(in srgb,var(--gold) 30%,transparent);
  color: var(--gold-ink); padding: 2px 8px; border-radius: 99px; font-size: 13px;
}
.clase-day-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; flex-wrap: wrap; }
.clase-day-lbl { font-size: 12px; color: var(--ink-mute); width: 28px; flex-shrink: 0; }
.clase-chk {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-mute); padding: 4px 10px; border-radius: 99px;
  font-size: 12.5px; cursor: pointer; transition: all .12s;
}
.clase-chk input { display: none; }
.clase-chk.on { background: color-mix(in srgb,var(--gold) 14%,transparent); border-color: var(--gold); color: var(--gold-ink); }

/* ── Credits ─────────────────────────────────────────────────────────── */
.credits-banner {
  background: color-mix(in srgb,var(--gold) 10%,transparent);
  border: 1px solid color-mix(in srgb,var(--gold) 25%,transparent);
  border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.credits-num { font-size: 2.2rem; font-weight: 700; color: var(--gold); line-height: 1; font-family: var(--display); }
.credits-lbl { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.credits-sub { font-size: 13.5px; color: var(--ink-mute); margin-top: 3px; }
.sus-card { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 13px 14px; margin-bottom: 8px; }
.sus-card.sus-active { border-color: color-mix(in srgb,var(--gold) 35%,transparent); }
.sus-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sus-name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.sus-pill { padding: 2px 8px; border-radius: 99px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.sus-pill.activa    { background: color-mix(in srgb,var(--green) 16%,transparent); color: var(--green); }
.sus-pill.agotada   { background: color-mix(in srgb,var(--amber) 16%,transparent); color: var(--amber); }
.sus-pill.vencida   { background: var(--surface-2); color: var(--ink-mute); border: 1px solid var(--line); }
.sus-pill.cancelada { background: var(--surface-2); color: var(--ink-mute); }
.credit-bar-bg { background: var(--line); border-radius: 99px; height: 5px; margin: 8px 0 4px; overflow: hidden; }
.credit-bar-fill { height: 100%; border-radius: 99px; background: var(--gold); }
.credit-bar-lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-mute); }
.sus-dates { font-size: 13px; color: var(--ink-mute); margin-top: 6px; }

/* ── Reservas ────────────────────────────────────────────────────────── */
.res-item { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 11px; margin-bottom: 8px; }
.res-item.res-reservado { border-color: color-mix(in srgb,var(--blue) 35%,transparent); }
.res-item.res-cancelado { opacity: .5; }
.res-date-blk { text-align: center; min-width: 42px; }
.res-date-day { font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; }
.res-date-num { font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.1; font-family: var(--display); }
.res-date-mon { font-size: 10px; color: var(--ink-mute); }
.res-info { flex: 1; min-width: 0; }
.res-hora { font-size: 15px; font-weight: 700; color: var(--blue); }
.res-loc  { font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }
.res-cred { font-size: 13px; color: var(--ink-mute); margin-top: 2px; }
.res-status { font-size: 10.5px; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; font-weight: 700; }
.res-status.reservado { background: color-mix(in srgb,var(--blue) 15%,transparent); color: var(--blue); }
.res-status.cancelado { background: var(--surface-2); color: var(--ink-mute); }
.res-status.asistio   { background: color-mix(in srgb,var(--green) 15%,transparent); color: var(--green); }
.res-status.noshow    { background: color-mix(in srgb,var(--red) 15%,transparent); color: var(--red); }

/* ── Booking date chips ──────────────────────────────────────────────── */
.date-chip {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-mute);
  padding: 5px 11px; border-radius: 7px; font-size: 12.5px; cursor: pointer;
  transition: all .12s; font-family: var(--body);
}
.date-chip:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-ink); background: color-mix(in srgb,var(--gold) 10%,transparent); }
.date-chip:disabled { opacity: .4; cursor: not-allowed; }

/* ── Desktop overrides ───────────────────────────────────────────────── */
@media(min-width: 640px) {
  .header { padding: 14px 24px; }
  .contact-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-bg { align-items: center; }
  .modal { border-radius: 14px; width: 520px; max-width: 94vw; padding: 24px; }
  .modal-handle { display: none; }
  #editBg .mform { display: grid; grid-template-columns: 1fr 1fr; }
  #editBg .mf-full { grid-column: 1 / -1; }
}
@media print {
  .header-actions, .modal-bg, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ccc; }
}
