/* ═══════════════════════════════════════════════════════════
   AGAPE LOVE FC — DESIGN SYSTEM
   Palette: Chlorophyll-inspired deep green + warm accents
═══════════════════════════════════════════════════════════ */

:root {
  /* Core Colors */
  --green-900: #0a1f02;
  --green-800: #122b08;
  --green-700: #1a6b3c;
  --green-600: #2d8a52;
  --green-500: #3aaa68;
  --green-400: #5ec98a;
  --green-300: #8fdcaa;
  --green-100: #e8f7ee;
  --green-50:  #f2fbf5;

  --accent-lime: #b8f369;
  --accent-gold: #f0c040;
  --accent-red:  #e84040;
  --accent-blue: #4a90d9;
  --accent-orange: #f07840;

  --surface-0: #ffffff;
  --surface-1: #f7faf8;
  --surface-2: #eef4f0;
  --surface-3: #ddeae1;

  --text-primary:   #0d1f12;
  --text-secondary: #3d5c47;
  --text-muted:     #7a9e85;
  --text-inverse:   #ffffff;

  --border-light: #d4e8da;
  --border-mid:   #b0d0bc;

  --shadow-sm: 0 1px 3px rgba(10,31,2,0.08);
  --shadow-md: 0 4px 16px rgba(10,31,2,0.10);
  --shadow-lg: 0 8px 32px rgba(10,31,2,0.14);
  --shadow-xl: 0 16px 48px rgba(10,31,2,0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  --sidebar-w: 260px;
  --topbar-h: 64px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--surface-1); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 40%, #1a3d20 70%, #0d2b10 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  background: var(--accent-lime);
  animation: floatShape 8s ease-in-out infinite;
}
.shape-1 { width: 400px; height: 400px; top: -100px; right: -80px; animation-delay: 0s; }
.shape-2 { width: 250px; height: 250px; bottom: -60px; left: -40px; animation-delay: 2s; }
.shape-3 { width: 180px; height: 180px; top: 40%; left: 10%; animation-delay: 4s; }
.shape-4 { width: 120px; height: 120px; top: 20%; right: 20%; animation-delay: 1s; }

@keyframes floatShape {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 900px;
  width: 100%;
  align-items: center;
  position: relative;
  z-index: 1;
}

.login-brand { color: white; }

.login-logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.login-logo {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  padding: 10px;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,243,105,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(184,243,105,0); }
}

.login-ngo-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  line-height: 1.1;
}
.login-tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-welcome-anim {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.welcome-word {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-lime);
  opacity: 0;
  transform: translateY(20px);
  animation: wordReveal 0.6s ease forwards;
  line-height: 1.1;
}
.welcome-word.delay-1 { animation-delay: 0.2s; color: white; }
.welcome-word.delay-2 { animation-delay: 0.4s; color: var(--green-300); }
@keyframes wordReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* Login Card */
.login-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.1);
  animation: cardSlideIn 0.5s ease 0.1s both;
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.login-card-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

.login-tabs {
  display: flex;
  gap: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}
.login-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}
.login-tab.active {
  background: var(--green-700);
  color: white;
  box-shadow: var(--shadow-sm);
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--surface-0);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(58,170,104,0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }

.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 44px; }
.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 4px;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--accent-red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(26,107,60,0.35);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,107,60,0.45); }
.btn-login:active { transform: translateY(0); }

.login-hint {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   MAIN APP LAYOUT
═══════════════════════════════════════════════════════════ */
.main-app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--green-900) 0%, #0f2a10 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 6px;
  flex-shrink: 0;
}
.sidebar-ngo-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}
.sidebar-role-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-lime);
  color: var(--green-900);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}
.sidebar-close {
  color: rgba(255,255,255,0.5);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: none;
}
.sidebar-close:hover { color: white; background: rgba(255,255,255,0.1); }

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 12px 8px 6px;
  margin-top: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: white;
  box-shadow: 0 2px 8px rgba(26,107,60,0.4);
}
.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}
.btn-logout:hover { background: rgba(232,64,64,0.15); color: #ff8080; }

/* APP CONTENT */
.app-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: var(--surface-0);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.hamburger {
  color: var(--text-secondary);
  padding: 8px;
  border-radius: var(--radius-sm);
  display: none;
}
.hamburger:hover { background: var(--surface-2); }
.topbar-breadcrumb {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  transition: var(--transition);
}
.topbar-search:focus-within {
  border-color: var(--green-500);
  background: white;
  box-shadow: 0 0 0 3px rgba(58,170,104,0.1);
}
.topbar-search svg { color: var(--text-muted); flex-shrink: 0; }
.topbar-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--text-primary);
  width: 180px;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  font-family: var(--font-display);
}

/* PAGE AREA */
.page-area {
  flex: 1;
  padding: 28px 28px 40px;
  animation: pageIn 0.3s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   COMMON COMPONENTS
═══════════════════════════════════════════════════════════ */

/* Page Header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.page-header-left p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: white;
  box-shadow: 0 2px 8px rgba(26,107,60,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,107,60,0.4); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-mid); }
.btn-danger {
  background: #fef2f2;
  color: var(--accent-red);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }
.btn-success {
  background: var(--green-100);
  color: var(--green-700);
  border: 1.5px solid var(--green-300);
}
.btn-sm { padding: 7px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* Cards */
.card {
  background: var(--surface-0);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface-0);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.green { background: var(--green-100); color: var(--green-700); }
.stat-icon.lime { background: #f0ffd4; color: #4a8a00; }
.stat-icon.gold { background: #fffbeb; color: #b45309; }
.stat-icon.blue { background: #eff6ff; color: #1d4ed8; }
.stat-icon.red { background: #fef2f2; color: var(--accent-red); }
.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* Player Cards Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.player-card {
  background: var(--surface-0);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.player-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-300); }
.player-card-photo {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--green-100), var(--surface-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.player-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.player-card-photo .photo-placeholder {
  width: 64px;
  height: 64px;
  background: var(--green-200, #c8ecd4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green-700);
}
.player-card-id-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(10,31,2,0.75);
  color: var(--accent-lime);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}
.player-card-body { padding: 14px; }
.player-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.meta-tag.green { background: var(--green-100); color: var(--green-700); }
.player-card-actions {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
  background: var(--surface-1);
}

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-light); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead { background: var(--surface-2); }
th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
tr:hover td { background: var(--surface-1); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-present { background: var(--green-100); color: var(--green-700); }
.badge-absent { background: #fef2f2; color: var(--accent-red); }
.badge-leave { background: #fffbeb; color: #b45309; }
.badge-fit { background: var(--green-100); color: var(--green-700); }
.badge-unfit { background: #fef2f2; color: var(--accent-red); }
.badge-review { background: #fffbeb; color: #b45309; }

/* Form Sections */
.form-section {
  background: var(--surface-0);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.form-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green-100);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title svg { color: var(--green-600); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

/* Photo Upload */
.photo-upload-area {
  border: 2px dashed var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface-1);
}
.photo-upload-area:hover { border-color: var(--green-500); background: var(--green-50); }
.photo-upload-area.has-photo { padding: 0; overflow: hidden; border-style: solid; }
.photo-upload-area img { width: 100%; height: 200px; object-fit: cover; border-radius: calc(var(--radius-lg) - 2px); }
.photo-upload-icon { color: var(--text-muted); margin-bottom: 8px; }
.photo-upload-text { font-size: 0.875rem; color: var(--text-muted); }
.photo-upload-text strong { color: var(--green-700); }

/* Attendance Calendar */
.attendance-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day-header {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 6px 0;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
  background: var(--surface-2);
  color: var(--text-secondary);
}
.cal-day:hover { border-color: var(--green-400); }
.cal-day.present { background: var(--green-100); color: var(--green-700); border-color: var(--green-300); }
.cal-day.absent { background: #fef2f2; color: var(--accent-red); border-color: #fecaca; }
.cal-day.leave { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.today { border-color: var(--green-600); font-weight: 800; }

/* Notifications */
.notification-list { display: flex; flex-direction: column; gap: 10px; }
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-1);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--green-400);
  font-size: 0.875rem;
}
.notification-item.warning { border-left-color: var(--accent-gold); }
.notification-item.info { border-left-color: var(--accent-blue); }
.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  margin-top: 5px;
  flex-shrink: 0;
}
.notification-item.warning .notification-dot { background: var(--accent-gold); }
.notification-item.info .notification-dot { background: var(--accent-blue); }

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--surface-0);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}
.filter-bar select,
.filter-bar input {
  padding: 8px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--surface-1);
  outline: none;
  transition: var(--transition);
}
.filter-bar select:focus,
.filter-bar input:focus {
  border-color: var(--green-500);
  background: white;
}

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,31,2,0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface-0);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.25s ease;
}
.modal-box.modal-lg { max-width: 860px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-close {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close:hover { background: var(--surface-2); color: var(--text-primary); }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--green-900);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  min-width: 260px;
  max-width: 360px;
}
.toast.success { border-left: 3px solid var(--accent-lime); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
.dashboard-main { display: flex; flex-direction: column; gap: 20px; }
.dashboard-side { display: flex; flex-direction: column; gap: 20px; }

/* ═══════════════════════════════════════════════════════════
   PLAYER DETAIL VIEW
═══════════════════════════════════════════════════════════ */
.player-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--green-900), #1a3d20);
  border-radius: var(--radius-xl);
  color: white;
  margin-bottom: 24px;
}
.player-detail-photo {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  border: 3px solid rgba(255,255,255,0.3);
  overflow: hidden;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.player-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.player-detail-photo .initials {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-lime);
}
.player-detail-info h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
}
.player-detail-info p { color: rgba(255,255,255,0.7); font-size: 0.875rem; margin-top: 4px; }
.player-detail-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-badge {
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* Tabs */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--surface-0);
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: pageIn 0.2s ease; }

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* NGO Presentation */
.ngo-hero {
  background: linear-gradient(135deg, var(--green-900), #1a3d20);
  border-radius: var(--radius-xl);
  padding: 40px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.ngo-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(184,243,105,0.08);
  border-radius: 50%;
}
.ngo-hero h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.ngo-hero p { color: rgba(255,255,255,0.75); max-width: 600px; line-height: 1.7; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 16px; opacity: 0.4; }
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state p { font-size: 0.875rem; }

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  .login-container { grid-template-columns: 1fr; gap: 32px; }
  .login-brand { text-align: center; }
  .login-logo-wrap { justify-content: center; }
  .login-welcome-anim { justify-content: center; }
  .welcome-word { font-size: 1.8rem; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }

  .app-content { margin-left: 0; }
  .hamburger { display: flex; }
  .topbar-search { display: none; }

  .page-area { padding: 16px 16px 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .players-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .page-header-actions { width: 100%; }
  .tab-nav { gap: 2px; }
  .tab-btn { padding: 8px 12px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .players-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-box { border-radius: var(--radius-lg); }
  .login-card { padding: 24px; }
}

/* ═══════════════════════════════════════════════════════════
   PRINT / PDF STYLES
═══════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .page-header-actions, .player-card-actions { display: none !important; }
  .app-content { margin-left: 0; }
  .page-area { padding: 0; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }