/* ScoutFlow Academy MVP */
:root {
  --purple: #6F5AEF;
  --purple-2: #8D7CFF;
  --purple-dark: #4B35C9;
  --purple-soft: #EEEAFE;
  --dark: #17132A;
  --bg: #F7F7FC;
  --card: #FFFFFF;
  --text: #1F2430;
  --muted: #73788D;
  --line: #E6E8F3;
  --green: #22A06B;
  --yellow: #F5A524;
  --red: #E5484D;
  --blue: #2F80ED;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 265px;
  background: var(--dark);
  color: #fff;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-2), var(--purple), var(--purple-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: -2px;
  box-shadow: 0 10px 30px rgba(111, 90, 239, .45);
}

.brand h1 { margin: 0; font-size: 21px; }
.brand p { margin: 2px 0 0; font-size: 11px; color: #BDB7E8; }

.nav { display: flex; flex-direction: column; gap: 5px; }

.nav-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 14px;
  color: #D8D5F8;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(111, 90, 239, .24);
  color: #fff;
}

.main {
  flex: 1;
  padding: 26px;
  max-width: 1500px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.topbar h2 { font-size: 30px; margin: 0 0 4px; }
.topbar p { color: var(--muted); margin: 0; }

.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  border: 0;
  border-radius: 13px;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary { background: var(--purple); color: #fff; }
.btn-light { background: #fff; border: 1px solid var(--line); color: var(--text); }

.smart-search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(34, 30, 60, .04);
}

.smart-search input {
  border: 0;
  outline: 0;
  font-size: 15px;
  width: 100%;
  font-weight: 600;
}

.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(34, 30, 60, .05);
}

.kpi small { color: var(--muted); font-weight: 800; }
.kpi strong { display: block; font-size: 28px; margin-top: 7px; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
}

.section-title h3 { margin: 0; font-size: 19px; }

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.green { background: #EAF8F1; color: var(--green); }
.badge.yellow { background: #FFF6DF; color: #9A6700; }
.badge.red { background: #FDECEC; color: var(--red); }
.badge.blue { background: #EAF2FF; color: var(--blue); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filter {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 800;
  color: #4A4F62;
}

.players { grid-template-columns: repeat(4, 1fr); }

.player-card { overflow: hidden; padding: 0; }
.player-photo {
  height: 145px;
  background: linear-gradient(135deg, #DDD, #F8F7FF);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-weight: 900;
}

.player-body { padding: 15px; }
.player-body h4 { margin: 0 0 10px; font-size: 18px; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 0;
  color: #4E5366;
  font-weight: 700;
}

.icons { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.icon {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  background: #FBFBFF;
  font-size: 12px;
  font-weight: 900;
}

.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card-actions .btn { font-size: 12px; padding: 9px 10px; flex: 1; }

.two { grid-template-columns: 1.25fr .75fr; margin-top: 18px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.tab {
  padding: 9px 12px;
  border-radius: 999px;
  background: #F2F3FA;
  font-weight: 900;
  color: #5B6074;
  font-size: 13px;
}
.tab.active { background: var(--purple); color: #fff; }

.profile-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}

.big-avatar {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background: linear-gradient(135deg, #E3E1FF, #C9C1FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--purple-dark);
}

.profile-head h3 { font-size: 25px; margin: 0 0 5px; }
.muted { color: var(--muted); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.info {
  background: #FBFBFF;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.info small { display: block; color: var(--muted); font-weight: 800; }
.info strong { display: block; margin-top: 5px; }

.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.stage {
  background: #FBFBFF;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  min-height: 105px;
}
.stage h4 { margin: 0 0 10px; font-size: 13px; }
.mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  margin: 7px 0;
  font-size: 12px;
  font-weight: 800;
}

textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  font-family: inherit;
  font-weight: 600;
  resize: vertical;
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
input, select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  font-family: inherit;
  font-weight: 700;
}

.permission-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.permission {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #D8DCEA;
  position: relative;
  flex: 0 0 auto;
}
.switch.on { background: var(--purple); }
.switch:after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
}
.switch.on:after { left: 21px; }

@media (max-width: 1200px) {
  .players { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .sidebar { display: none; }
  .main { padding: 18px; }
  .players, .info-grid, .permission-grid, .form-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .kpis { grid-template-columns: 1fr; }
}
