/* ============================================================
   Sportsteca — App Styles
   ============================================================ */

:root {
  --st-green:      #2e7d32;
  --st-green-light:#4caf50;
  --st-dark:       #1a1a2e;
  --st-sidebar-w:  240px;
  --st-sidebar-bg: #1b5e20;
  --st-sidebar-txt:#e8f5e9;
}

/* ── Layout ─────────────────────────────────────────────── */
body { background: #f5f7fa; font-family: 'Segoe UI', system-ui, sans-serif; }

#app-wrapper { min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
#sidebar {
  width: var(--st-sidebar-w);
  background: var(--st-sidebar-bg);
  color: var(--st-sidebar-txt);
  transition: width .25s ease;
  min-height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
}
#sidebar .sidebar-brand { color: #fff; }
#sidebar .nav-link { color: rgba(255,255,255,.75); border-radius: 8px; margin-bottom: 2px; }
#sidebar .nav-link:hover,
#sidebar .nav-link.active { background: rgba(255,255,255,.15); color: #fff; }
#sidebar hr { border-color: rgba(255,255,255,.2); }

#sidebar.collapsed { width: 64px; overflow: hidden; }
#sidebar.collapsed .sidebar-brand span.fs-5,
#sidebar.collapsed .nav-link span:not(.bi),
#sidebar.collapsed strong { display: none; }

/* ── Avatar ─────────────────────────────────────────────── */
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--st-green-light);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--st-green);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.3rem; flex-shrink: 0;
}

/* ── Stat cards ──────────────────────────────────────────── */
.stat-card {
  border: none; border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .icon-wrap {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-hover tbody tr:hover { background: #f0f7f0; cursor: pointer; }

/* ── Badges ──────────────────────────────────────────────── */
.badge-role-admin   { background:#7b1fa2; }
.badge-role-coach   { background:#1565c0; }
.badge-role-manager { background:#e65100; }
.badge-role-parent  { background:#558b2f; }

/* ── Formation field ─────────────────────────────────────── */
#formation-field {
  background: #388e3c;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  touch-action: none;
}
#formation-field .field-line {
  position: absolute;
  border: 2px solid rgba(255,255,255,.3);
}
.player-chip {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; border: 3px solid #1565c0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: grab; position: absolute;
  font-size: .65rem; font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
  transition: box-shadow .15s;
  user-select: none;
  line-height: 1.1;
}
.player-chip:active { cursor: grabbing; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.player-chip .jersey { font-size: .8rem; font-weight: 900; color: #1565c0; }
.player-chip.bench  { border-color: #9e9e9e; }

/* ── Auth pages ──────────────────────────────────────────── */
.auth-card {
  max-width: 440px; margin: 0 auto;
  border-radius: 16px; border: none;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}
.auth-logo { font-size: 3rem; }

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }

/* ── Calendar ────────────────────────────────────────────── */
#schedule-calendar { background:#fff; border-radius:12px; padding:1rem; }

/* ── Sidebar overlay (mobile) ────────────────────────────── */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1040;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: -260px;
    transition: left .25s;
    z-index: 1050;
    height: 100dvh;
    overflow-y: auto;
  }
  #sidebar.open { left: 0; }
  #sidebar.open ~ #sidebar-overlay,
  #sidebar-overlay.visible { display: block; }
  #page-content { margin-left: 0 !important; }
  #sidebar-close-btn { display: inline-flex !important; }
}
@media (min-width: 769px) {
  #sidebar-close-btn { display: none !important; }
}
