/* ══════════════════════════════════════════
   LONNE OPEN — EDITORIAL COURT
   Drop-in replacement · same class names
   Paleta: verde botánico + crema + tinta
   Tipografía: Fraunces (display) + Inter (texto)
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400;1,9..144,500;1,9..144,600&family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Tokens originales — REMAPEADOS al sistema editorial */
  --green: #1f3a2b;       /* tinta verde profunda */
  --gl: #eef0e6;          /* crema claro (verde apagado) */
  --gm: #c9d4a8;          /* salvia / acento sutil */
  --dark: #0e1410;        /* casi negro con verde */
  --mid: #4b5447;
  --muted: #8a8f80;
  --bg: #f6f4ed;          /* crema editorial (papel) */
  --white: #fffdf7;       /* off-white tibio */
  --border: #e4e0d2;      /* línea fina cálida */
  --err: #b0413e;
  --orange: #c97a3a;
  --blue: #3a5a7a;

  /* Acentos editoriales */
  --ink: #0e1410;
  --paper: #f6f4ed;
  --paper-2: #eee9da;
  --rule: #0e1410;
  --accent: #1f3a2b;
  --accent-2: #c9d4a8;
  --hairline: 1px solid var(--border);

  /* Sombras suaves (papel, no glow) */
  --shadow: 0 1px 2px rgba(14,20,16,.04), 0 1px 0 rgba(14,20,16,.03);
  --shadow-lg: 0 24px 60px -20px rgba(14,20,16,.18), 0 2px 6px rgba(14,20,16,.06);

  --nav-h: 64px;
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;

  --ff-display: 'Fraunces', 'Times New Roman', serif;
  --ff-text: 'Inter', system-ui, sans-serif;
}

html, body {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

/* Selección */
::selection { background: var(--ink); color: var(--paper); }

/* ── LAYOUT ── */
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: var(--hairline);
  display: flex; align-items: center;
  padding: 0 28px; gap: 4px;
  box-shadow: none;
}
.nav-logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-style: italic;
  font-size: 26px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  color: var(--ink); letter-spacing: -.02em;
  text-decoration: none; margin-right: 24px; flex-shrink: 0;
  display: flex; align-items: baseline; gap: 6px;
  white-space: nowrap;
}
.nav-logo span {
  color: var(--ink);
  font-style: normal;
  font-family: var(--ff-text);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  align-self: center;
}
.nav-links { display: flex; gap: 0; flex: 1; overflow-x: auto; }
.nav-link {
  font-family: var(--ff-text);
  font-size: 13px; font-weight: 500; letter-spacing: -.005em;
  text-transform: none; color: var(--mid);
  border: none; background: none; cursor: pointer;
  padding: 8px 14px; border-radius: 0; white-space: nowrap;
  transition: color .15s;
  position: relative;
}
.nav-link:hover { color: var(--ink); background: transparent; }
.nav-link.active {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.nav-link.admin-only { display: none; }
.nav-user {
  margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.nav-user-name {
  font-size: 13px; color: var(--mid); font-weight: 500;
  font-family: var(--ff-display); font-style: italic;
}
.btn-logout {
  background: transparent; border: 1px solid var(--border);
  color: var(--mid); padding: 7px 14px; border-radius: var(--r);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: var(--ff-text); letter-spacing: .02em;
  transition: all .15s;
}
.btn-logout:hover { border-color: var(--ink); color: var(--ink); }
.btn-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.btn-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink); border-radius: 0; transition: all .3s;
}
.mobile-menu {
  display: none; position: fixed; inset: 0; background: var(--paper);
  z-index: 200; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-link {
  font-family: var(--ff-display); font-size: 38px; font-weight: 500;
  color: var(--ink); background: none; border: none;
  cursor: pointer; padding: 10px 20px; border-radius: 0;
  letter-spacing: -.02em; transition: all .2s; width: 280px; text-align: center;
}
.mobile-menu-link:hover, .mobile-menu-link.active {
  background: transparent; color: var(--accent);
  font-style: italic;
}
.mobile-menu-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: var(--ink); font-size: 28px; cursor: pointer;
  font-family: var(--ff-text); font-weight: 300;
}

/* ── MAIN CONTENT ── */
#main {
  margin-top: var(--nav-h);
  flex: 1;
}

/* ── VIEWS ── */
.view { display: none; }
.view.active { display: block; min-height: calc(100vh - var(--nav-h)); }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--paper);
  padding: 56px 28px 40px;
  position: relative;
  border-bottom: var(--hairline);
  overflow: hidden;
}
.page-hero.compact {
  padding: 36px 28px 28px;
}
.page-hero.compact h1 {
  font-size: 56px;
}
.page-hero::after {
  content: none;
}
.page-hero .eyebrow {
  font-family: var(--ff-text);
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--mid); font-weight: 500; margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.page-hero .eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--ink);
}
.page-hero h1 {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 88px; line-height: .95;
  letter-spacing: -.035em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  max-width: 18ch;
}
.page-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* ── PAGE WRAP ── */
.page-wrap { max-width: 1240px; margin: 0 auto; padding: 32px 28px 80px; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: border-color .15s;
}
.card:hover { border-color: #d6d1c0; }
.card-title {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 22px; letter-spacing: -.02em;
  color: var(--ink); margin-bottom: 18px;
  display: flex; align-items: baseline; gap: 12px;
}
.card-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
  align-self: center;
}

/* ── BUTTONS ── */
.btn {
  border: none; border-radius: var(--r); cursor: pointer;
  font-family: var(--ff-text); font-weight: 500;
  transition: all .15s;
  letter-spacing: -.005em;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
  padding: 12px 24px;
  font-family: var(--ff-text);
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
  border: 1px solid var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-secondary {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--border);
  padding: 11px 20px; font-size: 13px; font-weight: 500;
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-danger {
  background: transparent; color: var(--err);
  border: 1px solid #e9c8c6;
  padding: 9px 14px; font-size: 13px; font-weight: 500;
}
.btn-danger:hover { background: #fbf1f0; border-color: var(--err); }
.btn-success {
  background: var(--gl); color: var(--accent);
  border: 1px solid #d8dec8;
  padding: 9px 14px; font-size: 13px; font-weight: 500;
}
.btn-warning {
  background: #f7efd9; color: #6b5320;
  border: 1px solid #e5d9b8;
  padding: 9px 14px; font-size: 13px; font-weight: 500;
}
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-sm); }
.btn-icon {
  background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 6px;
  color: var(--mid); border-radius: var(--r-sm);
  transition: all .15s;
}
.btn-icon:hover { color: var(--ink); background: var(--paper-2); }

/* ── FORM FIELDS ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label {
  font-family: var(--ff-text);
  font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--mid);
}
.field input, .field select, .field textarea {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 11px 14px;
  font-family: var(--ff-text);
  font-size: 14px; color: var(--ink); width: 100%;
  transition: all .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); background: var(--white); outline: none;
  box-shadow: 0 0 0 3px rgba(14,20,16,.06);
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--muted); font-style: italic; font-family: var(--ff-display);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(14,20,16,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white);
  border: var(--hairline);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  transform: translateY(12px); transition: transform .2s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-title {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 32px; letter-spacing: -.025em;
  color: var(--ink); margin-bottom: 24px;
}
.modal-actions {
  display: flex; gap: 10px; margin-top: 24px; justify-content: flex-end;
  padding-top: 20px; border-top: var(--hairline);
}

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--ff-text);
  font-size: 11px; font-weight: 500;
  letter-spacing: .04em; text-transform: none;
  padding: 3px 9px; border-radius: 100px;
  border: 1px solid transparent;
}
.badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.badge-green { background: var(--gl); color: var(--accent); border-color: #d8dec8; }
.badge-red { background: #fbf1f0; color: var(--err); border-color: #e9c8c6; }
.badge-yellow { background: #f7efd9; color: #6b5320; border-color: #e5d9b8; }
.badge-blue { background: #e8eef4; color: var(--blue); border-color: #cfdbe5; }
.badge-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── TABLE ── */
.table-wrap {
  overflow-x: auto;
  border: var(--hairline);
  border-radius: var(--r-lg);
  background: var(--white);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  background: var(--white); color: var(--mid);
  padding: 14px 16px; text-align: left;
  font-family: var(--ff-text);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
}
td {
  padding: 14px 16px;
  border-bottom: var(--hairline);
  color: var(--ink);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--paper); }

/* ── KPI GRID ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0;
  margin-bottom: 28px;
  border: var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}
.kpi {
  background: var(--white);
  border-radius: 0;
  padding: 22px 20px;
  box-shadow: none;
  border-top: none;
  border-right: var(--hairline);
  border-bottom: var(--hairline);
  text-align: left;
  position: relative;
}
.kpi:last-child { border-right: none; }
.kpi-val {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 44px; line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
}
.kpi-label {
  font-family: var(--ff-text);
  font-size: 11px; font-weight: 500;
  color: var(--mid); text-transform: uppercase;
  letter-spacing: .18em; margin-top: 8px;
}

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink); color: var(--paper);
  border-radius: var(--r);
  padding: 12px 22px;
  font-family: var(--ff-text);
  font-size: 13px; font-weight: 500;
  transition: transform .3s; z-index: 1000;
  white-space: nowrap; max-width: calc(100vw - 40px); text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--ink);
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.success { background: var(--accent); border-color: var(--accent); }
#toast.error { background: var(--err); border-color: var(--err); }
#toast.warning { background: #6b5320; border-color: #6b5320; }

/* ── LOADER ── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; transition: opacity .25s;
  background: var(--paper);
}
#loader::before { display: none; }
#loader::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, transparent, rgba(14,20,16,.04));
  pointer-events: none;
}
.loader-content { position: relative; z-index: 1; text-align: center; }
.loader-logo {
  font-family: var(--ff-display); font-weight: 500;
  font-style: italic;
  font-size: 64px; color: var(--ink);
  letter-spacing: -.02em; margin-bottom: 24px;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.loader-logo span { color: var(--accent); font-style: normal; }
.loader-dots { display: flex; gap: 8px; justify-content: center; }
.loader-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink);
  animation: pulse 1.2s ease-in-out infinite;
}
.loader-dot:nth-child(2) { animation-delay: .2s; }
.loader-dot:nth-child(3) { animation-delay: .4s; }
#loader.hidden { opacity: 0; pointer-events: none; }

/* ── EMPTY STATE ── */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--mid);
}
.empty-icon {
  font-size: 32px; margin-bottom: 14px; opacity: .5;
  font-family: var(--ff-display); font-style: italic;
}
.empty p {
  font-family: var(--ff-display); font-style: italic;
  font-size: 18px; font-weight: 400; color: var(--mid);
}

/* ── TABS ── */
.tabs {
  display: flex; gap: 0; margin-bottom: 24px; flex-wrap: wrap;
  border-bottom: var(--hairline);
}
.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--mid);
  border-radius: 0;
  padding: 10px 18px;
  margin-bottom: -1px;
  font-family: var(--ff-text);
  font-weight: 500; font-size: 13px;
  cursor: pointer; transition: all .15s;
  letter-spacing: -.005em;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  background: transparent; color: var(--ink);
  border-color: var(--ink);
  font-weight: 600;
}

/* ── ANIMATIONS ── */
@keyframes pulse { 0%, 80%, 100% { transform: scale(.5); opacity: .3; } 40% { transform: scale(1); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeUp .3s ease both; }

/* ── LOGIN VIEW ── */
#view-login {
  min-height: 100vh; margin-top: 0;
  background: var(--paper);
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  position: relative;
}
#view-login.active {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
}
#view-login::before {
  content: 'EST. ' counter(year) ' · MAR DE AJÓ · ARG';
  counter-reset: year 1986;
  position: absolute;
  top: 28px; left: 28px;
  font-family: var(--ff-text);
  font-size: 11px; letter-spacing: .28em;
  color: var(--mid); font-weight: 500;
  z-index: 2;
}
#view-login::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 50%;
  width: 1px; background: var(--border);
}
.login-box {
  background: transparent;
  border-radius: 0;
  padding: 80px 56px;
  width: 100%; max-width: 480px;
  margin: auto;
  box-shadow: none;
}
.login-logo {
  font-family: var(--ff-display);
  font-weight: 500; font-style: italic;
  font-size: 56px; color: var(--ink);
  margin-bottom: 6px; letter-spacing: -.025em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.login-logo span { color: var(--ink); font-style: normal; font-weight: 400; }
.login-sub {
  font-family: var(--ff-text);
  font-size: 13px; color: var(--mid);
  margin-bottom: 36px;
  letter-spacing: .02em;
}
.login-tabs {
  display: flex;
  border-bottom: var(--hairline);
  margin-bottom: 28px;
}
.login-tab {
  flex: 1; padding: 12px 0;
  background: none; border: none;
  font-family: var(--ff-text);
  font-weight: 500; font-size: 13px;
  cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .15s;
  letter-spacing: -.005em;
}
.login-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.login-msg {
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: 13px; margin-bottom: 14px;
  display: none; border: 1px solid transparent;
}
.login-msg.ok { background: var(--gl); color: var(--accent); border-color: #d8dec8; display: block; }
.login-msg.error { background: #fbf1f0; color: var(--err); border-color: #e9c8c6; display: block; }

/* ── CANCHAS GRILLA ── */
.grilla-toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: var(--hairline);
}
.day-nav { display: flex; align-items: center; gap: 10px; }
.day-nav button {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); width: 36px; height: 36px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); transition: all .15s;
}
.day-nav button:hover { border-color: var(--ink); }
.day-label {
  font-family: var(--ff-display); font-weight: 500;
  font-style: italic;
  font-size: 26px; color: var(--ink);
  min-width: 240px; text-align: center;
  letter-spacing: -.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.day-shortcuts { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.day-shortcuts button {
  background: var(--white); border: none;
  border-right: 1px solid var(--border);
  border-radius: 0; padding: 8px 14px;
  font-size: 12px; font-weight: 500;
  cursor: pointer; color: var(--mid);
  font-family: var(--ff-text);
  transition: all .15s;
}
.day-shortcuts button:last-child { border-right: none; }
.day-shortcuts button:hover { background: var(--paper); color: var(--ink); }

.grilla-scroll {
  overflow-x: auto;
  border: var(--hairline);
  border-radius: var(--r-lg);
  background: var(--white);
}
.grilla { display: grid; min-width: 600px; }
.grilla-header {
  display: flex; background: var(--white);
  border-radius: 0; overflow: hidden;
  border-bottom: 1px solid var(--ink);
}
.gh-hora {
  width: 64px; flex-shrink: 0;
  padding: 14px 8px;
  color: var(--mid);
  font-family: var(--ff-text);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .18em;
}
.gh-cancha {
  flex: 1; padding: 14px 12px;
  color: var(--ink);
  font-family: var(--ff-display); font-weight: 500;
  font-size: 18px; text-align: center;
  letter-spacing: -.01em;
  border-left: var(--hairline);
}
.gh-cancha small {
  display: block; font-family: var(--ff-text);
  font-size: 10px; color: var(--mid);
  font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 4px;
}
.grilla-body { display: flex; }
.grilla-horas { width: 64px; flex-shrink: 0; }
.hora-label {
  height: 52px; display: flex; align-items: flex-start;
  padding: 6px 8px;
  font-family: var(--ff-text);
  font-size: 11px; color: var(--mid);
  font-weight: 500;
  border-top: var(--hairline);
  font-feature-settings: 'tnum';
}
.grilla-canchas { flex: 1; display: flex; }
.cancha-col { flex: 1; position: relative; border-left: var(--hairline); }
.slot {
  height: 52px;
  border-top: var(--hairline);
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.slot:hover { background: var(--gl); }
.slot.media-hora {
  border-top-style: dashed;
  border-top-color: rgba(14,20,16,.06);
}
.reserva-block {
  position: absolute; left: 3px; right: 3px;
  border-radius: var(--r-sm);
  padding: 6px 10px; cursor: pointer; overflow: hidden;
  transition: all .15s; z-index: 2;
  border: 1px solid transparent;
}
.reserva-block:hover { transform: translateX(1px); }
.reserva-block.alquiler {
  background: var(--white);
  color: var(--blue);
  border-color: var(--blue);
  border-left: 3px solid var(--blue);
}
.reserva-block.fija {
  background: var(--white);
  color: var(--accent);
  border-color: var(--accent);
  border-left: 3px solid var(--accent);
}
.reserva-block.clase {
  background: var(--white);
  color: var(--orange);
  border-color: var(--orange);
  border-left: 3px solid var(--orange);
}
.reserva-block.partido {
  background: var(--white);
  color: #6b3aa8;
  border-color: #6b3aa8;
  border-left: 3px solid #6b3aa8;
}
.reserva-block.ocupado {
  background: var(--paper-2);
  color: var(--mid);
  border-color: var(--border);
  cursor: default;
}
.rb-nombre {
  font-weight: 600; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: inherit;
  letter-spacing: -.005em;
}
.rb-hora {
  font-size: 10px;
  color: inherit; opacity: .7;
  font-feature-settings: 'tnum';
  margin-top: 1px;
}
.now-line {
  position: absolute; left: 0; right: 0;
  height: 1px; background: var(--err); z-index: 3;
}
.now-line::before {
  content: 'AHORA';
  position: absolute; left: 4px; top: -7px;
  font-family: var(--ff-text);
  font-size: 9px; font-weight: 600;
  letter-spacing: .14em;
  color: var(--err);
  background: var(--white);
  padding: 0 4px;
}
.now-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--err);
  position: absolute; left: -3px; top: -2.5px;
}

/* ── ALUMNOS ── */
.alumno-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
  border: var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}
.alumno-card {
  background: var(--white);
  border: none;
  border-right: var(--hairline);
  border-bottom: var(--hairline);
  border-radius: 0;
  padding: 20px;
  box-shadow: none;
  cursor: pointer;
  transition: background .12s;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.alumno-card:hover { background: var(--paper); transform: none; border-color: var(--border); }
.alumno-card.selected {
  background: var(--gl);
}
.alumno-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 500;
  font-style: italic;
  font-size: 18px; color: var(--ink); flex-shrink: 0;
  letter-spacing: -.01em;
}
.alumno-card.selected .alumno-avatar {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.alumno-nombre {
  font-family: var(--ff-text);
  font-weight: 600; font-size: 15px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.alumno-sub {
  font-family: var(--ff-text);
  font-size: 12px; color: var(--mid);
  margin-top: 2px;
}
.alumno-saldo {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 24px;
  letter-spacing: -.02em;
  font-feature-settings: 'tnum';
}
.saldo-pos { color: var(--accent); }
.saldo-neg { color: var(--err); }
.saldo-zero { color: var(--muted); }

/* ── CLASES HORARIO ── */
.horario-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin-bottom: 28px;
  border: var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}
.dia-col {
  background: var(--white);
  border-radius: 0;
  border-right: var(--hairline);
  overflow: hidden;
  box-shadow: none;
}
.dia-col:last-child { border-right: none; }
.dia-header {
  background: var(--white);
  color: var(--ink);
  padding: 14px 8px;
  text-align: center;
  font-family: var(--ff-display); font-weight: 500;
  font-size: 18px; letter-spacing: -.01em;
  border-bottom: 1px solid var(--ink);
}
.dia-header.hoy {
  background: var(--ink); color: var(--paper);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.clase-card {
  margin: 8px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all .12s;
}
.clase-card:hover { background: var(--white); border-color: var(--ink); }
.clase-card.inscripto {
  border-left-color: var(--ink);
  background: var(--gl);
}
.clase-card.lleno {
  border-left-color: var(--err);
  opacity: .7;
}
.clase-hora {
  font-family: var(--ff-text);
  font-size: 11px; font-weight: 500;
  color: var(--mid);
  letter-spacing: .04em;
  font-feature-settings: 'tnum';
}
.clase-nombre {
  font-family: var(--ff-text);
  font-weight: 600; font-size: 13px;
  color: var(--ink); letter-spacing: -.005em;
  margin-top: 2px;
}
.clase-profe {
  font-family: var(--ff-display); font-style: italic;
  font-size: 12px; color: var(--mid);
  margin-top: 2px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-hero { padding: 40px 20px 32px; }
  .page-hero h1 { font-size: 56px; }
  .page-hero.compact h1 { font-size: 38px; }
  #view-login.active { grid-template-columns: 1fr; }
  #view-login::after { display: none; }
}

@media (max-width: 768px) {
  #nav { padding: 0 18px; }
  .nav-links { display: none; }
  .btn-hamburger { display: flex; }
  .nav-link.active { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .horario-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .page-hero h1 { font-size: 44px; }
  .page-wrap { padding: 24px 18px 60px; }
  .login-box { padding: 56px 32px; }
}

@media (max-width: 480px) {
  .horario-grid { grid-template-columns: repeat(2, 1fr); }
  .alumno-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 38px; }
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ── COMANDA ── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.prod-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 10px;
  cursor: pointer; text-align: left;
  transition: all .12s;
}
.prod-btn:hover {
  border-color: var(--ink);
  background: var(--paper);
}
.prod-nombre {
  font-family: var(--ff-text);
  font-weight: 600; font-size: 13px;
  color: var(--ink); letter-spacing: -.005em;
}
.prod-precio {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 22px; color: var(--ink);
  letter-spacing: -.02em;
  font-feature-settings: 'tnum';
  margin-top: 4px;
}
.prod-cat {
  font-family: var(--ff-display); font-style: italic;
  font-size: 11px; color: var(--mid);
  margin-top: 2px;
}
.comanda-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: var(--hairline);
  border-radius: var(--r);
  margin-bottom: 8px;
}
.ci-nombre {
  flex: 1;
  font-family: var(--ff-text);
  font-weight: 500; font-size: 14px;
  color: var(--ink);
}
.ci-qty { display: flex; align-items: center; gap: 8px; }
.ci-qty button {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--white); cursor: pointer;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); transition: all .12s;
}
.ci-qty button:hover { border-color: var(--ink); background: var(--paper); }
.ci-precio {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 20px; color: var(--ink);
  min-width: 80px; text-align: right;
  letter-spacing: -.02em;
  font-feature-settings: 'tnum';
}

/* ── EDITORIAL DETAILS (extras pequeños que enriquecen) ── */

/* Drop cap opcional para textos largos en cards */
.card .lead::first-letter {
  font-family: var(--ff-display);
  font-size: 3.4em;
  font-weight: 500;
  font-style: italic;
  float: left;
  line-height: .9;
  margin: 4px 8px 0 0;
  color: var(--accent);
}

/* Números grandes con tabular */
.kpi-val, .alumno-saldo, .prod-precio, .ci-precio {
  font-feature-settings: 'tnum', 'lnum';
}

/* Links inline dentro de cards */
.card a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-2);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.card a:hover { text-decoration-color: var(--ink); }

/* Scrollbar fino */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--mid); }
