/* ================================
   Admin Dashboard Styles
   ================================ */

/* Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-container {
  display: flex;
  width: 100%;
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  background: linear-gradient(135deg, var(--cpar-blue-700) 0%, #0d2445 100%);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.admin-sidebar.collapsed {
  width: 80px;
}

.admin-sidebar.collapsed .nav-label,
.admin-sidebar.collapsed .sidebar-title,
.admin-sidebar.collapsed .nav-section-title {
  display: none;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  margin: 0;
  color: var(--cpar-gold);
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-inverse);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.sidebar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-toggle span {
  width: 20px;
  height: 2px;
  background-color: currentColor;
  transition: all 0.3s ease;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: var(--step--1);
  font-weight: 600;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  transition: color 0.2s ease;
}

.admin-sidebar.collapsed .nav-section-title {
  padding-left: 15px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-size: var(--step-0);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
}

.nav-item.active {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: var(--cpar-gold);
  color: var(--text-inverse);
  font-weight: 500;
}

.nav-icon {
  font-size: 20px;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
}

.admin-sidebar.collapsed .nav-item {
  padding: 12px 15px;
  justify-content: center;
}

.admin-sidebar.collapsed .nav-label {
  display: none;
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.admin-main {
  flex: 1;
  margin-left: 280px;
  background: var(--surface);
  transition: margin-left 0.3s ease;
  min-height: 100vh;
}

.admin-sidebar.collapsed ~ .admin-main {
  margin-left: 80px;
}

.admin-content {
  padding: 40px;
}

/* Dashboard */
.admin-dashboard {
  width: 100%;
}

.dashboard-header {
  margin-bottom: 40px;
}

.dashboard-header h1 {
  font-size: var(--step-4);
  margin-bottom: 8px;
  color: var(--cpar-blue-700);
}

.dashboard-subtitle {
  color: var(--muted);
  font-size: var(--step-0);
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.dashboard-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.card-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.dashboard-card h2 {
  font-size: var(--step-2);
  margin-bottom: 12px;
}

.dashboard-card p {
  color: var(--muted);
  font-size: var(--step-0);
  margin-bottom: 24px;
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Section Views */
.admin-section {
  width: 100%;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-header h1 {
  font-size: var(--step-3);
  margin: 0;
}

/* Tables */
.table-container {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-0);
}

.admin-table thead {
  background-color: var(--surface);
  border-bottom: 2px solid var(--border);
}

.admin-table th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: var(--cpar-blue-700);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.admin-table tbody tr:hover {
  background-color: var(--surface);
}

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

.text-center {
  text-align: center;
  color: var(--muted);
}

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

/* Forms */
.admin-form {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 600px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--cpar-blue-700);
  font-size: var(--step-0);
}

.form-input,
.form-input textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--step-0);
  color: var(--text);
  background: var(--bg);
  transition: all 0.2s ease;
}

.form-input:focus,
textarea.form-input:focus {
  outline: none;
  border-color: var(--cpar-blue-700);
  box-shadow: 0 0 0 3px rgba(26, 62, 113, 0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Fieldsets & help text */
.form-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  background: var(--surface);
}

.form-fieldset legend {
  font-weight: 600;
  font-size: var(--step-1);
  padding: 0 10px;
  color: var(--text);
}

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

.form-help,
.form-text {
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
  color: var(--muted);
  font-style: italic;
}

/* File & media preview blocks */
.current-file {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.current-file img {
  display: block;
}

.current-file label {
  display: block;
  margin-top: 8px;
  font-size: 0.9em;
  color: #d9534f;
  cursor: pointer;
}

.file-entry {
  margin-bottom: 10px;
}

.file-entry:last-child {
  margin-bottom: 0;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--cpar-blue-700);
  color: var(--text-inverse);
  text-decoration: none;
  border-radius: 4px;
}

.file-link:hover {
  background: #0d2445;
}

.media-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
}

.media-row:last-child {
  margin-bottom: 0;
}

.media-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-actions-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Image helpers */
.img-preview {
  max-width: 160px;
  border-radius: 4px;
  display: block;
}

.img-preview--lg {
  max-width: 200px;
}

.img-preview--sm {
  max-width: 120px;
}

.img-avatar {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
}

.img-avatar--lg {
  width: 100px;
  height: 100px;
  border-radius: 8px;
}

.img-logo {
  height: 40px;
  max-width: 100px;
  object-fit: contain;
}

.img-logo--lg {
  height: 80px;
  max-width: 200px;
  object-fit: contain;
}

.img-hero-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.placeholder-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ddd;
}

.placeholder-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: #ddd;
}

/* Filters & tables */
.filters-container {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.filter-form {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-weight: 600;
  color: var(--cpar-blue-700);
  font-size: 14px;
}

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

.table-responsive {
  overflow-x: auto;
}

/* Admin header */
.admin-header {
  margin-bottom: 32px;
}

.admin-header h1 {
  font-size: var(--step-3);
  margin: 0 0 8px 0;
  color: var(--cpar-blue-700);
}

.admin-subtitle {
  color: var(--muted);
  margin: 0;
  font-size: var(--step-0);
}

/* Admin settings sections */
.form-section {
  background: var(--surface);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--cpar-blue-700);
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background: var(--bg);
}

.form-control:focus {
  outline: none;
  border-color: var(--cpar-blue-700);
  box-shadow: 0 0 0 3px rgba(26, 62, 113, 0.1);
}

.form-text code {
  background: var(--border);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* File lists (media upload) */
.file-list {
  margin-top: 15px;
}

.file-list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px;
  background: var(--surface);
}

.file-list-title {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 16px;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.file-list-item:last-child {
  margin-bottom: 0;
}

.file-list-status {
  font-weight: 700;
  min-width: 20px;
}

.file-list-status.is-valid {
  color: #28a745;
}

.file-list-status.is-invalid {
  color: #dc3545;
}

.file-list-name {
  flex: 1;
}

.file-list-size {
  margin-left: auto;
  color: #666;
  font-size: 12px;
  min-width: 70px;
  text-align: right;
}

.file-list-summary {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.file-list-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.file-list-summary-row:last-child {
  margin-bottom: 0;
}

/* Sidebar sub-item */
.nav-item--sub {
  margin-left: 25px;
  font-size: 14px;
  padding: 8px 12px;
}

/* Inline icon alignment */
.icon-inline {
  vertical-align: middle;
}

/* Admin login */
.admin-login-page {
  background: linear-gradient(135deg, var(--cpar-blue-700) 0%, #0f2a4d 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
}

.admin-login-page .login-container {
  width: 100%;
  max-width: 420px;
  position: relative;
}

.admin-login-page .login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(26, 62, 113, 0.3);
  padding: 3rem 2rem;
  position: relative;
  z-index: 10;
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

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

.login-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(26, 62, 113, 0.15));
}

.login-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cpar-blue-700);
  margin: 0 0 0.5rem 0;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

.login-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fee;
  border-left: 4px solid #e74c3c;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #c0392b;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

.error-icon {
  font-size: 1.2em;
  flex-shrink: 0;
}

.error-text {
  line-height: 1.4;
}

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

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

.login-form .form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.label-icon {
  font-size: 1.1em;
}

.login-form .form-input {
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.login-form .form-input:focus {
  outline: none;
  border-color: var(--cpar-blue-700);
  background: white;
  box-shadow: 0 0 0 4px rgba(26, 62, 113, 0.1);
}

.login-form .form-input::placeholder {
  color: var(--muted);
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--cpar-blue-700), #0f2a4d);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(26, 62, 113, 0.35);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
  transform: translateX(4px);
}

.btn-text {
  font-size: 1rem;
}

.login-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cpar-blue-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: #0f2a4d;
  text-decoration: none;
  transform: translateX(-4px);
}

.back-icon {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.back-link:hover .back-icon {
  transform: translateX(-2px);
}

.login-decoration {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}

.decoration-1 {
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.5);
  top: -80px;
  right: -80px;
  animation: float 6s ease-in-out infinite;
}

.decoration-2 {
  width: 150px;
  height: 150px;
  background: rgba(203, 169, 97, 0.3);
  bottom: -60px;
  left: -60px;
  animation: float 8s ease-in-out infinite reverse;
}

.decoration-3 {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.3);
  bottom: 10%;
  right: 5%;
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(20px);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--step-0);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--step--1);
}

.btn-primary {
  background: var(--cpar-blue-700);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: #0d2445;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 62, 113, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--cpar-blue-700);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  transform: translateY(-2px);
}

.btn-danger {
  background: #d32f2f;
  color: var(--text-inverse);
}

.btn-danger:hover {
  background: #b71c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--cpar-blue-700);
  border-bottom-color: var(--cpar-blue-700);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: var(--step--1);
  font-weight: 600;
  white-space: nowrap;
}

.badge-success {
  background-color: #d1f2eb;
  color: #0c6b5d;
}

.badge-danger {
  background-color: #fce8e6;
  color: #ae2a19;
}

.badge-warning {
  background-color: #fef7e0;
  color: #9a6b00;
}

/* Members Select */
.members-select {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.member-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-checkbox:hover {
  background: var(--border);
}

.member-checkbox input {
  cursor: pointer;
}

/* Schedule Calendar Styles */
.form-inline {
  display: inline-block;
}

.color-badge {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

.badge-active {
  color: #28a745;
  font-weight: bold;
}

.badge-inactive {
  color: #999;
}

.group-name-with-color {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.season-selector,
.group-selector,
.day-selector {
  min-width: 150px;
}

.schedule-calendar {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 150px repeat(7, 1fr);
  gap: 0;
  background: var(--cpar-blue-700);
  color: white;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.calendar-header > div {
  padding: 16px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.calendar-header > div:last-child {
  border-right: none;
}

.group-column {
  text-align: left;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.day-name {
  font-size: 14px;
  font-weight: 600;
}

.day-number {
  font-size: 11px;
  opacity: 0.8;
}

.calendar-body {
  overflow-x: auto;
}

.group-row {
  display: grid;
  grid-template-columns: 150px repeat(7, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
  min-height: 120px;
}

.group-row:last-child {
  border-bottom: none;
}

.group-cell {
  padding: 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
}

.group-cell strong {
  color: var(--cpar-blue-700);
  word-break: break-word;
}

.group-cell .btn {
  padding: 4px 8px;
  font-size: 11px;
}

.day-cell {
  padding: 8px;
  border-right: 1px solid var(--border);
  min-height: 100%;
}

.day-cell:last-child {
  border-right: none;
}

.no-schedule {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100px;
}

.no-schedule .btn {
  padding: 8px 12px;
  font-size: 18px;
  min-width: 40px;
  height: 40px;
}

.schedule-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

.schedule-slot {
  background: #d1f2eb;
  border: 1px solid #0c6b5d;
  border-radius: 6px;
  padding: 6px;
  font-size: 11px;
  color: #0c6b5d;
}

.schedule-slot.inactive {
  background: #f0f0f0;
  border-color: #999;
  color: #666;
  text-decoration: line-through;
}

.slot-time {
  font-weight: 600;
  margin-bottom: 2px;
}

.slot-location {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.slot-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.btn-icon {
  cursor: pointer;
  font-size: 12px;
  flex: 1;
  text-align: center;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-icon:hover {
  opacity: 1;
}

.schedule-actions {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.schedule-actions h3 {
  margin: 0 0 16px 0;
  font-size: var(--step-1);
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Group and Schedule View Styles */
.group-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.group-schedule-view {
  display: grid;
  gap: 32px;
}

.week-overview {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.week-overview h3 {
  margin: 0 0 20px 0;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.week-day {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.day-header h4 {
  margin: 0;
  color: var(--cpar-blue-700);
  font-size: var(--step-0);
}

.btn-link {
  background: transparent;
  color: var(--cpar-blue-700);
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-link:hover {
  opacity: 1;
}

.schedules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.no-schedules {
  color: var(--muted);
  font-size: var(--step--1);
  margin: 0;
  padding: 12px;
  text-align: center;
}

.schedule-card {
  background: white;
  border: 1px solid #d1f2eb;
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
}

.schedule-card.inactive {
  background: #f5f5f5;
  border-color: #ccc;
  opacity: 0.7;
}

.schedule-card strong {
  color: var(--cpar-blue-700);
  display: block;
  margin-bottom: 4px;
}

.schedule-location {
  color: var(--muted);
  font-size: 12px;
}

.schedule-notes {
  font-size: 11px;
  color: #666;
  font-style: italic;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.schedule-card .schedule-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.schedule-card .btn {
  flex: 1;
  padding: 4px 8px;
  font-size: 11px;
  min-width: 0;
}

.group-stats {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.group-stats h3 {
  margin: 0 0 20px 0;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--cpar-blue-700);
  margin-bottom: 8px;
}

.stat-label {
  font-size: var(--step--1);
  color: var(--muted);
}

.group-actions-bulk {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.group-actions-bulk h3 {
  margin: 0 0 16px 0;
}

.bulk-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bulk-buttons .btn {
  flex: 1;
  min-width: 200px;
}

/* Day View Styles */
.day-actions {
  display: flex;
  gap: 12px;
}

.timeline-view {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.timeline-container {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.empty-day {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.empty-day p {
  margin-bottom: 24px;
}

.timeline-slot {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.timeline-slot:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.slot-time-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.time-badge {
  background: var(--cpar-blue-700);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  min-width: 60px;
  text-align: center;
}

.slot-count {
  color: var(--muted);
  font-size: var(--step--1);
}

.slot-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all 0.2s ease;
}

.group-card:hover {
  border-color: var(--cpar-blue-700);
  box-shadow: 0 4px 12px rgba(26, 62, 113, 0.1);
}

.group-card.inactive {
  opacity: 0.6;
  background: #f5f5f5;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-header strong {
  color: var(--cpar-blue-700);
}

.time-duration {
  background: #d1f2eb;
  color: #0c6b5d;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.location-item,
.notes-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 8px;
  font-size: 14px;
}

.location-item .label,
.notes-item .label {
  color: var(--muted);
  font-weight: 600;
}

.location-item .value,
.notes-item .value {
  word-break: break-word;
}

.notes-item .value {
  font-style: italic;
  color: #666;
}

.card-footer {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-footer .btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
}

.timeline-stats {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.timeline-stats h3 {
  margin: 0 0 16px 0;
  font-size: var(--step-1);
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--cpar-blue-700);
}

.stat-label {
  font-size: var(--step--1);
  color: var(--muted);
}

/* Quick Add Form Styles */
.quick-add-form {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

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

.form-value {
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--cpar-blue-700);
  font-weight: 600;
}

.quick-tips {
  background: #fef7e0;
  border-left: 4px solid var(--cpar-gold);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-top: 24px;
}

.quick-tips h3 {
  margin: 0 0 12px 0;
  font-size: var(--step-0);
  color: var(--cpar-blue-700);
}

.quick-tips ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: var(--step-0);
}

.quick-tips li {
  margin-bottom: 8px;
}

.quick-tips li:last-child {
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .timeline-view {
    grid-template-columns: 1fr;
  }

  .timeline-stats {
    height: auto;
  }
  .week-grid {
    grid-template-columns: 1fr;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }

  .bulk-buttons {
    flex-direction: column;
  }

  .bulk-buttons .btn {
    width: 100%;
    min-width: auto;
  }
}
/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .admin-sidebar.collapsed {
    width: 280px;
  }

  .admin-sidebar.collapsed .nav-label,
  .admin-sidebar.collapsed .sidebar-title,
  .admin-sidebar.collapsed .nav-section-title {
    display: block;
  }

  .admin-main {
    margin-left: 0;
    width: 100%;
  }

  .admin-sidebar.collapsed ~ .admin-main {
    margin-left: 0;
  }

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

  .admin-content {
    padding: 24px;
  }

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

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-form {
    padding: 24px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  /* Schedule Calendar Responsive */
  .calendar-header,
  .group-row {
    grid-template-columns: 120px repeat(7, 100px) !important;
  }

  .group-cell {
    padding: 8px;
    font-size: 13px;
  }

  .day-cell {
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .admin-content {
    padding: 16px;
  }

  .dashboard-header h1 {
    font-size: var(--step-3);
  }

  .dashboard-card {
    padding: 20px;
  }

  .card-icon {
    font-size: 36px;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn {
    width: 100%;
  }

  .section-header {
    gap: 12px;
  }

  .admin-table {
    font-size: var(--step--1);
  }

  .admin-table th,
  .admin-table td {
    padding: 8px;
  }

  .sidebar-toggle {
    width: 36px;
    height: 36px;
  }

  .sidebar-toggle span {
    width: 18px;
  }

  /* Schedule Calendar Responsive Mobile */
  .schedule-calendar {
    font-size: 12px;
  }

  .calendar-header,
  .group-row {
    grid-template-columns: 100px repeat(7, 80px) !important;
  }

  .group-cell {
    padding: 6px;
    font-size: 12px;
  }

  .day-name {
    font-size: 12px;
  }

  .day-number {
    font-size: 10px;
  }

  .schedule-slot {
    padding: 4px;
    font-size: 10px;
  }

  .slot-time {
    margin-bottom: 1px;
  }

  .slot-location {
    display: none;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }

  /* Quick Add Form Responsive */
  .form-columns {
    grid-template-columns: 1fr;
  }

  .quick-add-form {
    padding: 24px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* ================================
   DARK MODE – Admin overrides
   ================================ */
@media (prefers-color-scheme: dark) {
  .admin-main {
    background: var(--bg);
  }

  .dashboard-card,
  .admin-form,
  .table-container,
  .schedule-calendar,
  .schedule-actions,
  .week-overview,
  .group-stats,
  .group-actions-bulk,
  .timeline-container,
  .timeline-stats,
  .quick-add-form,
  .group-stats,
  .group-actions-bulk {
    background: var(--surface);
    border: 1px solid var(--border);
  }

  .admin-table thead {
    background-color: var(--surface);
  }

  .admin-table th {
    color: #cfe0ff;
  }

  .admin-table tbody tr:hover {
    background-color: color-mix(in srgb, var(--surface) 80%, #000 20%);
  }

  .form-input,
  .form-input textarea {
    background: #0f1420;
    border-color: var(--border);
    color: var(--text);
  }

  .form-input:focus,
  textarea.form-input:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cpar-blue-700) 35%, transparent);
  }

  .member-checkbox {
    background: var(--surface);
  }

  .member-checkbox:hover {
    background: color-mix(in srgb, var(--surface) 85%, #000 15%);
  }

  .day-cell,
  .group-cell,
  .week-day,
  .stat,
  .stat-card,
  .form-value {
    background: var(--surface);
    border-color: var(--border);
  }

  .schedule-card {
    background: #0f1524;
    border-color: #1c2a44;
    color: var(--text);
  }

  .schedule-card.inactive,
  .group-card.inactive {
    background: #10151f;
    border-color: #2a2f3b;
  }

  .schedule-notes,
  .notes-item .value {
    color: var(--muted);
  }

  .schedule-notes,
  .schedule-card .schedule-actions,
  .slot-actions,
  .card-footer,
  .card-header {
    border-top-color: #1c2a44;
    border-bottom-color: #1c2a44;
  }

  .badge-success {
    background-color: #0f2f2a;
    color: #7be6d5;
  }

  .badge-danger {
    background-color: #3a1512;
    color: #ffb4a8;
  }

  .badge-warning {
    background-color: #3a2b0f;
    color: #ffd78a;
  }

  .quick-tips {
    background: #1f1a10;
    border-left-color: var(--cpar-gold);
  }

  .quick-tips ul {
    color: var(--text);
  }

  .schedule-slot {
    background: #0f2b25;
    border-color: #0c6b5d;
    color: #9be8dc;
  }

  .schedule-slot.inactive {
    background: #12161d;
    border-color: #2a2f3b;
    color: #9aa4b2;
  }

  .time-badge {
    background: color-mix(in srgb, var(--cpar-blue-700) 80%, #000 20%);
  }
}