/* ============================================
   PADEL STATS v2 — app.css
   Mobile-first · Dark theme · Zero Bootstrap
   ============================================ */

/* ---------- Reset ---------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body,input,select,textarea,button{font-family:'Outfit',sans-serif}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
ul,ol{list-style:none}
button{cursor:pointer;border:none;background:none}
input,select,textarea{outline:none;border:none;background:none}

/* ---------- Design tokens ---------- */
:root{
  --bg:        #090e1a;
  --surface:   #111827;
  --surface-2: #1a2236;
  --surface-3: #222d44;
  --border:    rgba(255,255,255,.06);
  --border-2:  rgba(255,255,255,.10);

  --green:     #00e676;
  --green-dim: rgba(0,230,118,.12);
  --green-mid: rgba(0,230,118,.25);
  --amber:     #ffab00;
  --amber-dim: rgba(255,171,0,.12);
  --red:       #ff5252;
  --red-dim:   rgba(255,82,82,.12);
  --blue:      #448aff;
  --blue-dim:  rgba(68,138,255,.12);
  --purple:    #b388ff;
  --purple-dim:rgba(179,136,255,.12);

  --text:      #eef0f6;
  --text-2:    #8892b0;
  --text-3:    #4a5578;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow:    0 2px 12px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.45);

  --tab-h:     64px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
  --header-h:  56px;

  --ease:      cubic-bezier(.4,0,.2,1);
}

/* ---------- Base ---------- */
body{
  background:var(--bg);
  color:var(--text);
  font-size:15px;
  line-height:1.55;
  min-height:100dvh;
  -webkit-font-smoothing:antialiased;
  padding-bottom:calc(var(--tab-h) + var(--safe-b) + 16px);
  overflow-x:hidden;
}

/* ---------- Typography ---------- */
h1{font-size:1.5rem;font-weight:700;letter-spacing:-.02em}
h2{font-size:1.25rem;font-weight:600;letter-spacing:-.01em}
h3{font-size:1.1rem;font-weight:600}
h4{font-size:1rem;font-weight:600}
.text-2{color:var(--text-2)}
.text-3{color:var(--text-3)}
.text-green{color:var(--green)}
.text-amber{color:var(--amber)}
.text-red{color:var(--red)}
.text-blue{color:var(--blue)}
small,.small{font-size:.82rem}

/* ---------- Layout ---------- */
.page{
  padding:16px;
  max-width:600px;
  margin:0 auto;
  animation:fadeUp .35s var(--ease);
}
@keyframes fadeUp{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}

/* ---------- Top bar ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:90;
  background:rgba(9,14,26,.85);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--border);
  height:var(--header-h);
  display:flex;
  align-items:center;
  padding:0 16px;
  gap:12px;
}
.topbar-title{
  font-size:1.1rem;
  font-weight:700;
  flex:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar-brand{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  font-size:1.15rem;
  letter-spacing:.02em;
}
.topbar-brand i{color:var(--green);font-size:1.1rem}
.topbar-action{
  width:36px;height:36px;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;
  color:var(--text-2);
  transition:all .2s var(--ease);
}
.topbar-action:hover,.topbar-action:active{
  background:var(--surface-2);color:var(--text);
}

/* ---------- Welcome hero (index) ---------- */
.welcome-hero{
  position:relative;
  overflow:hidden;
  background:linear-gradient(180deg,#042a14 0%,#084a24 50%,#0c6430 100%);
}
.welcome-hero::before{
  content:'';position:absolute;
  top:-40px;left:50%;transform:translateX(-50%);
  width:280px;height:180px;border-radius:50%;
  background:radial-gradient(ellipse,rgba(0,230,118,.07),transparent 70%);
}
.welcome-hero::after{
  content:none;
}
.welcome-seam{
  position:absolute;
  top:0;left:0;
  width:100%;height:100%;
  z-index:0;
  pointer-events:none;
}
.welcome-content{
  position:relative;z-index:1;
  text-align:center;
  padding:32px 24px 28px;
}
.welcome-avatar{
  display:flex;align-items:center;justify-content:center;
  width:84px;height:84px;
  border-radius:50%;
  background:var(--green-dim);
  border:3px solid var(--green);
  margin:0 auto 16px;
  background-size:cover;background-position:center;
  text-decoration:none;
  transition:transform .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.welcome-avatar:active{transform:scale(.93)}
.welcome-avatar.has-image{background-color:transparent}
.welcome-avatar.has-image i{display:none}
.welcome-avatar i{color:var(--green);font-size:1.8rem}
.welcome-greeting{
  font-size:1.3rem;
  font-weight:800;
  color:#fff;
  letter-spacing:-.02em;
}
.welcome-appname{
  font-size:.7rem;
  color:rgba(255,255,255,.28);
  text-transform:uppercase;
  letter-spacing:.2em;
  font-weight:600;
  margin-top:6px;
}
.welcome-appname i{color:var(--green);margin-right:2px}
.welcome-curve{
  position:relative;z-index:1;
  line-height:0;
}
.welcome-curve svg{
  display:block;width:100%;height:40px;
}
.welcome-insight{
  margin-top:16px;
  display:inline-flex;align-items:center;gap:10px;
  background:rgba(255,255,255,.06);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.1);
  border-radius:12px;
  padding:11px 18px;
  text-align:left;
  max-width:340px;
}
.welcome-insight i{
  color:var(--green);
  font-size:.9rem;
  flex-shrink:0;
}
.welcome-insight span{
  font-size:.78rem;
  color:rgba(255,255,255,.6);
  line-height:1.4;
  font-weight:500;
}
.welcome-insight b{color:var(--green);font-weight:700}

/* ---------- Bottom tab bar ---------- */
.tabbar{
  position:fixed;
  bottom:0;left:0;right:0;
  z-index:100;
  background:rgba(17,24,39,.92);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-top:1px solid var(--border);
  display:flex;
  height:calc(var(--tab-h) + var(--safe-b));
  padding-bottom:var(--safe-b);
}
.tab{
  flex:1;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:3px;
  color:var(--text-3);
  font-size:.65rem;
  font-weight:600;
  letter-spacing:.03em;
  text-transform:uppercase;
  transition:color .2s var(--ease);
  position:relative;
  -webkit-tap-highlight-color:transparent;
}
.tab i{font-size:1.15rem;transition:transform .2s var(--ease)}
.tab.active{color:var(--green)}
.tab.active i{transform:scale(1.12)}
.tab.active::before{
  content:'';position:absolute;
  top:0;left:25%;right:25%;
  height:2px;border-radius:0 0 2px 2px;
  background:var(--green);
}
/* Center "+" button */
.tab--add{
  position:relative;
}
.tab--add .tab-icon-wrap{
  width:44px;height:44px;
  border-radius:50%;
  background:linear-gradient(135deg,#00e676,#00c853);
  display:flex;align-items:center;justify-content:center;
  margin-top:-18px;
  box-shadow:0 4px 20px rgba(0,230,118,.35);
  transition:transform .2s var(--ease),box-shadow .2s var(--ease);
}
.tab--add .tab-icon-wrap i{color:#090e1a;font-size:1.3rem}
.tab--add:active .tab-icon-wrap{transform:scale(.92)}
.tab--add span{margin-top:2px}

/* ---------- Cards ---------- */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform .15s var(--ease);
}
.card+.card{margin-top:12px}
.card-head{
  padding:14px 16px;
  font-weight:600;
  font-size:.9rem;
  display:flex;align-items:center;gap:8px;
  border-bottom:1px solid var(--border);
  color:var(--text-2);
}
.card-head i{color:var(--green);font-size:.85rem}
.card-body{padding:16px}
.card-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:10px 0;
}
.card-row+.card-row{border-top:1px solid var(--border)}
.card-row-label{color:var(--text-2);font-size:.85rem}
.card-row-value{font-weight:600;font-size:.95rem}

/* Clickable card */
.card-link{display:block;text-decoration:none;color:inherit}
.card-link:active .card{transform:scale(.985);background:var(--surface-2)}

/* ---------- KPI chips ---------- */
.kpi-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.kpi-grid-4{
  grid-template-columns:repeat(2,1fr);
}
.kpi{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px 12px;
  text-align:center;
}
.kpi-val{
  font-size:1.5rem;
  font-weight:800;
  line-height:1.1;
  letter-spacing:-.03em;
}
.kpi-label{
  font-size:.7rem;
  color:var(--text-2);
  margin-top:4px;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:600;
}
.kpi--green .kpi-val{color:var(--green)}
.kpi--amber .kpi-val{color:var(--amber)}
.kpi--red   .kpi-val{color:var(--red)}
.kpi--blue  .kpi-val{color:var(--blue)}
.kpi--purple .kpi-val{color:var(--purple)}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:10px 20px;
  border-radius:var(--radius-sm);
  font-size:.88rem;font-weight:600;
  transition:all .2s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.btn-block{width:100%}
.btn-green{
  background:var(--green);color:#090e1a;
  box-shadow:0 2px 12px rgba(0,230,118,.2);
}
.btn-green:active{transform:scale(.97);box-shadow:0 1px 6px rgba(0,230,118,.15)}
.btn-outline{
  border:1.5px solid var(--border-2);
  color:var(--text-2);
}
.btn-outline:active{background:var(--surface-2);color:var(--text)}
.btn-danger{background:var(--red-dim);color:var(--red)}
.btn-danger:active{opacity:.8}
.btn-ghost{color:var(--text-2);padding:8px}
.btn-ghost:active{color:var(--text)}

.btn-sm{padding:7px 14px;font-size:.8rem;border-radius:6px}
.btn-icon{
  width:36px;height:36px;padding:0;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}

/* ---------- Forms ---------- */
.form-group{margin-bottom:16px}
.form-label{
  display:block;
  font-size:.78rem;
  font-weight:600;
  color:var(--text-2);
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.form-input,.form-select,.form-textarea{
  width:100%;
  background:var(--surface-2);
  border:1.5px solid var(--border-2);
  border-radius:var(--radius-sm);
  padding:11px 14px;
  color:var(--text);
  font-size:.95rem;
  transition:border-color .2s var(--ease);
}
.form-input:focus,.form-select:focus,.form-textarea:focus{
  border-color:var(--green);
  box-shadow:0 0 0 3px var(--green-dim);
}
.form-input::placeholder{color:var(--text-3)}
.form-select{
  -webkit-appearance:none;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238892b0'%3E%3Cpath d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  padding-right:32px;
}
.form-select option{background:var(--surface-2);color:var(--text)}
.form-textarea{resize:vertical;min-height:80px;line-height:1.5}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.form-row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.form-hint{font-size:.75rem;color:var(--text-3);margin-top:4px}
.form-error{
  font-size:.78rem;color:var(--red);margin-top:4px;
  display:none;
}
.form-group.has-error .form-input,
.form-group.has-error .form-select{border-color:var(--red)}
.form-group.has-error .form-error{display:block}

/* ---------- Rating selector (1-5) ---------- */
.rating{display:flex;gap:6px}
.rating-btn{
  flex:1;
  height:42px;
  border-radius:var(--radius-sm);
  background:var(--surface-2);
  border:1.5px solid var(--border-2);
  color:var(--text-2);
  font-size:.95rem;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  transition:all .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.rating-btn.active{
  background:var(--green-dim);
  border-color:var(--green);
  color:var(--green);
}
.rating-btn:active{transform:scale(.93)}

/* ---------- Result selector ---------- */
.result-options{display:flex;gap:8px}
.result-btn{
  flex:1;
  padding:12px 8px;
  border-radius:var(--radius-sm);
  background:var(--surface-2);
  border:1.5px solid var(--border-2);
  text-align:center;
  font-size:.82rem;font-weight:600;
  color:var(--text-2);
  transition:all .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.result-btn i{display:block;font-size:1.3rem;margin-bottom:4px}
.result-btn.active.win{background:var(--green-dim);border-color:var(--green);color:var(--green)}
.result-btn.active.lose{background:var(--red-dim);border-color:var(--red);color:var(--red)}
.result-btn.active.draw{background:var(--amber-dim);border-color:var(--amber);color:var(--amber)}
.result-btn:active{transform:scale(.95)}

/* ---------- Set score inputs ---------- */
.sets-grid{display:flex;flex-direction:column;gap:8px}
.set-row{
  display:grid;
  grid-template-columns:auto 1fr 20px 1fr;
  align-items:center;gap:8px;
}
.set-label{
  font-size:.78rem;font-weight:600;color:var(--text-3);
  width:42px;text-align:center;
}
.set-sep{text-align:center;color:var(--text-3);font-weight:700}
.set-input{
  width:100%;
  background:var(--surface-2);
  border:1.5px solid var(--border-2);
  border-radius:var(--radius-sm);
  padding:10px;
  text-align:center;
  font-size:1.1rem;font-weight:700;
  color:var(--text);
  -moz-appearance:textfield;
}
.set-input::-webkit-outer-spin-button,
.set-input::-webkit-inner-spin-button{-webkit-appearance:none}
.set-input:focus{border-color:var(--green);box-shadow:0 0 0 3px var(--green-dim)}

/* ---------- Section divider ---------- */
.section-title{
  font-size:.78rem;
  font-weight:700;
  color:var(--green);
  text-transform:uppercase;
  letter-spacing:.06em;
  margin:24px 0 12px;
  display:flex;align-items:center;gap:8px;
}
.section-title::after{
  content:'';flex:1;height:1px;background:var(--border);
}

/* ---------- Badges ---------- */
.badge{
  display:inline-flex;align-items:center;
  padding:3px 10px;
  border-radius:20px;
  font-size:.72rem;font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.badge-green{background:var(--green-dim);color:var(--green)}
.badge-red{background:var(--red-dim);color:var(--red)}
.badge-amber{background:var(--amber-dim);color:var(--amber)}
.badge-blue{background:var(--blue-dim);color:var(--blue)}
.badge-muted{background:var(--surface-3);color:var(--text-2)}

/* ---------- Match list item ---------- */
.match-item{
  display:flex;align-items:center;gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  transition:background .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.match-item:last-child{border-bottom:none}
.match-item:active{background:var(--surface-2)}
.match-marker{
  width:4px;height:40px;border-radius:2px;flex-shrink:0;
}
.match-marker.win{background:var(--green)}
.match-marker.lose{background:var(--red)}
.match-marker.draw{background:var(--amber)}
.match-body{flex:1;min-width:0}
.match-players{
  font-weight:600;font-size:.9rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.match-meta{
  font-size:.72rem;color:var(--text-2);
  display:flex;gap:5px;margin-top:4px;
  flex-wrap:wrap;
  align-items:center;
}
.match-badge{
  display:inline-flex;align-items:center;
  padding:1px 7px;
  border-radius:10px;
  font-size:.65rem;font-weight:600;
  letter-spacing:.02em;
}
.match-badge-tipo{background:var(--green-dim);color:var(--green)}
.match-badge-lado{background:var(--blue-dim);color:var(--blue)}
.match-badge-lugar{background:var(--purple-dim);color:var(--purple)}
.match-score{
  font-weight:800;font-size:.95rem;
  white-space:nowrap;flex-shrink:0;
}
.match-arrow{color:var(--text-3);flex-shrink:0}

/* ---------- Streak pill ---------- */
.streak{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 14px;
  border-radius:20px;
  font-size:.82rem;font-weight:700;
}
.streak-win{background:var(--green-dim);color:var(--green)}
.streak-lose{background:var(--red-dim);color:var(--red)}

/* ---------- Progress bar ---------- */
.progress{
  height:6px;
  background:var(--surface-3);
  border-radius:3px;
  overflow:hidden;
}
.progress-fill{
  height:100%;
  border-radius:3px;
  transition:width .6s var(--ease);
}
.progress-fill.green{background:var(--green)}
.progress-fill.red{background:var(--red)}
.progress-fill.amber{background:var(--amber)}
.progress-fill.blue{background:var(--blue)}

/* ---------- Stat row (metric display) ---------- */
.stat-row{
  display:flex;align-items:center;gap:12px;
  padding:10px 0;
}
.stat-row+.stat-row{border-top:1px solid var(--border)}
.stat-icon{
  width:34px;height:34px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  font-size:.85rem;flex-shrink:0;
}
.stat-icon.green{background:var(--green-dim);color:var(--green)}
.stat-icon.red{background:var(--red-dim);color:var(--red)}
.stat-icon.amber{background:var(--amber-dim);color:var(--amber)}
.stat-icon.blue{background:var(--blue-dim);color:var(--blue)}
.stat-icon.purple{background:var(--purple-dim);color:var(--purple)}
.stat-info{flex:1;min-width:0}
.stat-name{font-size:.85rem;font-weight:500}
.stat-detail{font-size:.72rem;color:var(--text-3)}
.stat-val{font-weight:700;font-size:.95rem;flex-shrink:0}

/* ---------- Alerts / Toast ---------- */
.toast-container{
  position:fixed;top:12px;left:12px;right:12px;
  z-index:200;
  display:flex;flex-direction:column;gap:8px;
  pointer-events:none;
}
.toast{
  padding:12px 16px;
  border-radius:var(--radius-sm);
  font-size:.88rem;font-weight:500;
  display:flex;align-items:center;gap:8px;
  pointer-events:auto;
  animation:toastIn .3s var(--ease);
  box-shadow:var(--shadow-lg);
}
@keyframes toastIn{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
.toast.out{animation:toastOut .25s var(--ease) forwards}
@keyframes toastOut{to{opacity:0;transform:translateY(-12px)}}
.toast-success{background:#0a2e1a;border:1px solid rgba(0,230,118,.25);color:var(--green)}
.toast-error{background:#2e0a0a;border:1px solid rgba(255,82,82,.25);color:var(--red)}
.toast-warning{background:#2e1f0a;border:1px solid rgba(255,171,0,.25);color:var(--amber)}
.toast-info{background:#0a1a2e;border:1px solid rgba(68,138,255,.25);color:var(--blue)}

/* ---------- Modal / Bottom sheet ---------- */
.modal-overlay{
  position:fixed;inset:0;
  z-index:150;
  background:rgba(0,0,0,.6);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  display:none;
  align-items:flex-end;
  justify-content:center;
  animation:fadeIn .2s var(--ease);
}
.modal-overlay.open{display:flex}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal-sheet{
  background:var(--surface);
  border-radius:var(--radius-lg) var(--radius-lg) 0 0;
  width:100%;max-width:600px;
  max-height:85dvh;
  overflow-y:auto;
  animation:slideUp .3s var(--ease);
  padding-bottom:var(--safe-b);
}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.modal-handle{
  width:36px;height:4px;
  background:var(--text-3);
  border-radius:2px;
  margin:10px auto 0;
}
.modal-head{
  padding:16px;
  font-weight:700;font-size:1.05rem;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--border);
  position:sticky;top:0;
  background:var(--surface);
  z-index:1;
}
.modal-body{padding:16px}
.modal-actions{
  padding:12px 16px;
  display:flex;gap:8px;
  border-top:1px solid var(--border);
  position:sticky;bottom:0;
  background:var(--surface);
}

/* ---------- Tabs ---------- */
.tabs{
  display:flex;
  background:var(--surface-2);
  border-radius:var(--radius-sm);
  padding:3px;
  gap:2px;
}
.tab-btn{
  flex:1;
  padding:9px;
  border-radius:6px;
  font-size:.82rem;font-weight:600;
  color:var(--text-2);
  text-align:center;
  transition:all .2s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.tab-btn.active{
  background:var(--surface);
  color:var(--text);
  box-shadow:0 1px 4px rgba(0,0,0,.2);
}
.tab-panel{display:none}
.tab-panel.active{display:block}

/* ---------- Empty state ---------- */
.empty{
  text-align:center;
  padding:48px 24px;
  color:var(--text-3);
}
.empty i{font-size:2.5rem;margin-bottom:12px;display:block}
.empty p{font-size:.9rem;margin-bottom:16px}

/* ---------- Chart container ---------- */
.chart-wrap{
  position:relative;
  width:100%;
}
.chart-wrap-square{
  position:relative;
  width:100%;
  max-width:320px;
  margin:0 auto;
}

/* ---------- Spinner overlay ---------- */
.spinner-overlay{
  position:fixed;inset:0;
  z-index:300;
  background:rgba(9,14,26,.7);
  display:none;
  align-items:center;justify-content:center;
}
.spinner-overlay.active{display:flex}
.spinner{
  width:36px;height:36px;
  border:3px solid var(--surface-3);
  border-top-color:var(--green);
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- Filters row ---------- */
.filters{
  display:flex;gap:8px;
  overflow-x:auto;
  padding:4px 0 12px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.filters::-webkit-scrollbar{display:none}
.filter-chip{
  flex-shrink:0;
  padding:6px 12px;
  border-radius:20px;
  background:var(--surface-2);
  border:1px solid var(--border-2);
  font-size:.72rem;font-weight:600;
  color:var(--text-2);
  white-space:nowrap;
  transition:all .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.filter-chips{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.filter-chips::-webkit-scrollbar{display:none}
.filter-chip.active{
  background:var(--green-dim);
  border-color:var(--green);
  color:var(--green);
}

/* ---------- Compare bars ---------- */
.compare{display:flex;flex-direction:column;gap:14px}
.compare-item{display:flex;flex-direction:column;gap:6px}
.compare-header{
  display:flex;justify-content:space-between;align-items:baseline;
}
.compare-label{font-size:.85rem;font-weight:500}
.compare-val{font-size:.85rem;font-weight:700}
.compare-bar{
  height:8px;background:var(--surface-3);border-radius:4px;
  overflow:hidden;
}
.compare-fill{height:100%;border-radius:4px;transition:width .6s var(--ease)}

/* ---------- Opponent card ---------- */
.opponent{
  display:flex;align-items:center;gap:12px;
  padding:12px;
  border-radius:var(--radius-sm);
  background:var(--surface-2);
}
.opponent+.opponent{margin-top:8px}
.opponent-avatar{
  width:38px;height:38px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:.85rem;
}
.opponent-info{flex:1;min-width:0}
.opponent-name{font-weight:600;font-size:.9rem}
.opponent-sub{font-size:.75rem;color:var(--text-3)}
.opponent-wr{font-weight:700;font-size:.9rem;flex-shrink:0}

/* ---------- Timeline dots ---------- */
.timeline{display:flex;gap:5px;align-items:center;justify-content:center;padding:8px 0}
.timeline-dot{
  width:10px;height:10px;border-radius:50%;
  transition:transform .15s var(--ease);
}
.timeline-dot.win{background:var(--green)}
.timeline-dot.lose{background:var(--red)}
.timeline-dot.draw{background:var(--amber)}

/* ---------- Login page ---------- */
.login-page{
  min-height:100dvh;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  padding:24px;
  background:linear-gradient(160deg,#0a1628 0%,#091119 50%,#0d1f12 100%);
}
.login-card{
  width:100%;max-width:380px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
}
.login-header{
  padding:32px 24px 24px;
  text-align:center;
  border-bottom:1px solid var(--border);
}
.login-logo{
  width:64px;height:64px;
  border-radius:50%;
  background:var(--green-dim);
  border:2px solid var(--green);
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 12px;
}
.login-logo i{font-size:1.6rem;color:var(--green)}
.login-header h1{font-size:1.8rem;margin-bottom:4px}
.login-header p{color:var(--text-2);font-size:.88rem}
.login-body{padding:24px}
.login-footer{
  padding:16px 24px;
  text-align:center;
  font-size:.75rem;
  color:var(--text-3);
  border-top:1px solid var(--border);
}

/* ---------- Confirm dialog ---------- */
.confirm-overlay{
  position:fixed;inset:0;z-index:200;
  background:rgba(0,0,0,.6);
  display:none;align-items:center;justify-content:center;
  padding:24px;
}
.confirm-overlay.open{display:flex}
.confirm-box{
  background:var(--surface);
  border-radius:var(--radius);
  padding:24px;
  max-width:320px;width:100%;
  text-align:center;
  box-shadow:var(--shadow-lg);
}
.confirm-box p{margin-bottom:20px;font-size:.95rem}
.confirm-actions{display:flex;gap:8px}
.confirm-actions .btn{flex:1}

/* ---------- Pagination ---------- */
.pagination{
  display:flex;align-items:center;justify-content:center;
  gap:4px;padding:16px 0;
}
.page-btn{
  width:36px;height:36px;
  border-radius:var(--radius-sm);
  display:flex;align-items:center;justify-content:center;
  font-size:.85rem;font-weight:600;
  color:var(--text-2);
  transition:all .15s var(--ease);
}
.page-btn.active{background:var(--green);color:#090e1a}
.page-btn:active:not(.active){background:var(--surface-2)}

/* ---------- Detail sections ---------- */
.detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.detail-item{
  padding:12px;
  background:var(--surface-2);
  border-radius:var(--radius-sm);
}
.detail-label{font-size:.72rem;color:var(--text-3);text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px}
.detail-val{font-weight:600;font-size:.9rem}

/* ---------- IA analysis ---------- */
.ia-content{
  font-size:.9rem;
  line-height:1.7;
  white-space:pre-wrap;
  color:var(--text);
}
.ia-content strong{color:var(--green)}

/* ---------- Scrollable area inside modal ---------- */
.scroll-area{
  max-height:50dvh;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

/* ---------- Manage list items ---------- */
.manage-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 0;
}
.manage-item+.manage-item{border-top:1px solid var(--border)}
.manage-info{flex:1;min-width:0}
.manage-name{font-weight:600;font-size:.9rem}
.manage-sub{font-size:.75rem;color:var(--text-3)}
.manage-actions{display:flex;gap:6px;flex-shrink:0}

/* ---------- Utilities ---------- */
.flex{display:flex}.flex-col{flex-direction:column}
.items-center{align-items:center}.justify-between{justify-content:space-between}
.gap-4{gap:4px}.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}
.p-16{padding:16px}
.w-full{width:100%}
.text-center{text-align:center}
.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hidden{display:none!important}

/* ---------- Responsive (tablet+) ---------- */
@media(min-width:640px){
  .page{padding:24px}
  .kpi-grid{grid-template-columns:repeat(3,1fr)}
  .kpi-grid-4{grid-template-columns:repeat(4,1fr)}
  .detail-grid{grid-template-columns:repeat(3,1fr)}
}
@media(min-width:768px){
  .page{max-width:680px}
  .kpi-grid{grid-template-columns:repeat(6,1fr)}
  .kpi-grid-4{grid-template-columns:repeat(4,1fr)}
}

/* ---------- Metric toggles ---------- */
.metric-toggles{
  display:flex;gap:6px;
  flex-wrap:wrap;
}
.metric-toggle{
  padding:5px 12px;
  border-radius:20px;
  font-size:.72rem;font-weight:600;
  background:var(--surface-2);
  border:1.5px solid var(--border-2);
  color:var(--text-3);
  transition:all .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
  letter-spacing:.02em;
}
.metric-toggle.active{
  border-color:currentColor;
}
.metric-toggle[data-color="#00e676"].active{background:var(--green-dim);color:var(--green)}
.metric-toggle[data-color="#448aff"].active{background:var(--blue-dim);color:var(--blue)}
.metric-toggle[data-color="#ff5252"].active{background:var(--red-dim);color:var(--red)}
.metric-toggle[data-color="#ffab00"].active{background:var(--amber-dim);color:var(--amber)}
.metric-toggle[data-color="#b388ff"].active{background:var(--purple-dim);color:var(--purple)}

/* ---------- Metric insights ---------- */
.insight{
  display:flex;align-items:center;gap:8px;
  padding:10px 14px;
  border-radius:var(--radius-sm);
  font-size:.82rem;
  line-height:1.4;
}
.insight+.insight{margin-top:6px}
.insight strong{font-weight:700}
.insight-up{background:var(--green-dim);color:var(--green)}
.insight-up i{font-size:.9rem}
.insight-down{background:var(--red-dim);color:var(--red)}
.insight-down i{font-size:.9rem}

/* ---------- Quick fill items ---------- */
.qf-item{
  display:flex;align-items:center;gap:10px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  transition:background .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
  cursor:pointer;
}
.qf-item:last-child{border-bottom:none}
.qf-item:active{background:var(--surface-2)}
.qf-body{flex:1;min-width:0}
.qf-players{
  font-size:.85rem;font-weight:500;
  display:flex;align-items:center;gap:5px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.qf-pareja{font-weight:700}
.qf-meta{
  font-size:.7rem;color:var(--text-3);
  display:flex;gap:6px;margin-top:2px;
  flex-wrap:wrap;
}
.qf-score{
  font-weight:700;font-size:.82rem;
  white-space:nowrap;flex-shrink:0;
  color:var(--text-2);
}

/* ---------- Quick fill review glow ---------- */
.qf-review{
  box-shadow:0 0 6px 1px rgba(255,171,0,.4), 0 0 14px 2px rgba(255,171,0,.12) !important;
  border-color:rgba(255,171,0,.5) !important;
  border-radius:var(--radius-sm);
  animation:reviewGlow 2.5s ease-in-out infinite;
}
@keyframes reviewGlow{
  0%,100%{box-shadow:0 0 6px 1px rgba(255,171,0,.4), 0 0 14px 2px rgba(255,171,0,.12)}
  50%{box-shadow:0 0 3px 1px rgba(255,171,0,.2), 0 0 8px 1px rgba(255,171,0,.06)}
}

/* ---------- Monthly comparison grid ---------- */
.cmp-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
}
.cmp-item{
  padding:10px;
  background:var(--surface-2);
  border-radius:var(--radius-sm);
  text-align:center;
}
.cmp-label{
  font-size:.65rem;
  color:var(--text-3);
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:6px;
  font-weight:600;
}
.cmp-vals{
  font-size:.95rem;
  font-weight:700;
  color:var(--text);
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:4px;
}
.cmp-prev{
  font-size:.72rem;
  font-weight:500;
  color:var(--text-3);
  opacity:.6;
}
.cmp-arrow{
  font-size:.6rem;
  color:var(--text-3);
  opacity:.4;
}
.cmp-diff{
  display:inline-flex;
  align-items:center;gap:2px;
  margin-top:5px;
  padding:2px 8px;
  border-radius:10px;
  font-size:.68rem;font-weight:700;
}
.cmp-diff.text-green{background:var(--green-dim)}
.cmp-diff.text-red{background:var(--red-dim)}
.cmp-diff.text-3{background:var(--surface-3)}

/* ---------- Profile page ---------- */
.profile-hero{
  text-align:center;
  padding:24px 16px 20px;
}
.profile-avatar-wrap{
  position:relative;
  display:inline-block;
  margin-bottom:12px;
}
.profile-avatar{
  width:88px;height:88px;
  border-radius:50%;
  background:var(--green-dim);
  border:3px solid var(--green);
  display:flex;align-items:center;justify-content:center;
  background-size:cover;
  background-position:center;
  margin:0 auto;
}
.profile-avatar.has-image{background-color:transparent}
.profile-avatar.has-image i{display:none}
.profile-avatar i{color:var(--green);font-size:2rem}
.profile-avatar-edit{
  position:absolute;
  bottom:0;right:0;
  width:30px;height:30px;
  border-radius:50%;
  background:var(--green);
  color:#090e1a;
  display:flex;align-items:center;justify-content:center;
  font-size:.75rem;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.3);
  transition:transform .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.profile-avatar-edit:active{transform:scale(.9)}
.profile-name{
  font-size:1.3rem;
  font-weight:800;
  letter-spacing:-.01em;
}
.profile-username{
  font-size:.85rem;
  color:var(--text-3);
  margin-top:2px;
}

/* ---------- Nou Partit bottom sheet ---------- */
.modal-sheet--mini{max-width:400px}
.nou-option{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 12px;
  border-radius:var(--radius);
  text-decoration:none;
  color:var(--text);
  transition:background .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.nou-option:active{background:var(--surface-2)}
.nou-option+.nou-option{border-top:1px solid var(--border)}
.nou-option-icon{
  width:42px;height:42px;
  border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;
  font-size:1.1rem;
  flex-shrink:0;
}
.nou-option-icon.green{background:var(--green-dim);color:var(--green)}
.nou-option-icon.blue{background:var(--blue-dim);color:var(--blue)}
.nou-option-info{flex:1;min-width:0}
.nou-option-title{font-size:.95rem;font-weight:700}
.nou-option-desc{font-size:.75rem;color:var(--text-3);margin-top:2px}
.nou-option-arrow{color:var(--text-3);font-size:.75rem}

/* ---------- Programat match styles ---------- */
.match-marker.scheduled{background:var(--blue)}
.match-badge-programat{
  background:var(--blue-dim);
  color:var(--blue);
  font-weight:600;
}
.btn-completar{
  display:flex;align-items:center;justify-content:center;
  width:34px;height:34px;
  border-radius:50%;
  background:var(--green-dim);
  color:var(--green);
  font-size:.85rem;
  flex-shrink:0;
  text-decoration:none;
  transition:transform .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.btn-completar:active{transform:scale(.9)}

/* ---------- Proper Partit card (home) ---------- */
.card-programat{
  border-left:3px solid var(--blue);
}
.programat-date{
  text-align:center;
  min-width:44px;
  flex-shrink:0;
}
.programat-dia{
  font-size:1.4rem;
  font-weight:800;
  color:var(--blue);
  line-height:1;
}
.programat-mes{
  font-size:.65rem;
  color:var(--text-3);
  text-transform:uppercase;
  letter-spacing:.05em;
  font-weight:600;
  margin-top:2px;
}
.badge-blue{background:var(--blue-dim);color:var(--blue)}



/* ---------- Whoop circles ---------- */
.whoop-circles{
  display:flex;
  justify-content:center;
  gap:12px;
  padding:0 8px;
}
.whoop-circle-item{
  text-align:center;
  position:relative;
  flex:1;
  max-width:130px;
}
.whoop-ring{
  width:100%;
  height:auto;
  display:block;
}
.whoop-ring-fill{
  transition:stroke-dashoffset .8s cubic-bezier(.4,0,.2,1);
}
.whoop-circle-val{
  position:absolute;
  top:0;left:0;right:0;bottom:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1px;
  font-size:1.65rem;
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1;
  margin-bottom:14px;
}
.whoop-circle-suffix{
  font-size:.85rem;
  font-weight:700;
  opacity:.6;
}
.whoop-circle-label{
  font-size:.7rem;
  color:var(--text-3);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-top:2px;
}

/* ---------- Whoop small KPIs ---------- */
.whoop-kpi-sm-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:6px;
}
.whoop-kpi-sm{
  background:var(--surface);
  border-radius:var(--radius-sm);
  padding:10px 4px;
  text-align:center;
}
.whoop-kpi-sm-val{
  font-size:.85rem;
  font-weight:800;
  color:var(--text);
  letter-spacing:-.02em;
  line-height:1.2;
}
.whoop-kpi-sm-unit{
  font-size:.55rem;
  font-weight:500;
  color:var(--text-3);
}
.whoop-kpi-sm-label{
  font-size:.55rem;
  color:var(--text-3);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.03em;
  margin-top:4px;
  line-height:1.2;
}
.kpi-unit{
  font-size:.6rem;
  font-weight:500;
  color:var(--text-3);
}

/* ---------- Detected matches (Detectats) ---------- */
.dm-card{
  background:var(--surface);
  border-radius:var(--radius);
  border:1px solid var(--border);
  margin-bottom:12px;
  overflow:hidden;
}
.dm-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  border-bottom:1px solid var(--border);
}
.dm-status{
  font-size:.78rem;
  font-weight:700;
  display:flex;align-items:center;gap:6px;
}
.dm-status.status-new{color:var(--amber)}
.dm-status.status-created{color:var(--green)}
.dm-status.status-cancelled{color:var(--red)}
.dm-status.status-discarded{color:var(--text-3)}
.dm-email-type{
  font-size:.7rem;
  color:var(--text-3);
}
.dm-body{
  padding:14px;
}
.dm-main{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
.dm-date-block{
  text-align:center;
  min-width:44px;
  flex-shrink:0;
}
.dm-dia{
  font-size:1.4rem;
  font-weight:800;
  color:var(--text);
  line-height:1;
}
.dm-mes{
  font-size:.65rem;
  color:var(--text-3);
  text-transform:uppercase;
  font-weight:600;
  margin-top:2px;
}
.dm-info{
  flex:1;
  min-width:0;
}
.dm-club{
  font-size:.88rem;
  font-weight:700;
  color:var(--text);
  display:flex;align-items:center;gap:6px;
}
.dm-club i{color:var(--green);font-size:.75rem}
.dm-time{
  font-size:.78rem;
  color:var(--text-2);
  margin-top:4px;
  display:flex;align-items:center;gap:6px;
}
.dm-time i{color:var(--text-3);font-size:.7rem}
.dm-pista{
  font-size:.75rem;
  color:var(--text-3);
  margin-top:3px;
  display:flex;align-items:center;gap:6px;
}
.dm-pista i{font-size:.65rem}
.dm-badge{
  display:inline-flex;align-items:center;gap:4px;
  font-size:.7rem;font-weight:600;
  padding:3px 10px;border-radius:20px;
  margin-top:10px;
}
.dm-badge-linked{
  background:var(--blue-dim);color:var(--blue);
}
.dm-link{
  display:inline-flex;align-items:center;gap:4px;
  font-size:.72rem;
  color:var(--green);
  text-decoration:none;
  font-weight:600;
  margin-top:10px;
}
.dm-link:active{opacity:.7}
.dm-actions{
  display:flex;gap:8px;
  padding:0 14px 14px;
}
.dm-btn{flex:1}
.dm-actions .text-red{
  flex:0;
  min-width:40px;
}

/* ---------- Detected match players ---------- */
.dm-players{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:12px;
  padding:10px;
  background:var(--surface-2);
  border-radius:var(--radius-sm);
}
.dm-team{
  flex:1;
  min-width:0;
}
.dm-team-label{
  font-size:.6rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--text-3);
  margin-bottom:6px;
}
.dm-vs{
  font-size:.7rem;
  font-weight:700;
  color:var(--text-3);
  align-self:center;
  padding:0 2px;
}
.dm-player{
  margin-bottom:4px;
}
.dm-player-name{
  font-size:.8rem;
  font-weight:600;
  color:var(--text);
  display:block;
}
.dm-player-extra{
  font-size:.65rem;
  color:var(--text-3);
}

/* ---------- Detected badge on partido ---------- */
.badge-detected{
  background:rgba(255,171,0,.12);
  color:var(--amber);
  font-size:.65rem;
  font-weight:600;
  display:inline-flex;align-items:center;gap:4px;
}

/* ---------- Page tabs (internal) ---------- */
.page-tabs{
  display:flex;
  background:var(--surface);
  border-radius:var(--radius);
  padding:3px;
  gap:3px;
}
.page-tab{
  flex:1;
  padding:9px 12px;
  border-radius:calc(var(--radius) - 2px);
  background:transparent;
  border:none;
  font-size:.82rem;
  font-weight:700;
  color:var(--text-3);
  cursor:pointer;
  transition:all .15s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.page-tab.active{
  background:var(--green-dim);
  color:var(--green);
}
.page-tab-content{
  display:none;
}
.page-tab-content.active{
  display:block;
}

/* ---------- Semaphore card ---------- */
.sem-card{
  background:var(--surface);
  border-radius:var(--radius);
  border-left:4px solid;
  padding:20px;
  text-align:center;
}
.sem-icon{font-size:2.2rem;margin-bottom:6px}
.sem-label{
  font-size:1.1rem;font-weight:800;
  text-transform:uppercase;letter-spacing:.06em;
  margin-bottom:8px;
}
.sem-message{
  font-size:.85rem;color:var(--text-2);
  line-height:1.5;margin-bottom:16px;
}
.sem-kpis{
  display:flex;justify-content:center;gap:16px;
}
.sem-kpi{text-align:center}
.sem-kpi-val{font-size:1.1rem;font-weight:800}
.sem-kpi-label{font-size:.6rem;color:var(--text-3);text-transform:uppercase;font-weight:600;letter-spacing:.04em;margin-top:2px}
.sem-recommend{
  font-size:.82rem;color:var(--text-2);
  background:var(--surface-2);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  line-height:1.5;
}

/* ---------- Correlation rows ---------- */
.corr-desc{
  font-size:.75rem;color:var(--text-3);
  padding:10px 16px 4px;
  font-style:italic;
}
.corr-row{
  display:flex;align-items:center;gap:12px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
}
.corr-row:last-child{border-bottom:none}
.corr-icon{font-size:1.1rem;width:28px;text-align:center;flex-shrink:0}
.corr-info{flex:1;min-width:0}
.corr-band{font-size:.82rem;font-weight:700;color:var(--text)}
.corr-meta{font-size:.7rem;color:var(--text-3)}
.corr-stats{text-align:right;flex-shrink:0}
.corr-wr{font-size:1rem;font-weight:800;display:block}
.corr-nivel{font-size:.65rem;color:var(--text-3)}

/* ---------- Matches with body ---------- */
.mwb-legend{
  display:flex;gap:12px;
  justify-content:flex-end;
  font-size:.65rem;font-weight:600;
}
.mwb-item{
  display:flex;align-items:center;gap:8px;
  padding:10px 0;
  border-bottom:1px solid var(--border);
}
.mwb-item:last-child{border-bottom:none}
.mwb-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.mwb-info{flex:1;min-width:0}
.mwb-opp{font-size:.8rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mwb-meta{font-size:.68rem;color:var(--text-3);margin-top:2px}
.mwb-score{
  font-size:.8rem;font-weight:800;
  white-space:nowrap;margin:0 6px;
}
.mwb-body{
  display:flex;gap:6px;flex-shrink:0;
}
.mwb-tag{
  font-size:.7rem;font-weight:700;
}

/* ---------- Mini charts grid ---------- */
.mini-charts-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.mini-chart-label{
  font-size:.65rem;font-weight:700;
  color:var(--text-3);text-transform:uppercase;
  letter-spacing:.04em;text-align:center;
  margin-bottom:6px;
}
.mini-chart-wrap{
  height:60px;
}

/* ---------- Toggle switch ---------- */
.toggle{
  position:relative;
  display:inline-block;
  width:44px;height:24px;
  flex-shrink:0;
}
.toggle input{opacity:0;width:0;height:0}
.toggle-slider{
  position:absolute;top:0;left:0;right:0;bottom:0;
  background:var(--surface-3);
  border-radius:24px;
  cursor:pointer;
  transition:background .2s var(--ease);
}
.toggle-slider::before{
  content:'';
  position:absolute;
  width:18px;height:18px;
  left:3px;bottom:3px;
  background:#fff;
  border-radius:50%;
  transition:transform .2s var(--ease);
}
.toggle input:checked + .toggle-slider{
  background:var(--green);
}
.toggle input:checked + .toggle-slider::before{
  transform:translateX(20px);
}

/* ---------- Integration row (perfil) ---------- */
.integration-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.integration-info{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1;
}
.integration-icon{
  width:38px;height:38px;
  border-radius:var(--radius-sm);
  background:var(--green-dim);
  color:var(--green);
  display:flex;align-items:center;justify-content:center;
  font-size:1rem;
  flex-shrink:0;
}
.integration-name{
  font-size:.88rem;
  font-weight:700;
}
.integration-desc{
  font-size:.72rem;
  color:var(--text-3);
  margin-top:2px;
}

/* ---------- Whoop detail grid (partido detail) ---------- */
.whoop-detail-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  text-align:center;
}
.whoop-detail-item{}
.whoop-detail-val{
  font-size:1.2rem;
  font-weight:800;
}
.whoop-detail-label{
  font-size:.6rem;
  color:var(--text-3);
  text-transform:uppercase;
  font-weight:600;
  letter-spacing:.04em;
  margin-top:2px;
}

/* ---------- Whoop badge in match list ---------- */
.match-badge-whoop{
  background:rgba(255,255,255,.06);
  font-size:.6rem;
}

/* ---------- Pending player slot ---------- */
.dm-player-pending{
  opacity:.5;
  font-style:italic;
}
.dm-player-pending .dm-player-name{
  font-size:.72rem;
}

/* ---------- Detectats: new statuses ---------- */
.status-ready{color:var(--green)}
.status-pending{color:var(--amber)}
.status-reserva{color:#448aff}
.dm-players-count{
  font-size:.72rem;color:var(--text-3);
  margin-top:2px;
}
.dm-info-msg{
  font-size:.75rem;
  color:var(--text-3);
  font-style:italic;
  padding:8px 0;
  line-height:1.4;
}
.dm-info-msg i{margin-right:4px;color:#448aff}

/* ---------- Player self badge ---------- */
.dm-self-badge{
  color:var(--green);
  font-weight:800;
  font-size:.75rem;
}

/* ---------- Propers partits (home) ---------- */
.prog-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  transition:background .15s var(--ease);
}
.prog-item:active{background:var(--surface-2)}
.prog-item-border{border-top:1px solid var(--border)}
.prog-date-block{
  flex-shrink:0;
  text-align:center;
  min-width:44px;
}
.prog-dia{
  font-size:1.5rem;
  font-weight:800;
  color:var(--blue);
  line-height:1.1;
}
.prog-mes{
  font-size:.6rem;
  font-weight:700;
  text-transform:uppercase;
  color:var(--text-3);
  letter-spacing:.04em;
}
.prog-info{flex:1;min-width:0}
.prog-when{
  font-size:.95rem;
  font-weight:700;
}
.prog-matchup{
  margin-top:8px;
  background:var(--surface-2);
  border-radius:var(--radius-sm);
  padding:8px 12px;
  font-size:.78rem;
  line-height:1.4;
  text-align:center;
}
.prog-team-a, .prog-team-b{
  font-weight:600;
  color:var(--text);
}
.prog-divider{
  display:flex;
  align-items:center;
  gap:8px;
  margin:4px 0;
}
.prog-divider::before, .prog-divider::after{
  content:'';
  flex:1;
  height:1px;
  background:var(--border);
}
.prog-divider span{
  font-size:.6rem;
  font-weight:800;
  color:var(--text-3);
  letter-spacing:.1em;
}
.prog-club{
  margin-top:6px;
  font-size:.7rem;
  color:var(--text-3);
}
.prog-club i{margin-right:3px}
