/* Dashboard charts */
.dash-grid{display:grid;gap:16px;grid-template-columns:repeat(3,minmax(0,1fr));}
@media (max-width: 992px){.dash-grid{grid-template-columns:1fr;}}
.dash-card{border:1px solid rgba(148,163,184,.25);border-radius:16px;padding:16px;background: rgb(255 255 255 / 0%);}
html[data-theme='dark'] .dash-card{background:rgba(15,23,42,.55);border-color:rgba(148,163,184,.2);}
.dash-card-title{font-weight:800;margin-bottom:8px;}
.dash-card-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.dash-card-title-row .dash-card-title{margin-bottom:0;}
.dash-card-sub{color:rgba(15,23,42,.65);font-size:12px;font-weight:700;margin:-4px 0 10px;}
html[data-theme='dark'] .dash-card-sub{color:rgba(226,232,240,.7);} 
.dash-chart{min-height:220px;}
.dash-chart-tall{min-height:420px;}
.dash-chart-wide{min-height:360px;}
.dash-chart-fs{min-height:620px;}
.dash-card-wide{grid-column:1 / -1;}

.dash-divider{height:1px;background:rgba(148,163,184,.18);margin:14px 0;border-radius:999px;}
html[data-theme='dark'] .dash-divider{background:rgba(148,163,184,.14);}

.dash-radial-row{display:flex;gap:16px;align-items:stretch;}
.dash-radial-left{min-width:260px;display:flex;flex-direction:column;gap:6px;}
.dash-radial-title{font-weight:900;}
.dash-radial-sub{color:rgba(15,23,42,.65);font-size:12px;font-weight:700;}
html[data-theme='dark'] .dash-radial-sub{color:rgba(226,232,240,.7);} 
.dash-radial-right{flex:1;}
.dash-chart-radial{min-height:320px;}

/* Player stats modal radial chart (same Apex "Custom Angle Circle" as dashboard). */
.player-modal-radial-wrap{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148,163,184,.18);
}
.player-modal-radial-head{ margin-bottom: 8px; }
.player-modal-radial-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.player-modal-radial-actions{ display:flex; gap:8px; align-items:center; }
.is-hidden{ display:none !important; }
.player-modal-radial-title{ font-weight: 900; letter-spacing: .01em; }
.player-modal-radial-sub{ opacity: .75; font-size: 13px; margin-top: 2px; }
.player-modal-radial{
  width: 100%;
  min-height: 320px;
}
.player-modal-radial .apexcharts-canvas{ max-width: 100% !important; }
.am-gauge-demo{width:100%;height:360px;min-height:320px;}
@media (max-width: 480px){
  .am-gauge-demo{height:320px;}
}

/* Speler statistieken: grafiek + radial naast elkaar (desktop), onder elkaar (mobile) */
.dash-metrics-two{display:grid;grid-template-columns: 1fr 350px;gap:16px;align-items:start;}
.dash-metrics-main{min-width:0;}
.dash-metrics-side{min-width:0;position:relative;}
.dash-metrics-side::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(148,163,184,.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events:none;
  z-index:0;
}
html[data-theme='dark'] .dash-metrics-side::before{
  background:rgba(15,23,42,.46);
  border-color:rgba(148,163,184,.18);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.dash-metrics-side > *{position:relative;z-index:1;}
.dash-metrics-side{padding:12px;}
.dash-metrics-side .dash-chart-radial{min-height:320px;}

.player-radial-focus{
  font-size:12px;
  font-weight:800;
  color:rgba(15,23,42,.72);
}
html[data-theme='dark'] .player-radial-focus{color:rgba(226,232,240,.8);} 

/* Keep amCharts attribution element present but visually non-intrusive */
.amcharts-Logo{
  width:0px !important;
  height:0px !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
@media (max-width: 992px){
  .dash-metrics-two{grid-template-columns:1fr;}
}
@media (max-width: 992px){
  .dash-radial-row{flex-direction:column;}
  .dash-radial-left{min-width:0;}
}

.player-radial-block{margin-top:16px;padding-top:16px;border-top:1px solid rgba(148,163,184,.18);}
html[data-theme='dark'] .player-radial-block{border-top-color:rgba(148,163,184,.14);} 
.player-radial-title{font-weight:900;}
.player-radial-sub{color:rgba(15,23,42,.65);font-size:12px;font-weight:700;}
html[data-theme='dark'] .player-radial-sub{color:rgba(226,232,240,.7);} 

/* Player metrics tabs + scroll container */
.pm-tabs{flex-wrap:wrap;gap:8px;}
.dash-chart-scroll{max-height:560px;overflow:auto;border-radius:14px;}
.dash-chart-scroll-x{overflow-x:auto;overflow-y:hidden;border-radius:14px;}
.dash-chart-scroll-x::-webkit-scrollbar{height:10px;width:10px;}
.dash-chart-scroll-x::-webkit-scrollbar-thumb{background:rgba(148,163,184,.45);border-radius:999px;}
html[data-theme='dark'] .dash-chart-scroll-x::-webkit-scrollbar-thumb{background:rgba(148,163,184,.25);} 
.dash-chart-scroll::-webkit-scrollbar{height:10px;width:10px;}
.dash-chart-scroll::-webkit-scrollbar-thumb{background:rgba(148,163,184,.45);border-radius:999px;}
html[data-theme='dark'] .dash-chart-scroll::-webkit-scrollbar-thumb{background:rgba(148,163,184,.25);} 
@media (max-width: 992px){
  .dash-chart-scroll{max-height:520px;}
}

/* Duotone (stroke-on-stroke) SVG icons */
.ti-ico{
  width:20px;
  height:20px;
  display:block;
  /* Duotone variables: primary follows currentColor; secondary is a softened mix.
     If color-mix() isn't supported, the SVG falls back to currentColor with opacity. */
  --ico-primary: currentColor;
  --ico-secondary: color-mix(in srgb, currentColor 70%, transparent);
}
.nav-icon .ti-ico{ width:22px; height:22px; }
.mobile-tab .icon .ti-ico{ width:30px; height:30px; }
.ico-duo-bg{ opacity: .55; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
.ico-duo-fg{ opacity: 1; }

/* Duotone (two-layer fill) icons (sidebar + bottom menu) */
.duoicon{
  width:20px;
  height:20px;
  display:block;
  --ico-primary: currentColor;
  --ico-secondary: color-mix(in srgb, currentColor 70%, transparent);
}
.duoicon .duoicon-primary-layer{ fill: var(--ico-primary, currentColor); }
.duoicon .duoicon-secondary-layer{ fill: var(--ico-secondary, currentColor); }
.nav-icon .duoicon{ width:22px; height:22px; }
.mobile-tab .icon .duoicon{width: 26px;height: 26px;}
.sidebar-collapse-btn .duoicon{ width:18px; height:18px; }

/* Make duotone read stronger in the dark sidebar */
.sidebar{
  --ico-secondary: color-mix(in srgb, currentColor 55%, #000 45%);
}
body[data-theme="dark"] .sidebar,
[data-theme="dark"] .sidebar,
.dark .sidebar{
  --ico-secondary: color-mix(in srgb, currentColor 55%, #0b1220 45%);
}


:root {
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --label-font-normal: 12px;
  --label-font-compact: 10px;

  /* Geex-like modern admin palette */
  --bg-body: #f4f6fb;
  --bg-card: #ffffff;
  /* Original app sidebar color (from final.zip) */
  --bg-sidebar: #1f2936;
  --border-subtle: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text-main: #0f172a;
  --text: var(--text-main);
  --text-muted: rgba(15, 23, 42, 0.62);

  /* Aliases used across components (messages/list/etc.) */
  --card-bg: var(--bg-card);
  --surface: var(--bg-body);
  --border: var(--border-subtle);
  --border-2: var(--border-strong);
  --muted: var(--text-muted);
  --primary: #206bc4;
  --primary-rgb: 91, 95, 245;
  --primary-soft: rgba(91, 95, 245, 0.12);
  --success: #16a34a;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --radius-lg: 18px;
  --radius-card: 18px;
  --radius-control: 14px;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
  --input-bg: #ffffff;
  --input-border: rgba(15, 23, 42, 0.16);
  --input-focus: var(--primary);
  --danger: #dc2626;

  /* Chart palette (ApexCharts reads these vars) */
  --chart-1: #5b5ff5;
  --chart-2: #22c55e;
  --chart-3: #0ea5e9;
  --chart-4: #f59e0b;
  --chart-5: #ef4444;
}

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

.table-toolbar {
  margin-bottom: 20px;
}

html, body {
  height: 100%;
}

button, input, select, textarea { font-family: inherit; }


body {
  margin: 0;

/* Typography & icon rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iOS-like system font stack */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  background: linear-gradient(180deg, #fafbff 0%, #eef2ff 100%);
  color: var(--text-main);
}

/* Dark theme variables (Uptime Kuma-ish baseline; keep MK primary blue). */
body[data-theme="dark"],
[data-theme="dark"],
body.dark,
.dark{
  /* Geex-like dark */
  --bg-body: #0b1020;
  --bg-card: rgba(17, 24, 39, 0.86);
  /* Keep sidebar identical in dark mode (requested) */
  --bg-sidebar: #1f2936;
  --text-main: rgba(241, 245, 249, 0.96);
  --text: var(--text-main);
  --text-muted: rgba(226, 232, 240, 0.70);
  --card-bg: var(--bg-card);
  --surface: var(--bg-body);
  --border: var(--border-subtle);
  --border-2: var(--border-strong);
  --muted: var(--text-muted);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.20);
  --input-bg: rgba(15, 23, 42, 0.55);
  --input-border: rgba(148, 163, 184, 0.22);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.45);

  --chart-1: #7c7cff;
  --chart-2: #34d399;
  --chart-3: #38bdf8;
  --chart-4: #fbbf24;
  --chart-5: #fb7185;

  background: radial-gradient(1200px 700px at 20% -10%, rgba(91,95,245,0.18), transparent 55%),
              radial-gradient(900px 600px at 110% 0%, rgba(56,189,248,0.12), transparent 50%),
              linear-gradient(180deg, #070b16 0%, #0b1020 100%);
}


/* Auth layout */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* allow app-like gradient behind the login card (especially visible on mobile/tablet) */
  background: linear-gradient(180deg, rgba(32,107,196,0.06) 0%, rgba(250,252,255,1) 55%, rgba(255,255,255,1) 100%);
}

body[data-theme="dark"] .auth-wrapper,
[data-theme="dark"] .auth-wrapper,
.dark .auth-wrapper{
  background: linear-gradient(180deg, rgba(7,10,18,1) 0%, rgba(12,18,32,1) 55%, rgba(10,12,18,1) 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 24px 24px 28px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-logo img {
  height: 40px;
  width: auto;
  border-radius: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(32,107,196,.22), rgba(32,107,196,.10));
  color: var(--primary);
}

/* Teams > Opstellingen */
.formation-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
  /* Per-formation color via CSS variable --h (hue) */
  background: linear-gradient(135deg,
    hsla(var(--h,210), 70%, 55%, .18),
    hsla(var(--h,210), 70%, 55%, .08)
  );
  color: hsl(var(--h,210), 70%, 32%);
  border: 1px solid hsla(var(--h,210), 70%, 55%, .22);
}

.lineup-count{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:700;
}

.lineup-count-ico svg{
  width:16px;
  height:16px;
  opacity:.78;
  vertical-align:-3px;
}

.auth-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-bottom: 16px;
}

.auth-toggle button {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
}

.auth-toggle button.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.auth-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-helper {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Form basics */

form {
  margin: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select {
  border-radius: 10px;
  border: 1px solid var(--input-border);
  padding: 8px 10px;
  font-size: 14px;
  background: var(--input-bg);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  color: var(--text);
}


input:focus,
select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 1px rgba(32, 107, 196, 0.25);
  /* keep focus background theme-aware (dark mode login fields were unreadable) */
  background: var(--input-bg);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder{
  color: rgba(226,232,240,0.55);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-control);
  padding: 9px 14px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.btn:hover{ background: rgba(15, 23, 42, 0.06); border-color: rgba(148,163,184,0.55); }
.btn:active{ transform: translateY(0.5px); }

[data-theme="dark"] .btn,
.dark .btn{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
  color: var(--text-main);
}
[data-theme="dark"] .btn:hover,
.dark .btn:hover{
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
}
#club-address-search {
  max-width: fit-content;
}
.btn.primary {
  background: linear-gradient(135deg, #206bc4, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45);
  border-color: rgba(37, 99, 235, 0.35);
}

.btn.primary:hover {
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.55);
  transform: translateY(-0.5px);
}

.btn.primary:disabled {
  opacity: .6;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.form-error {
  margin-top: 10px;
  font-size: 13px;
  color: var(--danger);
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

/* Layout after login */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w, 260px) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg-body);
  transition: grid-template-columns .28s ease-in-out;
}

.layout.layout-collapsed {
  --sidebar-w: 72px;
}

/* Topbar (Geex-like) */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
body[data-theme="dark"] .topbar,
[data-theme="dark"] .topbar,
.dark .topbar{
  background: rgba(17,24,39,0.55);
  border-bottom-color: rgba(148,163,184,0.16);
}
.topbar-left{display:flex;align-items:center;gap:14px;min-width:0;}
.topbar-right{display:flex;align-items:center;gap:12px;}
.topbar-menu{display:none;}

/* Topbar page title (icon + title) */
.topbar-pagehead{display:flex;align-items:center;gap:10px;min-width:0;}
.topbar-page-ico{display:inline-flex;align-items:center;justify-content:center;color: var(--primary);}
.topbar-page-ico svg{width:20px;height:20px;}
.topbar-page-title{font-weight: 700;font-size: 15px;letter-spacing: -0.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color: var(--primary);}
.topbar-theme{display:flex;align-items:center;gap:10px;}

/* Theme toggle icon button (sun/moon) */
.topbar-theme-btn{
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.topbar-theme-btn:hover{ transform: translateY(-1px); }
.topbar-theme-btn:active{ transform: translateY(0px) scale(.98); }
.topbar-theme-btn svg{ width: 18px; height: 18px; color: var(--primary); }

/* Show sun in light, moon in dark */
.topbar-theme-btn .ico-moon{ display:none; }
body[data-theme="dark"] .topbar-theme-btn .ico-sun,
[data-theme="dark"] .topbar-theme-btn .ico-sun,
.dark .topbar-theme-btn .ico-sun{ display:none; }
body[data-theme="dark"] .topbar-theme-btn .ico-moon,
[data-theme="dark"] .topbar-theme-btn .ico-moon,
.dark .topbar-theme-btn .ico-moon{ display:inline;color:white!important; }
.topbar-theme-auto{
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
}
body[data-theme="dark"] .topbar-theme-auto,
[data-theme="dark"] .topbar-theme-auto,
.dark .topbar-theme-auto{
  background: rgba(15,23,42,0.55);
  border-color: rgba(148,163,184,0.22);
}
.topbar-user-btn{
  display:flex;
  align-items:center;
  gap:10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  cursor:pointer;
}

/* Avatar wrapper to support online ring */
.topbar-avatar-wrap{
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.topbar-avatar-wrap.online{
  box-shadow: 0 0 0 2px rgba(34,197,94,0.95);
}
.topbar-avatar-wrap.online::after{
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 2px var(--bg-card);
}
.topbar-avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}
.topbar-avatar-fallback{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(var(--primary-rgb),0.14);
  color: var(--primary);
  font-weight: 900;
  font-size: 12px;
}
.topbar-user-name{font-weight:600;font-size:13px;max-width: 220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color: var(--text);}

/* Ensure username stays readable in dark mode */
[data-theme="dark"] .topbar-user-name{ color: var(--text-main, #e5e7eb); }

@media (max-width: 992px){
  .topbar{padding: 12px 14px;}
  .topbar-menu{display:inline-flex;}
  .topbar-user-name{display:none;}
}

.sidebar {
  /* Restore original gradient sidebar background (from final.zip) */
  background:
    radial-gradient(900px 600px at -10% -10%, rgba(32,107,196,0.28), transparent 55%),
    radial-gradient(700px 500px at 110% 10%, rgba(99,102,241,0.20), transparent 60%),
    linear-gradient(180deg, rgba(17,24,39,0.98) 0%, rgba(15,23,42,0.98) 100%);
  background-color: var(--bg-sidebar);
  /* Sidebar stays dark in both themes */
  color: rgba(241,245,249,0.92);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  width: var(--sidebar-w, 260px);
  transition: width .28s ease-in-out, padding .28s ease-in-out;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

body[data-theme="dark"] .sidebar,
[data-theme="dark"] .sidebar,
.dark .sidebar{
  color: rgba(241,245,249,0.92);
}

/* Desktop collapsed sidebar (ChatGPT-like) */
.sidebar.sidebar-collapsed{
  width:84px;
  flex:0 0 84px;
  padding: 16px 10px;
}
.sidebar.sidebar-collapsed .sidebar-link{
  justify-content:center;
  padding: 10px 10px;
}
.sidebar.sidebar-collapsed .sidebar-link span:not(.nav-icon){ display:none; }
.sidebar.sidebar-collapsed .sidebar-user{ display:none; }
.sidebar.sidebar-collapsed .sidebar-footer{ display:none; }
.sidebar.sidebar-collapsed .nav-icon{ width:36px; font-size:18px; }
.sidebar.sidebar-collapsed .sidebar-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.sidebar.sidebar-collapsed .sidebar.sidebar-collapsed .sidebar-collapse-btn{ margin-left:0; }

.sidebar-header {
    padding: 4px 4px 12px;
    border-bottom: 1px solid #ffffff38;
    margin-bottom: 20px;
}

/* Sidebar unread badge (Berichten) */
.sidebar-unread-badge{
  margin-left:auto;
  min-width:12px;
  height:12px;
  padding:0 4px;
  border-radius:999px;
  background: var(--danger, #ef4444);
  color:#fff;
  font-size:9px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  box-shadow:0 3px 8px rgba(0,0,0,0.18);
}


/* Allow title to wrap */
.sidebar-brand-text .sidebar-title{ white-space: normal; }

/* Small circular avatars (messages list) */
.circle-avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(148,163,184,0.22);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  flex: 0 0 auto;
}
.circle-avatar img{ width:100%; height:100%; object-fit: cover; display:block; }
.circle-avatar-fallback{ font-size: 12px; font-weight: 700; color: var(--text); }

/* Mobile user + bell row */
.mobile-user-row{ display:flex; align-items:center; gap:10px; }
.mobile-bell-btn{
  /* Match the tab icon scale and the user button (52px) */
  width: 52px; height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.46);
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  color: var(--primary);
  display:inline-flex; align-items:center; justify-content:center;
  position: relative;
  box-shadow: 0 10px 24px rgba(2,6,23,0.14), inset 0 0 0 1px rgba(255,255,255,0.22);
}
.mobile-bell-btn svg,
.mobile-bell-btn .ti-ico,
.mobile-bell-btn .duoicon{ width: 26px; height: 26px; }
[data-theme="dark"] .mobile-bell-btn,
.dark .mobile-bell-btn{
  background: rgba(7,9,12,0.78);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 16px 44px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}
.mobile-bell-badge{
  position:absolute;
  top: 6px; right: 6px;
  min-width: 14px; height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger, #ef4444);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display:inline-flex; align-items:center; justify-content:center;
  line-height: 1;
}
.mobile-user-btn{ position:relative; }
.mobile-user-btn.online .mobile-online-dot{ display:block; }
.mobile-online-dot{
  display:none;
  position:absolute;
  width: 10px; height: 10px;
  right: 4px; bottom: 4px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid var(--card-bg, #fff);
}
[data-theme="dark"] .mobile-online-dot{ border-color: var(--card-bg, #0f172a); }


.sidebar-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand-text{min-width:0;display:flex;flex-direction:column;line-height:1.05;}
.sidebar-brand-text .sidebar-title{white-space: normal;overflow:hidden;text-overflow:ellipsis;max-width: 160px;}

/* When (desktop) collapsed, hide the app title text */
.sidebar.sidebar-collapsed .sidebar-brand-text{display:none;}


.sidebar-collapse-btn{
  margin-left:auto;
  display:none; /* show only on mobile */
  width:34px;
  height:34px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:1px solid transparent;
  color: rgba(226,232,240,0.9);
  cursor:pointer;
}
.sidebar-collapse-btn:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
.sidebar-collapse-btn .ti-ico{ width:18px; height:18px; }

  .sidebar-title {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-title-sub {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.62);
}

.sidebar-user {
  padding: 8px 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
}

.badge-soft {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(34, 197, 94, 0.15);
  color: #bbf7d0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  flex: 1;
}

.sidebar-footer{
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-link {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

/* Sidebar links inherit the sidebar's (light) text color in both themes */

.sidebar-link .nav-icon {
  width: 32px;
  text-align: center;
  font-size: 16px;
  color: inherit;
}

/* Sidebar duotone icon sizing */
.sidebar-link .nav-icon svg{ width:22px; height:22px; display:inline-block; }
.sidebar.sidebar-collapsed .sidebar-link .nav-icon svg{ width:22px; height:22px; }


/* Tabler line icons (webfont) */
.sidebar-link .nav-icon .sidebar-ti{
  font-size: 22px;       /* Tabler line icon size */
  line-height: 1;
  display: inline-block;
  transform: translateY(1px);
  opacity: .92;
}

.sidebar-link:hover {
  background: #206bc414;
  border-color: rgba(91, 95, 245, 0.10);
}

.sidebar-link.active {
  background: #206bc41f;
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: none;
}

.sidebar-link.active::before{
  content:'';
  position:absolute;
  left:0;
  top:6px;
  bottom:6px;
  width:3px;
  border-radius:3px;
  background: var(--primary);
}

body[data-theme="dark"] .sidebar-link:hover,
[data-theme="dark"] .sidebar-link:hover,
.dark .sidebar-link:hover{
  background: #206bc461;
  border-color: rgba(124, 124, 255, 0.14);
}

/* TailAdmin-like sidebar collapse */
.sidebar-header{
  position: relative;
}

.sidebar-collapse{
  position: absolute;
  top: 6px;
  right: 6px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.sidebar-collapse:hover{
  background: rgba(255, 255, 255, 0.10);
  transform: translateY(-1px);
}

.sidebar.sidebar-collapsed{
  padding: 14px 8px;
}

.sidebar.sidebar-collapsed .sidebar-title,
.sidebar.sidebar-collapsed .sidebar-title-sub,
.sidebar.sidebar-collapsed .sidebar-user-name,
.sidebar.sidebar-collapsed .badge-soft,
.sidebar.sidebar-collapsed .sidebar-theme-label{
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.sidebar.sidebar-collapsed .sidebar-logo-row > div{
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.sidebar-collapsed .sidebar-link{
  justify-content: center;
  padding: 12px 10px;
  border-radius: 14px;
}

.sidebar.sidebar-collapsed .sidebar-link span:last-child{
  display: none;
}

.sidebar.sidebar-collapsed .sidebar-link .nav-icon{
  width: auto;
  font-size: 22px;
}

.sidebar-link{
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sidebar-link:hover{
  transform: translateX(2px);
}

.sidebar.sidebar-collapsed .sidebar-link:hover{
  transform: translateY(-1px);
}


/* Main content */

.main {
  padding: 18px 20px;
}

/* Top horizontal header (desktop) */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:18px;
  background:rgba(255,255,255,.75);
  box-shadow:var(--shadow-soft);
  margin-bottom:14px;
  position:sticky;
  top:10px;
  z-index:30;
  backdrop-filter: blur(10px);
}
body[data-theme="dark"] .topbar{
  background:rgba(15,23,42,.75);
  border-color:rgba(148,163,184,.14);
}
@media (max-width:768px){
  .topbar{display:none}
}
.topnav{display:flex;gap:6px;flex-wrap:wrap}
.topnav-link{
  border:1px solid rgba(148,163,184,.22);
  background:transparent;
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.topnav-link:hover{transform:translateY(-1px);background:rgba(148,163,184,.12)}
.topnav-link.active{
  background:linear-gradient(135deg, rgba(99,102,241,.20), rgba(34,197,94,.14));
  border-color:rgba(99,102,241,.30);
}
body[data-theme="dark"] .topnav-link{color:rgba(226,232,240,.92)}

.topbar-right{position:relative;display:flex;align-items:center;gap:10px}
.topbar-user{
  display:flex;align-items:center;gap:10px;
  border:1px solid rgba(148,163,184,.22);
  background:transparent;
  border-radius:999px;
  padding:6px 10px;
  cursor:pointer;
  transition:background .15s ease, transform .15s ease;
}
.topbar-user:hover{background:rgba(148,163,184,.12);transform:translateY(-1px)}
.topbar-user-name{font-weight:600;font-size:13px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color: var(--text);}
.topbar-caret{opacity:.6}
.topbar-avatar{width:32px;height:32px;border-radius:999px;object-fit:cover}
.topbar-avatar-fallback{display:flex;align-items:center;justify-content:center;font-weight:900;background:rgba(99,102,241,.14);color:#4f46e5}
body[data-theme="dark"] .topbar-avatar-fallback{color:#c7d2fe;background:rgba(99,102,241,.18)}

.topbar-menu{
  position:absolute;
  right:0;
  top:46px;
  width:260px;
  background:rgba(255,255,255,.95);
  border:1px solid rgba(148,163,184,.25);
  border-radius:18px;
  box-shadow:0 18px 48px rgba(15,23,42,.18);
  padding:8px;
  opacity:0;
  transform:translateY(-6px) scale(.98);
  pointer-events:none;
  transition:opacity .16s ease, transform .16s ease;
}
.topbar-menu.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
body[data-theme="dark"] .topbar-menu{background:rgba(15,23,42,.96);border-color:rgba(148,163,184,.14);box-shadow:0 22px 60px rgba(0,0,0,.45)}
.topbar-menu-item{
  width:100%;text-align:left;
  border:none;background:transparent;
  padding:10px 10px;
  border-radius:14px;
  cursor:pointer;
}
.topbar-menu-item:hover{background:rgba(148,163,184,.12)}
.topbar-menu-item.danger{color:#ef4444}
.topbar-menu-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:14px}
.topbar-menu-row:hover{background:rgba(148,163,184,.08)}
.topbar-menu-sep{height:1px;background:rgba(148,163,184,.22);margin:6px 6px}
body[data-theme="dark"] .topbar-menu-sep{background:rgba(148,163,184,.14)}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
  width: -webkit-fill-available;
  overflow: visible;
  padding: 10px;
}

.card-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgb(226 232 240 / 28%);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.card-body {
  padding: 12px 16px 16px;
}

/* Tabler-like tabs (used on Teams page) */
.nav{display:flex;flex-wrap:wrap;list-style:none;padding-left:0;margin:0;}
.nav-tabs{
  display:flex;
  align-items:flex-end;
  gap: 4px;
  border-bottom: 1px solid rgba(148,163,184,.18);
  margin-bottom: 14px;
  padding-left: 0;
}
.nav-tabs .nav-item{ margin-bottom: -1px; }
.nav-tabs .nav-item{ list-style:none; }
.nav-tabs .nav-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.nav-tabs .nav-link:hover{
  color: var(--text);
  background: rgba(148,163,184,0.10);
}
.nav-tabs .nav-link.active{
  color: var(--text);
  background: var(--bg-card);
  /* Tabler-like: active tab connects to body background */
  border-color: rgba(148,163,184,.16) rgba(148,163,184,.16) var(--bg-page);
}
body[data-theme="dark"] .nav-tabs .nav-link.active{
  background: rgba(15,23,42,0.82);
  border-color: rgba(148,163,184,.16) rgba(148,163,184,.16) var(--bg-page);
}

.list {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

/* Readability defaults */
.list, .list-row, .list-title, .sub-row, .sub-col{ color: var(--text-main, #0f172a); }

[data-theme="dark"] .list{
  background: var(--bg-card, #0f172a);
  border-color: var(--border-subtle, rgba(255,255,255,0.10));
}
[data-theme="dark"] .list-row{ border-bottom-color: var(--border-subtle, rgba(255,255,255,0.10)); }
[data-theme="dark"] .sub-row{ border-bottom-color: var(--border-subtle, rgba(255,255,255,0.10)); }
[data-theme="dark"] .list, [data-theme="dark"] .list-row, [data-theme="dark"] .list-title,
[data-theme="dark"] .sub-row, [data-theme="dark"] .sub-col{ color: var(--text-main, #e5e7eb); }

.list-row {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.list-row:last-child {
  border-bottom: none;
}

.list-title {
  font-size: 14px;
  font-weight: 500;
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--input-bg);
}

.event-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Match events modal: phase section headers */
.event-section td {
  background: rgba(148, 163, 184, 0.12);
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
  padding-top: 10px;
  padding-bottom: 10px;
}

.sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--input-bg);
}

.sub-row:last-child {
  border-bottom: none;
}

.sub-col {
  font-size: 13px;
}

.sub-time { width: 60px; color: var(--text-muted); }
.sub-out, .sub-in { flex: 1; }

.duration-ico {
  margin-right: 6px;
}

.list-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Table */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  overflow: visible;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgb(226 232 240 / 14%);
}

.table th {
  text-align: left;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--text-muted);
  background: linear-gradient(180deg, rgba(2,6,23,0.03), rgba(2,6,23,0.00));
}



/* Tabler-like table headers */
.table thead th{
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .08em;
  color: rgba(100,116,139,.95);
  background: rgba(248,250,252,.92);
  border-bottom: 1px solid rgba(148,163,184,.28);
}
body[data-theme="dark"] .table thead th{
  color: rgba(148,163,184,.95);
  background: rgba(15,23,42,.55);
  border-bottom: 1px solid rgba(148,163,184,.20);
}


/* Row hovers / zebra polish */
.table tbody tr:hover td{ background: rgba(32,107,196,0.05); }
.table tbody tr:nth-child(even) td{ background: rgba(2,6,23,0.012); }

body[data-theme="dark"] .table tbody tr:nth-child(even) td,
[data-theme="dark"] .table tbody tr:nth-child(even) td,
.dark .table tbody tr:nth-child(even) td{ background: rgba(255,255,255,0.02); }
body[data-theme="dark"] .table tbody tr:hover td,
[data-theme="dark"] .table tbody tr:hover td,
.dark .table tbody tr:hover td{ background: rgba(32,107,196,0.10); }

/* Dark mode table fixes (matches near-black Kuma palette) */
body[data-theme="dark"] .table,
[data-theme="dark"] .table,
.dark .table{
  color: rgba(230,237,243,0.92);
}
body[data-theme="dark"] .table th,
[data-theme="dark"] .table th,
.dark .table th{
  color: rgba(195,205,220,0.75);
}
body[data-theme="dark"] .table th,
body[data-theme="dark"] .table td,
[data-theme="dark"] .table th,
[data-theme="dark"] .table td,
.dark .table th,
.dark .table td{
  border-bottom-color: rgba(255,255,255,0.06);
}

/* Simple responsive tweak */




/* Tactics board */

.tactics-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

/* Modern toolbar container (used on tactics board) */
.tactics-toolbar{
  padding: 0.75rem;
  border-radius: 18px;
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 12px 24px rgba(15,23,42,0.06);
}

.tactics-toolbar .form-group{ margin: 0; }
.tactics-toolbar label{ font-size: 12px; opacity: .85; }
.tactics-toolbar select,
.tactics-toolbar input[type="number"]{
  border-radius: 12px;
}

.tactics-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tactics-timer-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #0f172a;
  color: #f9fafb;
}

.tactics-timer-controls .btn {
  padding-inline: 0.75rem;
}

.tactics-score {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.tactics-score input {
  width: 3rem;
  text-align: center;
}

.tactics-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
  align-items: center;
}

.tactics-tools .btn{
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tactics-tools .btn .btn-ico{
  width: 18px;
  height: 18px;
}

/* On mobile: make the tools row horizontally scrollable (keeps UI tidy) */
@media (max-width: 700px){
  .tactics-topbar{ gap: 0.75rem; }
  .tactics-tools{
    flex: 1 1 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .tactics-tools::-webkit-scrollbar{ display:none; }
  .tactics-tools .btn{ white-space: nowrap; }
}

/* Make the tools strip feel like a modern pill toolbar */
.tactics-tools .btn{
  border-radius: 999px;
}
.tactics-tools .btn .btn-ico,
.tactics-tools .btn svg{
  width: 18px;
  height: 18px;
}

/* Mobile: keep the tools reachable with horizontal scroll */
@media (max-width: 640px){
  .tactics-topbar{ gap: .75rem; }
  .tactics-tools{
    flex: 1 1 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tactics-tools::-webkit-scrollbar{ display:none; }
  .tactics-tools .btn{ white-space: nowrap; }
}

.tactics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .tactics-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  overflow: scroll!important;
}
}

.tactics-pitch-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: #020617;
  padding: 0.75rem;
}

.tactics-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 18px;
  overflow: hidden;
  /* Match the training field green */
  background: #3aa25b;
  /* Prevent mobile/tablet from scrolling the page while dragging players */
  touch-action: none;
  overscroll-behavior: contain;
}

.tactics-pitch.draw-mode {
  cursor: crosshair;
  outline: 2px solid rgba(99,102,241,0.55);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}

.tactics-pitch.draw-mode .tactics-lines-layer {
  pointer-events: auto;
}

.tactics-pitch-background,
.tactics-lines-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
pointer-events:auto;}

/* Match the training field look (stripes + subtle lighting) */
.tactics-pitch-background{
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 20px, rgba(255,255,255,0) 20px 40px),
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.16), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(0,0,0,0.06));
}

.tactics-lines-layer {
  /* Allow selecting lines + dragging bend handle */
  pointer-events: auto;
}

.tactics-players-layer {
  position: absolute;
  inset: 0;
  /* Let pointer events reach the SVG lines below (bend/select) like in Oefeningen.
     Tokens themselves remain interactive. */
  pointer-events: none;
}

.tactics-players-layer .player-token,
.tactics-players-layer .player-token *{
  pointer-events: auto;
}

/* Drop position marker (shown during dragover, and pinned while the sub modal is open) */
.pitch-drop-indicator {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--player-size, 56px) + 10px);
  height: calc(var(--player-size, 56px) + 10px);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
  border: 2px dashed rgba(255,255,255,.85);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  background: radial-gradient(circle at 30% 20%, rgba(52, 211, 153, .35) 0, rgba(59, 130, 246, .25) 55%, rgba(2, 6, 23, .10) 100%);
}
.pitch-drop-indicator.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.02);
}
.pitch-drop-indicator.pinned {
  opacity: 1;
  border-style: solid;
}

.player-token {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: grab;
  /* Keeps touch drags inside the pitch */
  touch-action: none;
}

/* Visual hint when dragging over a token (drop will replace this player) */
.player-token.drop-hover .player-token-inner {
  outline: 3px solid rgba(255,255,255,.9);
  outline-offset: 2px;
  filter: brightness(1.06);
}

.player-token-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #bfdbfe 0, #1d4ed8 40%, #1e293b 100%);
  box-shadow: 0 10px 20px rgba(15,23,42,0.45);
}

.player-token-initials {
  color: #eff6ff;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: clamp(11px, calc(var(--player-size, 56px) * 0.28), 18px);
}

.player-token-label {
  margin-top: 0.25rem;
  font-size: clamp(10px, calc(var(--player-size, 56px) * 0.18), 13px);
  color: #e5e7eb;
  text-shadow: 0 1px 2px rgba(15,23,42,0.8);
  white-space: nowrap;
}

/* Compact labels mode (useful on mobile + exports) */
.tactics-view.compact-labels .player-token-label{ font-size: var(--label-font-compact); opacity: .9; }

/* Mobile tap-to-place: selected player highlight */
.marker-tile.selected{
  outline: 2px solid rgba(59,130,246,.85);
  outline-offset: 2px;
  border-radius: 12px;
}

.tactics-events-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--bg-card);
  padding: 0.75rem 1rem 1rem;
}

.tactics-events-card .list {
  max-height: 340px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.sidebar-close-mobile{ display:none; }


/* === Responsive / Sidebar off-canvas (Tabler-like) === */
.layout { display:flex; min-height:100vh; }
.main { flex:1; min-width:0; }

/* === Field fullscreen for Tactiekbord (mobile/tablet) === */
@media (max-width: 1200px){
  body.tactics-field-focus-body .sidebar,
  body.tactics-field-focus-body .sidebar-overlay,
  body.tactics-field-focus-body .mobile-header {
    display: none !important;
  }

  body.tactics-field-focus-body .main {
    position: fixed;
    inset: 0;
    overflow: hidden;
    padding: 0;
    background: var(--bg, #f3f4f6);
  }

  /* Hide everything except the pitch */
  body.tactics-field-focus-body .mobile-tabbar,
  body.tactics-field-focus-body .mobile-user-fab,
  body.tactics-field-focus-body .tactics-toolbar,
  body.tactics-field-focus-body .tactics-events-card,
  body.tactics-field-focus-body .tactics-bench {
    display: none !important;
  }

  /* Keep the toggle button accessible */
  body.tactics-field-focus-body #tactics-fullscreen-mobile{
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    right: 12px;
    z-index: 1000;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
  }

  body.tactics-field-focus-body .tactics-view.tactics-field-focus{
    height: 100%;
  }

  body.tactics-field-focus-body .tactics-view.tactics-field-focus .card{
    height: 100%;
    border-radius: 0;
    margin: 0;
  }

  body.tactics-field-focus-body .tactics-view.tactics-field-focus .card-body{
    height: 100%;
    padding: 0;
    min-height: 96vh;
  }

  body.tactics-field-focus-body .tactics-view.tactics-field-focus .tactics-layout{
    height: 100%;
    display: block;
  }

  body.tactics-field-focus-body .tactics-view.tactics-field-focus .tactics-pitch-card{
    position: fixed;
    inset: 0;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  body.tactics-field-focus-body .tactics-view.tactics-field-focus .tactics-pitch{
    /* keep pitch proportions in focus mode (show full field) */
    aspect-ratio: 5 / 3;
    width: var(--tacticsPitchW, 100vw);
    height: var(--tacticsPitchH, 60vw);
    max-width: calc(var(--vvw, 100vw) - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(var(--vvh, 100vh) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 0;
  }

  /* Floating close button on the pitch (prevents being stuck in field focus) */
  body.tactics-field-focus-body .tactics-exit-focus{
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    left: 12px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
    padding: 0;
  }
}

/* Fullscreen buttons visibility */
@media (min-width: 1025px){
  .tactics-fs-mobile{ display:none !important; }
}
@media (max-width: 1200px){
  .tactics-fs-desktop{ display:none !important; }
}

/* Browser fullscreen (desktop + many Android devices): fullscreen the wrapper,
   keep the pitch aspect ratio correct, and center it */
#tactics-pitch-fs:fullscreen{
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#tactics-pitch-fs:fullscreen #tactics-pitch{
  aspect-ratio: 5 / 3;
  height: 100svh;
  height: 100dvh;
  width: auto;
  max-width: 100vw;
  max-height: 100svh;
  max-height: 100dvh;
  border-radius: 0;
}

/* Desktop browser fullscreen for Training board wrapper */
#training-board-fs:fullscreen{
  background: #0b0f14;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#training-board-fs:fullscreen #training-board{
  aspect-ratio: 5 / 3;
  height: 100svh;
  height: 100dvh;
  width: auto;
  max-width: 100vw;
  max-height: 100svh;
  max-height: 100dvh;
  border-radius: 0;
}


/* === Desktop fullscreen (browser fullscreen): make the pitch truly fill the screen === */
@media (min-width: 992px){
  .layout.layout-tactics-desktop-fs .sidebar,
  .layout.layout-tactics-desktop-fs .sidebar-overlay,
  .layout.layout-tactics-desktop-fs .mobile-header{
    display:none !important;
  }

  .layout.layout-tactics-desktop-fs .main{
    position: fixed;
    inset: 0;
    padding: 0;
    overflow: hidden;
    background: var(--bg, #f3f4f6);
  }

  .layout.layout-tactics-desktop-fs .tactics-view .card{
    height: 100%;
    border-radius: 0;
    margin: 0;
  }
  .layout.layout-tactics-desktop-fs .tactics-view .card-header{
    display: none;
  }
  .layout.layout-tactics-desktop-fs .tactics-view .card-body{
    height: 100%;
    padding: 0;
  }

  /* Put the control bar over the pitch (so the pitch can be 100%) */
  .layout.layout-tactics-desktop-fs .tactics-topbar{
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 1000;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.18);
  }

  .layout.layout-tactics-desktop-fs .tactics-layout{
    height: 100%;
    display: block;
  }

  /* Hide side panels to allow the pitch to fill the screen */
  .layout.layout-tactics-desktop-fs .tactics-events-card,
  .layout.layout-tactics-desktop-fs .tactics-bench{
    display:none !important;
  }

  .layout.layout-tactics-desktop-fs .tactics-pitch-card{
    position: fixed;
    inset: 0;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
  }
  .layout.layout-tactics-desktop-fs .tactics-pitch{
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}
.mobile-header{ display:none; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid rgba(0,0,0,.08); position:sticky; top:0; background:var(--card,#fff); z-index:20; }
.mobile-header .btn.icon{ width:40px; height:40px; display:flex; align-items:center; justify-content:center; }
.mobile-header-title{ font-weight:700; }

.sidebar{ width:var(--sidebar-w, 260px); flex:0 0 var(--sidebar-w, 260px); }

@media (max-width: 992px){
  .mobile-header{ display:flex; }
  .sidebar-collapse-btn{ display:inline-flex; }
  .sidebar{
    position:fixed; left:0; top:0; bottom:0;
    transform:translateX(-105%);
    transition:transform .2s ease;
    z-index:50;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    background: var(--sidebar-bg, #0b1220);
  }
  /* make collapsed sidebar easier to tap on mobile */
  .sidebar.sidebar-collapsed{ width:84px; }
  .sidebar.sidebar-collapsed .sidebar-link{ padding:14px 12px; }
  .sidebar.sidebar-collapsed .sidebar-link .nav-icon .app-ico{ width:22px; height:22px; }
  .layout.layout-sidebar-open .sidebar{ transform:translateX(0); }
  .sidebar-close-mobile{ display:inline-flex !important; }
  .main{ width:100%; }
}

/* Avatars in lists */
.list-avatar-sm{ width:32px; height:32px; border-radius:999px; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; }
.list-avatar-sm img{ width:32px; height:32px; object-fit:cover; display:block; }

/* Tactics layout: pitch above, bench + events below */
.tactics-layout{ display:flex; flex-direction:column; gap:14px; }
.tactics-pitch{ width:100%; aspect-ratio: 5 / 3; max-height: 70vh; }
@media (max-width: 992px){
  .tactics-pitch{ max-height: 55vh; }
}
.tactics-bench{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 768px){
  .tactics-bench{ grid-template-columns: 1fr; }
}
.player-token-label{ font-size:12px; line-height:1.1; max-width: 220px; }

/* Make pitch lighter green by default background SVG already */

.bench-ghost{ border:1px dashed rgba(0,0,0,.2); border-radius:8px; background:#fff; }
.player-token.dragging{ opacity:.9; }

.tactics-bench{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
@media (max-width: 900px){
  .tactics-bench{ grid-template-columns: 1fr; }
}
.bench-item{ display:flex; align-items:center; gap:0.6rem; padding:0.5rem 0.6rem; border:1px solid rgba(148,163,184,0.25); border-radius:12px; background:#fff; }
.bench-item[draggable="true"]{ cursor: grab; }
.bench-avatar{ width:32px; height:32px; border-radius:999px; overflow:hidden; flex:0 0 32px; display:flex; align-items:center; justify-content:center; background:#e5e7eb; }
.bench-avatar img{ width:100%; height:100%; object-fit:cover; }
.bench-name{ font-weight:600; font-size:0.9rem; }
.bench-sub{ color:var(--text-muted); font-size:0.8rem; }

.player-token-label{
  margin-top:6px;
  font-size:12px;
  line-height:1.1;
  color:#0f172a;
  background:rgba(255,255,255,0.85);
  border-radius:10px;
  padding:3px 6px;
  display:inline-block;
  max-width:160px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.table-avatar{ width:32px; height:32px; border-radius:999px; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; background:#e5e7eb; }
.table-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }

.club-cell{display:inline-flex;align-items:center;gap:8px;}
.club-logo{width:20px;height:20px;border-radius:6px;object-fit:cover;display:inline-block;box-shadow:0 2px 8px rgba(2,6,23,.10);}
/* Tabler-like offcanvas sidebar on mobile/tablet */
.mobile-header{ display:none; }
@media (max-width: 992px){
  .layout{ grid-template-columns: 1fr; }
  .mobile-header{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 14px;
    border-bottom:1px solid rgba(148,163,184,0.25);
    position:sticky;
    top:0;
    background:rgba(245,247,251,0.98);
    z-index:40;
  }
  .mobile-header .btn.icon{ width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; }
  .sidebar{
    position:fixed;
    top:0;
    left:0;
    /* Use dynamic viewport height so it always matches the visible screen (iOS safe) */
    height:100dvh;
    max-height:100dvh;
    width:280px;
    max-width:86vw;
    transform:translateX(-105%);
    transition:transform .22s ease;
    z-index:60;
    /* Keep footer (theme switch) always visible: only the nav can scroll */
    overflow:hidden;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    padding:14px 12px;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    /* Mobile: solid sidebar (no gradient) */
    background: var(--bg-sidebar);
    will-change: transform;
    touch-action: pan-y;
  }

  /* Mobile: nav takes remaining space and can scroll if needed */
  .sidebar-nav{ flex:1 1 auto; overflow-y:auto; padding-bottom:10px; }
  .sidebar-footer{
    flex:0 0 auto;
    margin-top:auto;
    background: var(--bg-sidebar);
    border-top:1px solid rgba(255,255,255,0.08);
    padding-top:10px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  /* While swiping, disable transition to avoid jank */
  .sidebar.is-swiping{ transition:none; }

  /* Mobile: disable collapsed sidebar mode (needs all items + theme toggle visible) */
  .sidebar.sidebar-collapsed{ width:280px; }
  .sidebar.sidebar-collapsed .sidebar-footer{ display:block; }
  .sidebar.sidebar-collapsed .sidebar-user{ display:flex; }
  .sidebar.sidebar-collapsed .sidebar-link span:not(.nav-icon){ display:inline; }
  /* Backdrop is handled by .sidebar-overlay; disable extra pseudo overlay */
  .layout-sidebar-open::before{ content:none; }
  .layout-sidebar-open .sidebar{ transform:translateX(0); }
  .sidebar-close-mobile{ display:inline-flex !important; }
}

.sidebar-overlay{ display:none; }
@media (max-width: 992px){
  .layout-sidebar-open .sidebar-overlay{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(2,6,23,0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index:55;
  }
}

/* Tactics: make pitch larger and place bench under pitch */
.tactics-layout{ display:flex; flex-direction:column; gap:14px; }
.tactics-pitch{ width:100%; aspect-ratio: 5 / 3; max-height: 72vh; }
@media (max-width: 992px){
  .tactics-pitch{ max-height: 58vh; }
}

.player-photo-thumb{ width:32px; height:32px; border-radius:999px; object-fit:cover; }

/* Modal */
.modal-overlay{ position:fixed; inset:0; background:rgba(2,6,23,0.45); z-index:100; display:flex; align-items:center; justify-content:center; padding:16px; }
.modal{ width:min(900px, 98vw); background:#fff; border-radius:16px; box-shadow:0 20px 60px rgba(0,0,0,0.25); overflow:hidden; }
.modal-header{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid rgba(148,163,184,0.25); }
.modal-title{ font-weight:700; }
.modal-subtitle{ color:var(--text-muted); font-size:0.85rem; margin-top:2px; }
.modal-body{ padding:14px 16px; max-height:70vh; overflow:auto; }

/* Force sidebar vertical on all breakpoints */
.sidebar{ flex-direction:column !important; align-items:stretch !important; }

/* Pitch: slightly lighter green */
.pitch{ background: linear-gradient(180deg, #2ea44f, #268a43); }

/* Player token image */
.player-token .avatar{ width: min(64px, var(--player-size, 56px)); height: min(64px, var(--player-size, 56px)); }
.player-token img{ width:100%; height:100%; object-fit:cover; }

/* Lines thinner */
.tactics-lines path{ stroke-width:0.8 !important; }

/* Players table alignment */
.table td, .table th { vertical-align: middle; }
.player-cell { display:flex; align-items:center; gap:10px; }
.player-cell img { width:32px; height:32px; border-radius:8px; object-fit:cover; }

/* Hard layout fix for content alignment */
body{overflow-x:hidden;}
/* When the off-canvas sidebar is open on mobile, prevent the page behind it from scrolling. */
body.sidebar-open-body{ overflow: hidden; }
@media (min-width: 993px){
  /* Keep sidebar visible without overlaying content */
  .sidebar{
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    z-index: 10;
  }
  .main{ margin-left: 0 !important; width: auto !important; }
}

/* Player token remove button */
.player-token{ position:absolute; }
.player-token .token-remove{
  position:absolute;
  top:-10px;
  right:-10px;
  width:22px;
  height:22px;
  border:0;
  border-radius:999px;
  background:#ffffff;
  box-shadow: 0 6px 16px rgba(15,23,42,0.25);
  cursor:pointer;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
}
.player-token:hover .token-remove{ display:flex; }

body{overflow-x:hidden;}
@media (min-width: 993px){
  .sidebar{position:fixed; left:0; top:0; bottom:0; width:260px; z-index:10;}
  .main, .page-content, .content-area {margin-left:260px !important; width:calc(100% - 260px) !important;}
  /* Do not reserve sidebar width on the right */
  .main, main.main, .page-content, .content-area { padding-right: 0 !important; }
}

/* Layout hard-fix so content never goes behind sidebar */
@media (min-width: 992px){
  .sidebar{position:fixed; left:0; top:0; bottom:0; width:260px; z-index:50;}
  main.main{margin-left:260px; padding-left:20px;}
}

/* Mobile sidebar should remain vertical (not topbar) */
@media (max-width: 991px){
  .sidebar{position:fixed; left:0; top:0; bottom:0; width:260px; transform:translateX(-110%); transition:transform .2s ease; }
  body.sidebar-open .sidebar{transform:translateX(0);}
  .sidebar .nav{display:flex; flex-direction:column;}
  .sidebar .nav a{display:flex;}
  .topbar{position:sticky; top:0; z-index:60;}
}

/* Force vertical sidebar on mobile (no horizontal menu) */
@media (max-width: 991px){
  .sidebar{position:fixed; top:0; bottom:0; left:0; width:260px; transform:translateX(-100%); transition:transform .2s ease; z-index:1050;}
  .sidebar.open{transform:translateX(0);}
  .topnav, .navbar-horizontal, .mobile-topbar{display:none !important;}
  main.main{margin-left:0 !important; padding-left:12px;}
}


/* --- v55 fix: mobile sidebar nav stays vertical --- */
@media (max-width: 992px){
  .sidebar { display:flex; flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; }
  .sidebar-nav { display:flex; flex-direction: column !important; gap: 6px !important; }
  .sidebar-nav .nav-btn { width: 100% !important; justify-content: flex-start !important; }
}
.player-token-photo{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:999px;
}


/* v55 phase2 basic ui helpers */
.divider{ height:1px; background: rgba(148,163,184,.25); margin:14px 0; }
.section-title{ margin:8px 0 10px; font-size:13px; font-weight:700; color:#e2e8f0; }
.table-wrap{
  /* Allow action dropdowns to render above the table (avoid clipping). */
  overflow-x: visible;
  overflow-y: visible;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.25);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  padding: 6px;
}

/* Sticky table headers inside table-wrap for long lists */
.table-wrap .table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}
body[data-theme="dark"] .table-wrap .table thead th,
[data-theme="dark"] .table-wrap .table thead th,
.dark .table-wrap .table thead th{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.inp{ width:64px; padding:6px 8px; border-radius:10px; border:1px solid var(--border-subtle); background:#fff; color:#0f172a; font-size:14px; }

.inp.small{ width:60px; }
@media (max-width:992px){
  .section-title{ color:#0f172a; }
  .inp{ background:#fff; color:#0f172a; }
  .table-wrap {
    overflow-x: visible;
    overflow-y: auto!important;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .25);
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
    padding: 6px;
}
}

/* Extra form helpers */
.form-row {
  display: flex;
  gap: 10px;
}
.form-row > * {
  flex: 1 1 0%;
}


/* v57: force mobile sidebar items vertical */
@media (max-width: 992px){
  .sidebar nav.sidebar-nav{display:flex !important; flex-direction:column !important; align-items:stretch !important;}
  .sidebar .sidebar-link{display:flex !important; width:100% !important;}
}
.logo-login{ filter:none; }

.avatar-sm{width:32px;height:32px;border-radius:999px;object-fit:cover;}

.avatar-fallback{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  background:rgba(99,102,241,.14);
  color:#4f46e5;
}
body[data-theme="dark"] .avatar-fallback{background:rgba(99,102,241,.18);color:#c7d2fe}

.user-cell{display:flex;align-items:center;gap:10px;min-width:0}
.user-cell-meta{min-width:0}
.user-cell-name{font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-cell-email{font-size:12px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.badge-role{font-weight:800}


/* Logo variants */

/* Make sidebar logo white, keep login logo normal */
.logo-login{filter:none !important;}

.logo-menu{max-width:140px; height:auto;}
.logo-login{max-width:160px; height:auto;}


/* Logged-in logo size */
.logo-menu img, .sidebar-logo img{ width:52px; height:52px; object-fit:contain; background:transparent; }


.sidebar-user-row{display:flex;align-items:center;gap:10px;}
.sidebar-avatar{width:28px;height:28px;border-radius:999px;object-fit:cover;border:1px solid rgba(148,163,184,.22);} 


.dash-actions{margin-top:12px;}
.dash-actions-grid{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:10px;}
@media(min-width:768px){.dash-actions-grid{grid-template-columns:repeat(4, minmax(0,1fr));}}
.dash-action-btn{display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:12px;border:1px solid var(--border-subtle);border-radius:16px;background:linear-gradient(135deg, rgba(32,107,196,.10), var(--bg-card));box-shadow:var(--shadow-soft);width:100%;transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;}
.dash-action-btn:hover{transform:translateY(-1px);box-shadow:0 16px 42px rgba(15,23,42,.12);border-color:rgba(148,163,184,.45);}
.dash-action-btn:active{transform:translateY(0) scale(.99)}
.dash-action-icon{font-size:24px;line-height:1;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:14px;background:linear-gradient(135deg, rgba(59,130,246,.18), rgba(34,197,94,.12));}
.dash-action-text{font-weight:800;}
@media (max-width:768px){
  /* More app-like on iOS/Android: glassy, rounded tiles */
  .dash-action-btn{
    border-radius:22px;
    background:rgba(255,255,255,.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color:rgba(148,163,184,.22);
    box-shadow:0 18px 52px rgba(15,23,42,.10);
  }
  body[data-theme="dark"] .dash-action-btn{
    background:rgba(15,23,42,.66);
    border-color:rgba(148,163,184,.14);
    box-shadow:0 18px 52px rgba(0,0,0,.38);
  }
  body[data-theme="dark"] .dash-action-icon{
    background:linear-gradient(135deg, rgba(59,130,246,.22), rgba(15,23,42,0));
  }
}

.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:30000;padding:16px;backdrop-filter:blur(4px);}
.muted-note{color:rgba(0,0,0,.65);}
body[data-theme="dark"] .muted-note{color:rgba(255,255,255,.75);}

.theme-toggle{display:flex;align-items:center;gap:8px;}
.theme-icon{font-size:14px;line-height:1;opacity:.95;}
.modal.open .modal-card{ animation: slideInBlurredBottom .45s ease-out both; }
.modal.open .modal-backdrop{ animation: fadeInBottom .25s ease-out both; }
.modal-card{width:min(920px,100%);max-height:90vh;overflow:auto;border-radius:16px;}

/* Ensure modals are always white in light mode */
.modal-card{
  background: #fff;
  border: 1px solid rgba(148,163,184,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
body[data-theme="dark"] .modal-card{
  background: rgba(15,23,42,.98);
  border-color: rgba(148,163,184,0.18);
}

/* Tabler-like modal polish */
.modal-card.modal-xl{width:min(1200px,100%);} 
.modal-card.modal-lg{width:min(1040px,100%);} 
.modal-card .card-header{
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: inherit;
  backdrop-filter: blur(6px);
}
.modal-card .card-title{font-size:1.05rem;font-weight:800;letter-spacing:.2px;}
.modal-card .card-body{padding:18px;}
.modal-actions{display:flex;align-items:center;gap:8px;}
.btn.btn-icon{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:12px;}
.btn.btn-icon svg{width:18px;height:18px;}

/* Mobile-friendly horizontal scroll for tables */
.table-responsive{width:100%;overflow-x: visible;overflow-y:visible;-webkit-overflow-scrolling:touch;}
.table-responsive > table{min-width:640px;}

/* Desktop collapsed sidebar should also become narrower (mobile already had rules) */
.sidebar.sidebar-collapsed{
  width: 72px !important;
  flex: 0 0 72px !important;
  padding: 16px 8px;
}
.sidebar.sidebar-collapsed .sidebar-link{ padding:14px 10px; justify-content:center; }
.sidebar.sidebar-collapsed .sidebar-link .nav-icon .app-ico{ width:22px; height:22px; }

/* Matches table polish */
.table a{ text-decoration: none; }
.table a:hover{ text-decoration: none; }

/* Simple dropdown (Tabler-ish) */
.dropdown{ position: relative; display: inline-flex; }
.dropdown-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  padding: 6px;
  /* Keep dropdowns above cards/tables */
  z-index: 1055;
  display: none;
}
.dropdown.open .dropdown-menu{display:block;overflow: visible;}

/* iOS-like dropdown animation (match More menu) */
.dropdown.open .dropdown-menu{
  animation: dropdownPopIn 520ms cubic-bezier(.16,1,.3,1) both;
  transform-origin: top right;
}
.dropdown-menu.closing{
  animation: dropdownPopOut 240ms cubic-bezier(.4,0,1,1) both;
}
@keyframes dropdownPopIn{from{transform:translateY(-6px) scale(.98); opacity:0}to{transform:translateY(0) scale(1); opacity:1}}
@keyframes dropdownPopOut{from{transform:translateY(0) scale(1); opacity:1}to{transform:translateY(-6px) scale(.98); opacity:0}}

/* When a dropdown menu is portaled to <body> (JS), make sure it floats above EVERYTHING */
.dropdown-menu.dropdown-menu-portal{
  position: fixed;
  z-index: 2000;
  display: block !important;
}
.dropdown-item{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:10px 10px;
  border-radius:10px;
  border:0;
  background:transparent;
  color: inherit;
  text-decoration:none;
  cursor:pointer;
}
.dropdown-item:hover{ background: rgba(148,163,184,0.18); }
body[data-theme="dark"] .dropdown-item:hover{ background: rgba(148,163,184,0.12); }
.dropdown-sep{ height:1px; background: var(--border-subtle); margin: 6px; }

/* Icon prefix helper */
.ico{ display:inline-flex; align-items:center; justify-content:center; margin-right:8px; opacity:.8; }
.date-ico{ margin-right:8px; opacity:.85; }

/* Input with icon */
.input-with-icon{ position:relative; }
.input-with-icon .input-ico{ position:absolute; left:12px; top:50%; transform:translateY(-50%); opacity:.75; pointer-events:none; }
.input-with-icon input{ padding-left:36px; }
@media (max-width: 768px){
  .table-responsive{margin-left:-12px;margin-right:-12px;padding-left:12px;padding-right:12px;width: -webkit-fill-available;}
}


/* Theme switch */
.switch{position:relative;display:inline-block;width:44px;height:24px;}
.switch input{opacity:0;width:0;height:0;}
.switch .slider{position:absolute;cursor:pointer;inset:0;background:var(--border-subtle);transition:.2s;border-radius:999px;}
.switch .slider:before{content:"";position:absolute;height:18px;width:18px;left:3px;top:3px;background:var(--bg-card);transition:.2s;border-radius:999px;box-shadow:0 1px 2px rgba(0,0,0,.25);}
.switch input:checked + .slider{background:var(--primary);}
.switch input:checked + .slider:before{transform:translateX(20px);} 
.sidebar-theme-row{display:flex;align-items:center;gap:10px;margin-top:10px;}
.sidebar-theme-label{cursor:pointer;user-select:none;}
.sidebar-theme-label{color:var(--text-muted);font-size:12px;}
.sidebar-user-role{color:var(--text-muted);font-size:12px;margin-top:2px;}


/* Dark theme */
body[data-theme="dark"]{
  /* Match Tabler-like sidebar greys (no blue glow) */
  background: #141b24;
  --bg-body: #23293000;
  --bg-card: #0c1016;
  --bg-sidebar: #0e0e0ecc;
  --text-main:#e5e7eb;
  --text: var(--text-main);
  --text-muted:#94a3b8;
  --border-subtle:rgba(148,163,184,.10);
  --input-bg:#131c27;
  --input-border:rgba(148,163,184,.16);
  --shadow-soft:0 10px 30px rgba(0,0,0,.45);
  --primary-soft:rgb(34 56 83 / 39%);
}
body[data-theme="dark"] img.logo--white{filter:brightness(1.1) contrast(1.05);}


/* Inputs used in spelerstatistieken: readable in both themes */
body[data-theme="dark"] .inp{ background:rgba(15,23,42,.35); color:#e2e8f0; border-color:rgba(148,163,184,.25); }

/* Tactics range control */
.tactics-range{ display:flex; align-items:center; gap:12px; }
.tactics-range input[type="range"]{ width:180px; }

body[data-theme="dark"] .report-textarea{ color:#e2e8f0; }


/* Player totals modal: card layout */
.player-card-head{display:flex;align-items:center;gap:14px;margin-bottom:14px;}
.player-card-photo{width:54px;height:54px;border-radius:14px;overflow:hidden;border:1px solid var(--border-subtle);background:rgba(148,163,184,.12);display:flex;align-items:center;justify-content:center;flex:0 0 auto;}
.player-card-photo img{width:100%;height:100%;object-fit:cover;display:block;}
.player-card-photo-fallback{font-weight:700;color:var(--text-muted);font-size:18px;}
.player-card-name{font-weight:700;font-size:16px;line-height:1.2;}
.player-card-sub{color:var(--text-muted);font-size:12px;margin-top:2px;}

.stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px;}
@media (min-width:900px){.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}

.stat-card{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid var(--border-subtle);border-radius:16px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.06);transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;}
.stat-card:hover{transform:translateY(-1px);box-shadow:0 16px 34px rgba(15,23,42,.10);border-color:rgba(37,99,235,.25)}
body[data-theme="dark"] .stat-card{background:rgba(255,255,255,.03);box-shadow:0 14px 30px rgba(0,0,0,.35);}
.stat-ico{width:18px;height:18px;color:var(--text-muted);}
.stat-card-label{color:var(--text-muted);font-size:12px;line-height:1.1;}
.stat-card-main{font-weight:900;font-size:20px;margin-top:2px;letter-spacing:-0.01em;}
.stat-card-sub{color:var(--text-muted);font-size:12px;margin-top:2px;}

/* Report view */
.report-view-content{padding:14px 16px;border:1px solid var(--border-subtle);border-radius:16px;background:rgba(148,163,184,.06);color:var(--text, #0f172a);line-height:1.65;}
body[data-theme="dark"] .report-view-content{background:rgba(15,23,42,.35);color:#e2e8f0;}

/* Match card in report modal */
.match-card{padding:12px 14px;border:1px solid var(--border-subtle);border-radius:16px;background:rgba(148,163,184,.06);margin-bottom:12px;}
body[data-theme="dark"] .match-card{background:rgba(15,23,42,.35);}
.match-card-title{font-weight:800;font-size:15px;}
.match-card-sub{color:var(--text-muted);font-size:12px;margin-top:2px;}


/* Player totals modal: bigger + white background */
#player-totals-modal .modal-card{max-width:760px;width:95%;background:#fff;max-height:90vh;display:flex;flex-direction:column;}
body[data-theme="dark"] #player-totals-modal .modal-card{background:rgba(15,23,42,.98);}

/* Keep the modal card 100% width on small screens and scroll inside */
@media (max-width:768px){
  #player-totals-modal .modal-card{width:100%;max-width:100%;max-height:100vh;border-radius:0;}
}

#player-totals-modal .card-body{overflow-y:auto;-webkit-overflow-scrolling:touch;}

/* Apex charts should never overflow their container */
.dash-chart, .dash-chart *{max-width:100%;}
.dash-chart .apexcharts-canvas{margin:0 auto;}

/* Radial row: keep legend at left and donut to the right, leaving room for the opening */
.dash-radial-row{display:flex;gap:16px;align-items:flex-start;}
@media (max-width:768px){
  .dash-radial-row{flex-direction:column;}
  .dash-radial-right{width:100%;}
}

/* Apex charts should never overflow the modal/card */
#player-totals-modal .apexcharts-canvas,
#player-totals-modal .apexcharts-svg,
.dash-radial-row .apexcharts-canvas,
.dash-radial-row .apexcharts-svg{max-width:100% !important;}

/* Keep the modal card full-width on mobile (like before) and scroll inside the body */
@media (max-width:768px){
  #player-totals-modal .modal-card{width:100%;max-width:100%;border-radius:18px;max-height:100vh;}
}

#player-totals-modal .modal-card .card-body{overflow-y:auto;-webkit-overflow-scrolling:touch;}

/* Apex charts should never exceed container width */
.player-radial-block .apexcharts-canvas,
.player-radial-block .apexcharts-svg,
.player-radial-block .apexcharts-inner,
.dash-chart-radial .apexcharts-canvas{max-width:100% !important;}


/* Report view fixes: normal font + line breaks */
.report-view-content{font:inherit; white-space:pre-wrap; word-break:break-word;}


/* ======================================================
   App polish: duotone icons + dashboard quick actions + motion
====================================================== */

.nav-icon .app-ico{width:26px;height:26px;display:block}
@media (max-width:768px){ .nav-icon .app-ico{width:28px;height:28px} }
.app-ico path:first-child{opacity:.30}
.app-ico path:last-child{opacity:1}

.sidebar .nav-btn .app-ico{color:rgba(226,232,240,.92);filter:drop-shadow(0 1px 0 rgba(15,23,42,.35))}
.sidebar .nav-btn:hover .app-ico{color:rgba(199,210,254,.95)}
.sidebar .nav-btn.active .app-ico{color:#c7d2fe}

.quick-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.qa-tile{
  border:1px solid rgba(148,163,184,.22);
  border-radius:20px;
  padding:14px;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  position: relative;
  background:
    radial-gradient(160px 140px at 18% 0%, var(--primary-soft), #00000000 60%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
  box-shadow:none;
  transition:transform .15s ease, box-shadow .15s ease;
}
.qa-tile:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:20px;
  background: linear-gradient(135deg, rgba(255,255,255,.35), transparent 45%);
  opacity:.55;
  pointer-events:none;
}
.qa-tile:after{
  content:"";
  position:absolute;
  top:-40%;
  left:-60%;
  width:60%;
  height:180%;
  background: linear-gradient(90deg, transparent, rgba(32,107,196,.14), transparent);
  transform: rotate(20deg) translateX(-30%);
  opacity:0;
  transition: opacity .2s ease;
  pointer-events:none;
}
.qa-tile:hover:after{
  opacity:1;
  animation: qa-sweep 1.05s ease-in-out both;
}
@keyframes qa-sweep{
  from{ transform: rotate(20deg) translateX(-30%); }
  to{ transform: rotate(20deg) translateX(220%); }
}
.qa-tile:hover{transform:translateY(-2px);box-shadow:none}
.qa-tile:active{transform:translateY(0) scale(.99)}
.qa-ico{
  width:44px;height:44px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  background: linear-gradient(135deg, rgba(32,107,196,.22), rgba(32,107,196,.10));
  margin-bottom:10px;
}
.qa-ico .app-ico{width:22px;height:22px;color:var(--primary)}
.qa-title{font-weight:800;font-size:14px}
.qa-sub{color:var(--text-muted);font-size:12px;margin-top:2px}

body[data-theme="dark"] .qa-tile{
  background:
    radial-gradient(160px 140px at 18% 0%, rgba(32,107,196,.18), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.85), rgba(15,23,42,.65));
  border-color:rgba(148,163,184,.14);
  box-shadow:0 10px 26px rgba(0,0,0,.35);
}
body[data-theme="dark"] .qa-ico{background:rgba(32,107,196,.18)}
body[data-theme="dark"] .qa-ico .app-ico{color:rgba(191,219,254,.95)}

.main.page-enter{animation:fadeUp .22s ease}



/* ======================================================
   Tactics: marker lists for field + reserves
====================================================== */

.tactics-bench{display:flex;gap:12px;align-items:flex-start;margin-top:12px}
.bench-side{flex:1;min-width:0}
.marker-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;max-height:320px;overflow:auto;padding-right:4px}
@media (max-width:768px){
  .tactics-bench{gap:10px}
  .marker-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;max-height:320px;overflow:auto;padding-right:4px}
}

.marker-item{
  display:grid;
  grid-template-columns:44px 1fr;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  background:rgba(255,255,255,.65);
  box-shadow:0 6px 18px rgba(15,23,42,.05);
}
body[data-theme="dark"] .marker-item{
  background:rgba(15,23,42,.55);
  border-color:rgba(148,163,184,.12);
  box-shadow:0 10px 26px rgba(0,0,0,.30);
}

.marker-circle{
  width:44px;height:44px;border-radius:999px;
  overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:rgba(99,102,241,.12);
  border:1px solid rgba(99,102,241,.18);
}
.marker-circle img{width:100%;height:100%;object-fit:cover;display:block}
.marker-circle span{font-weight:800;color:#4f46e5}
body[data-theme="dark"] .marker-circle{background:rgba(99,102,241,.16)}
body[data-theme="dark"] .marker-circle span{color:#c7d2fe}

.marker-meta{min-width:0}
.marker-name{font-weight:800;font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.marker-sub{color:var(--text-muted);font-size:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.marker-btn{grid-column:1 / -1;justify-self:start;margin-top:6px;border-radius:14px}

/* All players section spacing */
.tactics-allplayers{margin-top:12px}

/* ======================================================
   Dashboard: better quick actions (mobile first)
====================================================== */

.quick-actions{gap:14px}
/* Keep 2 columns on mobile (app-like). Only collapse on very narrow screens. */
@media (max-width:360px){
  .quick-actions{grid-template-columns:1fr}
}
.qa-tile{
  position:relative;
  padding:16px;
  border-radius:22px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 10px 30px rgba(15,23,42,.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.qa-tile:active{transform: scale(.98)}
.qa-ico{width:48px;height:48px;border-radius:18px}
.qa-title{font-size:15px}
.qa-sub{font-size:12px}
.qa-chevron{
  position:absolute;
  right:14px;
  top:16px;
  width:18px;height:18px;
  color:rgba(15,23,42,.35);
}
body[data-theme="dark"] .qa-chevron{color:rgba(226,232,240,.35)}

body[data-theme="dark"] .qa-tile{
  background: rgba(17,24,39,.55);
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* Dashboard: iOS-like light background on mobile */
@media (max-width:768px){
  body[data-page="dashboard"]{
    background:
      radial-gradient(900px 520px at 18% -10%, rgba(59,130,246,.18), transparent 60%),
      radial-gradient(760px 520px at 88% 10%, rgba(34,197,94,.16), transparent 62%),
      linear-gradient(180deg, #f7f9ff 0%, #f3f7ff 45%, #f4fbf8 100%);
  }

  /* iOS-like tiles on mobile: slightly translucent + soft blur */
  .quick-actions .qa-tile{
    background: rgba(255,255,255,.72);
    border-color: rgba(148,163,184,.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 44px rgba(15,23,42,.10);
  }
  body[data-theme="dark"] .quick-actions .qa-tile{
    background: rgba(15,23,42,.66);
    border-color: rgba(148,163,184,.14);
    box-shadow: 0 18px 52px rgba(0,0,0,.38);
  }

  .quick-actions .qa-ico{
    background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(34,197,94,.14));
  }
  body[data-theme="dark"] .quick-actions .qa-ico{
    background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(15,23,42,0));
  }
  body[data-page="dashboard"] .main{
    /* Let the gradient read as the app background */
    background: transparent;
  }
}

/* New: app-like quick actions (dashboard) */
.qa-appgrid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:12px;
}
@media (max-width:768px){
  .qa-appgrid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:420px){
  .qa-appgrid{grid-template-columns: repeat(2,minmax(0,1fr));}
}
.qa-app{
  position:relative;
  border:1px solid rgba(148,163,184,.22);
  border-radius:22px;
  padding:14px 14px;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  background: var(--bg-card);
  box-shadow:0 10px 26px rgba(15,23,42,.08);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow:hidden;
}
.qa-app:before{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  /* App-store like shine sweep */
  background: linear-gradient(120deg,
    rgba(59,130,246,0) 0%,
    rgba(59,130,246,.12) 45%,
    rgba(59,130,246,0) 90%
  );
  opacity:0;
  transform: translateX(-70%);
  transition: opacity .18s ease, transform .28s ease;
}
.qa-app:hover{transform:translateY(-2px);box-shadow:0 16px 42px rgba(15,23,42,.12);border-color:rgba(148,163,184,.40)}
.qa-app:hover:before{opacity:1;transform: translateX(70%);}
.qa-app:active{transform:translateY(0px) scale(.99)}
.qa-app-ico{
  position:relative;
  width:56px;height:56px;
  border-radius:20px;
  display:flex;align-items:center;justify-content:center;
  /* Subtle "button-blue" gradient like Tabler/TailAdmin cards */
  background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(96,165,250,.10));
  border: 1px solid rgba(37,99,235,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  margin-bottom:10px;
}
.qa-app-ico .app-ico{width:28px;height:28px;color:var(--text-main)}
.qa-app-label{position:relative;display:block}
.qa-app-title{display:block;font-weight:900;font-size:15px}
.qa-app-sub{display:block;color:var(--text-muted);font-size:12px;margin-top:2px}

body[data-theme="dark"] .qa-app{
  background: rgba(255,255,255,.02);
  border-color:rgba(148,163,184,.14);
  box-shadow:0 10px 26px rgba(0,0,0,.35);
}
body[data-theme="dark"] .qa-app:before{
  background: linear-gradient(120deg,
    rgba(37,99,235,0) 0%,
    rgba(37,99,235,.18) 45%,
    rgba(37,99,235,0) 90%
  );
}
body[data-theme="dark"] .qa-app:hover{box-shadow:0 18px 46px rgba(0,0,0,.45)}
body[data-theme="dark"] .qa-app-ico{background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(2,6,23,.0));}
body[data-theme="dark"] .qa-app-ico .app-ico{color:#e2e8f0}


/* ======================================================
   Tactics compact tiles (small squares)
====================================================== */
.marker-item{display:none !important;} /* legacy */
.marker-tile{
  width:110px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  background:rgba(255,255,255,.65);
  box-shadow:0 6px 18px rgba(15,23,42,.05);
  padding:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
body[data-theme="dark"] .marker-tile{
  background:rgba(15,23,42,.55);
  border-color:rgba(148,163,184,.12);
  box-shadow:0 10px 26px rgba(0,0,0,.30);
}

.marker-tile-photo{
  width:58px;height:58px;border-radius:16px;
  overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:rgba(99,102,241,.12);
  border:1px solid rgba(99,102,241,.18);
}
.marker-tile-photo img{width:100%;height:100%;object-fit:cover;display:block}
.marker-tile-photo span{font-weight:900;color:#4f46e5}
body[data-theme="dark"] .marker-tile-photo{background:rgba(99,102,241,.16)}
body[data-theme="dark"] .marker-tile-photo span{color:#c7d2fe}

.marker-tile-name{
  font-weight:800;
  font-size:12px;
  text-align:center;
  line-height:1.2;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.marker-tile-btn{
  width:100%;
  border-radius:14px;
  padding:8px 10px;
}

/* Mobile/tablet: make player/reserve tiles more compact */
@media (max-width: 991px){
  .marker-list{
    grid-template-columns:repeat(auto-fill,minmax(84px,1fr));
    gap:8px;
    max-height:220px;
  }
  .marker-tile{
    width:88px;
    padding:7px;
    border-radius:16px;
    gap:6px;
  }
  .marker-tile-photo{
    width:44px;
    height:44px;
    border-radius:14px;
  }
  .marker-tile-name{font-size:11px}
  .marker-tile-btn{padding:6px 8px;border-radius:12px;font-size:11px}
}

@media (max-width: 480px){
  .marker-list{grid-template-columns:repeat(auto-fill,minmax(78px,1fr));max-height:200px}
  .marker-tile{width:82px}
}

/* Datagrid sort headers (Tabler-like) */
.th-sort{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  font: inherit;
  color: var(--text-muted);
  font-weight: 600;
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
}
.th-sort:hover{ color: var(--text); }
.th-sort:after{
  content:"";
  width:0;height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:6px solid rgba(148,163,184,.55);
  transform: translateY(1px);
  opacity:.35;
}
body[data-theme="dark"] .th-sort:after{ border-top-color: rgba(148,163,184,.55); }


/* === Tabler-like inline line icons (SVG) === */
.ti-ico{
  width:20px;height:20px;
  display:inline-block;
  vertical-align:middle;
  color: currentColor;
  flex: 0 0 auto;
}
.sidebar .ti-ico{ width:20px;height:20px; opacity:.92; }
.sidebar .nav-link:hover .ti-ico,
.sidebar .nav-link.active .ti-ico{ opacity:1; }

.qa-ico .ti-ico{ width:22px;height:22px; }
.dropdown-item .ti-ico{ width:16px;height:16px; margin-right:8px; opacity:.9; }
.dropdown-item:hover .ti-ico{ opacity:1; }
.btn .ti-ico{ width:18px;height:18px; }

.btn[data-actions-toggle]{ display:inline-flex; align-items:center; justify-content:center; }


/* Tabler-like tabs inside card */
.tabs-card{background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:14px;overflow:hidden;box-shadow:var(--shadow-soft);margin-bottom:12px;}
.nav-tabs-card{margin:0;padding:0 8px;border-bottom:1px solid rgba(148,163,184,.14);background:var(--bg-card);}
body[data-theme="dark"] .nav-tabs-card{border-bottom:1px solid rgba(255,255,255,.06);}
.nav-tabs-card .nav-link{border:1px solid transparent;border-bottom:none;padding: 8px 8px;font-weight:700;color:var(--text-muted);background:transparent;border-radius:10px 10px 0 0;margin:8px 6px 0 0;}
.nav-tabs-card .nav-link:hover{color:var(--text); background:rgba(148,163,184,.10);} 
body[data-theme="dark"] .nav-tabs-card .nav-link:hover{background:rgba(255,255,255,.06);} 
.nav-tabs-card .nav-link.active{color:var(--text); background:var(--bg-card); border-color:rgba(148,163,184,.14); box-shadow:none;}
body[data-theme="dark"] .nav-tabs-card .nav-link.active{border-color:rgba(255,255,255,.08);} 
.nav-tabs-card .nav-link.disabled{opacity:.45; pointer-events:none;}

.dash-action-btn:hover{transform:translateY(-1px);box-shadow:0 10px 30px rgba(2,6,23,.10);background:linear-gradient(135deg, rgba(32,107,196,.16), var(--bg-card));}

/* Dark mode: mobile header should match sidebar */
.dark .mobile-header{
  background: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #e5e7eb;
}
.dark .mobile-header-title{ color:#e5e7eb; }
.dark .mobile-header .btn.icon{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color:#e5e7eb;
}

.sidebar .nav-link .ti {
  font-size: 1.45rem;
  opacity: .9;
  margin-right: .6rem;
}

.sidebar .nav-link {
  line-height: 1.45;
  padding: .65rem .75rem;
}

@media (min-width: 768px){ .ti-ico.ico-panel-left, #sidebarToggle, .sidebar-toggle-btn { display:none !important; } }

/* Remove blue glow/shadow on primary buttons (Tabler-like) */
.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn.btn-primary, .btn.btn-primary:hover, .btn.btn-primary:focus, .btn.btn-primary:active {
  box-shadow: none !important;
}
/* Tabler-ish button padding */
.btn { padding: .5rem .75rem; }

/* Sidebar logo sizing (final) */
.sidebar-logo{
  height: 72px !important;
  width: auto;
  display: block;
}


/* Sidebar menu sizing */
.sidebar .nav-link{
  font-size: 1.08rem;
  line-height: 1.7;
  padding: .85rem 1rem;
}


.sidebar .nav-link .ti{
  font-size: 2.1rem;
  opacity: .9;
  margin-right: .9rem;
}




/* Tabler-like buttons: no glow shadows */
.btn, .btn:focus, .btn:active, .btn:hover,
.btn-primary, .btn-primary:focus, .btn-primary:active, .btn-primary:hover,
.btn-outline-primary, .btn-outline-primary:focus, .btn-outline-primary:active, .btn-outline-primary:hover{
  box-shadow: none !important;
}

/* Profile photo: 48x48, squarish with rounded corners */
.profile-photo, .avatar, .user-avatar, img.profile-photo {
  width: 48px !important;
  height: 48px !important;
  object-fit: cover;
  border-radius: 10px !important;
}

/* Empty avatar placeholder */
.avatar.avatar-empty{
  display:inline-block;
  width:48px !important;
  height:48px !important;
  border-radius:10px !important;
  background: rgba(148,163,184,.25);
}

/* Dashboard quick actions: true square tiles */
.dashboard-quick-actions .card,
.dashboard-quick-actions a.card,
.dashboard-quick-actions .quick-action,
.quick-actions .card,
.quick-actions .quick-action {
  border-radius: 0 !important;
  aspect-ratio: 1 / 1;
}
.dashboard-quick-actions .card-body,
.quick-actions .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* Page transitions (iOS-ish)
   - Works for both desktop + mobile.
   - Uses opacity + top (NOT transform) so fixed-position modals stay fixed on iOS/Safari.
   - JS toggles classes on #app-root only on real navigation (link clicks / page load).
*/
#app-root.page-transition {
  opacity: 0;
  position: relative;
  top: 10px;
  will-change: opacity, top;
  transition:
    opacity 260ms cubic-bezier(.2,.8,.2,1),
    top 260ms cubic-bezier(.2,.8,.2,1);
}
#app-root.page-transition.page-in {
  opacity: 1;
  top: 0;
}
#app-root.page-transition.page-out {
  opacity: 0;
  top: -8px;
}
@media (prefers-reduced-motion: reduce) {
  #app-root.page-transition,
  #app-root.page-transition.page-in,
  #app-root.page-transition.page-out {
    transition: none;
    top: 0;
    opacity: 1;
  }
}


/* Verslagen modal: wider + airier */
.modal.modal-report .modal-dialog,
#reportModal .modal-dialog,
#verslagModal .modal-dialog {
  max-width: 1140px;
}
.modal.modal-report .modal-content,
#reportModal .modal-content,
#verslagModal .modal-content {
  border-radius: 12px;
}
.modal.modal-report .modal-body,
#reportModal .modal-body,
#verslagModal .modal-body {
  padding: 1.25rem 1.25rem;
}
.modal.modal-report .modal-header,
#reportModal .modal-header,
#verslagModal .modal-header {
  padding: 1rem 1.25rem;
}
.modal.modal-report .section,
#reportModal .section,
#verslagModal .section {
  margin-bottom: 1rem;
}


/* Sidebar avatar: 48x48 */
.sidebar-avatar, .sidebar .avatar, .sidebar img.avatar, .sidebar img.sidebar-avatar {
  width: 48px !important;
  height: 48px !important;
  object-fit: cover;
  border-radius: 10px !important;
}

/* Dashboard quick actions: force square tiles */
.dashboard-quick-actions .card,
.dashboard-quick-actions .quick-action,
.dashboard-quick-actions a.card,
.quick-actions .card,
.quick-actions .quick-action {
  aspect-ratio: 1 / 1;
  border-radius: 0 !important;
}

.dashboard-quick-actions .card-body,
.quick-actions .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* Verslagen / Reports modal ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ wider & modern */
#verslagModal .modal-dialog,
#reportModal .modal-dialog,
.modal.modal-report .modal-dialog {
  max-width: 1200px;
}

#verslagModal .modal-content,
#reportModal .modal-content,
.modal.modal-report .modal-content {
  border-radius: 14px;
}

#verslagModal .modal-header,
#reportModal .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

#verslagModal .modal-body,
#reportModal .modal-body {
  padding: 1.5rem;
}

#verslagModal .modal-footer,
#reportModal .modal-footer {
  padding: 1rem 1.5rem;
}

/* Air between sections */
#verslagModal .section,
#reportModal .section {
  margin-bottom: 1.25rem;
}

/* Tables inside verslag modal */
#verslagModal table,
#reportModal table {
  margin-bottom: 0;
}

#verslagModal .row + .row,
#reportModal .row + .row {
  margin-top: 1rem;
}

/* Small muted inline icon (used in reports table date column) */
.muted-icon svg{
  width:16px;
  height:16px;
  vertical-align:-3px;
  margin-right:6px;
  opacity:.72;
}
/* Tactics undo/redo buttons are visible; their availability is controlled via disabled state in JS */
#tactics-undo, #tactics-redo{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#tactics-undo:disabled, #tactics-redo:disabled{
  opacity: .5;
  cursor: not-allowed;
}

/* Micro animations (Tabler-like) */
.btn, .card, .nav-link {
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Cards: no hover lift (looks jittery on touch + not needed) */
.card:hover { transform: none; }
.stat-card:hover{ transform:none; box-shadow:0 10px 24px rgba(15,23,42,.06); border-color: var(--border-subtle); }
body[data-theme="dark"] .stat-card:hover{ box-shadow:0 14px 30px rgba(0,0,0,.35); }

/* (Removed) Old keyframe-based animation that replayed on every re-render */

/* Dropdown backdrop (mobile) */
.dropdown-overlay{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(2,6,23,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index:1990;
}

/* Modal animation */
.modal.fade .modal-dialog {
  transform: translateY(12px) scale(.98);
  transition: transform .2s ease, opacity .2s ease;
}
.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Empty states */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--bs-secondary-color);
}
.empty-state .icon {
  font-size: 3rem;
  opacity: .4;
  margin-bottom: 1rem;
}
.empty-state h4 {
  font-weight: 600;
  margin-bottom: .25rem;
}
.empty-state p {
  font-size: .95rem;
}

/* Color & typography polish */
body {
  font-feature-settings: "cv02","cv03","cv04","cv11";
}

h1,h2,h3,h4,h5 {
  letter-spacing: -.01em;
}

/* Page titles */
.page-title{
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0 14px;
  display:flex;
  align-items:center;
  gap: 10px;
}
.page-title:before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background: linear-gradient(135deg, rgba(32,107,196,.95), rgba(29,78,216,.85));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

/* Make section titles feel a bit more like headings */
.section-title{
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Slightly richer card headers */
.card-title{
  font-size: 15px;
  font-weight: 700;
}
.card-subtitle{ line-height: 1.35; }

/* Form labels */
label{
  font-size: 12px;
  font-weight: 650;
  color: rgba(17,24,39,.70);
}
[data-bs-theme="dark"] label,
body[data-theme="dark"] label{ color: rgba(226,232,240,.78); }

/* File input: style the "Bestand" / choose file button */
input[type="file"]{
  padding: 6px;
}
input[type="file"]::file-selector-button{
  margin-right: 10px;
  border: 1px solid rgba(37,99,235,.22);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 650;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(32,107,196,.95), rgba(29,78,216,.92));
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  transition: transform .08s ease, box-shadow .15s ease, filter .15s ease;
}
input[type="file"]::file-selector-button:hover{
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
  transform: translateY(-0.5px);
  filter: brightness(1.02);
}
input[type="file"]::file-selector-button:active{
  transform: translateY(0);
}
/* Safari/WebKit fallback */
input[type="file"]::-webkit-file-upload-button{
  margin-right: 10px;
  border: 1px solid rgba(37,99,235,.22);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 650;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(32,107,196,.95), rgba(29,78,216,.92));
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

/* Table headings a bit clearer */
.table th{
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: 12px;
}

.text-muted {
  color: rgba(33,37,41,.55) !important;
}

[data-bs-theme="dark"] .text-muted {
  color: rgba(255,255,255,.55) !important;
}

/* Softer borders */
.card, .modal-content, .dropdown-menu {
  border-color: rgba(0,0,0,.06);
}
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu {
  border-color: rgba(255,255,255,.08);
}

/* Dashboard hero polish */
.dashboard-hero {
  padding: 2.5rem 2.5rem 2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13,110,253,.08), rgba(13,110,253,.02));
  margin-bottom: 2rem;
}
[data-bs-theme="dark"] .dashboard-hero {
  background: linear-gradient(135deg, rgba(13,110,253,.18), rgba(13,110,253,.04));
}
.dashboard-hero h1 {
  font-size: 2rem;
  margin-bottom: .25rem;
}
.dashboard-hero p {
  font-size: 1.05rem;
  opacity: .85;
}

/* Spacing between actions and tables */
.actions + table,
.actions + .table-responsive,
.btn-group + table,
.btn-group + .table-responsive {
  margin-top: 1rem;
}

.table + .btn,
.table-responsive + .btn,
.table + .btn-group,
.table-responsive + .btn-group {
  margin-top: 1rem;
}

/* General section spacing */
.section {
  margin-bottom: 1.5rem;
}

/* Hide sidebar collapse button on desktop */
@media (min-width: 768px) {
  .sidebar-collapse-btn { display: none !important; }
}

/* Fixed sidebar while scrolling */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Dark mode select fields text color */
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] option {
  color: #e6e9ef;
  background-color: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
}

/* Reset main/content margin-left (sidebar handled by layout, not spacing hack) */
main, .main, .page-content, #main {
  margin-left: 0 !important;
}

/* Final sidebar link sizing */
.sidebar .nav-link {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: .9rem 1.1rem;
  line-height: 1.8;
}

.sidebar .nav-link .ti {
  font-size: 2.3rem;
  margin-right: 1rem;
}

/* Mobile: ensure main content is not offset */
@media (max-width: 767.98px) {
  main, .main, .page-content, #main {
    margin-left: 0 !important;
    transform: none !important;
  }
}

/* HARD mobile reset: prevent sidebar offset on content */
@media (max-width: 767.98px) {
  body {
    overflow-x: hidden;
  }

  main, .main, .page-content, #main, .content, .container-fluid {
    margin-left: 0 !important;
    padding-left: 1rem !important;
    transform: none !important;
    left: 0 !important;
  }
  .offcanvas.show ~ main,
  .offcanvas.show ~ .main,
  .offcanvas.show ~ .page-content {
    margin-left: 0 !important;
    transform: none !important;
  }
}

}

  .sidebar.offcanvas:not(.show),
  .sidebar.offcanvas-start:not(.show),
  .sidebar.offcanvas-md:not(.show) {
    /* keep hidden state handled by bootstrap transforms; don't push with left */
    left: 0 !important;
  }
  .sidebar.offcanvas.show,
  .sidebar.offcanvas-start.show,
  .sidebar.offcanvas-md.show {
    visibility: visible !important;
    transform: none !important;
  }
}

/* Mobile sidebar offcanvas: Bootstrap-friendly (visible when .show, hidden via transform) */
@media (max-width: 767.98px) {
  .sidebar.offcanvas-start, .sidebar.offcanvas, .sidebar.offcanvas-md {
    width: var(--bs-offcanvas-width, 260px);
    z-index: 1045;
  }
}

.sidebar-link{ padding: 12px 12px !important; }

/* Mobile/tablet: layout should not reserve sidebar width (sidebar is offcanvas) */
@media (max-width: 992px){
  .layout{
    grid-template-columns: 1fr !important;
  }
  .main{
    grid-column: 1 / -1;
    margin-left: 0 !important;
    transform: none !important;
  }
}

/* Mobile: content must NOT be shifted; sidebar is overlay */
@media (max-width: 991px){
  .layout{
    grid-template-columns: 1fr !important;
  }
  .layout > .main,
  .layout > main.main,
  .layout > .page-content,
  .layout > .content-area{
    grid-column: 1 / -1;
    width: 100% !important;
    margin-left: 0 !important;
    transform: none !important;
  }
  .main, main.main, .page-content, .content-area, #main, .container, .container-fluid{
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
    transform: none !important;
    left: 0 !important;
  }

  /* Ensure sidebar overlays content (never reserves space) */
  .sidebar{
    position: fixed !important;
    left: 0 !important;
    top: 0; bottom: 0;
    z-index: 1050 !important;
  }
}

/* Dashboard quick actions: blue icon + text on all breakpoints (Tabler-ish) */
.dashboard-quick-actions .quick-action,
.dashboard-quick-actions a.card,
.quick-actions .quick-action,
.quick-actions a.card {
  color: var(--bs-primary) !important;
}
.dashboard-quick-actions .quick-action .ti,
.dashboard-quick-actions a.card .ti,
.quick-actions .quick-action .ti,
.quick-actions a.card .ti {
  color: var(--bs-primary) !important;
}

.qa-app-title{ color:#206bc4 !important; }
.qa-app-ico{ color:#206bc4 !important; }

#coachAddModal .modal-dialog{max-width:900px;}
#coachAddModal .modal-body{padding:1.5rem;}
#coachAddModal .modal-header{padding:1.25rem 1.5rem;}
#coachAddModal .modal-footer{padding:1rem 1.5rem;}

#coachModal .modal-dialog{max-width:900px;}

.modal-card.modal-wide{max-width:920px;}

.modal-card .form-control,.modal-card .form-select{min-height:2.25rem;padding:.4375rem .75rem;border-radius:.375rem;display:block;width:100%;}
.form-select{display:block;width:100%;}

/* Normalize modal input borders to Tabler default */
.modal-backdrop .form-control,
.modal-backdrop .form-select{
  border-width: 1px;
}


/* Mobile body subtle gradient (light theme) */
@media (max-width: 992px){
  body{
    background: linear-gradient(180deg, rgba(240,248,255,1) 0%, rgba(245,247,251,1) 40%, rgba(236,253,245,1) 100%);
  }
}


/* Dark mode: mobile header follows theme */
[data-theme="dark"] .mobile-header{
  background: rgba(15,23,42,0.85) !important;
  color: #f8fafc;
  border-bottom-color: rgba(148,163,184,.12) !important;
}
[data-theme="dark"] .mobile-header *{
  color: inherit;
}
[data-theme="dark"] .mobile-header .btn,
[data-theme="dark"] .mobile-header .btn.icon{
  color: #f8fafc;
}


/* Dark mode: ensure native inputs/selects render with light text */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] textarea{
  color: var(--text) !important;
  caret-color: var(--text);
  -webkit-text-fill-color: var(--text);
}

[data-theme="dark"] select option{
  background: var(--bg-card);
  color: var(--text);
}

/* Dark mode mobile/tablet keeps gradient (matches iOS app feel) */
@media (max-width: 992px){
  [data-theme="dark"] body{
    background: linear-gradient(180deg, rgba(8,12,22,1) 0%, rgba(15,23,42,1) 45%, rgba(16,18,24,1) 100%) !important;
  }
}

/* ---------------------------------------------------------
   Report modal: collapsible substitutions table
--------------------------------------------------------- */
.report-section-header-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.report-section-body.is-collapsed{ display:none; }

/* ---------------------------------------------------------
   Teams > Competitie: compact layout
--------------------------------------------------------- */
.standings-compact .form-group{margin-bottom:12px}
.standings-compact .form-group label{margin-bottom:6px}
.standings-compact input, .standings-compact .form-control, .standings-compact .form-select{padding:10px 12px}
.standings-compact table.table.small td input,
.standings-compact table.table.small td .form-control{
  padding:6px 8px;
  height:auto;
}


/* ===== Training module ===== */
.training-grid{display:grid;grid-template-columns:320px 1fr;gap:16px;align-items:start}

/* New training layout (list full width; editor full width when opened) */
.training-page{display:flex;flex-direction:column;gap:16px}
.training-editor-full{width:100%}
.training-panel{border:1px solid var(--border);border-radius:16px;overflow:hidden;background:var(--card)}
.panel-head{padding:12px 14px;border-bottom:1px solid var(--border)}
.panel-title{font-weight:700}
.panel-sub{font-size:12px;opacity:.75;margin-top:2px}
.panel-list{padding:10px;display:flex;flex-direction:column;gap:8px}
.list-item{width:100%;text-align:left;padding:10px 12px;border:1px solid var(--border);border-radius:14px;background:var(--bg);cursor:pointer}
.list-item.active{border-color:var(--accent);box-shadow:0 0 0 2px rgba(34,197,94,.15)}
.li-title{font-weight:700;color:var(--primary)}
.li-sub{font-size: 14px;opacity:.75;margin-top:2px;margin-bottom: 8px;}
.archive-box{margin-top:10px}
.archive-box summary{cursor:pointer;font-weight:700;opacity:.8}
.training-editor{border:1px solid var(--border);border-radius:16px;background:var(--card);padding:12px}
.training-editor-head{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
.training-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:end}
.training-meta .meta{display:flex;flex-direction:column;gap:6px;font-size:12px;opacity:.85}
.training-tools{flex-wrap:wrap;gap:10px;margin:10px 0}
.tool-group{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px;border:1px dashed var(--border);border-radius:14px}
.tool-label{font-size:12px;opacity:.75;font-weight:700;margin-right:4px}
.training-board-wrap{margin-top:6px}
.training-board{position:relative;width:100%;aspect-ratio:5/4; min-height:520px;border-radius:22px;overflow:hidden;border:1px solid var(--border);background:#3aa25b;touch-action:none}
.training-pitch{position:absolute;inset:0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 20px, rgba(255,255,255,0) 20px 40px),
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.16), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(0,0,0,0.06));
}
.training-pitch:before{content:"";position:absolute;inset:10px;border:2px solid rgba(255,255,255,0.85);border-radius:18px;opacity:.95}
.training-pitch:after{content:"";position:absolute;inset:10px;
  background:
    /* center line */
    linear-gradient(90deg, rgba(255,255,255,0.85), rgba(255,255,255,0.85)) 50% 0/2px 100% no-repeat,
    /* center circle */
    radial-gradient(circle at 50% 50%, transparent 0 48px, rgba(255,255,255,0.85) 48px 50px, transparent 50px),
    /* penalty boxes */
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)) 10px 35%/90px 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)) 10px 65%/90px 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)) calc(100% - 10px) 35%/90px 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)) calc(100% - 10px) 65%/90px 2px no-repeat;
  opacity:.9
}
.training-canvas{position:absolute;inset:0;pointer-events:none}
.training-item{position:absolute;width:30px;height:30px;transform:translate(-50%,-50%);
  border-radius:16px;
  background:transparent;
  box-shadow:0 10px 28px rgba(0,0,0,0.18);
}
/* legacy icon backgrounds off (we render inline SVG now) */
.training-item:before{content:none}
.training-item .ti-num{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-weight:900;font-size:12px;letter-spacing:-0.2px;color:#0f172a;text-shadow:0 1px 0 rgba(255,255,255,0.6)}
.training-item.ti-shirt .ti-num{font-size:12px}

/* Player shirt (no name) */
.training-item.ti-shirt{border-radius:999px;background:transparent}
.training-item.ti-shirt:before{content:none}

/* Cone */
.training-item.ti-cone{background:transparent}
.training-item.ti-cone:before{content:none}

/* Ball */
.training-item.ti-ball{background:transparent}
.training-item.ti-ball:before{content:none}

/* Goals ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ bigger, net look */
.training-item.ti-goal_small,.training-item.ti-goal_big{background:transparent}
.training-item.ti-goal_small{width:42px;height:28px;border-radius:18px}
.training-item.ti-goal_big{width:58px;height:38px;border-radius:22px}
.training-item.ti-goal_small:before,.training-item.ti-goal_big:before{content:none}
.training-equip{margin-top:12px}
.equip-title{font-weight:700;margin-bottom:8px}
.equip-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
/* Inline layout for benodigdheden inside the editor */
.equip-grid.equip-grid-inline{display:flex;flex-wrap:wrap;gap:10px}
.equip-grid.equip-grid-inline .equip-chip{flex:0 0 auto;min-width:200px}
.equip-grid-inline{display:flex;flex-wrap:wrap;gap:10px}
.equip-grid-inline .equip-chip{flex:0 0 auto}
.equip-chip{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:14px;background:transparent;box-shadow:none;font-size:13px}
.equip-ico{display:inline-flex;width:44px;height:44px;align-items:center;justify-content:center;background:transparent;border:none;border-radius:0;}
.equip-ico svg{width:40px;height:40px;display:block}

/* Equipment sprite icons */
.equip-ico{background-image:url("../assets/training-req-icons.png");background-repeat:no-repeat;background-size:533px 109px;}
.equip-ico.equip-ico-ball{background-position: 10px 10px;}
.equip-ico.equip-ico-cone{background-position: -106px 10px;}
.equip-ico.equip-ico-goal{background-position: -222px 10px;}
.equip-ico.equip-ico-shirt{background-position: -338px 10px;}
.equip-label{opacity:.85;font-weight:700;flex:1}
.equip-val{font-weight:900}
.equip-shirt .equip-ico{background:rgba(219,234,254,0.8)}
.equip-cone .equip-ico{background:rgba(255,237,213,0.85)}
.equip-ball .equip-ico{background:rgba(224,231,255,0.85)}
.equip-goal-small .equip-ico,.equip-goal-big .equip-ico{background:rgba(204,251,241,0.85)}


.training-steps{margin-top:12px;padding:12px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);-webkit-backdrop-filter: blur(10px);box-shadow:0 10px 26px rgba(0,0,0,0.06)}
.steps-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:8px}
.steps-title{font-weight:800}
.steps-sub{font-size:12px;opacity:.7}
.steps-list{margin:10px 0 0 18px;line-height:1.4}

@media (max-width: 420px){
  .equip-grid{grid-template-columns:1fr}
}
@media (max-width: 992px){
  .training-grid{grid-template-columns:1fr}
  .training-panel{order:2}
  .training-editor{order:1}
}
@media (max-width: 992px){
  /* Keep pitch proportions stable on mobile/tablet */
  .training-board{height:auto;aspect-ratio:5/4;min-height:0;}
}


/* ===== Training UI upgrades (HOTFIX44) ===== */
.training-board-split{display:grid;grid-template-columns:1fr 320px;gap:12px;align-items:start}
@media (max-width: 860px){.training-board-split{grid-template-columns:1fr;}}
.training-board-compact{height:auto;aspect-ratio:5/4}

@media (max-width: 992px){
  .training-board.rotated{
    transform: rotate(90deg);
    transform-origin: center center;
  }
  .training-board-col.rotated-wrap{display:flex;justify-content:center;align-items:center;}
}

/* Optional rotate helper for smaller screens */
@media (max-width: 992px){
  .training-board.rotated{ transform: rotate(90deg); transform-origin: center; }
  .training-board-wrap.rotate-mode{ padding-top: 8px; }
}
.training-pitch-light{background:linear-gradient(135deg,#3ad07d 0%,#1f8a4d 60%,#1a6e3d 100%);}
.training-trash{margin-top:10px;padding:10px 12px;border-radius:14px;border:1px dashed rgba(255,255,255,0.55);background:rgba(15,23,42,0.22);color:rgba(255,255,255,0.92);font-weight:700;font-size:13px;text-align:center}
.training-trash:hover{background:rgba(15,23,42,0.28)}
.training-item{width:auto;height:auto;background:transparent;border-radius:0}
.training-item:before{display:none!important}
.training-item .ti-svg{display:block;width:34px;height:34px}
.training-item.selected .ti-svg{filter:drop-shadow(0 6px 10px rgba(0,0,0,0.35)) drop-shadow(0 0 0 rgba(255,255,255,0.9))}
.goal-rot{display:flex;align-items:center;gap:8px;margin-left:6px;}
.goal-rot-label{font-size:12px;opacity:.8;font-weight:700;margin-right:2px;}
.range.small{width:140px}
.training-item .ti-svg.ti-cone-small{width:26px;height:26px}
.training-item .ti-svg.ti-cone-big{width:30px;height:30px}
.training-item .ti-shirt{width:40px;height:36px}
.training-item .ti-goal{width:58px;height:38px}
.training-item.ti-goal_small .ti-goal{width:52px;height:32px}
.training-item .ti-step{width:30px;height:30px}
.training-palette-item{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:rgba(255,255,255,0.6);font-weight:800;font-size:12px;cursor:grab;user-select:none}
body.dark .training-palette-item{background:rgba(255,255,255,0.08);color:rgba(255,255,255,0.9)}
.training-steps-panel{border:1px solid var(--border);border-radius:16px;padding:12px;background:rgba(255,255,255,0.55);backdrop-filter:blur(10px)}
body.dark .training-steps-panel{background:rgba(15,23,42,0.35)}
.steps-panel-head{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}
.steps-panel-head .steps-title{font-weight:900}
.steps-panel-head .steps-sub{font-size:12px;opacity:.8}
.step-row{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.step-badge{width:26px;height:26px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.95);border:1px solid rgba(0,0,0,0.12);font-weight:900}
body.dark .step-badge{background:rgba(255,255,255,0.12);border-color:rgba(255,255,255,0.18);color:rgba(255,255,255,0.92)}
.step-input{flex:1}
.steps-desc{margin-top:10px;padding-top:10px;border-top:1px solid rgba(0,0,0,0.08)}
body.dark .steps-desc{border-top-color:rgba(255,255,255,0.12)}
.steps-desc-title{font-size:12px;font-weight:800;opacity:.85;margin-bottom:6px}
.textarea{width:100%;min-height:90px;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:rgba(255,255,255,0.75)}
body.dark .textarea{background:rgba(15,23,42,0.22);color:rgba(255,255,255,0.92)}
.steps-desc{margin-top:12px}
.steps-desc-title{font-weight:800;margin-bottom:6px}
.steps-desc .textarea{width:100%;}
.steps-desc{margin-top:12px;padding-top:10px;border-top:1px dashed rgba(15,23,42,0.18)}
body.dark .steps-desc{border-top-color:rgba(255,255,255,0.18)}
.steps-desc-title{font-weight:800;margin-bottom:8px;font-size:13px;opacity:.9}
.textarea{width:100%;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:var(--bg);color:inherit;font:inherit;resize:vertical}
.training-equip .equip-ico{width:22px;height:22px;display:inline-block}


.need-mini{display:flex;flex-wrap: wrap;gap:6px;font-size:12px;opacity:.95;max-width:100%;justify-content:center;}
/* Light mode: readable chips (dark text). Dark mode: glassy dark chips (light text). */
.need-mini .n{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid rgba(2,6,23,0.10);border-radius:999px;background:rgba(255,255,255,0.74);color:rgba(2,6,23,0.88);white-space:normal;word-break:break-word;max-width:100%}
[data-theme="dark"] .need-mini .n,
.dark .need-mini .n{border-color:rgba(255,255,255,0.14);background:rgba(2,6,23,0.42);color:rgba(255,255,255,0.92)}
.table .active-row{background:rgba(34,197,94,0.08)}
.tr-actions{white-space:nowrap}
.row-link{font-weight:700;text-decoration:none;color:inherit}
.row-link:hover{text-decoration:underline}

.training-item .ti-ball{width:24px;height:24px}

.mini-ico{width:18px;height:18px;display:block}
.need-mini .n{display:inline-flex;align-items:center;gap:6px}
.need-mini .n b{font-weight:900}


/* Multi-select dropdown (training categories) */
.msel{position:relative;display:inline-block;min-width:160px}
.msel-btn{max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msel-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:40;background: #fff!important;border:1px solid var(--border);border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,0.15);padding:10px;min-width:220px;display:none}
.msel-pop.open{display: flex;}
.msel-opt{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:12px;cursor:pointer;user-select:none}
.msel-opt:hover{background:rgba(2,6,23,0.05)}
.msel-opt input{width:16px;height:16px}


/* --- Mobile iOS-style bottom app menu (WhatsApp-like) --- */
.mobile-tabbar,
.mobile-user-fab,
.mobile-quick-fab,
.mobile-sheet-backdrop{ display:none; }

@media (max-width: 1200px){
  /* Mobile/tablet background: Netlyzer UI (PSD) inspired. Keep MK blue as primary. */
  body{
    background:
      radial-gradient(1200px 800px at 20% -10%, rgba(13,110,253,0.14), transparent 60%),
      radial-gradient(900px 700px at 110% 10%, rgba(13,110,253,0.10), transparent 55%),
      linear-gradient(180deg, #ffffff 0%, #f4f6fb 100%);
  }
  body[data-theme="dark"],
  [data-theme="dark"],
  .dark{
    background:
      radial-gradient(1100px 800px at 20% -10%, rgba(13,110,253,0.18), transparent 62%),
      radial-gradient(900px 700px at 110% 10%, rgba(13,110,253,0.12), transparent 58%),
      linear-gradient(180deg, #05060a 0%, #0b0d14 100%);
  }

  /* Let the gradient read through the app layout surface. */
  .layout{ background: transparent !important; }

/* Mobile cards like PSD: softer + larger radius */
.card{
  border-radius: var(--radius-card); background: rgba(255,255,255,0.78) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(2,6,23,0.06);
}
[data-theme="dark"] .card,
.dark .card{
  background: rgba(17,19,28,0.72) !important;
  border-color: rgba(255,255,255,0.10) !important;
  box-shadow: 0 16px 44px rgba(0,0,0,0.55);
}

  /* Desktop sidebar remains for large screens; on mobile/tablet we use the bottom bar */
  .sidebar, .sidebar-overlay, .mobile-header{ display:none !important; }

  /* Ensure content isn't hidden behind the persistent tabbar */
  .main{
    /* leave room for tabbar + safe areas (also avoid top content under the status bar) */
    padding-top: calc(8px + env(safe-area-inset-top)) !important;
    padding-bottom: calc(74px + env(safe-area-inset-bottom)) !important;
  }

  .mobile-tabbar{
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: 10px!important;
    z-index: 60;
    display: flex;
    gap: 2px;
    padding: 8px 8px;
    width: 96%;
    margin-right: 20px!important;
    margin-left: 0px!important;
    border-radius: 90px;
    background: rgb(255 255 255 / 87%);
    border: 1px solid rgba(0,0,0,0.08);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
  }

  /* iOS 26-ish: floating glass pill + moving active background */
  .mobile-tabbar.mobile-tabbar-ios26{
    padding: 8px;
    gap: 0;
    overflow: hidden;
    background: rgba(255,255,255,0.72);
    border-color: rgba(0,0,0,0.10);
    box-shadow:
      0 18px 48px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.60);
    -webkit-backdrop-filter: blur(26px) saturate(200%);
    backdrop-filter: blur(26px) saturate(200%);
  }
  .mobile-tabbar.mobile-tabbar-ios26::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    border-radius: 90px;
    /* iOS-like glass highlight */
    background:
      radial-gradient(120% 180% at 20% 10%, rgba(255,255,255,0.80), rgba(255,255,255,0.00) 55%),
      linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.10));
    opacity: .55;
    mix-blend-mode: overlay;
  }
  [data-theme="dark"] .mobile-tabbar.mobile-tabbar-ios26,
  .dark .mobile-tabbar.mobile-tabbar-ios26{
    background: rgba(15,17,24,0.28);
    border-color: rgba(255,255,255,0.10);
    box-shadow:
      0 22px 60px rgba(0,0,0,0.60),
      inset 0 1px 0 rgba(255,255,255,0.08);
    -webkit-backdrop-filter: blur(28px) saturate(220%);
    backdrop-filter: blur(28px) saturate(220%);
  }
  [data-theme="dark"] .mobile-tabbar.mobile-tabbar-ios26::before,
  .dark .mobile-tabbar.mobile-tabbar-ios26::before{
    background:
      radial-gradient(120% 180% at 20% 10%, rgba(255,255,255,0.22), rgba(255,255,255,0.00) 60%),
      linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
    opacity: .65;
    mix-blend-mode: screen;
  }
  .mobile-tabbar.mobile-tabbar-ios26 .mobile-tabbar-indicator{
    position: absolute;
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
    width: calc((100% - 12px) / var(--tabs, 5));
    transform: translateX(calc(var(--active, 2) * 100%));
    border-radius: 22px;
    background: rgba(13,110,253,0.12);
    border: 1px solid rgba(13,110,253,0.16);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transition: transform 420ms cubic-bezier(.16,1,.3,1), background 260ms ease, border-color 260ms ease; will-change: transform;
    pointer-events: none;
  }
  [data-theme="dark"] .mobile-tabbar.mobile-tabbar-ios26 .mobile-tabbar-indicator,
  .dark .mobile-tabbar.mobile-tabbar-ios26 .mobile-tabbar-indicator{
    background: rgba(13,110,253,0.18);
    border-color: rgba(13,110,253,0.20);
  }

  /* WhatsApp-like 'Meer' sheet styling */
  .mobile-sheet-backdrop{ display:block; }
  .mobile-sheet{padding-bottom: calc(10px + env(safe-area-inset-bottom));}
  .mobile-sheet-title{ font-weight:600; font-size:15px; margin-bottom:8px; }
  .mobile-sheet-list{ background: rgba(255,255,255,0.42); border:1px solid rgba(0,0,0,0.08); border-radius: 18px; overflow:hidden; }
  [data-theme="dark"] .mobile-sheet-list,
  .dark .mobile-sheet-list{ background: rgba(7,9,12,0.34); border-color: rgba(255,255,255,0.06); }
  .mobile-sheet-item{width:100%;border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;padding:14px 14px;font-size: 16px;color:inherit;}
  .mobile-sheet-item + .mobile-sheet-item{ border-top: 1px solid rgba(0,0,0,0.07); }
  [data-theme="dark"] .mobile-sheet-item + .mobile-sheet-item,
  .dark .mobile-sheet-item + .mobile-sheet-item{ border-top-color: rgba(255,255,255,0.07); }
  .mobile-sheet-item .l{ display:flex; align-items:center; gap:10px; }
  .mobile-sheet-item .l svg{width: 32px;height: 32px; color: var(--primary);}
  .mobile-sheet-item .chev{ font-size:20px; opacity:.45; }
  [data-theme="dark"] .mobile-tabbar,
  .dark .mobile-tabbar{
    background: rgba(15,17,24,0.32);
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 18px 48px rgba(0,0,0,0.55);
  }

  .mobile-tab{color: rgba(2,6,23,0.88); position: relative; z-index: 1;}

.mobile-tab{
    flex: 1;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px 6px;
    color: currentColor;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 18px;
    -webkit-tap-highlight-color: transparent;
  }
  /* iOS-like tabbar: icons only (no labels) */
  .mobile-tabbar-ios26 .mobile-tab .label{display:none;}
  .mobile-tabbar-ios26 .mobile-tab.active .label{opacity:1;}

  /* Netlyzer-style outline icons */
  .mobile-tab .icon{ opacity: .72; }
  .mobile-tab .icon svg{
    width: 28px;
    height: 28px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
  }

  .mobile-tab.active{
    color: var(--primary);
    background: transparent;
  }

  .mobile-tabbar-ios26 .mobile-tab{
    padding: 10px 6px;
    border-radius: 22px;
  }

  .mobile-tabbar-ios26 .mobile-tab::after{
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0;
  }
  .mobile-tabbar-ios26 .mobile-tab.active::after{ opacity: .9; }

  /* Mobile floating actions (user + notifications) */
  .mobile-fabs{
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    right: 12px;
    display: flex;
    gap: 10px;
    z-index: 220;
  }
  .mobile-fab{
    width: 52px;
    height: 52px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.58);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 12px 34px rgba(15,23,42,0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  [data-theme="dark"] .mobile-fab{ background: rgba(15,23,42,0.45); border-color: rgba(255,255,255,0.10); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
  .mobile-fab .btn-ico,
  .mobile-fab svg{ width: 24px; height: 24px; }
  .mobile-fab-badge{
    position:absolute;
    top: 6px;
    right: 6px;
    min-width:18px;
    height:18px;
    padding:0 5px;
    border-radius:999px;
    background: var(--danger);
    color:#fff;
    font-size:11px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    line-height:1;
  }

  /* Mobile dropdown panels (notif/user) with same timing as "Meer" */
  .mobile-dd-backdrop{position:fixed; inset:0; z-index:210; background:transparent; }
  .mobile-dd-panel{
    position: fixed;
    top: calc(env(safe-area-inset-top) + 70px);
    right: 12px;
    width: min(320px, calc(100vw - 24px));
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(255,255,255,.92);
    box-shadow: 0 18px 48px rgba(15,23,42,.18);
    overflow: hidden;
  }
  [data-theme="dark"] .mobile-dd-panel{ background: rgba(15,23,42,.96); border-color: rgba(148,163,184,.14); box-shadow: 0 22px 60px rgba(0,0,0,.45); }

  /* Mobile user dropdown header (avatar + online badge) */
  .mobile-user-head{
    display:flex;
    align-items:center;
    gap:12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148,163,184,.22);
  }
  [data-theme="dark"] .mobile-user-head{ border-bottom-color: rgba(148,163,184,.14); }

  .mobile-user-avatar{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    display:flex;
    align-items:center;
    justify-content:center;
    background: rgba(148,163,184,.18);
    color: rgba(15,23,42,.85);
    font-weight: 700;
    flex: 0 0 auto;
  }
  [data-theme="dark"] .mobile-user-avatar{ background: rgba(148,163,184,.14); color: rgba(255,255,255,.9); }
  .mobile-user-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
  .mobile-user-avatar .initials{ font-size: 14px; letter-spacing: .5px; }

  .mobile-user-avatar .online-dot{
    position:absolute;
    right: 2px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #22c55e;
    border: 2px solid rgba(255,255,255,.92);
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
  }
  [data-theme="dark"] .mobile-user-avatar .online-dot{ border-color: rgba(15,23,42,.96); }
  .mobile-user-avatar .online-dot.offline{ background: rgba(148,163,184,.8); }

  .mobile-user-meta{ min-width:0; }
  .mobile-user-name{
    font-size: 16px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-user-role{
    margin-top: 2px;
    font-size: 13px;
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Slightly larger menu text on mobile user dropdown */
  .mobile-dd-panel .dropdown-item{ font-size: 16px; }
  .mobile-tab.active .icon{ opacity: 1; color: var(--primary); }

  /* Dark mode: inactive icons should read closer to white */
  body[data-theme="dark"] .mobile-tab,
  [data-theme="dark"] .mobile-tab,
  .dark .mobile-tab{color: rgba(255,255,255,0.84)!important;}
  body[data-theme="dark"] .mobile-tab.active,
  [data-theme="dark"] .mobile-tab.active,
  .dark .mobile-tab.active{ background: rgba(13,110,253,0.16); }
  body[data-theme="dark"] .mobile-tab .icon,
  [data-theme="dark"] .mobile-tab .icon,
  .dark .mobile-tab .icon{opacity: .92;}


  /* Floating user avatar (top-right) */
  .mobile-user-fab{
    display: block;
    position: fixed;
    top: calc(10px + env(safe-area-inset-top));
    right: 12px;
    z-index: 70;
  }
  .mobile-user-btn{
    width: 52px;
    height: 52px;
    border-radius: 999px;
    /* subtle ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œliquid glassÃƒÂ¢Ã¢â€šÂ¬Ã‚Â ring */
    border: 1px solid rgba(255,255,255,0.46);
    background: rgba(255,255,255,0.78);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(2,6,23,0.14), inset 0 0 0 1px rgba(255,255,255,0.22);
  }
  .mobile-user-btn::before{
    content:'';
    position:absolute;
    inset:0;
    border-radius:999px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.55), rgba(255,255,255,0) 55%);
    pointer-events:none;
    opacity:.55;
  }
  [data-theme="dark"] .mobile-user-btn,
  .dark .mobile-user-btn{
    border-color: rgba(255,255,255,0.12);
    background: rgba(16,18,24,0.58);
    box-shadow: 0 10px 24px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
  }
  .mobile-user-btn img{ width: 100%; height: 100%; object-fit: cover; }
  .mobile-user-btn .initials{ font-weight: 800; font-size: 13px; color: var(--text-main); }
  [data-theme="dark"] .mobile-user-btn .initials,
  .dark .mobile-user-btn .initials{ color: #e5e7eb; }

  .mobile-user-menu{
    position: absolute;
    top: 74px;
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }

  /* Floating quick actions (+) - bottom-right above the tab bar */
  .mobile-quick-fab{
    display: block;
    position: fixed;
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    z-index: 70;
  }
  .quick-fab-btn{
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.46);
    background: rgba(255,255,255,0.78);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(2,6,23,0.18), inset 0 0 0 1px rgba(255,255,255,0.22);
    -webkit-tap-highlight-color: transparent;
  }
  .quick-fab-btn svg{ width: 26px; height: 26px; }
  [data-theme="dark"] .quick-fab-btn,
  .dark .quick-fab-btn{
    border-color: rgba(255,255,255,0.12);
    background: rgba(16,18,24,0.58);
    box-shadow: 0 12px 28px rgba(0,0,0,0.42), inset 0 0 0 1px rgba(255,255,255,0.08);
  }

  /* Pull-to-refresh indicator */
  .ptr{
    position: fixed;
    left: 0;
    right: 0;
    top: calc(env(safe-area-inset-top));
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(calc(-1 * (22px)));
    transition: opacity .18s ease, transform .18s ease;
    z-index: 80;
    --ptr: 0px;
  }
  .ptr.active{
    opacity: 1;
    transform: translateY(0);
  }
  .ptr .ptr-label{ font-size: 13px; font-weight: 700; opacity: .88; }
  .ptr .ptr-spinner{
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(2,6,23,0.18);
    border-top-color: rgba(2,6,23,0.65);
    animation: ptrspin .8s linear infinite;
  }
  [data-theme="dark"] .ptr .ptr-spinner,
  .dark .ptr .ptr-spinner{ border-color: rgba(255,255,255,0.16); border-top-color: rgba(255,255,255,0.7); }
  @keyframes ptrspin{ to { transform: rotate(360deg); } }
  [data-theme="dark"] .mobile-user-menu,
  .dark .mobile-user-menu{
    background: #0f172a;
    border-color: rgba(255,255,255,0.08);
  }
  .mobile-user-item{
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 12px 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
  }
  .mobile-user-item:hover{ background: rgba(0,0,0,0.04); }
  [data-theme="dark"] .mobile-user-item:hover,
  .dark .mobile-user-item:hover{ background: rgba(255,255,255,0.06); }
  .mobile-user-divider{ height: 1px; background: rgba(0,0,0,0.08); }
  [data-theme="dark"] .mobile-user-divider,
  .dark .mobile-user-divider{ background: rgba(255,255,255,0.07); }

  .mobile-user-theme{
    display:flex;
    align-items:center;
    justify-content: space-between;
    padding: 12px;
    font-weight: 600;
    gap: 10px;
    font-size: 14px;
  }
  .mobile-user-theme input{ display:none; }
  .mobile-switch{
    width: 44px; height: 26px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    position: relative;
    flex: 0 0 auto;
  }
  .mobile-switch::after{
    content:'';
    position:absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 999px;
    background: #fff;
    transition: transform .18s ease;
  }
  #mobile-theme-toggle:checked + .mobile-switch{ background: var(--primary); }
  #mobile-theme-toggle:checked + .mobile-switch::after{ transform: translateX(18px); }

  /* More sheet */
  .mobile-sheet-backdrop{
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(0,0,0,0.25);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* a bit higher so the "Meer" menu fits without scrolling */
    padding: 10px 10px calc(24px + env(safe-area-inset-bottom));
    animation: mobileBackdropIn .18s cubic-bezier(.16,1,.3,1) both;
  }
  .mobile-sheet{
    width: min(520px, 100%);
    background: rgba(255,255,255,0.78);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.10);
    box-shadow: var(--shadow-soft);
    padding: 10px;
    transform: translateY(18px);
    animation: mobileSheetUp .34s cubic-bezier(.16,1,.3,1) both;
  }
  [data-theme="dark"] .mobile-sheet,
  .dark .mobile-sheet{
    background: rgba(7,9,12,0.78);
    border-color: rgba(255,255,255,0.10);
  }

  @keyframes mobileBackdropIn{ from {opacity:0} to {opacity:1} }
  @keyframes mobileBackdropOut{ from {opacity:1} to {opacity:0} }
  @keyframes mobileSheetUp{ from { transform: translateY(44px) scale(.98); opacity:.65 } to { transform: translateY(0) scale(1); opacity:1 } }
  @keyframes mobileSheetDown{ from { transform: translateY(0) scale(1); opacity:1 } to { transform: translateY(44px) scale(.98); opacity:0 } }

  .mobile-sheet-backdrop.closing{ animation: mobileBackdropOut .18s cubic-bezier(.4,0,.2,1) both; }
  .mobile-sheet-backdrop.closing .mobile-sheet{ animation: mobileSheetDown .20s cubic-bezier(.4,0,.2,1) both; }
  .mobile-sheet-handle{
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    margin: 4px auto 8px;
  }
  [data-theme="dark"] .mobile-sheet-handle,
  .dark .mobile-sheet-handle{ background: rgba(255,255,255,0.18); }
  .mobile-sheet-title{
    font-weight: 600;
    padding: 4px 8px 10px;
  }

  /* iOS modern settings menu (used for the Mobile "Meer" sheet) */
  .ios-modern-settings__sheet{background:transparent;border:0;box-shadow:none;padding:0;width: 100%;} 
  .ios-modern-settings__container {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
    max-width: none;
    width: 100%;
    /* Let the sheet size itself to content, but stay within the viewport */
    height: auto;
    max-height: calc(var(--vvh, 100vh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 140px);
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    scrollbar-width: none; /* Firefox */
  }
  [data-theme="dark"] .ios-modern-settings__container,
  .dark .ios-modern-settings__container{
    background-color: rgba(7, 9, 12, 0.82);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  }

  .ios-modern-settings__container::-webkit-scrollbar { display: none; }

  .ios-modern-settings__header {
    font-size: 21px;
    font-weight: 600;
    color: #000000;
    margin: 6px 0 10px 10px;
    letter-spacing: -0.4px;
  }
  [data-theme="dark"] .ios-modern-settings__header,
  .dark .ios-modern-settings__header{ color: rgba(255,255,255,0.92); }

  .ios-modern-settings__card {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    text-align: left;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 3px 0;
    cursor: pointer;
    transition:
      transform 0.25s cubic-bezier(0.28, 0.11, 0.32, 1),
      background-color 0.25s ease,
      box-shadow 0.25s ease;
    opacity: 0;
    transform: translateY(12px);
    animation: ios-modern-settings__fadeInUp 0.35s cubic-bezier(0.28, 0.11, 0.32, 1) forwards;
  }
  [data-theme="dark"] .ios-modern-settings__card,
  .dark .ios-modern-settings__card{ background-color: rgba(255,255,255,0.06); }

  .ios-modern-settings__card:hover {
    background-color: #f7f7f8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }
  [data-theme="dark"] .ios-modern-settings__card:hover,
  .dark .ios-modern-settings__card:hover{ background-color: rgba(255,255,255,0.10); }

  .ios-modern-settings__card:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
  }

  .ios-modern-settings__icon {
    width: 30px;
    height: 30px;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    transition: transform 0.25s cubic-bezier(0.28, 0.11, 0.32, 1);
  }
  .ios-modern-settings__card:hover .ios-modern-settings__icon { transform: scale(1.05); }
  .ios-modern-settings__icon svg { width: 22px; height: 22px; }

  .ios-modern-settings__content { flex: 1; min-width:0; }
  .ios-modern-settings__title {
    font-size: 17px;
    font-weight: 500;
    color: #000000;
    margin: 0;
    letter-spacing: -0.3px;
  }
  [data-theme="dark"] .ios-modern-settings__title,
  .dark .ios-modern-settings__title{ color: rgba(255,255,255,0.92); }

  .ios-modern-settings__description {
    font-size: 12.5px;
    color: #6b7280;
    margin: 2px 0 0;
    line-height: 1.3;
  }
  [data-theme="dark"] .ios-modern-settings__description,
  .dark .ios-modern-settings__description{ color: rgba(226,232,240,0.70); }

  /* Compact quick actions grid inside the "Meer" sheet */
  .ios-modern-settings__section-label{
    margin: 10px 0 6px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(15,23,42,0.55);
  }
  [data-theme="dark"] .ios-modern-settings__section-label,
  .dark .ios-modern-settings__section-label{ color: rgba(226,232,240,0.55); }

  .ios-modern-settings__quickgrid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 8px;
    padding: 0 2px;
  }
  .ios-modern-settings__quick{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    border:0;
    text-align:left;
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  }
  [data-theme="dark"] .ios-modern-settings__quick,
  .dark .ios-modern-settings__quick{ background: rgba(255,255,255,0.06); }
  .ios-modern-settings__quick:active{ transform: scale(0.98); }
  .ios-modern-settings__quick .q-ico{ width: 30px; height: 30px; border-radius: 10px; display:flex; align-items:center; justify-content:center; }
  .ios-modern-settings__quick .q-ico svg{ width: 18px; height: 18px; }
  .ios-modern-settings__quick .q-title{ font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }
  [data-theme="dark"] .ios-modern-settings__quick .q-title,
  .dark .ios-modern-settings__quick .q-title{ color: rgba(255,255,255,0.92); }

  .ios-modern-settings__card:nth-child(2) { animation-delay: 0.05s; }
  .ios-modern-settings__card:nth-child(3) { animation-delay: 0.1s; }
  .ios-modern-settings__card:nth-child(4) { animation-delay: 0.15s; }
  .ios-modern-settings__card:nth-child(5) { animation-delay: 0.2s; }
  .ios-modern-settings__card:nth-child(6) { animation-delay: 0.25s; }
  .ios-modern-settings__card:nth-child(7) { animation-delay: 0.3s; }

  @keyframes ios-modern-settings__fadeInUp {
    to { opacity: 1; transform: translateY(0); }
  }
  .mobile-sheet-list{ display:flex; flex-direction: column; gap: 6px; }
  .mobile-sheet-item{
    border: 0;
    background: rgba(0,0,0,0.04);
    border-radius: 14px;
    padding: 12px 12px;
    display:flex;
    align-items:center;
    gap: 10px;
    font-weight: 700;
    cursor:pointer;
  }
  .mobile-sheet-item svg{ width: 20px; height: 20px; }
  [data-theme="dark"] .mobile-sheet-item,
  .dark .mobile-sheet-item{ background: rgba(255,255,255,0.06); }
}


/* Mobile table overflow fix */
@media (max-width: 1200px){
  /* Don't force horizontal scrolling on entire cards; convert tables to mobile "cards" instead. */
  .card{overflow: scroll;width: 100%;}
  .table-responsive{overflow: visible;}
  .table-responsive > table{min-width: 0;}
}

/* --- Mobile: tables -> stacked cards (readable lists) --- */
@media (max-width: 1200px){
  table.table.responsive-cards{ width: 100%; border-collapse: separate; border-spacing: 0 10px; }
  table.table.responsive-cards thead{ display:none; }
  table.table.responsive-cards tbody,
  table.table.responsive-cards tr,
  table.table.responsive-cards td{ display:block; width:100%; }
  table.table.responsive-cards tr{
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 18px;
    padding: 10px 12px;
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 10px 30px rgba(2,6,23,0.06);
  }
  [data-theme="dark"] table.table.responsive-cards tr,
  .dark table.table.responsive-cards tr{
    background: rgba(7,9,12,0.56);
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 16px 44px rgba(0,0,0,0.55);
  }
  table.table.responsive-cards td{
    padding: 8px 0;
    border: 0 !important;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 14px;
  }
  table.table.responsive-cards td + td{ border-top: 1px solid rgba(0,0,0,0.06) !important; }
  [data-theme="dark"] table.table.responsive-cards td + td,
  .dark table.table.responsive-cards td + td{ border-top-color: rgba(255,255,255,0.07) !important; }
  table.table.responsive-cards td::before{
    content: attr(data-label);
    font-weight: 700;
    font-size: 12px;
    color: rgba(15,23,42,0.58);
    flex: 0 0 auto;
    min-width: 112px;
    max-width: 44%;
  }
  [data-theme="dark"] table.table.responsive-cards td::before,
  .dark table.table.responsive-cards td::before{ color: rgba(226,232,240,0.62); }

  /* Make action columns feel like an inline button row */
  table.table.responsive-cards td[data-label*="Actie"],
  table.table.responsive-cards td[data-label*="Acties"],
  table.table.responsive-cards td.actions{
    justify-content:flex-end;
  }
}

/* Injected table search (lightweight) */
.table-search{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 0 0 10px;
}
.table-search input{
  width:100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.76);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
}
[data-theme="dark"] .table-search input,
.dark .table-search input{
  background: rgba(7,9,12,0.56);
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
}

/* Make the bottom tabbar a bit more "liquid glass" */
@media (max-width: 1200px){
  .mobile-tabbar.mobile-tabbar-ios26{
    background: rgba(255,255,255,0.62);
    -webkit-backdrop-filter: blur(26px) saturate(220%);
    backdrop-filter: blur(26px) saturate(220%);
    box-shadow:
      0 26px 70px rgba(0,0,0,0.14),
      inset 0 1px 0 rgba(255,255,255,0.70),
      inset 0 -1px 0 rgba(255,255,255,0.20);
  }
  [data-theme="dark"] .mobile-tabbar.mobile-tabbar-ios26,
  .dark .mobile-tabbar.mobile-tabbar-ios26{
    background: rgba(15,17,24,0.22);
    -webkit-backdrop-filter: blur(28px) saturate(220%);
    backdrop-filter: blur(28px) saturate(220%);
    box-shadow:
      0 30px 80px rgba(0,0,0,0.70),
      inset 0 1px 0 rgba(255,255,255,0.10);
  }

  /* Mobile bell should match icon sizing with the user avatar */
  .mobile-bell-btn{ width:52px; height:52px; border-radius: 999px; background: rgba(255,255,255,0.78);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 10px 24px rgba(2,6,23,0.14), inset 0 0 0 1px rgba(255,255,255,0.22);
  }
  [data-theme="dark"] .mobile-bell-btn,
  .dark .mobile-bell-btn{ background: rgba(7,9,12,0.62); border-color: rgba(255,255,255,0.10); }
  .mobile-bell-btn svg, .mobile-bell-btn .ti-ico{ width:26px !important; height:26px !important; }
}


/* Small buttons (mobile action bars) */
.btn.btn-sm{padding:6px 10px;font-size: 14px;border-radius:10px;}

/* Offline / sync banner */
.offline-banner{
  margin: 12px 12px 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}
[data-theme="dark"] .offline-banner,
.dark .offline-banner{
  border-color: rgba(255,255,255,0.10);
  background: rgba(7,9,12,0.70);
}
.offline-banner-left{ display:flex; align-items:center; gap: 10px; min-width: 0; }
.offline-banner-title{ font-weight: 900; font-size: 13px; line-height: 1.1; }
.offline-banner-sub{ font-size: 12px; opacity: .80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
.offline-banner-time{ margin-left: 8px; opacity: .70; }
.offline-banner-actions{ display:flex; gap: 8px; flex: 0 0 auto; }
.offline-dot{ width: 10px; height: 10px; border-radius: 999px; background: var(--primary); box-shadow: 0 0 0 3px rgba(0,0,0,0.04); flex: 0 0 auto; }
.offline-banner.is-offline .offline-dot{ background: rgba(255,90,90,1); }
.offline-banner.is-queue .offline-dot{ background: rgba(255,179,0,1); }

@media (max-width: 1200px){
  .dropdown.mobile-actions{display:flex; justify-content:flex-end;}
  .dropdown.mobile-actions .dropdown-menu{display:flex !important; flex-direction:row; gap:8px; padding:0; margin:0; background:transparent; border:0; box-shadow:none;}
  .dropdown.mobile-actions .dropdown-item.btn{background:rgba(255,255,255,.04);}
  body:not(.dark) .dropdown.mobile-actions .dropdown-item.btn{background:rgba(0,0,0,.03);}
  .dropdown.mobile-actions .dropdown-sep{display:none;}
.btn.btn-sm{padding:6px 10px;font-size: 14px;border-radius:10px;}
  
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select {
  border-radius: 10px;
  border: 1px solid var(--input-border);
  padding: 8px 10px;
  font-size: 14px;
  background: var(--input-bg);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  color: var(--text);
}
  .tabs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
    overflow: scroll;
    min-height: fit-content!important;
}
}


/* === Field fullscreen for Training > Oefening (mobile/tablet) === */
@media (max-width: 1200px){
  body.training-field-focus-body .sidebar,
  body.training-field-focus-body .sidebar-overlay,
  body.training-field-focus-body .mobile-header,
  body.training-field-focus-body .mobile-tabbar,
  body.training-field-focus-body .mobile-user-fab {
    display:none !important;
  }
  body.training-field-focus-body .main{
    position:fixed; inset:0; overflow:hidden; padding:0; background: var(--bg, #0b0f14);
  }
  body.training-field-focus-body .training-editor-head,
  body.training-field-focus-body .training-tools,
  body.training-field-focus-body .training-steps-panel,
  body.training-field-focus-body .training-equip,
  body.training-field-focus-body #training-trash{
    display:none !important;
  }
  body.training-field-focus-body #training-fullscreen-mobile{
    position:fixed; top:calc(env(safe-area-inset-top) + 12px); right:12px; z-index:1000;
    display:inline-flex !important; align-items:center; gap:8px;
    box-shadow:0 16px 40px rgba(0,0,0,.25);
  }
  body.training-field-focus-body .training-board-wrap,
  body.training-field-focus-body .training-board-split,
  body.training-field-focus-body .training-board-col{
    height:100%;
  }
  body.training-field-focus-body #training-board{
    position: fixed;
    inset: 0;
    width: calc(var(--vvw, 100vw));
    height: calc(var(--vvh, 100vh));
    max-width: none;
    max-height: none;
    left: 0;
    top: 0;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }
  body.training-field-focus-body #training-board .training-pitch{ display:none; }
  body.training-field-focus-body #training-board .training-pitch-light{ display:block !important; }

  body.training-field-focus-body .training-exit-focus{
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    left: 12px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
    padding: 0;
  }
}

/* Training board proportions (non-fullscreen) */
.training-board{
  aspect-ratio: 5 / 3;
}
@media (max-width: 1200px){
  .training-board{
    width:100%;
    height:auto;
  }
}

/* Tool groups nicer + collapsible */
.tool-group{ background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
[data-bs-theme="light"] .tool-group{ background: rgba(255,255,255,0.75); border-color: rgba(15,23,42,0.08); }
.tool-group summary{ list-style:none; cursor:pointer; display:flex; align-items:center; gap:8px; font-weight:700; padding:6px 4px; }
.tool-group summary::-webkit-details-marker{ display:none; }
.tool-group summary::after{ content:'ÃƒÂ¢Ã¢â‚¬â€œÃ‚Â¾'; margin-left:auto; font-size:14px; opacity:.6; transition:transform .15s ease, opacity .15s ease; }
.tool-group[open] summary::after{ transform: rotate(180deg); opacity:.85; }
.tool-group .tool-label{ display:none; }
.tool-group .ti-ico{ width:18px; height:18px; }

/* Steps/description titles blue + icon */
.steps-title, .steps-desc-title{ color: var(--primary, #0d6efd); font-weight:800; display:flex; align-items:center; gap:8px; }

/* Category multi-select solid backgrounds */
.msel-btn{ background: rgba(255,255,255,0.92) !important; border:1px solid rgba(15,23,42,0.12) !important; }
[data-bs-theme="dark"] .msel-btn{ background: rgba(22,27,34,0.95) !important; border-color: rgba(255,255,255,0.10) !important; color: rgba(255,255,255,0.92) !important; }
.msel-pop{background: rgba(255, 255, 255, 0.98);border:1px solid rgba(15,23,42,0.12);}
[data-bs-theme="dark"] .msel-pop{ background: rgba(22,27,34,0.98); border-color: rgba(255,255,255,0.10); }


.training-name-row{display:flex;align-items:center;gap:10px;}
.lock-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:rgba(0,0,0,0.12);border:1px solid rgba(255,255,255,0.10);color:rgba(255,255,255,0.9);font-weight:700;}
[data-bs-theme="light"] .lock-badge{background:rgba(13,110,253,0.08);border-color:rgba(13,110,253,0.20);color:rgba(13,110,253,0.95);}


.token-lock{ position:absolute; left:6px; top:6px; width:26px; height:26px; border-radius:999px; border:1px solid rgba(255,255,255,0.6); background:rgba(15,23,42,0.45); color:#fff; display:flex; align-items:center; justify-content:center; padding:0; cursor:pointer; }
.token-lock svg{ width:16px; height:16px; }
.player-token.locked .token-lock{ background:rgba(32,107,196,0.8); }
.player-token.locked{ outline:2px solid rgba(32,107,196,0.8); outline-offset:2px; }


.segmented{display:flex;gap:6px;background:rgba(148,163,184,0.15);padding:6px;border-radius:999px;align-items:center;}
.seg-btn{border:0;background:transparent;padding:8px 12px;border-radius:999px;cursor:pointer;font-weight:600;color:var(--text-main);min-height:38px;}
.seg-btn.active{background:var(--bg-card);box-shadow:0 6px 16px rgba(15,23,42,0.08);border:1px solid var(--border-subtle);}
.empty-card{border:1px dashed var(--border-subtle);border-radius:16px;padding:16px;background:rgba(148,163,184,0.08);}
.empty-title{font-weight:700;margin-bottom:4px;}
.empty-sub{color:var(--text-muted);font-size:13px;}
.plan-form .grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
@media (max-width: 860px){ .plan-form .grid-3{grid-template-columns:1fr;} }


/* Training planning: better alignment + touch targets */
.plan-form .grid-3 { gap: 12px; align-items: end; }
.plan-form .grid-2 { gap: 12px; align-items: end; }
.plan-form label.meta > span { display:block; margin-bottom:6px; font-weight:700; }
.plan-form .inp, .plan-form .select, .plan-form textarea {min-height: 44px;font-size: 16px;min-width: 200px;}
.plan-form textarea { padding-top:10px; }
.training-plan-preview svg { width: 100%; height: auto; display:block; border-radius: 12px; overflow:hidden; }
.steps { margin: 6px 0 0 18px; }
.steps li { margin: 4px 0; }

/* Attendance modal */
.att-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border-subtle);}
.att-row:last-child{border-bottom:0;}
.att-name{font-weight:800;}
.att-sub{font-size:12px;color:var(--text-muted);}


@media (min-width: 861px){
  .plan-form .grid-3{grid-template-columns: 33% 33% 33%;}
}

/* Matches: opponent logo in list */
.match-opp{display:flex;align-items:center;gap:10px;}
.match-opp-logo{width:26px;height:26px;object-fit:contain;border-radius:6px;border:1px solid var(--border-subtle);background:rgba(148,163,184,0.08);padding:3px;}

/* Users: permission checkboxes */
.check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin-top:6px;}
.check{display:flex;align-items:center;gap:10px;font-weight:650;}
.check input{width:18px;height:18px;}
@media (max-width: 860px){
  .check-grid{grid-template-columns:1fr;}
}

/* --- Page transition (Uptime Kuma-like) --- */
@keyframes mkvcPageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-content.page-enter {
  animation: mkvcPageEnter 180ms ease-out;
  will-change: opacity, transform;
}



/* Dashboard controls */
.dash-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 14px 0;flex-wrap:wrap;}
.segmented{display:inline-flex;border:1px solid var(--border);border-radius:999px;overflow:hidden;background:rgba(255,255,255,.6);}
.segmented .seg-btn{border:0;background:transparent;padding:6px 12px;font-weight:600;cursor:pointer;}
.segmented .seg-btn.active{background:rgba(0,0,0,.08);}
.dash-limit .form-select-sm{padding-top:4px;padding-bottom:4px;font-size:.9rem;}

/* Training plan modal: smaller meta icons */
#training-plan-modal .modal-subtitle .btn-ico{width:16px;height:16px;}



/* ===== Layout fix: remove unintended 260px spacing on main content ===== */
@media (min-width: 992px){
  .layout{ grid-template-columns: var(--sidebar-w, 260px) minmax(0, 1fr); }
  .sidebar{ position: sticky !important; top: 0; height: 100vh; }
  main.main, .main, .page-content, .content-area{
    margin-left: 0 !important;
    width: auto !important;
    padding-right: 15px !important;
  }
}

/* ===== Page transition (Uptime-Kuma-like) ===== */
@keyframes mkvcPageIn {
  from { opacity: 0; transform: translateY(8px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);  filter: blur(0); }
}
.main.page-enter, .page-content.page-enter{
  animation: mkvcPageIn 180ms cubic-bezier(0.2, 0, 0, 1) both;
}
@media (prefers-reduced-motion: reduce){
  .main.page-enter, .page-content.page-enter{ animation: none !important; }
}

/* ===== Training plan modal polish ===== */
#training-plan-modal .tp-meta-ico{ width:16px; height:16px; }
#training-plan-modal .tp-meta-pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:999px;
  background: rgba(148,163,184,0.14);
  border: 1px solid var(--border-subtle);
  margin-left:8px;
}
#training-plan-modal .tp-meta-min-text{
  font-weight:800;
}
#training-plan-modal .tp-ex-title{
  font-weight:900;
  color: var(--primary);
}
#training-plan-modal .tp-section-title{
  font-weight:900;
  color: var(--primary);
}
#training-plan-modal .tp-ex-meta{
  color: var(--text-muted);
  font-size: .95rem;
}
#training-plan-modal .tp-ex-time{
  display:inline-flex; align-items:center; gap:6px;
}
#training-plan-modal .tp-ex-ico{ width:16px; height:16px; }

.dash-card.dash-wide{grid-column:1/-1}

/* Dashboard: results table (uitslagen) */
.dash-results-table{ margin:0; }
.dash-results-table td{ vertical-align: middle; }
.dash-result-fixture{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dash-result-team{ display:flex; align-items:center; gap:8px; }
.dash-result-logo{ width:22px; height:22px; border-radius:999px; object-fit:cover; border:1px solid rgba(0,0,0,.08); }
.dash-result-logo.ph{ display:inline-block; background:#f1f5f9; }
.dash-result-name{ font-weight:700; }
.dash-result-vs{ color: var(--text-muted); font-weight:700; }
.dash-result-score{ font-weight:900; text-align:right; white-space:nowrap; }
.dash-result-date{ color: var(--text-muted); text-align:right; white-space:nowrap; }

@media (max-width: 640px){
  .dash-result-date{ display:none; }
}

@keyframes slideInBlurredBottom{0%{transform:translateY(1000px) scaleY(2.5) scaleX(.2);transform-origin:50% 100%;filter:blur(240px);opacity:0}to{transform:translateY(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}}
@keyframes fadeInBottom{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}

/* Sidebar duotone icons size */
.sidebar .nav-icon .duoicon,
.sidebar .nav-icon .app-ico{ width:22px; height:22px; }
.sidebar.sidebar-collapsed .nav-icon .duoicon,
.sidebar.sidebar-collapsed .nav-icon .app-ico{ width:22px; height:22px; }


/* Training tools accordion (replaces <details>/<summary>) */
.tool-accordion{ border:1px solid var(--border, rgba(148,163,184,.25)); border-radius:16px; background:var(--card, rgba(255,255,255,.7)); overflow:hidden; }
.tool-accordion + .tool-accordion{ margin-top:10px; }
.tool-accordion .acc-head{
  width:100%; display:flex; align-items:center; gap:10px;
  padding:12px 12px;
  background:linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.55));
  border:0; cursor:pointer;
  font-weight:800;
}
body.dark .tool-accordion .acc-head{
  background:linear-gradient(180deg, rgba(30,41,59,.72), rgba(15,23,42,.62));
}
.tool-accordion .acc-head .btn-ico{ width:18px; height:18px; }
.tool-accordion .acc-chevron{ margin-left:auto; opacity:.7; transition:transform .18s ease; }
.tool-accordion.open .acc-chevron{ transform:rotate(180deg); }
.tool-accordion .acc-body{ display:none; padding:12px; border-top:1px solid var(--border, rgba(148,163,184,.22)); }
.tool-accordion.open .acc-body{ display:block; animation: fadeInBottom .18s ease; }



/* --- Exercise cards (Rinus-style) --- */
.exercise-cards{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.exercise-card{
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.exercise-card:hover{
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--primary) 45%, transparent),
    0 10px 26px color-mix(in oklab, var(--primary) 18%, transparent);
}
.exercise-card .ex-title{
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.exercise-card .ex-sub{
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 10px;
}
.exercise-card .ex-thumb{
  min-height: 140px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in oklab, var(--card) 92%, var(--primary) 8%), var(--card));
  margin: 10px 0 12px 0;
}
.exercise-card .ex-thumb:empty{
  position:relative;
}
.exercise-card .ex-thumb:empty::after{
  content:"";
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid color-mix(in oklab, var(--border) 70%, var(--primary) 30%);
  border-top-color: var(--primary);
  opacity:.55;
  animation: spin 1s linear infinite;
}
.exercise-card .ex-thumb svg{
  width:100%;
  height:auto;
  display:block;
}
.exercise-card .ex-bottom{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 10px;
}

.exercise-card .need-mini{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  max-width:100%;
}
.exercise-card .need-mini .n{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border:1px solid var(--border);
  border-radius:999px;
  /* Theme-aware chip styling (numbers + icons must stay high-contrast in both modes) */
  background: rgba(15,23,42,0.06);
  color: var(--text-main);
  font-weight:800;
  white-space:nowrap;
}

/* Dark mode: chip becomes slightly darker and text stays light */
body[data-theme="dark"] .exercise-card .need-mini .n,
[data-theme="dark"] .exercise-card .need-mini .n,
.dark .exercise-card .need-mini .n{
  background: rgba(2,6,23,0.40);
  border-color: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
}
.exercise-card .need-mini .mini-ico{
  width:18px;
  height:18px;
  flex:0 0 auto;
}

.exercise-card .ex-actions a.btn{ text-decoration:none; }
.exercise-card .ex-actions{
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
}

.exercise-card.active{
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border) 45%);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 18%, transparent);
}



/* Exercise cards: tighten icons on small screens */
@media (max-width: 480px){
  .exercise-card .need-mini .mini-ico{ width:14px; height:14px; }
  .exercise-card .need-mini .n{ padding:3px 7px; font-size:12px; }
  .exercise-card .ex-actions .btn .btn-ico{ width:14px; height:14px; }
}
/* --- Tactics bend handle --- */
.tactic-bend-handle{
  fill: rgba(255,255,255,0.98);
  stroke: rgba(15,23,42,0.55);
  stroke-width: 0.6;
  /* Match Oefeningen: subtle handle, not oversized */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.28));
  cursor: grab;
pointer-events:all; cursor:grab;}
.tactic-bend-handle:active{ cursor: grabbing; }
.tactic-line{ cursor: pointer; pointer-events:stroke;}

.exercise-card .ex-actions{ flex-wrap:wrap; }
.exercise-card .ex-actions .btn{ white-space:nowrap; }
@keyframes spin{to{transform:rotate(360deg)}}
/* Training cards polish */
.exercise-card{overflow:hidden;}
.exercise-card .ex-thumb{display:flex;align-items:center;justify-content:center;padding:0px;background:rgba(255,255,255,0.35);border-radius:16px;}
.exercise-card .ex-thumb svg{max-width:100%;height:auto;display:block;}
.exercise-card .need-mini{display:flex;flex-wrap:wrap;gap:6px;}
.exercise-card .need-mini .n{white-space:nowrap;}


/* --- Exercise cards polish (Tabler-like, in-app style) --- */
.exercise-card{
  border: 1px solid rgba(148,163,184,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.exercise-card:hover{ transform: translateY(-1px); box-shadow: var(--shadow-md); }

.exercise-card .ex-title{ font-weight: 800; letter-spacing: -.01em; text-align:center; margin-top:2px; }
.exercise-card .ex-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(99,102,241,.28);
  background: rgba(99,102,241,.10);
  color: rgb(99,102,241);
  font-size: 12px;
  font-weight: 700;
  margin: 8px auto 0;
}
.exercise-card .ex-thumb{
  width: 100%;
  max-width: 420px;
  padding: 0px;
  border-radius: 16px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.22);
}
.exercise-card .ex-actions{ justify-content:center; flex-wrap:wrap; }
.exercise-card .need-mini{ justify-content:center; flex-wrap:wrap; }
.exercise-card .need-mini .n{ white-space:nowrap; }
.tp-svg{ display:block; width:100%; height:auto; }



/* --- Exercise card hover: primary feathered border --- */
.exercise-card:hover{
  border-color: var(--primary) !important;
  box-shadow:
    0 0 0 1px rgba(var(--primary-rgb), .35),
    0 10px 30px rgba(var(--primary-rgb), .16);
}

/* Dashboard split cards (results + upcoming) */
.dash-split{display:grid;grid-template-columns:1fr;gap:14px;margin-bottom:14px}
@media (min-width: 992px){.dash-split{grid-template-columns:1fr 1fr;}}


/* --- Exercise card preview box --- */
.exercise-card .ex-thumb{
  aspect-ratio: 12 / 7;
}
.exercise-card .ex-thumb .thumb-loading{
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  opacity: .85;
}

/* Teams > Opstellingen: small pitch preview inside the table */
.lineup-thumb{
  width: 132px;
  min-height: 78px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in oklab, var(--card) 92%, var(--primary) 8%), var(--card));
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.lineup-thumb:hover{
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  transform: translateY(-1px);
}
.lineup-thumb svg{ width:100%; height:auto; display:block; }
.lineup-thumb .thumb-loading{ color: var(--text-muted); font-weight:700; font-size:12px; opacity:.85; }


/* Lineup quickview modal */
.lineup-quickview-svg{
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.lineup-quickview-svg svg{ width:100%; height:auto; display:block; }


/* --- Clubs: mini map + marker --- */
.map-thumb{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  background: #f1f5f9;
  cursor: pointer;
}
.map-thumb-inner{ position: relative; width: 100%; height: 100%; }
.map-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: none;
}

.map-embed{
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  filter: none;
}

/* lightweight spinner used in map modal while geocoding */
.spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: mkvcSpin .8s linear infinite;
  opacity: .8;
}

@keyframes mkvcSpin{
  to{ transform: rotate(360deg); }
}

.map-blank{
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02)),
    radial-gradient(circle at 30% 35%, rgba(0,0,0,.08), transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(0,0,0,.06), transparent 60%);
  filter: none;
}
/* Marker overlay removed (map is shown without marker). */
.map-marker{ display:none; }
.map-thumb-lg{ height: 520px; }
@media (max-width: 640px){
  .map-thumb-lg{ height: 360px; }
}


.map-thumb-caption{
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.72);
  border-top: 1px solid rgba(0,0,0,.08);
}

/* Clubs: keep the table compact on mobile */
@media (max-width: 640px){
  .club-row-addr{ display:none !important; }
}

/* Map modal header logo + Google button */
.club-modal-logo{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.08);
}
.gmaps-btn{
  white-space: nowrap;
  justify-content: center;
  min-width: 160px;
}

/* --- amCharts solid-gauge (dashboard player radial) --- */
.dash-chart-radial .am-gauge-wrap{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  height:100%;
}
.dash-chart-radial .am-gauge-labels{
  flex:0 0 180px;
  max-width:180px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.dash-chart-radial .am-gauge-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size: 14px;
}
.dash-chart-radial .am-gauge-name{ color: var(--text-1, #0f172a); opacity: .85; }
.dash-chart-radial .am-gauge-val{ color: var(--text-1, #0f172a); font-weight: 800; }
.dash-chart-radial .am-gauge-chart{
  flex: 1 1 auto;
  height: 100%;
  min-height: 260px;
}

@media (max-width: 768px){
  .dash-chart-radial .am-gauge-labels{ flex-basis: 160px; max-width: 160px; }
  .dash-chart-radial .am-gauge-chart{ min-height: 240px; }
}



/* Training planning: exercise order (drag/drop) */
.ex-order-wrap{margin-top:8px;padding:10px;border:1px dashed rgba(148,163,184,.35);border-radius:14px;background:rgba(255,255,255,.03);}
.ex-order-hint{font-size:12px;opacity:.75;margin-bottom:8px;}
.ex-order-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;max-height:240px;overflow:auto;-webkit-overflow-scrolling:touch;}
.ex-order-item{display:flex;align-items:center;gap:10px;padding:10px 10px;border:1px solid rgba(148,163,184,.25);border-radius:14px;background:rgba(15,23,42,.15);}
html[data-theme='dark'] .ex-order-item{background:rgba(15,23,42,.35);}
.ex-order-item.dragging{opacity:.6;transform:scale(.99);}
.ex-order-handle{cursor:grab;user-select:none;font-weight:700;opacity:.7;letter-spacing:-1px;touch-action:none;}
.ex-order-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ex-order-actions{display:flex;gap:6px;}
.icon-btn{border:1px solid rgba(148,163,184,.25);background:transparent;border-radius:10px;padding:6px 8px;line-height:1;cursor:pointer;}
.icon-btn:active{transform:translateY(1px);}
@media (max-width: 480px){
  .ex-order-list{max-height:200px;}
  .ex-order-actions .icon-btn{padding:7px 10px;}
}




/* === MKV Coach brand accents === */
:root{
  --accent: var(--brand-orange);
  --accent-soft: rgba(255,140,0,0.12);
  --accent-soft-2: rgba(255,140,0,0.18);
}


/* Desktop sidebar / navigation accents */
.sidebar .nav-link.active,
.nav-link.active{
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar .nav-link:hover{
  color: var(--accent) !important;
}
.sidebar .nav-link:hover svg,
.sidebar .nav-link.active svg{
  stroke: var(--accent) !important;
}




.btn-primary:hover, .button-primary:hover, button.primary:hover{
  filter: brightness(1.02);
}


/* --- Notifications (topbar bell + center) --- */
.topbar-notif{ position:relative; }
.topbar-notif-btn{
  width:40px;height:40px;border-radius:12px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid transparent;background:transparent;
  color:var(--primary);
  cursor:pointer;
}
.topbar-notif-btn:hover{ background:var(--primary-soft); }
.topbar-notif-btn .ti-ico{ width:20px; height:20px; }
.topbar-notif-badge{
  position:absolute; top:6px; right:6px;
  min-width:18px; height:18px; padding:0 5px;
  border-radius:999px; background:var(--danger); color:#fff;
  font-size:11px; display:inline-flex; align-items:center; justify-content:center;
  line-height:1; box-shadow:0 4px 10px rgba(0,0,0,0.18);
}
.notif-center{
  animation: notif-center-pop 520ms cubic-bezier(.16,1,.3,1);

  position:absolute; right:0; top:48px;
  width:min(360px, calc(100vw - 16px));
  /* Match card surface (light/dark) */
  background: var(--bg-card, #ffffff);
  color: var(--text-main, #0f172a);
  border: 1px solid var(--border-strong, rgba(15,23,42,0.14));
  border-radius:16px;
  box-shadow: var(--shadow-soft, 0 16px 40px rgba(15,23,42,0.10));
  overflow:hidden;
  z-index:70;
}

/* Mobile: show notification center as a fixed floating card so it works with the mobile bell button */
@media (max-width: 768px){
  .notif-center{
    position: fixed;
    top: calc(env(safe-area-inset-top) + 64px);
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    z-index: 200; /* ensure above mobile user FAB + tabbar */
  }
}
.notif-center-header{
  padding:12px 14px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom: 1px solid var(--border-subtle, rgba(15,23,42,0.10));
}
.notif-center-title{ font-size:14px; font-weight:600; }
.notif-center-list{ max-height:340px; overflow:auto; }
.notif-item{
  width:100%; text-align:left;
  padding:10px 14px;
  display:flex; gap:10px;
  align-items:flex-start;
  background:transparent;
  border:0;
  cursor:pointer;
}
.notif-item:hover{ background: var(--hover, rgba(15,23,42,0.04)); }
.notif-item-ico{
  width:34px;height:34px;
  border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:var(--primary-soft);
  color:var(--primary);
  flex:0 0 34px;
}
.notif-item-main{ min-width:0; flex:1; }
.notif-item-title{ font-size:13px; font-weight:600; margin:0; }
.notif-item-sub{
  font-size:12px; color: var(--text-muted, rgba(15,23,42,0.62));
  margin-top:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.notif-empty{ padding:14px; color: var(--text-muted, rgba(15,23,42,0.62)); }

/* Dark mode: keep notif center readable like cards */
[data-theme="dark"] .notif-center{
  background: var(--bg-card, #0f172a);
  color: var(--text-main, #e5e7eb);
  border-color: var(--border-strong, rgba(255,255,255,0.10));
  box-shadow: var(--shadow-soft, 0 16px 40px rgba(0,0,0,0.35));
}
[data-theme="dark"] .notif-center-header{
  border-bottom-color: var(--border-subtle, rgba(255,255,255,0.08));
}
[data-theme="dark"] .notif-item:hover{ background: rgba(255,255,255,0.06); }
[data-theme="dark"] .notif-item-sub,
[data-theme="dark"] .notif-empty{ color: rgba(229,231,235,0.72); }

/* Online ring on avatar */
.topbar-avatar-wrap.online{ position:relative; }
.topbar-avatar-wrap.online::after{
  content:'';
  position:absolute;
  inset:-2px;
  border-radius:999px;
  border:2px solid rgba(34,197,94,0.95);
  pointer-events:none;
}
.topbar-avatar-wrap.online::before{
  content:'';
  display:none;
  position:absolute;
  width:10px; height:10px;
  border-radius:999px;
  background:rgba(34,197,94,0.95);
  border:2px solid var(--topbar-bg);
  right:-2px; bottom:-2px;
}

/* --- Messages page --- */
.messages-layout{ display:grid; grid-template-columns: 360px 1fr; gap:14px; }
@media (max-width: 900px){ .messages-layout{ grid-template-columns:1fr; } }
.message-list{ border:1px solid var(--border); border-radius:16px; background:var(--card); overflow:hidden; }
.message-list-header{ padding:12px 14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border-subtle);}
.message-list-tabs{ display:flex; gap:8px; }
.message-tab{ border:1px solid var(--border); background:transparent; color:var(--text); padding:6px 10px; border-radius:12px; cursor:pointer; font-size:12px; }
.message-tab.active{ background:var(--primary-soft); border-color: transparent; color:var(--primary);}
.message-row{ width:100%; text-align:left; border:0; background:transparent; padding:10px 14px; display:flex; gap:10px; align-items:flex-start; cursor:pointer; border-bottom:1px solid var(--border-subtle);}
.message-row:hover{ background:var(--hover); }
.message-row.unread .message-row-title{ font-weight:700; }
.message-row:last-child{ border-bottom:0; }
.message-row-title{ font-size:13px; font-weight:600; margin:0; }
.message-row-snippet{ font-size:12px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.message-detail{ border:1px solid var(--border); border-radius:16px; background:var(--card); padding:14px; }
.message-detail-title{ font-size:16px; font-weight:700; margin:0 0 6px; }
.message-detail-meta{ color:var(--muted); font-size:12px; display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.message-compose{ border:1px solid var(--border); border-radius:16px; background:var(--card); padding:14px; }
.chips{ display:flex; flex-wrap:wrap; gap:6px; }
.chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:var(--hover); border:1px solid var(--border-subtle); font-size:12px; }
.chip button{ border:0; background:transparent; cursor:pointer; color:var(--muted);}
.recipient-picker{ border:1px solid var(--border); border-radius:14px; padding:10px; max-height:220px; overflow:auto; }
.recipient-item{ display:flex; align-items:center; gap:10px; padding:8px 6px; border-radius:12px; cursor:pointer; }
.recipient-item:hover{ background:var(--hover); }
.recipient-item input{ width:16px; height:16px; }

/* --- Rich editor (Quill) inside compose modal --- */
.compose-editor {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 14px;
  overflow: hidden;
}

.compose-editor .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.08));
  background: var(--surface-0, rgba(255,255,255,0.7));
}

.compose-editor .ql-container.ql-snow {
  border: 0;
  font-family: inherit;
}

.compose-editor .ql-editor {
  min-height: 160px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text, #111827);
}

.compose-editor .ql-editor.ql-blank::before {
  color: var(--muted, #6b7280);
  font-style: normal;
}

[data-theme="dark"] .compose-editor {
  background: var(--card-bg, #0f172a);
  border-color: var(--border, rgba(255,255,255,0.10));
}

[data-theme="dark"] .compose-editor .ql-toolbar.ql-snow {
  background: rgba(255,255,255,0.04);
  border-bottom-color: var(--border, rgba(255,255,255,0.10));
}

[data-theme="dark"] .compose-editor .ql-stroke {
  stroke: var(--text, #e5e7eb);
}

[data-theme="dark"] .compose-editor .ql-fill {
  fill: var(--text, #e5e7eb);
}

[data-theme="dark"] .compose-editor .ql-picker {
  color: var(--text, #e5e7eb);
}



/* Messages page */
.messages-shell{
  display:grid;
  grid-template-columns: 260px 360px 1fr;
  gap:14px;
  align-items:stretch;
}
@media (max-width: 1080px){
  .messages-shell{ grid-template-columns: 240px 1fr; }
  .messages-detail-panel{ display:none; }
}
@media (max-width: 820px){
  .messages-shell{ grid-template-columns: 1fr; }
  .messages-mailbox{ display:none; }
}

.messages-panel{
  background: var(--card-bg);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow-sm);
  overflow:hidden;
  min-height: 520px;
}

.messages-panel-header{
  padding:12px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--border);
}

.messages-panel-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:-0.2px;
}

.messages-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
}

.messages-search{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
}
.messages-search input{
  width:100%;
  border-radius:12px;
  border:1px solid var(--border);
  background: var(--input-bg, transparent);
  color: var(--text);
  padding:10px 12px;
  outline:none;
}

.mailbox-list{ padding:10px; display:flex; flex-direction:column; gap:6px; }
.mailbox-item{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  border:0;
  background:transparent;
  color: var(--text);
  padding:10px 10px;
  border-radius:12px;
  cursor:pointer;
}
.mailbox-item:hover{ background: var(--surface-hover); }
.mailbox-item.active{ background: var(--primary-soft); color: var(--primary); }
.mailbox-item .badge{ margin-left:auto; }

.messages-filters{
  padding:10px 12px;
  display:flex;
  gap:8px;
  border-bottom:1px solid var(--border);
}
.messages-filter-chip{
  border:1px solid var(--border);
  background:transparent;
  color: var(--text);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  cursor:pointer;
}
.messages-filter-chip.active{ background: var(--primary-soft); color: var(--primary); border-color: transparent; }

.message-rows{ max-height: calc(100vh - 260px); overflow:auto; }

.message-row{
  width:100%;
  text-align:left;
  display:flex;
  gap:10px;
  padding:12px;
  border:0;
  background:transparent;
  border-bottom:1px solid var(--border);
  cursor:pointer;
}
.message-row:hover{ background: var(--surface-hover); }
.message-row.unread .message-row-title{ font-weight:800; }
.message-row-title{ font-size:13px; margin:0; }
.message-row-snippet{ font-size:12px; color: var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width: 100%; }
.message-row-meta{ font-size:11px; color: var(--muted); white-space:nowrap; }

.messages-detail{
  padding:14px;
  height:100%;
  display:flex;
  flex-direction:column;
}
.messages-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
}
.messages-detail-sub{ color: var(--muted); font-size:12px; margin-top:2px; display:flex; gap:12px; flex-wrap:wrap; }
.messages-detail-body{ padding-top:12px; overflow:auto; line-height:1.6; }

@media (max-width: 1080px){
  .messages-detail-panel{ display:none; }
}

/* Make Quill editor match cards */
.compose-editor{ border:1px solid var(--border); border-radius:14px; overflow:hidden; background: var(--card-bg); }
.compose-editor .ql-toolbar{ border:0; border-bottom:1px solid var(--border); background: var(--card-bg); }
.compose-editor .ql-container{ border:0; background: var(--card-bg); color: var(--text); }
.compose-editor .ql-editor{ min-height:180px; }


/* ---------------------------
   Messages (TailAdmin-like)
   --------------------------- */
.messages-shell{display:flex;gap:14px;align-items:stretch;min-height:calc(100vh - 170px);}
.messages-sidebar{width:240px;flex:0 0 240px;}
.messages-sidebar .msg-box{padding:12px;border-radius:14px;background:var(--card-bg);border:1px solid var(--border);box-shadow:var(--shadow-sm);}
.messages-sidebar .msg-compose{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:12px;}
.messages-sidebar .msg-nav{display:flex;flex-direction:column;gap:6px;}
.messages-sidebar .msg-nav button{width:100%;text-align:left;border:0;background:transparent;padding:10px 10px;border-radius:12px;color:var(--text);display:flex;align-items:center;gap:10px;cursor:pointer;}
.messages-sidebar .msg-nav button:hover{background:var(--surface-hover, rgba(0,0,0,0.03));}
.messages-sidebar .msg-nav button.active{background:var(--primary-soft);color:var(--primary);font-weight:700;}

.messages-list{flex:0 0 380px;width:380px;min-width:320px;display:flex;flex-direction:column;}
.messages-list .msg-list-card{flex:1;padding:0;border-radius:14px;background:var(--card-bg);border:1px solid var(--border);box-shadow:var(--shadow-sm);overflow:hidden;display:flex;flex-direction:column;}
.messages-list .msg-list-top{padding:12px 12px 10px;border-bottom:1px solid var(--border);display:flex;gap:10px;align-items:center;}
.messages-list .msg-search{flex:1;position:relative;}
.messages-list .msg-search input{width:100%;padding:10px 12px 10px 34px;border-radius:12px;border:1px solid var(--border);background:var(--surface);color:var(--text);}
.messages-list .msg-search .ico{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--muted);}
.messages-list .msg-filters{padding:10px 12px;border-bottom:1px solid var(--border);display:flex;gap:8px;align-items:center;}
.messages-list .msg-filter{border:1px solid var(--border);background:var(--surface);color:var(--text);padding:6px 10px;border-radius:999px;font-size:12px;cursor:pointer;}
.messages-list .msg-filter.active{background:var(--primary-soft);border-color:transparent;color:var(--primary);font-weight:700;}
.messages-list .msg-rows{overflow:auto;flex:1;}

.message-row .msg-avatar{width:34px;height:34px;border-radius:12px;background:var(--primary-soft);color:var(--primary);display:flex;align-items:center;justify-content:center;flex:0 0 34px;}
.message-row{width:100%;border:0;background:transparent;display:flex;gap:12px;align-items:center;padding:12px 12px;border-bottom:1px solid var(--border);cursor:pointer;text-align:left;}
.message-row:hover{background:var(--surface-hover, rgba(0,0,0,0.03));}
.message-row.unread .message-row-title{font-weight:800;}
.message-row .message-row-title{font-size:13px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.message-row .message-row-snippet{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

.messages-detail{flex:1;display:flex;flex-direction:column;}
.messages-detail .msg-detail-card{flex:1;border-radius:14px;background:var(--card-bg);border:1px solid var(--border);box-shadow:var(--shadow-sm);overflow:hidden;display:flex;flex-direction:column;}
.messages-detail .msg-detail-top{padding:14px;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.messages-detail .msg-detail-title{font-size:16px;font-weight:800;letter-spacing:-0.2px;color: var(--primary);}
.messages-detail .msg-detail-meta{margin-top:6px;font-size:12px;color:var(--muted);display:flex;gap:10px;flex-wrap:wrap;}
.messages-detail .msg-detail-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.messages-detail .msg-detail-body{padding:14px;overflow:auto;flex:1;color:var(--text);}

@media (max-width: 1100px){
  .messages-shell{flex-direction:column;min-height:auto;}
  .messages-sidebar{width:100%;flex:0 0 auto;}
  .messages-list{width:100%;flex:0 0 auto;min-width:0;}
}

/* ---------------------------
   Messages (simple page layout)
   --------------------------- */
.messages-page{display:flex;flex-direction:column;gap:14px;}
.messages-grid{display:grid;grid-template-columns:380px 1fr;gap:14px;align-items:stretch;}
@media (max-width: 1100px){
  .messages-grid{grid-template-columns:1fr;}
  .messages-detail{min-height:420px;}
}

.msg-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;z-index: 1000;}
.msg-tabs{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.msg-tab{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:999px;padding:8px 12px;font-size:12px;display:flex;align-items:center;gap:8px;cursor:pointer;}
.msg-tab.active{background:var(--primary-soft);border-color:transparent;color:var(--primary);font-weight:800;}
.msg-tab svg{width:16px;height:16px;}
.msg-tab-count{background:var(--danger, #ef4444);color:#fff;border-radius:999px;padding:1px 7px;font-size:11px;font-weight:800;}
.msg-tab-filter{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:999px;padding:8px 12px;font-size:12px;cursor:pointer;}
.msg-tab-filter.active{background:var(--primary-soft);border-color:transparent;color:var(--primary);font-weight:800;}

.msg-top-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.msg-search{position:relative;}
.msg-search input{width:220px;max-width:55vw;padding:10px 12px 10px 34px;border-radius:12px;border:1px solid var(--border);background:var(--surface);color:var(--text);}
.msg-search .ico{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--muted);}

.msg-list-card{padding:0;overflow:hidden;display:flex;flex-direction:column;}
.msg-rows{overflow:auto;max-height:calc(100vh - 280px);}
.msg-row-main{min-width:0;flex:1;}
.msg-row-time{font-size:11px;white-space:nowrap;color: var(--muted);}

.msg-card{overflow:hidden;}
.msg-detail-body{line-height:1.6;}

/* Dark mode polish for editor */
[data-theme="dark"] .ql-toolbar.ql-snow{border-color: var(--border) !important;}
[data-theme="dark"] .ql-container.ql-snow{border-color: var(--border) !important;}
[data-theme="dark"] .ql-editor{color: var(--text) !important;}

/* Notification center tabs */
.notif-center-tabs{display:flex;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border);}
.notif-tab{flex:1;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:999px;padding:7px 10px;font-size:12px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;}
.notif-tab.active{background:var(--primary-soft);border-color:transparent;color:var(--primary);font-weight:800;}
.notif-tab .pill{background:var(--danger, #ef4444);color:#fff;border-radius:999px;padding:1px 6px;font-size:11px;font-weight:800;}


@keyframes notif-center-pop{
  from{ transform: translateY(6px) scale(.98); opacity: 0; }
  to{ transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes notif-center-out{
  from{ transform: translateY(0) scale(1); opacity: 1; }
  to{ transform: translateY(8px) scale(.98); opacity: 0; }
}
.notif-center.closing{ animation: notif-center-out 240ms cubic-bezier(.4,0,1,1) both; }
/* iOS26.2-ish bottom tab animations */
.mobile-tab .icon{
  transition: transform 420ms cubic-bezier(.16,1,.3,1), opacity 220ms ease;
  transform: translateZ(0);
}
.mobile-tab.active .icon{
  transform: translateY(-1px) scale(1.12);
}

/* iOS-inspired glider tabs (reusable) */
.ios-tabs{
  display:flex;
  position:relative;
  padding: 8px;
  gap: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 18px 48px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
}
[data-theme="dark"] .ios-tabs,
.dark .ios-tabs{
  background: rgba(15,23,42,0.55);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 18px 48px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ios-tabs *{ z-index:2; }
.ios-tabs input[type="radio"]{ display:none; }
.ios-tab{
  display:flex;
  align-items:center;
  justify-content:center;
  height: 34px;
  min-width: 92px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 650;
  color: rgba(15,23,42,0.78);
  border-radius: 999px;
  cursor:pointer;
  transition: color 180ms ease;
  user-select:none;
}
[data-theme="dark"] .ios-tab,
.dark .ios-tab{ color: rgba(226,232,240,0.80); }
.ios-tabs input[type="radio"]:checked + label{ color: var(--primary); }
.ios-tabs .glider{
  position:absolute;
  top: 8px;
  left: 8px;
  height: calc(100% - 16px);
  width: calc((100% - 16px) / var(--tabs, 2));
  transform: translateX(calc(var(--active, 0) * 100%));
  border-radius: 999px;
  background: rgba(13,110,253,0.14);
  border: 1px solid rgba(13,110,253,0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 420ms cubic-bezier(.16,1,.3,1), background 220ms ease;
  z-index:1;
  pointer-events:none;
}
[data-theme="dark"] .ios-tabs .glider,
.dark .ios-tabs .glider{
  background: rgba(56,189,248,0.10);
  border-color: rgba(56,189,248,0.16);
}

/* dashboard tab panels */
/* dashboard tab panels */
.dash-tabs-row{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin: 8px 0 14px;}
.dash-tab-panel[hidden]{ display:none !important; }


/* iOS-style segmented: reuse the ios-tabs look for existing .segmented controls */
.segmented{
  display: flex;
  align-items:center;
  overflow: scroll!important;
  position:relative;
  padding: 8px;
  gap: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.10);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  --seg-x: 0px;
  --seg-w: 0px;
}
[data-theme="dark"] .segmented,
.dark .segmented{
  background: rgba(15,23,42,0.55);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 18px 48px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}
.segmented .seg-btn{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 650;
  color: rgba(15,23,42,0.78);
  border-radius: 999px;
  cursor:pointer;
  background: transparent;
  border: 0;
  transition: color 180ms ease, transform 220ms cubic-bezier(0.2, 1.2, 0.2, 1);
  white-space:nowrap;
}
[data-theme="dark"] .segmented .seg-btn,
.dark .segmented .seg-btn{ color: rgba(226,232,240,0.78); }
.segmented .seg-btn:disabled{ opacity: .55; cursor: not-allowed; }
.segmented .seg-btn.active{ color: rgba(13,110,253,1); }
[data-theme="dark"] .segmented .seg-btn.active,
.dark .segmented .seg-btn.active{ color: rgba(147,197,253,1); }
.segmented::after{
  content:'';
  position:absolute;
  top: 8px;
  left: 8px;
  height: calc(100% - 16px);
  width: var(--seg-w);
  border-radius: 999px;
  background: rgba(13,110,253,0.14);
  transform: translateX(var(--seg-x));
  transition: transform 520ms cubic-bezier(.16,1,.3,1), width 520ms cubic-bezier(.16,1,.3,1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
[data-theme="dark"] .segmented::after,
.dark .segmented::after{ background: rgba(147,197,253,0.16); }
.segmented *{ position:relative; z-index:2; }

.chip-duration .btn-ico{ width:14px; height:14px; }
.chip-duration .btn-ico{ width:14px; height:14px; }



/* Shared sheet-like pop animation (used for notif + user sheet) */
.sheet-backdrop{position:fixed; inset:0; z-index:210; background:transparent; animation: sheetFadeIn 220ms ease both;}
.sheet-backdrop.closing{animation: sheetFadeOut 200ms ease both;}
@keyframes sheetFadeIn{from{opacity:0}to{opacity:1}}
@keyframes sheetFadeOut{from{opacity:1}to{opacity:0}}
.sheet-panel{animation: sheetSlideUp 520ms cubic-bezier(.16,1,.3,1) both;}
.sheet-panel.closing{animation: sheetSlideDown 240ms cubic-bezier(.4,0,1,1) both;}
@keyframes sheetSlideUp{from{transform:translateY(18px) scale(.98); opacity:0}to{transform:translateY(0) scale(1); opacity:1}}
@keyframes sheetSlideDown{from{transform:translateY(0) scale(1); opacity:1}to{transform:translateY(18px) scale(.98); opacity:0}}


/* Training planning: dual selector */
.dual-ex{display:flex; gap:12px; align-items:center; flex-wrap:wrap;}
.dual-ex-col{flex:1; min-width:260px;}
.dual-ex-actions{display:flex; flex-direction:column; gap:10px; align-items:stretch; justify-content:center;}
.dual-ex-col .select,
.dual-ex-col .inp{ width:100%; }
.dual-ex-actions .btn{ width:100%; }
@media (max-width: 700px){
  .dual-ex{flex-direction:column; align-items:stretch;}
  .dual-ex-actions{flex-direction:row; justify-content:space-between;}
  .dual-ex-actions .btn{ width:auto; flex:1; }
}

/* Training filters: category tags (multi-select) */
.cat-tags{
  display: contents;
  flex-wrap: inherit;
  gap:8px;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(255,255,255,0.6);
  max-width:520px;
}
[data-theme="dark"] .cat-tags{background:rgba(15,23,42,0.35);}
.cat-tag{
  appearance:none;
  border:1px solid rgba(148,163,184,.22);
  background:rgba(255,255,255,0.7);
  color:inherit;
  padding: 10px 10px;
  border-radius:999px;
  cursor:pointer;
  user-select:none;
  font-size:13px;
  line-height:1;
  transition: transform .12s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
[data-theme="dark"] .cat-tag{background:rgba(15,23,42,0.22);}
.cat-tag:active{ transform: scale(.98); }
.cat-tag.active{
  background: rgba(24,94,224,0.16);
  border-color: rgba(24,94,224,0.35);
  color: var(--primary);
}
[data-theme="dark"] .cat-tag.active{
  background: rgba(59,130,246,0.22);
  border-color: rgba(59,130,246,0.35);
  color: #93c5fd;
}

/* Exercise cards:/* Exercise cards: category + duration row */
.ex-badges{display:flex; align-items:center; gap:8px; margin-top:6px;}
.ex-badge--duration{margin-left:auto;}
.ex-badge--duration .chip-duration{padding:2px 6px; font-size:10px; opacity:.75;}
.ex-badge--duration .chip-duration .btn-ico{width:10px;height:10px;}

/* Mobile floating user + notif buttons (top right) */
.mobile-fabs{position:fixed; top:calc(env(safe-area-inset-top) + 10px); right:10px; display:flex; gap:10px; z-index:220;}
.mobile-fab{
  width:44px; height:44px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.72);
  border:1px solid rgba(148,163,184,.22);
  box-shadow:0 10px 28px rgba(15,23,42,.12);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
[data-theme="dark"] .mobile-fab{background:rgba(15,23,42,0.62); border-color:rgba(148,163,184,.14); box-shadow:0 18px 48px rgba(0,0,0,.35);}
.mobile-fab .btn-ico, .mobile-fab svg{width:22px; height:22px;}
.mobile-fab-badge{position:absolute; transform:translate(12px,-12px); min-width:18px; height:18px; padding:0 5px; border-radius:999px; background:var(--danger); color:#fff; font-size:11px; display:inline-flex; align-items:center; justify-content:center; line-height:1;}

/* Hide the floating mobile actions only on true desktop pointers (mouse/trackpad). */
@media (min-width: 769px) and (hover: hover) and (pointer: fine){
  .mobile-fabs{display:none;}
}

/* Mobile user dropdown: slightly larger text */
.mobile-dd-backdrop[data-mobile-user-backdrop] .dropdown-item{
  font-size:16px;
  padding:12px 14px;
}
.mobile-dd-backdrop[data-mobile-user-backdrop] .dropdown-item svg{
  width:18px;
  height:18px;
}

/* Mobile theme fab */
.mobile-fab-theme .theme-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.mobile-fab-theme .theme-icon svg{
  width:20px;
  height:20px;
}


/* Keep mobile UI on touch devices (phones + tablets). */
@media (hover: none) and (pointer: coarse){
  .topbar{ display:none !important; }
  .sidebar{ display:none !important; }
  .sidebar-overlay{ display:none !important; }
  .mobile-header{ display:flex !important; }
  .mobile-tabbar{ display:flex !important; }
  .mobile-user-fab{ display:flex !important; }
  .mobile-fabs{ display:flex !important; }
  .layout{ grid-template-columns: 1fr !important; }
}

/* Tablet + small desktop widths: use the mobile UI (requested).
   Some iPads can report a fine pointer; also when a desktop window is narrowed we still want the mobile shell.
*/
@media (max-width: 1370px){
  .topbar{ display:none !important; }
  .sidebar{ display:none !important; }
  .sidebar-overlay{ display:none !important; }
  .mobile-header{ display:flex !important; }
  .mobile-tabbar{ display:flex !important; }
  .mobile-user-fab{ display:flex !important; }
  /* override the "true desktop pointers" rule above */
  .mobile-fabs{ display:flex !important; }
  .layout{ grid-template-columns: 1fr !important; }
}


/* --- Profile page (Tabler-like) --- */
.visually-hidden{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.profile-form .profile-grid{
  display:grid;
  grid-template-columns: 240px 1fr;
  gap:24px;
  align-items:start;
}

@media (max-width: 768px){
  .profile-form .profile-grid{
    grid-template-columns: 1fr;
  }
}

.profile-avatar-block{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.profile-avatar-wrap{
  width:92px;
  height:92px;
  border-radius:16px;
  overflow:hidden;
  position:relative;
  border:1px solid var(--border);
  background:var(--card);
  display:flex;
  align-items:center;
  justify-content:center;
}

.profile-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.profile-avatar-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:28px;
  color:var(--text);
  background:linear-gradient(135deg, rgba(32,107,196,.18), rgba(32,107,196,.06));
}

.profile-online-badge{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#22c55e;
  border:2px solid var(--card);
  position:absolute;
  right:10px;
  bottom:10px;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}

.profile-avatar-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}

.profile-avatar-actions .btn svg{
  width:18px;
  height:18px;
}

.profile-avatar-actions .btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
}

.profile-section-title{
  font-weight:700;
  font-size:14px;
  letter-spacing:.02em;
}

/* Profile: club logo under avatar */
.profile-club-logo{
  display:flex;
  align-items:center;
  gap:10px;
}

.profile-club-logo-img{
  width:44px;
  height:44px;
  border-radius:12px;
  object-fit:contain;
  background:var(--card);
  border:1px solid var(--border);
  padding:6px;
}

/* Ensure profile inputs are full-width and nicely stacked */
.profile-form .form-control,
.profile-form .form-select{
  display:block;
  width:100%;
  max-width:100%;
}

/* Make the primary button on profile always the 'MK blue' */
.profile-form .btn.btn-primary{
  background-color:#185ee0 !important;
  border-color:#185ee0 !important;
}
.profile-form .btn.btn-primary:hover{
  filter:brightness(0.95);
}



/* TailAdmin-inspired page tabs (Dashboard / Teams / Training) */
.page-tabs-wrap{
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 8px 12px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0));
  backdrop-filter: blur(10px);
}
body[data-theme="dark"] .page-tabs-wrap,
[data-theme="dark"] .page-tabs-wrap,
.dark .page-tabs-wrap{
  background: linear-gradient(180deg, rgba(2,6,23,0.82), rgba(2,6,23,0));
}
.page-tabs{
  display:flex;
  gap:10px;
  padding:8px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}
body[data-theme="dark"] .page-tabs,
[data-theme="dark"] .page-tabs,
.dark .page-tabs{
  background: rgba(15,23,42,0.62);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}
.page-tab{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(15,23,42,0.82);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.page-tab:hover{ transform: translateY(-1px); background: rgba(59,130,246,0.10); border-color: rgba(59,130,246,0.18); }
.page-tab:active{ transform: translateY(0px); }
.page-tab .page-tab-ico svg{ width: 18px; height: 18px; }
.page-tab.active{
  background: rgba(59,130,246,0.14);
  border-color: rgba(59,130,246,0.28);
  color: rgba(15,23,42,0.92);
}
body[data-theme="dark"] .page-tab,
[data-theme="dark"] .page-tab,
.dark .page-tab{
  color: rgba(226,232,240,0.92);
}
body[data-theme="dark"] .page-tab:hover,
[data-theme="dark"] .page-tab:hover,
.dark .page-tab:hover{
  background: rgba(59,130,246,0.16);
  border-color: rgba(59,130,246,0.30);
}
body[data-theme="dark"] .page-tab.active,
[data-theme="dark"] .page-tab.active,
.dark .page-tab.active{
  background: rgba(59,130,246,0.22);
  border-color: rgba(59,130,246,0.38);
  color: rgba(255,255,255,0.96);
}

@media (max-width: 768px){
  .page-tabs-wrap{ padding: 6px 10px 0; }
  .page-tab{ padding: 10px 12px; gap:8px; }
  .page-tab .page-tab-label{ font-size: 14px; }
}

