/* ============================================
   IT RISING STARS — Admin Panel Styles
   Premium Dark Glassmorphism Design
   ============================================ */

/* ========== LOGIN SCREEN ========== */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-particles {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

.login-card {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.08);
  animation: loginFadeIn 0.6s ease;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto;
  border: 3px solid var(--border-medium);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 1.2em;
  transition: all 0.3s ease;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.login-back:hover {
  color: var(--accent-secondary);
}

/* ========== COMMON FORM ELEMENTS ========== */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 1;
  pointer-events: none;
}

.admin-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: rgba(6, 10, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s ease;
}

.admin-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.admin-input::placeholder {
  color: var(--text-muted);
}

.admin-input.no-icon {
  padding-left: 1rem;
}

.admin-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(6, 10, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  min-height: 100px;
  resize: vertical;
  transition: all 0.2s ease;
}

.admin-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.admin-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(6, 10, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5rem;
}

.admin-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.admin-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.form-field .admin-input,
.form-field .admin-textarea,
.form-field .admin-select {
  padding-left: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ========== ADMIN BUTTONS ========== */
.btn-admin-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
  white-space: nowrap;
}

.btn-admin-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.btn-admin-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-admin-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-secondary);
  background: rgba(59, 130, 246, 0.06);
}

.btn-admin-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--gradient-gold);
  color: #1a1a2e;
  border: none;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.btn-admin-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.btn-admin-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.btn-admin-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* ========== ADMIN LAYOUT ========== */
.admin-dashboard {
  display: none;
  min-height: 100vh;
  background: var(--bg-primary);
}

.admin-dashboard.active {
  display: flex;
}

/* ========== SIDEBAR ========== */
.admin-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: rgba(13, 20, 36, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--border-medium);
}

.sidebar-brand-text {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: block;
}

.sidebar-brand-sub {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.06);
}

.sidebar-link.active {
  color: var(--accent-secondary);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.5rem 0;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logout-link:hover {
  color: var(--accent-red) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

/* ========== MOBILE HEADER ========== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(13, 20, 36, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 90;
}

.mobile-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.mobile-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-secondary);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 95;
}

.sidebar-overlay.active {
  display: block;
}

/* ========== MAIN CONTENT ========== */
.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  min-height: 100vh;
}

/* ========== SETUP BANNER ========== */
.setup-banner {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.banner-content i {
  color: var(--accent-secondary);
  font-size: 1.1rem;
}

.banner-link {
  color: var(--accent-secondary);
  text-decoration: underline;
  cursor: pointer;
}

/* ========== ADMIN SECTIONS ========== */
.admin-section {
  display: none;
  animation: sectionFadeIn 0.3s ease;
}

.admin-section.active {
  display: block;
}

@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title-bar h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title-bar h2 i {
  color: var(--accent-secondary);
  font-size: 1.3rem;
}

/* ========== DASHBOARD ========== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.dash-stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.dash-stat-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dash-stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 0 16px 0 60px;
  opacity: 0.06;
}

.dash-stat-card.blue::after { background: var(--accent-primary); }
.dash-stat-card.gold::after { background: var(--accent-gold); }
.dash-stat-card.green::after { background: var(--accent-green); }
.dash-stat-card.red::after { background: var(--accent-red); }

.dash-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.dash-stat-card.blue .dash-stat-icon {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-secondary);
}

.dash-stat-card.gold .dash-stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-gold-light);
}

.dash-stat-card.green .dash-stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
}

.dash-stat-card.red .dash-stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
}

.dash-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dash-stat-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-quick h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-action-card:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  color: var(--accent-secondary);
}

.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-secondary);
  transition: all 0.3s ease;
}

.quick-action-card:hover .quick-icon {
  background: rgba(59, 130, 246, 0.2);
  transform: scale(1.1);
}

/* ========== ADMIN TABLE ========== */
.admin-table-wrapper {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: rgba(59, 130, 246, 0.06);
}

.admin-table th {
  padding: 0.85rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(59, 130, 246, 0.04);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 0.4rem;
}

.table-player-photo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.table-player-initial {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-primary), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-yes {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
}

.badge-no {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
}

.badge-captain {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold-light);
}

.badge-vc {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.table-link {
  color: var(--accent-secondary);
  font-size: 0.85rem;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

.truncate {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  display: block;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

/* ========== LEADERSHIP MANAGER ========== */
.leadership-manager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.leader-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.leader-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
}

.leader-card.captain-card {
  border-color: rgba(245, 158, 11, 0.3);
}

.leader-card.captain-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 16px 16px 0 0;
}

.leader-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.leader-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border-medium);
}

.leader-avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 2px solid var(--border-medium);
}

.leader-info h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.leader-role-badge {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
}

.captain-card .leader-role-badge {
  color: var(--accent-gold);
}

.leader-message {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.25rem;
}

.leader-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* ========== GALLERY ADMIN GRID ========== */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gallery-admin-item {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gallery-admin-item:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
}

.gallery-admin-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-admin-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 0.5rem;
}

.gallery-admin-placeholder i {
  font-size: 2rem;
  opacity: 0.5;
}

.gallery-admin-info {
  padding: 0.85rem;
}

.gallery-admin-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-admin-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gallery-admin-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.85);
  color: white;
  border: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.gallery-admin-item:hover .gallery-admin-delete {
  opacity: 1;
}

.gallery-admin-delete:hover {
  background: rgba(239, 68, 68, 1);
  transform: scale(1.1);
}

/* ========== SETTINGS ========== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.settings-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.settings-card:hover {
  border-color: var(--border-medium);
}

.settings-card.danger-zone {
  border-color: rgba(239, 68, 68, 0.2);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.settings-card-header i {
  font-size: 1.2rem;
  color: var(--accent-secondary);
}

.danger-zone .settings-card-header i {
  color: var(--accent-red);
}

.settings-card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.settings-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.settings-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.settings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.settings-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.settings-list li i {
  color: var(--accent-green);
  margin-top: 0.2rem;
  font-size: 0.8rem;
}

.settings-list li code {
  background: rgba(59, 130, 246, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--accent-secondary);
}

.connection-status {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}

.connection-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
}

.connection-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

.connection-status.loading {
  display: block;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent-secondary);
}

/* ========== MODAL ========== */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}

.admin-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

.modal-container {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  width: 95%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--text-secondary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* ========== CONFIRM DIALOG ========== */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
}

.confirm-dialog.active {
  display: flex;
}

.confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.confirm-box {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modalSlideIn 0.25s ease;
}

.confirm-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
  color: var(--accent-red);
}

.confirm-box h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.confirm-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ========== TOAST CONTAINER ========== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 700;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease;
  min-width: 280px;
}

.toast.removing {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.toast.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
}

.toast.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-secondary);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
  }

  .admin-main {
    margin-left: 0;
    padding: 1.5rem;
    padding-top: calc(56px + 1.5rem);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .leadership-manager {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  .admin-table-wrapper {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 600px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .gallery-admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
  }

  .toast {
    min-width: auto;
  }

  .modal-container {
    width: 98%;
    max-height: 90vh;
  }
}
