/* ============================================================
   LoadViser Pro — Metronic-style theme
   Bootstrap 5 tabanlı, koyu sidebar, Inter font, kartlı yapı
   ============================================================ */

:root {
  --lv-primary: #009ef7;
  --lv-primary-active: #0095e8;
  --lv-primary-light: #f1faff;
  --lv-success: #50cd89;
  --lv-success-light: #e8fff3;
  --lv-info: #7239ea;
  --lv-info-light: #f8f5ff;
  --lv-warning: #ffc700;
  --lv-warning-light: #fff8dd;
  --lv-danger: #f1416c;
  --lv-danger-light: #fff5f8;
  --lv-dark: #181c32;
  --lv-muted: #99a1b7;
  --lv-gray-100: #f9f9f9;
  --lv-gray-200: #f1f1f2;
  --lv-gray-300: #e1e3ea;
  --lv-gray-400: #b5b5c3;
  --lv-body-bg: #f5f8fa;
  --lv-card-bg: #ffffff;
  --lv-aside-bg: #1e1e2d;
  --lv-aside-item: #9899ac;
  --lv-aside-hover: #2a2a3c;
  --lv-border: #f1f1f4;
  --lv-radius: 0.75rem;
  --lv-aside-width: 265px;
  --lv-header-height: 70px;
}

* { -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--lv-body-bg);
  color: #4b5675;
  font-size: 0.9rem;
  margin: 0;
  letter-spacing: -0.01em;
}

a { text-decoration: none; }

/* ---------- Layout shell ---------- */
.lv-wrapper { display: flex; min-height: 100vh; }

/* ---------- Sidebar (aside) ---------- */
.lv-aside {
  width: var(--lv-aside-width);
  background: var(--lv-aside-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1050;
  transition: transform .3s ease;
  overflow: hidden;
}
.lv-aside-logo {
  height: var(--lv-header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 25px;
  flex-shrink: 0;
  border-bottom: 1px dashed #282a3d;   /* Metronic ayracı */
}
.lv-aside-logo .badge-club {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--lv-primary), #0068c9);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 1.1rem;
}
.lv-aside-logo .brand { color: #fff; font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.lv-aside-logo .brand small { display: block; font-size: .62rem; color: var(--lv-muted); font-weight: 500; letter-spacing: .05em; }

.lv-aside-menu { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 30px; }
.lv-aside-menu::-webkit-scrollbar { width: 5px; }
.lv-aside-menu::-webkit-scrollbar-thumb { background: #2b2b40; border-radius: 4px; }

/* menü arama */
.lv-menu-search { padding: 4px 12px 10px; position: relative; }
.lv-menu-search i { position: absolute; left: 22px; top: 50%; transform: translateY(-40%); font-size: .8rem; color: #6d6d80; pointer-events: none; }
.lv-menu-search input {
  width: 100%; padding: 7px 10px 7px 30px; border-radius: 8px; font-size: .78rem;
  background: rgba(43,43,64,.5); border: 1px solid #2b2b40; color: #e6e6ef;
}
.lv-menu-search input::placeholder { color: #6d6d80; }
.lv-menu-search input:focus { outline: none; border-color: var(--lv-primary); background: #2b2b40; box-shadow: 0 0 0 3px rgba(0,158,247,.15); }

/* Genel Bakış — Metronic düz menü öğesi */
.lv-dash-tile {
  display: flex; align-items: center; gap: 12px; margin: 4px 10px 2px; padding: 8px 15px;
  border-radius: 8px; position: relative; text-decoration: none; transition: background .15s;
}
.lv-dash-tile:hover { background: var(--lv-aside-hover); }
.lv-dash-tile .dash-ic { width: 22px; height: 22px; display:flex; align-items:center; justify-content:center;
  color: #6d6d80; font-size: 1.05rem; transition: color .15s; }
.lv-dash-tile:hover .dash-ic { color: var(--lv-primary); }
.lv-dash-tile .dash-sub { display: none; }
.lv-dash-tile .dash-main { font-size: .88rem; font-weight: 500; color: var(--lv-aside-item); line-height: 1.1; transition: color .15s; }
.lv-dash-tile:hover .dash-main { color: #fff; }
.lv-dash-tile.active { background: var(--lv-aside-hover); }
.lv-dash-tile.active .dash-ic { color: var(--lv-primary); }
.lv-dash-tile.active .dash-main { color: #fff; font-weight: 600; }

/* çökebilir bölüm başlığı — Metronic section heading */
.lv-group { margin-bottom: 2px; }
.lv-group-head {
  width: 100%; margin: 0; padding: 16px 25px 6px; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px; border-radius: 0; text-align: left;
  background: transparent; box-shadow: none;
}
.lv-group-head:hover .gh-label { color: #9899ac; }
.lv-group-head .gh-bar { display: none; }
.lv-group-head .gh-label { font-size: .68rem; letter-spacing: .115em; font-weight: 600; text-transform: uppercase;
  color: #646477; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.lv-group-head .gh-line { display: none; }
.lv-group-head .gh-chev { font-size: .6rem; color: #494b74; margin-left: auto; transition: transform .3s; }
.lv-group.collapsed .gh-chev { transform: rotate(-90deg); }
.lv-group-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .28s ease; }
.lv-group.collapsed .lv-group-body { grid-template-rows: 0fr; }
.lv-group-body > div { overflow: hidden; min-height: 0; padding-bottom: 2px; }

/* alt menü öğesi — Metronic düz satır */
.lv-sub {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin: 1px 10px; padding: 8px 15px; border-radius: 8px;
  color: var(--lv-aside-item); font-size: .88rem; font-weight: 500; text-decoration: none; transition: all .15s;
}
.lv-sub::before { display: none; }
.lv-sub .sub-ic { width: 22px; height: 22px; border-radius: 0; display:flex; align-items:center; justify-content:center;
  font-size: 1rem; flex-shrink: 0; box-shadow: none; opacity: 1; color: #6d6d80 !important; transition: color .15s; }
.lv-sub .sub-tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-sub:hover { background: var(--lv-aside-hover); color: #fff; }
.lv-sub:hover .sub-ic { color: var(--lv-primary) !important; }
.lv-sub.active { background: var(--lv-aside-hover); color: #fff; font-weight: 600; }
.lv-sub.active .sub-tx { color: #fff; }
.lv-sub.active .sub-ic { color: var(--lv-primary) !important; }

/* arama filtresi ile gizleme */
.lv-group.search-hidden, .lv-sub.search-hidden { display: none; }

.lv-menu-section {
  color: #4a4b6a; font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; padding: 18px 25px 8px; margin: 0;
}
.lv-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 25px; color: var(--lv-aside-item);
  font-weight: 500; font-size: .92rem; cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .15s ease;
}
.lv-menu-item i { font-size: 1.1rem; width: 20px; text-align: center; color: #6d6d80; transition: color .15s; }
.lv-menu-item .lv-menu-badge { margin-left: auto; }
.lv-menu-item:hover { color: #fff; background: var(--lv-aside-hover); }
.lv-menu-item:hover i { color: var(--lv-primary); }
.lv-menu-item.active { color: #fff; background: var(--lv-aside-hover); border-left-color: var(--lv-primary); }
.lv-menu-item.active i { color: var(--lv-primary); }

/* ---------- Main content area ---------- */
.lv-main {
  flex: 1;
  margin-left: var(--lv-aside-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Topbar ---------- */
.lv-header {
  height: var(--lv-header-height);
  background: #fff;
  display: flex; align-items: center;
  padding: 0 30px;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--lv-border);
}
.lv-header .page-title { font-weight: 700; color: var(--lv-dark); font-size: 1.15rem; margin: 0; }
.lv-header .page-title small { display:block; font-weight:500; font-size:.72rem; color: var(--lv-muted); }
.lv-burger { display: none; background: none; border: none; font-size: 1.4rem; color: var(--lv-dark); cursor: pointer; }
.lv-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lv-icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: none;
  background: var(--lv-gray-100); color: #5e6278;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  cursor: pointer; transition: all .15s; position: relative;
}
.lv-icon-btn:hover { background: var(--lv-primary-light); color: var(--lv-primary); }
.lv-icon-btn .dot { position:absolute; top:9px; right:10px; width:7px; height:7px; border-radius:50%; background: var(--lv-danger); border: 1px solid #fff; }
.lv-user {
  display: flex; align-items: center; gap: 10px; cursor: pointer; padding-left: 6px;
}
.lv-user .avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--lv-success-light); color: var(--lv-success); display:flex; align-items:center; justify-content:center; font-weight:700; }
.lv-user .info { line-height: 1.2; }
.lv-user .info b { color: var(--lv-dark); font-size: .85rem; display:block; }
.lv-user .info span { color: var(--lv-muted); font-size: .72rem; }

/* ---------- Content ---------- */
.lv-content { padding: 28px 30px 60px; flex: 1; }
.lv-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom: 22px; }
.lv-toolbar h1 { font-size: 1.35rem; font-weight: 700; color: var(--lv-dark); margin:0; }
.lv-breadcrumb { color: var(--lv-muted); font-size: .8rem; }
.lv-breadcrumb span { color: var(--lv-primary); }

/* ---------- Cards ---------- */
.card {
  background: var(--lv-card-bg);
  border: none;
  border-radius: var(--lv-radius);
  box-shadow: 0 3px 12px rgba(24,28,50,.03);
}
.card-header {
  border-bottom: 1px solid var(--lv-border);
  padding: 18px 24px;
  display: flex; align-items: center; min-height: auto;
  background: transparent;
}
.card-title { font-weight: 700; color: var(--lv-dark); font-size: 1.05rem; margin: 0; display:flex; flex-direction:column; }
.card-title small { color: var(--lv-muted); font-weight:500; font-size:.75rem; }
.card-body { padding: 24px; }
.card-toolbar { margin-left: auto; }

/* ---------- Stat tiles ---------- */
.stat-tile {
  border-radius: var(--lv-radius); padding: 22px 24px; height: 100%;
  position: relative; overflow: hidden;
}
.stat-tile .stat-icon { font-size: 2rem; opacity: .9; margin-bottom: 10px; display:block; }
.stat-tile .stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-tile .stat-label { font-size: .82rem; font-weight: 500; opacity: .85; margin-top: 6px; }
.stat-tile.grad-primary { background: linear-gradient(135deg,#009ef7,#0068c9); color:#fff; }
.stat-tile.grad-success { background: linear-gradient(135deg,#50cd89,#2b9c62); color:#fff; }
.stat-tile.grad-warning { background: linear-gradient(135deg,#ffc700,#f1962b); color:#fff; }
.stat-tile.grad-danger  { background: linear-gradient(135deg,#f1416c,#c81e4e); color:#fff; }
.stat-tile.grad-dark    { background: linear-gradient(135deg,#3a3b5a,#1e1e2d); color:#fff; }
.stat-tile.grad-info    { background: linear-gradient(135deg,#7239ea,#5014b8); color:#fff; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; padding: .45em .7em; border-radius: .55em; font-size: .78rem; }
.badge-light-primary { background: var(--lv-primary-light); color: var(--lv-primary); }
.badge-light-success { background: var(--lv-success-light); color: var(--lv-success); }
.badge-light-warning { background: var(--lv-warning-light); color: #f1962b; }
.badge-light-danger  { background: var(--lv-danger-light); color: var(--lv-danger); }
.badge-light-info    { background: var(--lv-info-light); color: var(--lv-info); }
.badge-light-dark    { background: #e9ebf0; color: var(--lv-dark); }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: .65rem; padding: .6rem 1.1rem; font-size: .88rem; }
.btn-primary { background: var(--lv-primary); border-color: var(--lv-primary); }
.btn-primary:hover { background: var(--lv-primary-active); border-color: var(--lv-primary-active); }
.btn-light-primary { background: var(--lv-primary-light); color: var(--lv-primary); border:none; }
.btn-light-primary:hover { background: var(--lv-primary); color:#fff; }
.btn-sm { padding: .4rem .8rem; font-size: .8rem; }

/* ---------- Tables ---------- */
.table { color: #4b5675; margin: 0; }
.table thead th {
  color: var(--lv-muted); font-weight: 600; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--lv-border); padding: 12px 16px;
}
.table tbody td { padding: 14px 16px; vertical-align: middle; border-bottom: 1px solid var(--lv-border); }
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: var(--lv-gray-100); }

/* symbol / avatars in tables */
.symbol { width: 42px; height: 42px; border-radius: 9px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.9rem; flex-shrink:0; }
.symbol-circle { border-radius: 50%; }
.player-cell { display:flex; align-items:center; gap:12px; }
.player-cell .pc-name { font-weight:600; color: var(--lv-dark); font-size:.88rem; }
.player-cell .pc-sub { color: var(--lv-muted); font-size:.75rem; }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 6px; background: var(--lv-gray-200); }
.progress-sm { height: 6px; }

/* ---------- Traffic light (coach) ---------- */
.traffic {
  display:flex; align-items:center; gap:8px; font-weight:600;
}
.traffic .dot { width: 12px; height: 12px; border-radius: 50%; }
.traffic.ready .dot { background: var(--lv-success); box-shadow: 0 0 0 4px var(--lv-success-light); }
.traffic.monitor .dot { background: var(--lv-primary); box-shadow: 0 0 0 4px var(--lv-primary-light); }
.traffic.out .dot { background: var(--lv-danger); box-shadow: 0 0 0 4px var(--lv-danger-light); }

/* ACWR band chip */
.acwr-band { font-weight:700; padding:.3em .6em; border-radius:.5em; font-size:.8rem; }
.acwr-low { background: var(--lv-warning-light); color:#f1962b; }
.acwr-optimal { background: var(--lv-success-light); color:var(--lv-success); }
.acwr-high { background: var(--lv-danger-light); color:var(--lv-danger); }

/* readiness ring */
.ring-metric { text-align:center; }
.ring-metric .rv { font-size:1.6rem; font-weight:800; color: var(--lv-dark); }
.ring-metric .rl { font-size:.75rem; color: var(--lv-muted); }

/* body map */
.bodymap-item { display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px dashed var(--lv-border); }
.bodymap-item:last-child { border-bottom:none; }

/* drill card */
.drill-card { border:1px solid var(--lv-border); border-radius:var(--lv-radius); overflow:hidden; transition: box-shadow .2s, transform .2s; height:100%; }
.drill-card:hover { box-shadow: 0 10px 24px rgba(24,28,50,.08); transform: translateY(-3px); }
.drill-card .thumb { height: 120px; display:flex; align-items:center; justify-content:center; font-size:2.4rem; color:#fff; }
.drill-card .drill-body { padding: 14px 16px; }

/* separator */
.sep { height:1px; background: var(--lv-border); margin: 18px 0; }
.text-muted-2 { color: var(--lv-muted) !important; }

/* mobile overlay */
.lv-overlay { display:none; position: fixed; inset:0; background: rgba(0,0,0,.4); z-index: 1040; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .lv-aside { transform: translateX(-100%); }
  body.aside-open .lv-aside { transform: translateX(0); }
  body.aside-open .lv-overlay { display:block; }
  .lv-main { margin-left: 0; }
  .lv-burger { display: block; }
  .lv-content { padding: 20px 16px 50px; }
  .lv-header { padding: 0 16px; }
  .lv-user .info { display:none; }
}

@media (max-width: 575.98px) {
  .stat-tile .stat-value { font-size: 1.5rem; }
  .lv-toolbar h1 { font-size: 1.15rem; }
  .card-body { padding: 18px; }
}

/* ---------- ACWR oyuncu kartları ---------- */
.acwr-card { position: relative; overflow: hidden; border-radius: var(--lv-radius); transition: box-shadow .2s, transform .2s; height: 100%; }
.acwr-card:hover { box-shadow: 0 12px 28px rgba(24,28,50,.10); transform: translateY(-3px); }
.acwr-card .acwr-strip { height: 5px; }
.acwr-card.band-optimal .acwr-strip { background: linear-gradient(90deg,#50cd89,#2b9c62); }
.acwr-card.band-high .acwr-strip    { background: linear-gradient(90deg,#f1416c,#c81e4e); }
.acwr-card.band-low .acwr-strip     { background: linear-gradient(90deg,#ffc700,#f1962b); }
.acwr-card .acwr-val { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.acwr-card.band-optimal .acwr-val { color: var(--lv-success); }
.acwr-card.band-high .acwr-val    { color: var(--lv-danger); }
.acwr-card.band-low .acwr-val     { color: #f1962b; }

/* yatay ACWR bant çubuğu (0.5–1.6, optimal 0.8–1.3) */
.band-bar { position: relative; height: 8px; border-radius: 6px; background: var(--lv-gray-200); overflow: visible; margin: 4px 0 2px; }
.band-bar .zone { position: absolute; top: 0; bottom: 0; left: 27.3%; width: 45.5%; background: var(--lv-success-light); border-left: 2px solid var(--lv-success); border-right: 2px solid var(--lv-success); }
.band-bar .marker { position: absolute; top: -3px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transform: translateX(-50%); }
.acwr-card.band-optimal .marker { background: var(--lv-success); }
.acwr-card.band-high .marker    { background: var(--lv-danger); }
.acwr-card.band-low .marker     { background: var(--lv-warning); }
.band-scale { display:flex; justify-content:space-between; font-size:.62rem; color: var(--lv-muted); margin-top:2px; }

.acwr-mini { text-align:center; padding: 6px 0; }
.acwr-mini .m-val { font-weight:700; color: var(--lv-dark); font-size:.95rem; }
.acwr-mini .m-lbl { font-size:.65rem; color: var(--lv-muted); text-transform:uppercase; letter-spacing:.04em; }

/* segmented kontrol (focus geçişi) */
.focus-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.focus-tabs a { padding:.4rem .8rem; border-radius:.6rem; font-size:.82rem; font-weight:600; text-decoration:none; background:var(--lv-gray-100); color:#5e6278; transition:.15s; }
.focus-tabs a:hover { background: var(--lv-primary-light); color: var(--lv-primary); }
.focus-tabs a.active { background: var(--lv-primary); color:#fff; }

/* login */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
  background: radial-gradient(circle at 20% 20%, #1e2a4a 0%, #12172b 60%, #0b0f1e 100%); }
.login-card { width:100%; max-width:440px; background:#fff; border-radius:1.2rem; padding:42px 38px; box-shadow:0 25px 60px rgba(0,0,0,.4); }
.login-logo { display:flex; align-items:center; gap:12px; justify-content:center; margin-bottom:26px; }
.login-logo .badge-club { width:52px; height:52px; border-radius:13px; background:linear-gradient(135deg,var(--lv-primary),#0068c9); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:1.4rem; }
.form-control, .form-select { border-radius:.65rem; border:1px solid var(--lv-gray-300); padding:.7rem .95rem; font-size:.9rem; background:var(--lv-gray-100); }
.form-control:focus, .form-select:focus { border-color:var(--lv-primary); box-shadow:none; background:#fff; }
.form-label { font-weight:600; color:var(--lv-dark); font-size:.85rem; margin-bottom:.4rem; }
.demo-hint { background:var(--lv-primary-light); border-radius:.65rem; padding:12px 14px; font-size:.8rem; color:#0068c9; }
