/* Academia de Lucha RFT — v3.0 Standalone */
:root {
  --bg:#0f0f1a; --sf:#1a1a2e; --sf2:#222240; --bd:#2a2a45;
  --t:#ffffff;  --t2:#aaaacc; --t3:#666688;
  --red:#e0201a; --rd:#b81610; --rl:rgba(224,32,26,.15);
  --gr:#16a34a;  --gl:rgba(22,163,74,.15);
  --yw:#d97706;  --yl:rgba(217,119,6,.15);
  --sw:240px; --r:12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background: var(--bg); color: var(--t); }
a { text-decoration: none; }

/* ── LOGIN ─────────────────────────────── */
#rft-login-wrap {
  min-height: 100vh; background: #080814;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
#rft-login-box {
  background: #1a1a2e; border: 1px solid #252542; border-radius: 20px;
  padding: 48px 40px; width: 100%; max-width: 440px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.rft-logo {
  width: 72px; height: 72px; background: var(--red); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; margin: 0 auto 24px;
}
#rft-login-box h1 { color: #fff; font-size: 26px; font-weight: 700; }
.rft-sub { color: #8888aa; font-size: 14px; display: block; margin: 6px 0 28px; }
#rft-login-box label { display: block; text-align: left; color: #aaaacc; font-size: 13px; font-weight: 600; margin-bottom: 8px; margin-top: 4px; }
#rft-em, #rft-pw {
  width: 100%; padding: 14px 16px; background: #0d0d20;
  border: 1px solid #252542; border-radius: 10px; color: #fff;
  font-size: 15px; outline: none; display: block; margin-bottom: 20px;
}
#rft-em:focus, #rft-pw:focus { border-color: var(--red); }
.rft-pw-wrap { position: relative; }
.rft-pw-wrap #rft-pw { padding-right: 44px; }
.rft-eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #555577; cursor: pointer; font-size: 18px; }
#rft-err { padding: 12px 16px; border-radius: 8px; font-size: 14px; color: #ff6b6b; background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.25); margin-bottom: 16px; text-align: left; }

/* ── APP SHELL ──────────────────────────── */
#rft-app { display: flex; min-height: 100vh; }
#rft-side {
  width: var(--sw); background: #111120;
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; z-index: 200;
  height: 100vh; height: 100dvh;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-right: 1px solid var(--bd);
}
.rft-brand { display: flex; align-items: center; gap: 12px; padding: 20px 16px 16px; border-bottom: 1px solid var(--bd); }
.rft-logo-sm { width: 36px; height: 36px; background: var(--red); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; }
.rft-brand strong { display: block; font-size: 14px; font-weight: 700; color: #fff; }
.rft-brand span { font-size: 11px; color: #444466; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.rft-nav-lbl { font-size: 10px; color: #333355; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 16px 16px 6px; display: block; }
.rft-nav-a { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: #8888aa; font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.rft-nav-icon { width: 18px; text-align: center; font-size: 15px; }
.rft-nav-a:hover { background: #1e1e35; color: #cccce8; }
.rft-nav-a.active { background: var(--red); color: #fff; }
.rft-side-foot { padding: 8px 0 16px; border-top: 1px solid var(--bd); margin-top: auto; }
#rft-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 150; }
#rft-overlay.show { display: block; }
#rft-main { flex: 1; margin-left: var(--sw); min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
#rft-topbar { display: none; padding: 12px 16px; background: var(--sf); border-bottom: 1px solid var(--bd); }
#rft-topbar button { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--t); }
#rft-content { padding: 28px; flex: 1; overflow-x: hidden; }

/* ── PAGE HEADER ────────────────────────── */
.rft-ph { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.rft-ph h2 { font-size: 24px; font-weight: 800; color: var(--t); }
.rft-ph p  { font-size: 14px; color: var(--t2); margin-top: 2px; }
.rft-back  { font-size: 28px; color: var(--t3); font-weight: 300; }
.rft-stitle { font-size: 14px; font-weight: 700; color: var(--t); margin: 8px 0 12px; }

/* ── BUTTONS ────────────────────────────── */
.rft-btn-red { background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .2s; white-space: nowrap; }
.rft-btn-red:hover { background: var(--rd); }
.rft-btn-red-sm { background: var(--red); color: #fff; border: none; border-radius: 6px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rft-btn-outline { background: transparent; color: var(--t2); border: 1.5px solid var(--bd); border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .2s; }
.rft-btn-outline:hover { border-color: var(--red); color: var(--red); }
.rft-btn-green { background: #16a34a; color: #fff; border: none; border-radius: 10px; padding: 14px 20px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; }
.rft-btn-green:hover { background: #15803d; }
.rft-btn-full { width: 100%; margin-top: 12px; justify-content: center; }
.rft-btn-sm { background: var(--sf2); border: 1px solid var(--bd); color: var(--t2); border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.rft-btn-sm--green { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.3); color: #4ade80; }
.rft-btn-sm--green:hover { background: rgba(74,222,128,0.2); }
.rft-btn-danger { background: #dc2626; color: #fff; border: none; border-radius: 6px; padding: 8px 14px; font-size: 13px; cursor: pointer; }
.rft-btn-danger:hover { background: #b91c1c; }
.rft-link { color: var(--red); font-size: 13px; font-weight: 500; }
.rft-link:hover { text-decoration: underline; }

/* ── CARDS ──────────────────────────────── */
.rft-card { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r); padding: 22px; margin-bottom: 16px; }
.rft-card-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.rft-card-t { font-size: 15px; font-weight: 700; color: var(--t); }
.rft-card-danger { border-color: rgba(220,38,38,.3); background: rgba(220,38,38,.04); }

/* ── METRICS ────────────────────────────── */
.rft-metrics  { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 28px; }
.rft-metrics3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rft-mc { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r); padding: 22px; position: relative; overflow: hidden; }
.rft-mc-success { border-left: 4px solid var(--gr); }
.rft-mc-warn    { border-left: 4px solid var(--yw); }
.rft-mc-danger  { border-left: 4px solid var(--red); }
.rft-mc-lbl { font-size: 13px; color: var(--t2); font-weight: 500; margin-bottom: 8px; }
.rft-mc-val { font-size: 32px; font-weight: 800; color: var(--t); }
.rft-mc-ico { position: absolute; right: 16px; bottom: 14px; font-size: 28px; opacity: .2; }

/* ── AVATAR ─────────────────────────────── */
.rft-av    { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.rft-av-sm { width: 40px; height: 40px; font-size: 13px; }
.rft-av-lg { width: 100px; height: 100px; font-size: 28px; margin: 0 auto 14px; }

/* ── BELT BADGE ─────────────────────────── */
.rft-bb    { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid rgba(0,0,0,.2); }
.rft-bb-lg { padding: 6px 18px; font-size: 14px; margin-top: 8px; }

/* ── STATUS ─────────────────────────────── */
.rft-st              { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.rft-st--pagado      { background: var(--gl); color: #4ade80; }
.rft-st--por_caducar { background: var(--yl); color: #fbbf24; }
.rft-st--no_pagado   { background: var(--rl); color: #ff6b6b; }

/* ── FILTERS ────────────────────────────── */
.rft-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rft-fb { padding: 7px 18px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; background: var(--sf); border: 1.5px solid var(--bd); color: var(--t2); transition: all .15s; }
.rft-fb:hover, .rft-fb.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── SEARCH ─────────────────────────────── */
.rft-search { display: flex; align-items: center; gap: 10px; background: var(--sf); border: 1.5px solid var(--bd); border-radius: 10px; padding: 11px 16px; margin-bottom: 16px; }
.rft-search input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--t); }
.rft-search span { color: var(--t3); }

/* ── STUDENTS GRID ──────────────────────── */
.rft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 12px; }
.rft-sc { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r); padding: 16px; cursor: pointer; transition: border-color .2s, box-shadow .2s; position: relative; }
.rft-sc:hover { border-color: var(--red); box-shadow: 0 4px 20px rgba(224,32,26,.12); }
.rft-sc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }

/* ── STUDENT ROW ────────────────────────── */
.rft-srow { display: flex; align-items: center; gap: 12px; padding: 13px 10px; border-bottom: 1px solid var(--bd); cursor: pointer; border-radius: 8px; transition: background .1s; }
.rft-srow:last-child { border-bottom: none; }
.rft-srow:hover { background: var(--sf2); }
.rft-si { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rft-si strong { font-size: 14px; font-weight: 600; color: var(--t); }
.rft-si small { font-size: 11px; color: var(--t3); }
.rft-sm { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.rft-sm small { font-size: 11px; color: var(--t3); }
.rft-arr { color: var(--t3); font-size: 20px; margin-left: 4px; }

/* ── QUICK ACTIONS ──────────────────────── */
.rft-qa { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.rft-qb { background: var(--sf); border: 1.5px solid var(--bd); border-radius: var(--r); padding: 20px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--t2); transition: all .15s; }
.rft-qb:hover, .rft-qb:active, .rft-qb:focus-visible { border-color: var(--red); color: #fff; background: var(--rl); outline: none; }

/* ── PROFILE ────────────────────────────── */
.rft-profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.rft-photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 14px; }
.rft-ig { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-bottom: 16px; }
.rft-ig > div { display: flex; flex-direction: column; gap: 4px; }
.rft-lbl { font-size: 11px; color: var(--t3); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.rft-ig strong { font-size: 14px; font-weight: 600; color: var(--t); }
.rft-belt-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--bd); font-size: 14px; }
.rft-belt-row:last-child { border-bottom: none; }
.rft-pay-row2 { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--bd); font-size: 13px; color: var(--t); }
.rft-pay-row2:last-child { border-bottom: none; }
.rft-pay-row2 strong { font-weight: 700; }
.rft-doc-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--bd); font-size: 14px; color: var(--t); }
.rft-doc-row:last-child { border-bottom: none; }

/* ── PAYMENTS ───────────────────────────── */
.rft-pay-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--bd); }
.rft-pay-row:last-child { border-bottom: none; }
.rft-pay-info { display: flex; flex-direction: column; gap: 4px; }
.rft-pay-info strong { font-size: 14px; font-weight: 600; color: var(--t); }
.rft-pay-info small { font-size: 12px; color: var(--t3); }
.rft-pay-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.rft-mtag { background: rgba(59,130,246,.12); color: #60a5fa; border-radius: 4px; padding: 3px 10px; font-size: 12px; font-weight: 500; }

/* ── ATTENDANCE ─────────────────────────── */
.rft-att-cnt { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.rft-ac { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r); padding: 24px; text-align: center; }
.rft-ac span { font-size: 40px; font-weight: 800; display: block; line-height: 1.1; }
.rft-ac small { font-size: 13px; color: var(--t2); display: block; margin-top: 4px; }
.rft-ac-ico { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; margin: 14px auto 0; }
.rft-ac-p span { color: #4ade80; } .rft-ac-p .rft-ac-ico { background: var(--gl); color: #4ade80; }
.rft-ac-a span { color: #ff6b6b; } .rft-ac-a .rft-ac-ico { background: var(--rl); color: #ff6b6b; }
.rft-ac-n span { color: #fbbf24; } .rft-ac-n .rft-ac-ico { background: var(--yl); color: #fbbf24; }
.rft-att-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--sf); border: 1px solid var(--bd); border-radius: 10px; transition: all .2s; margin-bottom: 6px; }
.rft-att-row:last-child { margin-bottom: 0; }
.rft-att-row.present { border-color: rgba(22,163,74,0.4) !important; background: rgba(22,163,74,0.07) !important; }
.rft-att-row.absent { border-color: rgba(220,38,38,0.4) !important; background: rgba(220,38,38,0.07) !important; }
.rft-att-btns { display: flex !important; flex-direction: row !important; gap: 8px; margin-left: auto; flex-shrink: 0; }
.rft-att-btn { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; transition: all .12s; -webkit-appearance: none; background: none; flex-shrink: 0; }
.rft-att-btn:active { transform: scale(0.92); }
.rft-att-p { background: rgba(22,163,74,.14) !important; border-color: rgba(22,163,74,.35) !important; color: #4ade80 !important; }
.rft-att-p.active, .rft-att-p:hover { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; }
.rft-att-a { background: rgba(224,32,26,.14) !important; border-color: rgba(224,32,26,.35) !important; color: #ff6b6b !important; }
.rft-att-a.active, .rft-att-a:hover { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }

/* ── CALENDAR ───────────────────────────── */
.rft-cal { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 800px; }
.rft-cal th { background: var(--sf2); padding: 8px 4px; text-align: center; font-weight: 600; border: 1px solid var(--bd); font-size: 11px; color: var(--t2); }
.rft-cal td { border: 1px solid var(--bd); padding: 5px 3px; text-align: center; }
.rft-cal-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.cal-p { background: #16a34a; color: #fff; } .cal-a { background: var(--red); color: #fff; }
.cal-we { background: var(--sf2); } .cal-e { background: rgba(255,255,255,.05); }

/* ── ADMIN ──────────────────────────────── */
.rft-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.rft-tbl th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--bd); }
.rft-tbl td { padding: 13px 14px; border-bottom: 1px solid var(--bd); color: var(--t); vertical-align: middle; }
.rft-role { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.rft-role--superadmin { background: rgba(251,191,36,.15); color: #fbbf24; }
.rft-role--admin      { background: rgba(167,139,250,.15); color: #a78bfa; }
.rft-role--profesor   { background: rgba(74,222,128,.15);  color: #4ade80; }
.rft-tag { font-size: 11px; color: var(--t3); background: var(--sf2); padding: 2px 8px; border-radius: 4px; margin-left: 6px; }
.rft-input { padding: 9px 14px; border: 1.5px solid var(--bd); border-radius: 8px; font-size: 14px; background: var(--sf2); color: var(--t); outline: none; }
.rft-input:focus { border-color: var(--red); }

/* ── MODAL ──────────────────────────────── */
#rft-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
#rft-modal-box { background: var(--sf); border: 1px solid var(--bd); border-radius: 16px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.m-hdr { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 24px 0; }
.m-hdr h3 { font-size: 20px; font-weight: 700; color: var(--t); }
.m-hdr p  { font-size: 14px; color: var(--t2); margin-top: 3px; }
.m-close  { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--t3); line-height: 1; padding: 0; }
.m-body   { padding: 20px 24px; }
.m-foot   { padding: 16px 24px 24px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--bd); }
.m-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.m-row1   { grid-template-columns: 1fr; }
.m-grp    { display: flex; flex-direction: column; gap: 6px; }
.m-grp label { font-size: 12px; font-weight: 600; color: var(--t2); }
.m-inp    { width: 100%; padding: 11px 13px; border: 1.5px solid var(--bd); border-radius: 8px; font-size: 14px; color: var(--t); background: var(--sf2); outline: none; }
.m-inp:focus { border-color: var(--red); }
.m-ta     { width: 100%; padding: 11px 13px; border: 1.5px solid var(--bd); border-radius: 8px; font-size: 14px; color: var(--t); background: var(--sf2); outline: none; resize: vertical; min-height: 80px; }
.m-lbl    { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin: 16px 0 8px; display: block; }
.m-actbox { display: flex; gap: 8px; flex-wrap: wrap; }
.m-actchip { display: flex; align-items: center; gap: 6px; padding: 9px 13px; border: 1.5px solid var(--bd); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--t2); cursor: pointer; background: var(--sf2); user-select: none; }
.m-actchip.on { border-color: var(--red); color: var(--red); background: var(--rl); }
.m-actchip input { width: 15px; height: 15px; accent-color: var(--red); }
.m-cuota  { margin-top: 8px; font-size: 13px; color: var(--t2); }
.m-cuota strong { color: var(--t); font-size: 16px; }
.m-cuota-lim { font-size: 11px; color: var(--t3); margin-top: 2px; }
.rft-att-row.rft-att-over { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.4); }
.rft-att-badge-over { background: rgba(239,68,68,.16); color: #ef4444; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
details.rft-fold > summary { list-style: none; cursor: pointer; }
details.rft-fold > summary::-webkit-details-marker { display: none; }
.rft-chev { display: inline-block; transition: transform .2s; color: var(--t3); font-size: .85em; margin-left: 4px; }
details.rft-fold[open] > summary .rft-chev { transform: rotate(180deg); }
.m-method { display: flex; flex-direction: column; gap: 10px; }
.m-mopt   { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--bd); border-radius: 10px; cursor: pointer; transition: border-color .15s; background: var(--sf2); }
.m-mopt.sel { border-color: var(--red); background: var(--rl); }
.m-mopt input[type=radio] { accent-color: var(--red); width: 18px; height: 18px; }
.m-mopt strong { display: block; font-size: 14px; font-weight: 600; color: var(--t); }
.m-mopt span   { font-size: 12px; color: var(--t3); }
.m-ico { font-size: 22px; }
.m-photo-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.m-photo-prev { width: 70px; height: 70px; border-radius: 50%; background: var(--sf2); border: 2px dashed var(--bd); display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; }

/* ── MISC ───────────────────────────────── */
.rft-empty    { padding: 32px; text-align: center; color: var(--t3); font-size: 14px; }
.rft-empty-sm { color: var(--t3); font-size: 13px; padding: 8px 0; }
.rft-toast { position: fixed; bottom: 24px; right: 24px; z-index: 99999; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #fff; transform: translateY(20px); opacity: 0; transition: all .3s; pointer-events: none; }
.rft-toast.show { transform: translateY(0); opacity: 1; }
.rft-toast-ok  { background: #16a34a; }
.rft-toast-err { background: #dc2626; }
.rft-toast-inf { background: #2563eb; }

/* ── RESPONSIVE ─────────────────────────── */
@media(max-width:1100px){ .rft-metrics { grid-template-columns: repeat(2,1fr); } .rft-profile-grid { grid-template-columns: 1fr; } }
@media(max-width:768px){
  #rft-side { transform: translateX(-100%); transition: transform .3s; }
  #rft-side.open { transform: translateX(0); }
  #rft-main { margin-left: 0 !important; }
  #rft-topbar { display: flex !important; }
  #rft-content { padding: 16px; }
  .rft-metrics, .rft-metrics3 { grid-template-columns: 1fr 1fr; }
  .rft-ph { flex-direction: column; }
  .rft-qa { grid-template-columns: 1fr; }
  .rft-grid { grid-template-columns: 1fr; }
  .m-row { grid-template-columns: 1fr; }
  .rft-ig { grid-template-columns: 1fr; }
  .rft-att-btns { flex-direction: row; gap: 8px; }
}
@media(max-width:480px){
  .rft-metrics, .rft-metrics3 { grid-template-columns: 1fr; }
  #rft-modal-box { max-height: 95vh; }
  }

/* ── PAYMENT CARD ─────────────────────── */
.rft-pay-card {
  background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 18px; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.rft-pay-card:hover { border-color: var(--red); box-shadow: 0 4px 20px rgba(224,32,26,.1); }
.rft-pay-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rft-pay-card-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  padding-top: 12px; border-top: 1px solid var(--bd);
}
.rft-pay-card-info > div { display: flex; flex-direction: column; gap: 3px; }
.rft-pay-card-info strong { font-size: 13px; font-weight: 600; color: var(--t); }

/* ── ATT BUTTON active states more visible ── */
.rft-att-a { border-color: rgba(255,107,107,.3); color: rgba(255,107,107,.5); }
.rft-att-p.active { border-color: #16a34a; color: #4ade80; background: rgba(22,163,74,.15); font-weight: 700; }
.rft-att-a.active { border-color: #e0201a; color: #ff6b6b; background: rgba(224,32,26,.15); font-weight: 700; }
.rft-att-row { padding: 16px 20px; }

/* ── CAL dots with text ─────────────────── */
.cal-p { background: #16a34a; color: #fff; font-size: 11px; font-weight: 700; }
.cal-a { background: #e0201a; color: #fff; font-size: 11px; font-weight: 700; }

/* ── DASHBOARD GRID ──────────────────── */
.rft-dash-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; margin-bottom:8px; }
.rft-dash-card { background:var(--sf); border:1px solid var(--bd); border-radius:var(--r); padding:16px; cursor:pointer; transition:border-color .2s,box-shadow .2s; }
.rft-dash-card:hover { border-color:var(--red); box-shadow:0 4px 20px rgba(224,32,26,.1); }
.rft-dash-card-top { display:flex; align-items:center; gap:12px; }

/* ── PAYMENT SQUARE CARDS ────────────── */
.rft-pay-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.rft-pcard { background:var(--sf); border:1px solid var(--bd); border-radius:var(--r); padding:18px; cursor:pointer; transition:border-color .2s,box-shadow .2s; display:flex; flex-direction:column; }
.rft-pcard:hover { border-color:var(--red); box-shadow:0 4px 20px rgba(224,32,26,.1); }
.rft-pcard-head { display:flex; align-items:center; gap:10px; }
.rft-pcard-info { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rft-pcard-info > div { display:flex; flex-direction:column; gap:3px; }
.rft-pcard-info strong { font-size:13px; font-weight:600; color:var(--t); }

/* ── ATT BUTTONS ─────────────────────── */
.rft-att-p { background:rgba(22,163,74,.08); border:1.5px solid rgba(22,163,74,.3); color:rgba(74,222,128,.6); }
.rft-att-a { background:rgba(224,32,26,.08); border:1.5px solid rgba(224,32,26,.3); color:rgba(255,107,107,.6); }
.rft-att-p.active, .rft-att-p:hover { background:rgba(22,163,74,.2); border-color:#16a34a; color:#4ade80; font-weight:700; }
.rft-att-a.active, .rft-att-a:hover { background:rgba(224,32,26,.2); border-color:#e0201a; color:#ff6b6b; font-weight:700; }
.rft-att-row { padding:14px 20px; }

/* ── CALENDAR v2 — clean cells ───────── */
.rft-cal td { min-width: 24px; height: 28px; vertical-align: middle; }
.cal-we { background: rgba(255,255,255,.06); width:18px; height:18px; border-radius:50%; display:inline-flex; }
.cal-p  { background: #16a34a; color:#fff; width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; }
.cal-a  { background: #e0201a; color:#fff; width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; }

/* ── BIRTHDAY ALERT ──────────────────── */
.rft-birthday-alert {
  background: linear-gradient(135deg, rgba(251,191,36,.15), rgba(251,191,36,.05));
  border: 1.5px solid rgba(251,191,36,.4);
  border-radius: var(--r); padding: 14px 20px;
  font-size: 14px; font-weight: 600; color: #fbbf24;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}

/* ── PRIVACY CHECK ───────────────────── */
.rft-privacy-check {
  background: var(--sf2); border: 1.5px solid var(--bd);
  border-radius: 10px; padding: 14px 16px; margin-top: 14px;
}
.rft-privacy-check label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--t); cursor: pointer;
}
.rft-privacy-check input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--red); cursor: pointer; flex-shrink: 0;
}
/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   Tested breakpoints: 768px, 480px
═══════════════════════════════════════ */

/* ── TOPBAR STICKY ───────────────────── */
#rft-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sf);
  border-bottom: 1px solid var(--bd);
}

/* ── ATTENDANCE BUTTONS (desktop) ─────── */
.rft-att-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
}
.rft-att-btns { display: flex; flex-direction: row; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* ── ATTENDANCE HEADER ─────────────── */
.rft-att-header-right { display: flex; gap: 8px; align-items: center; }

/* ── CALENDAR STICKY COLUMN ─────────── */
.rft-cal-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}
.rft-cal { border-collapse: separate; border-spacing: 0; min-width: 700px; }
.rft-cal th:first-child,
.rft-cal td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--sf);
  border-right: 2px solid var(--bd);
  min-width: 90px;
}
.rft-cal thead th:first-child { background: var(--sf2); z-index: 3; }

/* ── BACK BUTTON ─────────────────────── */
.rft-back-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 20px;
}
.rft-back-bar a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--t2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 8px;
  transition: all .15s;
}
.rft-back-bar a:hover { border-color: var(--red); color: var(--red); }

/* ══════════════════════════════════════
   TABLET — max 1024px
══════════════════════════════════════ */
@media(max-width:1024px) {
  .rft-metrics { grid-template-columns: repeat(2,1fr); }
  .rft-profile-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   MOBILE — max 768px
══════════════════════════════════════ */
@media(max-width:768px) {

  /* Sidebar */
  #rft-side { transform: translateX(-100%); transition: transform .3s; width: 280px !important; }
  #rft-side.open { transform: translateX(0); }
  #rft-main { margin-left: 0 !important; min-width: 0 !important; max-width: 100vw !important; }
  #rft-topbar { display: flex !important; }
  .rft-nav-a { font-size: 15px !important; padding: 13px 20px !important; }
  .rft-nav-icon { font-size: 18px !important; }

  /* Content */
  #rft-content { padding: 14px !important; min-width: 0 !important; max-width: 100vw !important; overflow-x: hidden !important; }
  #rft-content > * { min-width: 0; max-width: 100%; }

  /* Page header */
  .rft-ph { flex-direction: column; gap: 10px; margin-bottom: 16px; }
  .rft-ph h2 { font-size: 20px; }
  .rft-ph > div:last-child {
    display: flex; gap: 8px; width: 100%;
  }
  .rft-ph > div:last-child button,
  .rft-ph > div:last-child a.rft-btn-red,
  .rft-ph > div:last-child a.rft-btn-outline {
    flex: 1; justify-content: center; font-size: 13px;
  }

  /* Metrics — 2 cols, compact */
  .rft-metrics { grid-template-columns: 1fr 1fr !important; gap: 8px; margin-bottom: 14px; }
  .rft-metrics3 { grid-template-columns: 1fr 1fr !important; }
  .rft-mc { padding: 12px 14px; border-radius: 10px; }
  .rft-mc-val { font-size: 28px; font-weight: 800; }
  .rft-mc-lbl { font-size: 11px; margin-bottom: 6px; }
  .rft-mc-ico { font-size: 18px; right: 10px; opacity: .15; }

  /* Cards */
  .rft-card { padding: 14px; }

  /* Grids */
  .rft-grid { grid-template-columns: 1fr !important; }
  .rft-dash-grid { grid-template-columns: 1fr !important; }
  .rft-pay-grid { grid-template-columns: 1fr !important; }
  .rft-qa { grid-template-columns: 1fr !important; gap: 8px; }

  /* Filters */
  .rft-filters { gap: 5px; }
  .rft-fb { padding: 6px 12px; font-size: 12px; }

  /* ── PROFILE ── */
  .rft-profile-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .rft-av-lg { width: 80px !important; height: 80px !important; font-size: 22px !important; }
  .rft-photo { width: 80px !important; height: 80px !important; }
  .rft-bb-lg { font-size: 13px !important; padding: 4px 14px !important; }

  /* Info grid — single column on mobile */
  .rft-ig { grid-template-columns: 1fr 1fr !important; gap: 12px 16px; }
  .rft-ig > div { display: flex; flex-direction: column; gap: 3px; }
  .rft-lbl { font-size: 10px; }
  .rft-ig strong { font-size: 14px; }

  /* Belt & payment rows */
  .rft-belt-row { flex-wrap: wrap; gap: 6px; padding: 10px 0; }
  .rft-pay-row2 { flex-wrap: wrap; gap: 6px; padding: 10px 0; }
  .rft-doc-row { flex-wrap: wrap; gap: 6px; }

  /* Green register button */
  .rft-btn-green { font-size: 14px; padding: 13px; }

  /* ── ATTENDANCE ── */
  .rft-att-cnt { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 8px; }
  .rft-ac { padding: 14px 8px; }
  .rft-ac span { font-size: 28px; }
  .rft-ac-ico { width: 38px; height: 38px; font-size: 16px; margin-top: 10px; }

  /* Attendance row — info stacked, buttons stay right */
  .rft-att-row {
    padding: 10px 12px;
    gap: 10px;
    align-items: center;
  }
  .rft-att-btns {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }
  .rft-att-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 17px !important;
    padding: 0 !important;
    flex: none !important;
  }
  .rft-att-header-right { width: 100%; }
  .rft-att-header-right .rft-input,
  .rft-att-header-right input[type=date] { flex: 1; min-width: 0; }

  /* ── CALENDAR ── */
  .rft-cal { min-width: 700px !important; font-size: 11px !important; }
  .rft-cal th { padding: 6px 3px !important; font-size: 10px !important; }
  .rft-cal td { padding: 4px 2px !important; }
  .rft-cal-dot { width: 18px !important; height: 18px !important; font-size: 9px !important; }
  .cal-p, .cal-a { width: 18px !important; height: 18px !important; font-size: 9px !important; }
  .rft-cal th:first-child, .rft-cal td:first-child {
    min-width: 72px !important;
    font-size: 9px !important;
    padding-left: 6px !important;
  }

  /* Calendar filters stacked */
  .rft-cal-top { flex-direction: column !important; gap: 10px !important; }
  .rft-cal-select { width: 100% !important; max-width: 100% !important; }

  /* ── PAYMENTS mobile ── */
  .rft-pcard { padding: 12px; border-radius: 10px; }
  .rft-pcard-head { gap: 8px; margin-bottom: 8px; }
  .rft-pcard-info { grid-template-columns: 1fr 1fr; gap: 6px; }
  .rft-pcard-info .rft-lbl { font-size: 9px; }
  .rft-pcard-info strong { font-size: 12px; }
  .rft-pay-grid { grid-template-columns: 1fr !important; gap: 8px; }
  .rft-pay-row { flex-wrap: wrap; }
  .rft-pay-acts { width: 100%; justify-content: flex-end; margin-top: 4px; }

  /* ── ADMIN ── */
  .rft-tbl { font-size: 12px; }
  .rft-tbl th, .rft-tbl td { padding: 8px 8px; }

  /* ── MODALS ── */
  #rft-modal-bg { padding: 0; align-items: flex-end; }
  #rft-modal-box { max-height: 92vh; border-radius: 16px 16px 0 0; }
  .m-row { grid-template-columns: 1fr !important; gap: 10px; }
  .m-hdr { padding: 18px 16px 0; }
  .m-body { padding: 14px 16px; }
  .m-foot { padding: 12px 16px 20px; }
}

/* ══════════════════════════════════════
   SMALL MOBILE — max 480px
══════════════════════════════════════ */
@media(max-width:480px) {
  .rft-metrics  { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .rft-metrics3 { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .rft-mc { padding: 10px 12px; }
  .rft-mc-val { font-size: 24px; }
  .rft-mc-lbl { font-size: 10px; }
  .rft-ig { grid-template-columns: 1fr !important; }
  .rft-att-cnt { gap: 6px; }
  .rft-ac small { font-size: 11px; }
  .rft-ac span { font-size: 24px; }
  .rft-filters { gap: 4px; }
  .rft-fb { padding: 5px 10px; font-size: 11px; }
  .rft-pcard-info { grid-template-columns: 1fr 1fr; }
  #rft-content { padding: 10px !important; }
  .rft-ph h2 { font-size: 18px; }
}

/* ── PROFILE REDESIGN ────────────────── */
.rft-profile-card { padding: 20px; }
.rft-profile-avatar-wrap {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.rft-profile-name-wrap { display: flex; flex-direction: column; gap: 4px; }
.rft-profile-contact { display: flex; flex-direction: column; gap: 8px; }
.rft-contact-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--t2);
}
.rft-contact-item span:first-child { width: 20px; text-align: center; flex-shrink: 0; }

/* Info list — always vertical, clear */
.rft-info-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 12px; }
.rft-info-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
  gap: 12px;
}
.rft-info-item:last-child { border-bottom: none; }
.rft-info-item .rft-lbl { font-size: 12px; color: var(--t3); flex-shrink: 0; }
.rft-info-item strong { font-size: 14px; font-weight: 600; color: var(--t); text-align: right; }

/* Payment history row */
.rft-pay-hist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
  font-size: 13px; color: var(--t); flex-wrap: wrap;
}
.rft-pay-hist-row:last-child { border-bottom: none; }
.rft-pay-hist-row strong { font-weight: 700; }

@media(max-width:768px) {
  .rft-profile-avatar-wrap { gap: 12px; }
  .rft-av-lg { width: 70px !important; height: 70px !important; font-size: 20px !important; }
  .rft-info-item { padding: 9px 0; }
  .rft-info-item strong { font-size: 13px; }
  .rft-pay-hist-row { gap: 8px; }
  .rft-pay-hist-row span:last-child { width: 100%; margin-left: 0 !important; }
}

/* ── PROFILE CLEAN ───────────────────── */
.rft-profile-top { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.rft-profile-img { width:70px; height:70px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.rft-profile-details { display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.rft-detail-row { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--t2); }
.rft-detail-row span:first-child { width:20px; text-align:center; flex-shrink:0; }
.rft-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.rft-detail-grid > div { display:flex; flex-direction:column; gap:4px; }
.rft-detail-grid strong { font-size:14px; font-weight:600; color:var(--t); }
@media(max-width:480px) {
  .rft-detail-grid { grid-template-columns:1fr !important; }
}

/* ── CALENDAR STICKY COLUMN ──────────── */
.rft-cal-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}
.rft-cal {
  border-collapse: separate !important;
  border-spacing: 0;
  min-width: 700px;
}
/* Sticky month column */
.rft-cal-sticky-col {
  position: sticky !important;
  left: 0 !important;
  z-index: 2;
  background: var(--sf) !important;
  border-right: 2px solid var(--bd) !important;
  min-width: 80px;
  text-align: left !important;
  padding-left: 8px !important;
  font-size: 10px;
  font-weight: 700;
  color: var(--t2);
  white-space: nowrap;
}
thead .rft-cal-sticky-col {
  background: var(--sf2) !important;
  z-index: 3;
  font-size: 11px;
  color: var(--t2);
}

/* ── CALENDAR CONTROLS ───────────────── */
.rft-cal-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.rft-cal-year-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── CALENDAR DOTS ───────────────────── */
.rft-cal-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 10px; font-weight: 700;
}
.cal-p  { background: #16a34a; color: #fff; }
.cal-a  { background: #e0201a; color: #fff; }
.cal-we { background: rgba(255,255,255,.06); }
.rft-cal th { background: var(--sf2); padding: 7px 4px; text-align: center; font-weight: 600; border: 1px solid var(--bd); font-size: 11px; color: var(--t2); }
.rft-cal td { border: 1px solid var(--bd); padding: 5px 3px; text-align: center; }

/* ── CALENDAR MOBILE FIXES v13 ───────── */
@media(max-width:768px) {
  /* Year nav row - compact */
  .rft-ph > div:last-child {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto !important;
  }
  .rft-ph > div:last-child strong {
    font-size: 16px !important;
  }
  .rft-ph > div:last-child a.rft-btn-outline {
    padding: 6px 10px !important;
    font-size: 14px !important;
    flex: 0 !important;
    min-width: 36px;
    justify-content: center;
  }

  /* Student selector - compact */
  .rft-cal-select,
  select.rft-input {
    padding: 8px 10px !important;
    font-size: 13px !important;
    height: 38px;
  }
}

/* ── CALENDAR STICKY FIRST COLUMN ───── */
.rft-cal-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
.rft-cal {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
.rft-cal th:first-child,
.rft-cal td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 2 !important;
  background: var(--sf) !important;
  border-right: 2px solid var(--bd) !important;
  min-width: 85px !important;
  white-space: nowrap;
}
.rft-cal thead th:first-child {
  background: var(--sf2) !important;
  z-index: 3 !important;
}

/* ── CALENDAR SELECTOR COMPACT ───────── */
.rft-cal-select,
#rft-content select.rft-input {
  padding: 8px 12px !important;
  font-size: 13px !important;
  height: 38px !important;
  border-radius: 8px !important;
}

/* ── CALENDAR SELECTOR COMPACT v2 ────── */
.rft-cal-select,
#rft-content select.rft-input {
  padding: 6px 10px !important;
  font-size: 13px !important;
  height: 34px !important;
  border-radius: 8px !important;
  max-width: 260px !important;
}
@media(max-width:768px) {
  .rft-cal-select,
  #rft-content select.rft-input {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 13px !important;
    height: 36px !important;
    padding: 6px 10px !important;
  }
}

/* ═══════════════════════════════════
   CALENDAR STICKY COL — FINAL FIX
   Like Excel "freeze panes"
═══════════════════════════════════ */
.rft-cal-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  display: block !important;
  width: 100% !important;
}
/* MUST use separate for sticky to work */
.rft-cal {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  min-width: 680px !important;
}
/* Sticky month column */
.rft-cal .rft-cal-sticky-col {
  position: sticky !important;
  left: 0 !important;
  z-index: 3 !important;
  background: #1a1a2e !important;
  border-right: 2px solid #2a2a45 !important;
  min-width: 80px !important;
  max-width: 80px !important;
  white-space: nowrap !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #aaaacc !important;
  text-align: left !important;
  padding-left: 8px !important;
}
/* Header sticky col slightly different bg */
.rft-cal thead .rft-cal-sticky-col {
  background: #222240 !important;
  z-index: 4 !important;
  color: #aaaacc !important;
  font-size: 11px !important;
}

/* ── Icon action buttons (alumno profile header) ── */
.rft-icon-btn {
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all .15s; flex-shrink: 0;
  -webkit-appearance: none;
}
.rft-icon-btn:active { transform: scale(0.92); }
.rft-alumno-btns {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0;
}
.rft-ph-alumno { flex-wrap: nowrap; gap: 10px; }

@media(max-width:600px) {
  .rft-ph-alumno { flex-direction: row !important; align-items: center; gap: 8px; }
  .rft-alumno-btns { gap: 5px; }
  .rft-btn-red.rft-action-edit { padding: 8px 12px; font-size: 12px; }
  .rft-icon-btn { width: 34px; height: 34px; font-size: 14px; }

  /* Forzar 1 columna en todas las grids de tarjetas */
  .rft-grid     { grid-template-columns: 1fr !important; }
  .rft-pay-grid { grid-template-columns: 1fr !important; }
  .rft-dash-grid{ grid-template-columns: 1fr !important; }
}

/* ── Stars / Gamification ── */
.rft-att-star { width:40px; height:40px; border-radius:10px; border:1.5px solid rgba(251,191,36,0.3); background:rgba(251,191,36,0.08); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:18px; transition:all .15s; flex-shrink:0; }
.rft-att-star:hover { background:rgba(251,191,36,0.2); border-color:rgba(251,191,36,0.6); transform:scale(1.1); }
.rft-att-star:active { transform:scale(0.92); }
.rft-badge-coins { display:flex; gap:3px; align-items:center; }
.rft-coin { font-size:1.1rem; filter:drop-shadow(0 0 4px rgba(251,191,36,0.6)); }
.rft-badge-box { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:10px; margin-bottom:12px; }
.rft-stars-row { display:flex; gap:4px; flex-wrap:wrap; }
.rft-star-chip { display:inline-flex; align-items:center; gap:4px; background:rgba(251,191,36,0.1); border:1px solid rgba(251,191,36,0.25); border-radius:6px; padding:3px 8px; font-size:11px; color:#fbbf24; }

/* ══ BOTTOM NAV MÓVIL ═══════════════════════════════════════════════════════ */
#rft-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--sf);
  border-top: 1px solid var(--bd);
  z-index: 500;
  display: none;
  flex-direction: row;
  align-items: stretch;
}
.rft-bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--t2);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 2px;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.rft-bnav-item.active { color: var(--red); }
.rft-bnav-icon { font-size: 18px; line-height: 1; }
.rft-bnav-lbl  { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }

/* Mostrar en móvil */
@media(max-width: 768px) {
  #rft-bottom-nav { display: flex; }
  #rft-main { padding-bottom: 60px; }
}

/* ══ BOTÓN FLOTANTE VOLVER ARRIBA ════════════════════════════════════════════ */
#rft-scroll-top {
  position: fixed;
  bottom: 72px; right: 16px;
  width: 40px; height: 40px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  z-index: 600;
  box-shadow: 0 4px 12px rgba(239,68,68,0.4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
#rft-scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media(min-width: 769px) {
  #rft-scroll-top { bottom: 20px; }
}
