/*
 * MIGA FIGHT TEAM: styles of the app (index.html).
 * The QR cards page has its own stylesheet, qr-athletes.css.
 *
 * How this file is built: it grew in layers, and LATER RULES OVERRIDE EARLIER ONES (the gym
 * monitor in particular was restyled twice, see the sections below), so the order of the rules
 * matters: do not sort or move them without checking every screen. It is written one rule per line
 * on purpose (short to scroll, easy to diff). Sections, top to bottom:
 *   variables and base · application shell · header · avatars and buttons · filters · athlete
 *   photos · cards, stats, lists, badges · panels and tables · forms · modals · tabs · QR cards ·
 *   check-in card · gym monitor (four layers) · responsive · recent check-ins · athlete profile ·
 *   sign-in and PIN screens · later additions (follow-up tables, evolution chart)
 * Colours and radius live in the :root variables below. Media queries: 850px (tablet, sidebar
 * becomes the bottom bar), 560px and 400px (phone), 520px (athlete profile grid).
 */

/* ---------- Variables and base ---------- */
:root{--ink:#111111;--muted:#5f5f5f;--line:#e7e7e7;--paper:#ffffff;--page:#f4f4f4;--black:#111111;--red:#d71920;--red-pale:#fff1f1;--yellow:#f2c94c;--yellow-pale:#fff5cc;--blue:#b91c1c;--green:#246b3d;--green-pale:#ebf9f0;--amber:#8d6500;--amber-pale:#fff5c7;--radius:18px;--shadow:0 18px 40px rgba(17,17,17,.13)}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--page);color:var(--ink);font:14px "DM Sans",sans-serif;overflow-x:hidden}
button,input,select,textarea{font:inherit}
button{border:0;cursor:pointer}

/* ---------- Application shell: sidebar, brand, navigation, main area ---------- */
.shell{display:flex;min-height:100vh}
.sidebar{position:sticky;top:0;width:250px;height:100vh;flex:none;padding:24px 14px;color:#fff;background:linear-gradient(180deg,#121212,#1d1d1d)}
.brand{display:flex;align-items:center;gap:11px;padding:0 12px 28px;color:#fff;font:700 24px Outfit,sans-serif;letter-spacing:-.7px;line-height:1.1}
.brand-text{display:flex;flex-direction:column;min-width:0}
.brand .miga{display:block;color:#fff}
.brand .team{display:block;margin-top:2px;color:var(--yellow)}
.brand-logo{width:2em;height:2em;object-fit:contain;flex:none;filter:drop-shadow(0 2px 6px rgba(0,0,0,.35))}
.nav-label{margin:16px 12px 8px;color:#aaa;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.nav button{display:flex;align-items:center;gap:11px;width:100%;margin:2px 0;padding:10px 12px;border-radius:10px;color:#ddd;background:transparent;text-align:left;font-weight:600;transition:.2s ease}
.nav button:hover,.nav button.active{background:linear-gradient(90deg,var(--yellow),#f8dd6d);color:var(--black);box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.nav .ico{display:grid;place-items:center;flex:none;width:22px;height:22px;font-style:normal}
.nav-svg{display:block;width:20px;height:20px;opacity:.85;transition:opacity .2s ease}
.nav button:hover .nav-svg,.nav button.active .nav-svg{opacity:1}
.main{min-width:0;flex:1;padding:28px 34px 50px;background:linear-gradient(180deg,#f8f8f8,#f0f0f0)}

/* ---------- Page header ---------- */
.topbar,.section-actions,.card-head{display:flex;align-items:center;justify-content:space-between}
.topbar{margin-bottom:27px}
.title h1{margin:0;font:700 27px Outfit,sans-serif;letter-spacing:-.8px}
.title p{margin:4px 0 0;color:var(--muted)}
.top-actions{display:flex;align-items:center;gap:10px}

/* ---------- Avatars, buttons and small controls ---------- */
.avatar,.initials{display:grid;place-items:center;border-radius:50%;font-weight:700}
.avatar{width:38px;height:38px;background:linear-gradient(135deg,var(--yellow),#e8b11d);color:var(--black);box-shadow:0 10px 20px rgba(242,201,76,.25)}
.btn{padding:10px 15px;border-radius:12px;background:linear-gradient(135deg,var(--red),#c10000);color:#fff;font-weight:700;box-shadow:0 10px 18px rgba(215,25,32,.18);transition:.2s ease}
.btn:hover{filter:brightness(.97);transform:translateY(-1px)}
.btn.secondary{border:1px solid #d5d5d5;background:#fff;color:var(--ink);box-shadow:none}
.btn.danger{background:var(--red)}
.btn.small{padding:7px 10px;font-size:12px}
.btn:disabled{opacity:.45;cursor:not-allowed;filter:none;transform:none}

/* ---------- Filters ---------- */
.filter-field{display:grid;gap:4px;flex:1 1 150px;min-width:0;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.filter-field input,.filter-field select{width:100%;min-width:0}
.filter-field[hidden],.filter-panel[hidden]{display:none}
.filter-panel{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;flex:1 1 100%;padding-top:12px;border-top:1px solid var(--line)}
.filter-count{align-self:center;color:var(--muted);font-weight:700;font-size:13px}
.btn.secondary.active-filter{border-color:var(--red);color:var(--red)}

/* ---------- Athlete chip, athlete photo and photo lightbox ---------- */
.athlete-chip{display:flex;align-items:center;gap:10px;min-width:0}
.athlete-chip .initials{width:32px;height:32px;font-size:12px}
.num .athlete-chip .initials{width:38px;height:38px;font-size:13px}
.athlete-photo{margin:0 auto;justify-self:center;display:grid;place-items:center;width:150px;height:150px;border-radius:18px;background:linear-gradient(135deg,#fff0ee,#ffd9d7);background-size:cover;background-position:center 20%;color:var(--red);font:700 44px Outfit,sans-serif;box-shadow:0 8px 22px rgba(0,0,0,.14)}
.athlete-photo.has-photo{color:transparent}
.checkin-card>.athlete-photo,.success>.athlete-photo{margin:14px auto}
.photo-lightbox{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:20px;background:rgba(0,0,0,.82);cursor:zoom-out}
.photo-lightbox img{max-width:min(92vw,720px);max-height:88vh;border-radius:18px;object-fit:contain;background:#111;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.photo-lightbox-close{position:absolute;top:16px;right:16px;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.18);color:#fff;font-size:26px;line-height:1}

/* ---------- Cards, stats, lists, badges and bars ---------- */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}
.card{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);box-shadow:var(--shadow)}
.stat{padding:19px}
.stat .eyebrow,.eyebrow{color:var(--muted);font-size:12px;font-weight:700}
.stat .num{margin:6px 0;font:700 29px Outfit,sans-serif}
.trend{color:#8d6500;font-size:12px;font-weight:700}
.grid{display:grid;grid-template-columns:1.45fr 1fr;gap:18px}
.card-head{padding:18px 20px 14px}
.card-head h2{margin:0;font:700 17px Outfit,sans-serif}
.card-head a,.icon-btn{color:var(--red);font-weight:700;cursor:pointer}
.card-head a{font-size:13px}
.list{padding:0 20px 10px}
.list-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.initials{width:36px;height:36px;flex:none;background:linear-gradient(135deg,var(--red-pale),#fde6e6);color:var(--red);border:1px solid rgba(215,25,32,.08)}
.row-main{min-width:0;flex:1}
.row-main strong{display:block}
.row-main small,.empty{color:var(--muted)}
.badge{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700}
.badge.green{background:var(--green-pale);color:var(--green)}
.badge.amber{background:var(--yellow-pale);color:#8d6500}
.badge.red{background:var(--red-pale);color:var(--red)}
.badge.blue{background:var(--red-pale);color:var(--red)}
.bar-row{padding:13px 20px;border-top:1px solid var(--line)}
.bar-title{display:flex;justify-content:space-between;margin-bottom:8px;font-weight:700}
.bar{height:9px;overflow:hidden;border-radius:99px;background:#efefef;border:1px solid #ededed}
.bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--red),#b6141a)}

/* ---------- Panels, filter bar, tables and empty states ---------- */
.panel{padding:20px}
.panel h3{margin:0 0 16px;font:700 16px Outfit,sans-serif}
.filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fff}
.filters input,.filters select,.field input,.field select,.field textarea{min-width:130px;padding:8px 10px;border:1px solid #d5d5d5;border-radius:9px;background:#fff;color:var(--ink)}
.table-wrap{overflow:auto}
.table{width:100%;overflow:hidden;border:1px solid var(--line);border-radius:14px;border-collapse:collapse;background:#fff}
.table th{padding:12px 14px;background:#fafafa;color:var(--muted);text-align:left;font-size:11px;letter-spacing:.05em;text-transform:uppercase}
.table td{padding:12px 14px;border-top:1px solid var(--line);white-space:nowrap}
.icon-btn{padding:4px;background:transparent}
.empty{padding:34px;text-align:center}
.section-actions{margin-bottom:17px}
.section-actions h2{margin:0;font:700 21px Outfit,sans-serif}

/* ---------- Forms ---------- */
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}
.field{display:grid;gap:6px}
.field.full{grid-column:1/-1}
.field label{color:#444;font-size:12px;font-weight:700}
.field textarea{min-height:80px;resize:vertical}
.initials.has-photo{cursor:zoom-in;background-size:cover;background-position:center;color:transparent}
.athlete-photo-row{display:flex;align-items:center;gap:12px}
.athlete-photo-preview{width:52px;height:52px;font-size:16px}
.qr-card-avatar{width:48px;height:48px;margin:0 auto 16px;font-size:15px}

/* ---------- Modals ---------- */
.modal-back{position:fixed;z-index:10;inset:0;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.55);overflow-y:auto}
.modal{width:min(560px,100%);max-height:calc(100vh - 36px);overflow-y:auto;padding:22px;border-radius:18px;background:#fff;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}
.modal-head h2{margin:0;font:700 20px Outfit,sans-serif}
.close{width:30px;height:30px;border-radius:50%;background:#f0f0f0;color:var(--ink);font-size:18px}
.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}

/* ---------- Tabs ---------- */
.tabs{display:flex;gap:6px;margin-bottom:18px;border-bottom:1px solid var(--line)}
.tabs button{padding:10px 13px;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-weight:700}
.tabs button.active{border-color:var(--red);color:var(--red)}

/* ---------- QR cards ---------- */
.qr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:16px}
.qr-card{padding:18px;text-align:center}
.qr-card h3{margin:8px 0 3px;font:700 16px Outfit,sans-serif}
.qr-card p{margin:0 0 12px;color:var(--muted);font-size:12px}
.qr{display:flex;justify-content:center;min-height:130px}
.qr img{max-width:130px}

/* ---------- Check-in card: athlete options, notices, success screen ---------- */
.checkin{display:grid;min-height:100vh;padding:24px;place-items:center;background:radial-gradient(circle at top,#2c2c2c 0%,#0d0d0d 28%,#1a1a1a 100%)}
.checkin-card{width:min(610px,100%);padding:30px;border-radius:28px;background:linear-gradient(180deg,#fff,#f7f7f7);box-shadow:0 24px 60px rgba(0,0,0,.34);border:1px solid rgba(255,255,255,.25)}
.checkin-logo{margin-bottom:26px;color:var(--black);font:700 26px Outfit,sans-serif;line-height:1;letter-spacing:-.8px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.checkin-logo .miga,.checkin-logo .team{display:inline-block}
.checkin-logo .team{color:var(--yellow)}
.login-card .checkin-logo .team{color:var(--red)}
.checkin-logo .brand-logo{width:38px;height:38px;filter:drop-shadow(0 2px 5px rgba(0,0,0,.2))}
.lesson-pill{display:inline-flex;padding:7px 12px;border-radius:999px;background:linear-gradient(135deg,var(--red-pale),#ffe1e1);color:var(--red);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.checkin h1{margin:16px 0 8px;font:700 31px Outfit,sans-serif;letter-spacing:-.8px}
.checkin p{color:var(--muted);line-height:1.6}
.athlete-options{max-height:260px;overflow:auto;margin:18px 0;padding-right:4px}
.athlete-option{display:flex;align-items:center;gap:11px;width:100%;margin:8px 0;padding:12px 12px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);text-align:left;transition:.2s ease}
.athlete-option:hover,.athlete-option.selected{border-color:var(--red);background:linear-gradient(135deg,#fff, #fff4f4);box-shadow:0 10px 20px rgba(215,25,32,.08)}
.athlete-option.selected:after{margin-left:auto;color:var(--red);content:'✓';font-weight:700}
.notice{margin:13px 0;padding:12px 14px;border-radius:12px;background:linear-gradient(135deg,var(--yellow-pale),#fff9df);color:#5e4600;line-height:1.4;border:1px solid rgba(242,201,76,.35)}
.success{padding:22px 0;text-align:center}
.success .check{display:grid;place-items:center;width:64px;height:64px;margin:auto;border-radius:50%;background:linear-gradient(135deg,var(--yellow-pale),#fce7a1);color:#8d6500;font-size:30px;box-shadow:0 16px 30px rgba(242,201,76,.2)}
.success h1{margin-bottom:4px}
.success-detail{margin:17px 0;padding:15px;border:1px solid #eee;border-radius:14px;background:#fafafa;text-align:left}
.checkin-footer{margin-top:16px;color:#fff;text-align:center;font-size:12px;letter-spacing:.08em;text-transform:uppercase}

/* ---------- Gym monitor, first layer ---------- */
.monitor-shell{min-height:100vh;padding:0;background:var(--page);display:block}
.monitor-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px 12px;border-bottom:1px solid rgba(17,17,17,.08);background:var(--page);color:var(--ink)}
.monitor-brand .brand-logo{width:30px;height:30px;filter:drop-shadow(0 2px 5px rgba(0,0,0,.2))}
.monitor-nav button{padding:4px 0;border-radius:0;border:0;background:transparent;color:var(--muted);font-weight:600;font-size:13px;letter-spacing:.01em;position:relative}
.monitor-nav button.active{background:transparent;color:var(--red);border:0}
.monitor-nav button.secondary{background:transparent;color:var(--ink);border:0}
.monitor-panel{padding:18px 18px 14px;background:var(--page)}
.monitor-title-group h1{margin:12px 0 8px;font:700 37px Outfit,sans-serif;letter-spacing:-1px;color:var(--ink)}
.monitor-title-group p{margin:0;color:var(--muted);line-height:1.6;font-size:14px}
.toast{position:fixed;right:20px;bottom:20px;z-index:20;padding:12px 15px;border-left:4px solid var(--yellow);border-radius:10px;background:var(--black);color:#fff;box-shadow:var(--shadow);opacity:0;transform:translateY(90px);transition:.25s}
.toast.show{opacity:1;transform:translateY(0)}
.mobile-nav{display:none}

/* ---------- Responsive: tablet and phone ---------- */
@media(max-width:850px){
.sidebar{display:none}
.main{padding:20px 16px 92px}
.stats{grid-template-columns:repeat(2,1fr)}
.grid{grid-template-columns:1fr}
.topbar{flex-direction:column;align-items:stretch;gap:12px;margin-bottom:20px}
.top-actions{width:100%;flex-wrap:wrap}
.section-actions{flex-wrap:wrap;gap:10px}
.card-head{flex-wrap:wrap;gap:6px 10px}
.form-grid{grid-template-columns:1fr}
.filters{padding:11px}
.filters input,.filters select{flex:1 1 100%;min-width:0}
.filters input,.filters select,.field input,.field select,.field textarea,.login-form input{font-size:16px}
.icon-btn{padding:8px 6px}
.checkin{padding:16px}
.checkin-card{padding:22px 18px}
.checkin h1{font-size:26px}
.monitor-header{padding:12px 14px;flex-direction:column;align-items:flex-start}
.monitor-nav{width:100%}
.monitor-nav button{padding:4px 6px}
.monitor-panel{padding:18px 16px}
.monitor-title-group h1{font-size:26px}
.mobile-nav{position:fixed;right:0;bottom:0;left:0;z-index:4;display:flex;justify-content:space-between;gap:2px;padding:6px 4px;background:var(--black);overflow-x:auto}
.mobile-nav button{display:grid;place-items:center;flex:1 0 auto;min-width:38px;padding:8px 4px;border-radius:8px;background:transparent;color:#ddd;font-size:17px}
.mobile-nav .nav-svg{width:22px;height:22px}
.mobile-nav button.active{color:var(--yellow);background:rgba(255,255,255,.06)}
.toast{left:12px;right:12px;bottom:84px;text-align:center}
}
@media(max-width:560px){
.main{padding:16px 12px 92px}
.title h1{font-size:22px}
.title p{font-size:13px}
.section-actions h2{font-size:18px}
.stats{gap:12px}
.stat{padding:15px}
.stat .num{font-size:22px}
.card-head{padding:14px 16px 10px}
.card-head h2{font-size:16px}
.list{padding:0 16px 10px}
.bar-row{padding:12px 16px}
.table th,.table td{padding:10px 12px}
.modal{padding:18px}
.tabs button{padding:9px 10px;font-size:13px}
}
@media(max-width:400px){
.stats{grid-template-columns:1fr}
}

/* ---------- Gym monitor, second layer (rules without the .kiosk scope) ---------- */
.monitor-shell.kiosk{min-height:100vh;padding:18px;background:linear-gradient(180deg,#f8f8f8,#eeeeee)}
.monitor-page{width:100%;background:var(--page);display:flex;justify-content:center;align-items:center;min-height:calc(100vh - 36px)}
.monitor-screen{width:min(1280px,100%);min-height:calc(100vh - 36px);padding:18px 20px 24px;border-radius:28px;background:#fff;box-shadow:0 25px 70px rgba(0,0,0,.16);border:1px solid var(--line)}
.monitor-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:8px 10px 16px;border-bottom:1px solid var(--line);background:transparent;color:var(--ink)}
.monitor-brand{font:700 30px Outfit,sans-serif;line-height:1;letter-spacing:-.8px;display:flex;gap:8px;align-items:center;color:var(--ink)}
.monitor-brand .team{color:var(--yellow)}
.monitor-nav{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.monitor-nav button{padding:10px 14px;border-radius:999px;background:#fff;color:var(--ink);border:1px solid #d5d5d5;font-weight:700}
.monitor-nav button.active{background:linear-gradient(135deg,var(--red),#bc1219);color:#fff;border-color:transparent}
.monitor-nav button.active::after{content:'';position:absolute;left:0;right:0;bottom:-6px;height:2px;background:var(--red);border-radius:999px;display:none}
.monitor-nav button.secondary{background:#fff;border:1px solid #d5d5d5}
.monitor-panel{padding:28px 8px 8px;background:transparent}
.monitor-title-group{margin-bottom:18px}
.monitor-title-group h1{margin:12px 0 8px;font:700 42px Outfit,sans-serif;letter-spacing:-.08em;color:var(--ink)}
.monitor-title-group p{margin:0;max-width:690px;color:var(--muted);font-size:16px;line-height:1.5}
.scan-area{display:grid;place-items:center;gap:18px;padding:26px 20px;border-radius:24px;background:linear-gradient(180deg,#fff,#f7f7f7);border:1px solid var(--line);margin:8px 0 18px}
.scan-ring{display:grid;place-items:center;width:116px;height:116px;border-radius:50%;background:radial-gradient(circle,#2a2a2a,#0a0a0a 62%);border:6px solid rgba(215,25,32,.65);box-shadow:0 0 0 10px rgba(215,25,32,.12),0 0 32px rgba(215,25,32,.18);color:var(--yellow);font-size:52px;font-weight:800}
.scan-label{font:700 15px Outfit,sans-serif;font-size:18px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink);font-weight:700}
.scan-status{padding:10px 12px;border-radius:8px;background:#fafafa;border:1px solid var(--line);font-weight:600;color:var(--muted);margin:14px 0 16px;font-size:18px}
.scan-status strong{color:var(--red)}
#scanner-input{position:absolute;left:-9999px;opacity:0;height:1px;width:100%;min-height:60px;padding:16px 18px;border-radius:16px;border:1px solid #d5d5d5;background:#fff;color:var(--ink);font-size:20px;outline:none}
.monitor-schedule-list{display:flex;flex-direction:column;gap:12px;max-height:420px;overflow:auto;padding-right:4px}
.monitor-item{background:#fff;border:1px solid var(--line);border-radius:18px;color:var(--ink)}
.monitor-item .initials{background:linear-gradient(135deg,#fff0ee,#ffd9d7);color:var(--red);border:0}
.monitor-item strong{color:var(--ink)}
.monitor-item small{color:var(--muted)}
.monitor-item .btn{padding:9px 12px}
.monitor-item .btn.secondary{background:#fff;color:var(--ink);border:1px solid #d5d5d5}

/* ---------- Gym monitor, kiosk look (scoped to .monitor-shell.kiosk) ---------- */
.monitor-shell.kiosk .monitor-page{display:flex;justify-content:center;align-items:center;min-height:calc(100vh - 36px)}
.monitor-shell.kiosk .monitor-screen{width:min(1280px,100%);min-height:calc(100vh - 36px);padding:18px 20px 24px;border-radius:26px;background:#111;border:1px solid rgba(255,255,255,.08);box-shadow:0 22px 60px rgba(0,0,0,.35)}
.monitor-shell.kiosk .monitor-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:8px 10px 16px;border-bottom:1px solid rgba(255,255,255,.08);background:transparent;color:#fff}
.monitor-shell.kiosk .monitor-brand{display:inline-flex;align-items:center;gap:8px;color:#111;font:700 30px Outfit,sans-serif;line-height:1;letter-spacing:-.8px}
.monitor-shell.kiosk .monitor-brand .miga{color:#111}
.monitor-shell.kiosk .monitor-brand .team{color:var(--red)}
.monitor-shell.kiosk .monitor-brand .brand-logo{width:42px;height:42px;filter:drop-shadow(0 2px 6px rgba(0,0,0,.25))}
.monitor-shell.kiosk.monitor-qr .monitor-brand .brand-logo{width:56px;height:56px}
.monitor-shell.kiosk .monitor-nav{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.monitor-shell.kiosk .monitor-nav button.active{background:linear-gradient(135deg,var(--red),#ba1017);border-color:transparent;color:#fff}
.monitor-shell.kiosk .monitor-nav button.secondary{background:#fff;color:#111;border:1px solid rgba(17,17,17,.12)}
.monitor-shell.kiosk .monitor-panel{padding:28px 8px 8px;background:transparent}
.monitor-shell.kiosk .monitor-title-group{margin-bottom:18px}
.monitor-shell.kiosk .lesson-pill{display:inline-flex;padding:7px 12px;border-radius:999px;background:linear-gradient(135deg,#fff1f1,#ffe1e1);color:var(--red);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.monitor-shell.kiosk .scan-area{display:grid;place-items:center;gap:18px;padding:26px 20px;border-radius:24px;background:#161616;border:1px solid rgba(255,255,255,.06);margin:8px 0 18px}
.monitor-shell.kiosk .scan-ring{display:grid;place-items:center;width:116px;height:116px;border-radius:50%;background:radial-gradient(circle,#1d1d1d,#0a0a0a 62%);border:6px solid rgba(215,25,32,.7);box-shadow:0 0 0 10px rgba(215,25,32,.12),0 0 32px rgba(215,25,32,.18);color:var(--yellow);font-size:52px;font-weight:800}
.monitor-shell.kiosk .scan-label{font-size:18px;letter-spacing:.04em;text-transform:uppercase;color:#f3f3f3;font-weight:700}
.monitor-shell.kiosk .scan-status{margin-bottom:16px;color:rgba(255,255,255,.8);font-size:18px}
.monitor-shell.kiosk .scan-status strong{color:var(--yellow)}
.monitor-shell.kiosk #scanner-input{width:100%;min-height:60px;padding:16px 18px;border-radius:16px;border:1px solid rgba(17,17,17,.18);background:#fff;color:#111;font-size:20px;outline:none;box-shadow:0 12px 30px rgba(0,0,0,.08)}
.monitor-shell.kiosk .monitor-schedule-list{display:flex;flex-direction:column;gap:12px;max-height:420px;overflow:auto;padding-right:4px}
.monitor-shell.kiosk .athlete-option,.monitor-shell.kiosk .monitor-item{display:flex;align-items:center;gap:11px;width:100%;margin:8px 0;padding:12px 12px;border:1px solid rgba(17,17,17,.08);border-radius:14px;background:#fff;color:#111;text-align:left;transition:.2s ease}
.monitor-shell.kiosk .athlete-option:hover,.monitor-shell.kiosk .athlete-option.selected{border-color:var(--red);background:linear-gradient(135deg,#fff,#fff4f4);box-shadow:0 10px 20px rgba(215,25,32,.08)}
.monitor-shell.kiosk .monitor-item .initials{background:linear-gradient(135deg,#fff0ee,#ffd9d7);color:var(--red);border:0}
.monitor-shell.kiosk .monitor-item strong{color:#111}
.monitor-shell.kiosk .monitor-item small{color:#5d5d5d}
.monitor-shell.kiosk .monitor-item .btn.secondary{background:#fff;color:#111;border:1px solid rgba(17,17,17,.15)}

/* ---------- Recent check-ins list on the monitor ---------- */
.monitor-recent{margin-top:20px;padding:18px;border:1px solid var(--line);border-radius:20px;background:#fff}
.monitor-recent-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.monitor-recent-head h2{margin:0;font:700 22px Outfit,sans-serif;color:var(--ink)}
.monitor-recent-head span{color:var(--muted);font-size:13px}
.monitor-recent-row{display:flex;align-items:center;gap:11px;padding:11px 0;border-top:1px solid var(--line)}
.monitor-recent-row .initials{flex:0 0 auto}
.monitor-recent-row .row-main{flex:1;min-width:0}
.monitor-recent-row strong{display:block;color:var(--ink)}
.monitor-recent-row small{display:block;color:var(--muted);margin-top:2px}
.monitor-recent-row .badge{flex:0 0 auto}
.monitor-recent-empty{padding:14px 0;color:var(--muted);font-size:14px}

/* ---------- QR codes page: filters ---------- */
.qr-admin-filters{margin:0 0 18px}
.qr-admin-filters input{max-width:420px}

/* ---------- Gym monitor, last overrides (they must stay after the kiosk rules above) ---------- */
.monitor-shell.kiosk{min-height:100vh;padding:18px;background:linear-gradient(180deg,#f8f8f8,#eeeeee)}
.monitor-shell.kiosk .monitor-screen{background:#fff;border-color:var(--line);box-shadow:0 22px 60px rgba(0,0,0,.16)}
.monitor-shell.kiosk .monitor-header{border-bottom-color:var(--line);color:var(--ink)}
.monitor-shell.kiosk .monitor-brand{color:var(--ink)}
.monitor-shell.kiosk .monitor-nav button{padding:10px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.08);font-weight:700;background:#fff;border-color:#d5d5d5;color:var(--ink)}
.monitor-shell.kiosk .monitor-title-group h1{margin:12px 0 8px;font:700 42px Outfit,sans-serif;letter-spacing:-.08em;color:var(--ink)}
.monitor-shell.kiosk .monitor-title-group p{margin:0;max-width:700px;font-size:16px;line-height:1.5;color:var(--muted)}
.monitor-shell.kiosk .scan-area{background:linear-gradient(180deg,#fff,#f7f7f7);border-color:var(--line)}
.monitor-shell.kiosk .scan-label{color:var(--ink)}
.monitor-shell.kiosk .scan-status{color:var(--muted)}
.monitor-shell.kiosk .scan-status strong{color:var(--red)}

/* ---------- Athlete profile in the check-in card ---------- */
.athlete-profile{display:grid;gap:13px;text-align:left}
.athlete-profile>strong{font:700 20px Outfit,sans-serif;color:var(--ink)}
.athlete-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.athlete-profile-grid span{display:grid;gap:3px;padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#fff}
.athlete-profile-grid b{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.athlete-profile small{color:var(--muted)}
@media(max-width:520px){
.athlete-profile-grid{grid-template-columns:1fr}
}

/* ---------- Sign-in and PIN screens ---------- */
.login-card{width:min(420px,100%);margin-inline:auto}
.login-form{display:flex;flex-direction:column;gap:12px;margin-top:20px}
.login-form input{width:100%;padding:12px 14px;border:1px solid #d7e2ec;border-radius:12px;background:#fff;color:var(--ink);font-size:15px}
.login-form input:focus{outline:none;border-color:var(--red);box-shadow:0 0 0 3px rgba(215,25,32,.12)}
.login-form .btn{width:100%;margin-top:4px;padding:12px}

/* ---------- Later additions: checkbox tables, link buttons, follow-up tables, evolution chart, report notes ---------- */
.table input[type=checkbox]{width:18px;height:18px;accent-color:var(--red);cursor:pointer;vertical-align:middle}
a.btn{display:inline-block;text-decoration:none;text-align:center;white-space:nowrap}
.table.follow-up td{white-space:normal}
.table.follow-up td:last-child{width:1%;white-space:nowrap}
.table.follow-up .badge{white-space:nowrap}
.filters[hidden]{display:none}
.tabs{overflow-x:auto}
.tabs button{flex:0 0 auto;white-space:nowrap}
.evo-chart{padding:4px 20px 18px}
.evo-bars{display:flex;align-items:flex-end;gap:10px}
.evo-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:6px}
.evo-pair{width:100%;height:150px;display:flex;align-items:flex-end;justify-content:center;gap:3px;border-bottom:1px solid var(--line)}
.evo-pair i{display:block;width:38%;max-width:26px;min-height:2px;border-radius:5px 5px 0 0}
.evo-col span{color:var(--muted);font-size:11px;font-weight:700;white-space:nowrap}
.evo-legend{display:flex;gap:16px;margin-top:12px;color:var(--muted);font-size:12px;font-weight:700}
.evo-legend span{display:inline-flex;align-items:center;gap:6px}
.evo-legend i{width:10px;height:10px;border-radius:3px}
i.exp{background:#d9d9d9}
i.rec{background:linear-gradient(180deg,var(--red),#b6141a)}
.report-notes{margin:14px 0 0;padding-left:18px;color:var(--muted);font-size:12px;line-height:1.55}
@media(max-width:560px){
.evo-chart{padding:4px 16px 16px}
.evo-bars{gap:6px}
.table.follow-up,.table.follow-up tbody{display:block}
.table.follow-up thead{display:none}
.table.follow-up tr{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 10px;padding:12px;border-top:1px solid var(--line)}
.table.follow-up tr:first-child{border-top:0}
.table.follow-up td{display:block;padding:0;border:0}
.table.follow-up td:first-child,.table.follow-up td.empty{grid-column:1/-1}
.table.follow-up td:last-child{width:auto}
}

/* ---------- Change log: picking lines to clear (programmer account) ---------- */
.audit-pick-col{display:none;width:34px}
#audit-table.clearing .audit-pick-col{display:table-cell}
.audit-pick{width:18px;height:18px;cursor:pointer}
.audit-clear-bar{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin-bottom:16px;padding:13px 16px}
.audit-clear-bar[hidden],#audit-clear-button[hidden]{display:none}
.audit-clear-bar label{display:flex;align-items:center;gap:8px;cursor:pointer}
.audit-clear-actions{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}
