/**
 * Urban Institute Admin Dashboard - CSS
 * Modern, dark theme UI
 */

/* ============================================================ */
/* CSS Variables */
/* ============================================================ */

:root {
  --admin-dark: #1e3a5f;
  --admin-dark-lighter: #2d5a87;
  --admin-dark-hover: #264a6e;
  --admin-accent: #f47920;
  --admin-accent-hover: #e06810;
  --admin-text-light: #ffffff;
  --admin-text-muted-light: rgba(255, 255, 255, 0.7);
  --admin-primary: #2563eb;
  --admin-primary-hover: #1d4ed8;
  --admin-success: #16a34a;
  --admin-danger: #dc2626;
  --admin-danger-hover: #b91c1c;
  --admin-bg: #f5f7fa;
  --admin-card-bg: #ffffff;
  --admin-border: #e5e7eb;
  --admin-text: #1f2937;
  --admin-text-muted: #6b7280;
}

/* ============================================================ */
/* Layout & Grid */
/* ============================================================ */

.admin-body {
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
}

.admin-header {
  background: linear-gradient(135deg, var(--admin-dark) 0%, var(--admin-dark-lighter) 100%);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.admin-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.admin-logo h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--admin-text-light);
}

.admin-logo h1 span {
  color: var(--admin-accent);
}

.header-title-link {
  text-decoration: none;
  color: inherit;
}

.header-title-link:hover {
  opacity: 0.8;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-greeting {
  font-size: 0.95rem;
  color: var(--admin-text-muted-light);
}

/* ============================================================ */
/* Authentication Modal - Dark Theme */
/* ============================================================ */

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--admin-dark) 0%, #162d47 50%, #0f1d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.auth-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  animation: slideUp 0.4s ease;
  backdrop-filter: blur(10px);
}

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

.auth-header h2 {
  margin: 0 0 0.75rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.auth-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
}

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

.auth-form .form-group {
  margin-bottom: 0;
}

.auth-form .form-input {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: #ffffff;
  transition: all 0.3s ease;
}

.auth-form .form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.auth-form .form-input:focus {
  outline: none;
  border-color: var(--admin-accent);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(244, 121, 32, 0.2);
}

.auth-form .form-hint {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.auth-form .btn-primary {
  background: linear-gradient(135deg, var(--admin-accent) 0%, #e05a00 100%);
  border: none;
  border-radius: 12px;
  padding: 1.25rem 2rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-form .btn-primary:hover {
  background: linear-gradient(135deg, #ff8c42 0%, var(--admin-accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(244, 121, 32, 0.3);
}

.auth-form .btn-primary:active {
  transform: translateY(0);
}

.auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 1rem;
  text-align: center;
  font-weight: 500;
}

/* Logo/Brand for login */
.auth-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-brand-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.form-hint {
  display: block;
  margin-top: 0.25rem;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* ============================================================ */
/* Main Dashboard Layout */
/* ============================================================ */

.admin-main {
  flex: 1;
  display: flex;
}

.admin-sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--admin-dark) 0%, #162d47 100%);
  border-right: none;
  padding: 1.5rem 0;
  position: fixed;
  left: 0;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
  z-index: 50;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--admin-text-muted-light);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

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

.nav-item:focus {
  outline: none;
}

.nav-item:active:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

a.nav-item {
  color: var(--admin-text-muted-light);
}

a.nav-item:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--admin-text-light);
}

.nav-item.active {
  color: var(--admin-text-light);
  background: var(--admin-accent);
  border-left: none;
  padding-left: 1rem;
}

.nav-item.active:hover {
  background: var(--admin-accent-hover);
}

.nav-icon {
  font-size: 1.25rem;
}

.admin-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  margin-left: 280px;
  max-width: 100%;
}

/* ============================================================ */
/* Section Styling */
/* ============================================================ */

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.text-muted {
  color: #9ca3af;
  font-size: 0.95rem;
  margin: 0;
}

.text-center {
  text-align: center;
}

/* ============================================================ */
/* Stats Cards */
/* ============================================================ */

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

.stat-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.stat-subtext {
  font-size: 0.85rem;
  color: #d1d5db;
}

.refresh-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

/* ============================================================ */
/* Signups Table */
/* ============================================================ */

.signups-controls {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-input {
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: #1f2937;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.signups-table-wrapper {
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.signups-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.signups-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.signups-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.signups-table td {
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937;
}

.signups-table tbody tr:hover {
  background: #f9fafb;
}

.loading-row {
  color: #9ca3af;
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-yes {
  background: #d1fae5;
  color: #065f46;
}

.badge-no {
  background: #fee2e2;
  color: #991b1b;
}

/* ============================================================ */
/* Pagination */
/* ============================================================ */

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.pagination-info {
  color: #6b7280;
  font-size: 0.95rem;
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
}

/* ============================================================ */
/* Export Cards */
/* ============================================================ */

.export-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.export-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s ease;
}

.export-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
}

.export-icon {
  font-size: 3rem;
  line-height: 1;
}

.export-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1f2937;
}

.export-card p {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
}

.export-info {
  color: #9ca3af;
  font-size: 0.9rem;
}

.export-notes {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.export-notes h4 {
  margin: 0 0 1rem;
  color: #1f2937;
  font-size: 1.1rem;
}

.export-notes ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.6;
}

.export-notes li {
  margin-bottom: 0.5rem;
}

.export-schedule {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}

.export-schedule h4 {
  margin: 0 0 0.5rem;
  color: #1f2937;
  font-size: 1.1rem;
}

.export-schedule p {
  margin: 0 0 1rem;
  color: #9ca3af;
  font-size: 0.95rem;
}

/* ============================================================ */
/* Buttons */
/* ============================================================ */

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--admin-accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--admin-accent-hover);
}

.btn-secondary {
  background: #e5e7eb;
  color: #1f2937;
}

.btn-secondary:hover:not(:disabled) {
  background: #d1d5db;
}

.btn-logout {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: var(--admin-text-light);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-delete {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background-color: #dc2626;
  transform: scale(1.05);
}

.btn-delete:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: scale(1);
}

/* ============================================================ */
/* PWA Install Button */
/* ============================================================ */

.pwa-install-btn {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #F97316;
  color: white;
  border: none;
  padding: 2.5rem 5rem;
  border-radius: 16px;
  font-size: 2.5rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.5);
  z-index: 1000;
  transition: all 0.2s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(249, 115, 22, 0.5); }
  50% { box-shadow: 0 8px 32px rgba(249, 115, 22, 0.8); }
}

.pwa-install-btn:hover {
  background: #EA580C;
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.6);
}

/* iOS Install Modal */
.ios-install-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.ios-install-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  position: relative;
  text-align: center;
}

.ios-install-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.ios-install-content h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  color: #1F2937;
}

.ios-install-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.ios-install-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  color: #374151;
}

.step-number {
  background: #F97316;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.share-icon {
  width: 32px;
  height: 32px;
  stroke: #2563EB;
  flex-shrink: 0;
  margin-left: auto;
}

/* ============================================================ */
/* Toast Notifications */
/* ============================================================ */

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideInRight 0.3s ease;
  pointer-events: auto;
}

.toast.success {
  border-left: 4px solid #10b981;
  color: #065f46;
}

.toast.error {
  border-left: 4px solid #ef4444;
  color: #7f1d1d;
}

.toast.info {
  border-left: 4px solid #3b82f6;
  color: #1e3a8a;
}

/* ============================================================ */
/* View Sections */
/* ============================================================ */

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

/* ============================================================ */
/* Animations */
/* ============================================================ */

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

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

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

/* ============================================================ */
/* Responsive Design */
/* ============================================================ */

@media (max-width: 1024px) {
  .admin-sidebar {
    width: 220px;
  }

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

  .signups-controls {
    grid-template-columns: 1fr;
  }
}

/* Hide mobile back button on desktop */
.mobile-back-btn {
  display: none;
}

@media (max-width: 768px) {
  .admin-main {
    flex-direction: column;
    position: relative;
  }

  .admin-sidebar {
    width: 100%;
    position: fixed;
    top: 140px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 140px);
    border-right: none;
    border-bottom: none;
    padding: 1.5rem;
    background: linear-gradient(180deg, var(--admin-dark) 0%, #162d47 100%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .admin-sidebar.hidden {
    display: none;
  }

  .admin-nav {
    flex-direction: column;
    overflow-x: visible;
    padding: 0;
    gap: 0.5rem;
    flex: 1;
  }

  .nav-item {
    white-space: normal;
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border-left: none;
    font-size: 1.1rem;
    justify-content: flex-start;
  }

  .nav-item .nav-icon {
    font-size: 1.5rem;
  }

  .nav-item.active {
    border-left: none;
    padding-left: 1.5rem;
  }

  .admin-content {
    padding: 1.5rem 1rem;
    margin-left: 0;
    display: block;
    margin-top: 80px;
  }

  /* Only hide content on main admin page (has sidebar) */
  .admin-sidebar ~ .admin-content {
    display: none;
    margin-top: 0;
  }

  .admin-sidebar.hidden ~ .admin-content,
  .admin-content.visible {
    display: block;
    position: fixed;
    top: 140px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    background: var(--admin-bg);
    z-index: 45;
  }

  .admin-header-content {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .admin-logo {
    text-align: center;
  }

  .admin-logo h1 {
    font-size: 1.25rem;
  }

  .admin-user {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .admin-greeting {
    display: none;
  }

  .btn-logout {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Back button in content area */
  .mobile-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--admin-dark);
    color: var(--admin-text-light);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
  }

  .mobile-back-btn:hover {
    background: var(--admin-dark-hover);
  }

  .signups-table {
    font-size: 0.85rem;
  }

  .signups-table th,
  .signups-table td {
    padding: 0.75rem;
  }

  .table-pagination {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .export-options {
    grid-template-columns: 1fr;
  }

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

  .toast {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .admin-header {
    padding: 0.75rem;
  }

  .admin-container {
    padding: 0 1rem;
  }

  .admin-logo h1 {
    font-size: 1.5rem;
  }

  .admin-content {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .stats-grid {
    gap: 1rem;
  }

  .stat-card {
    gap: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}

/* ============================================================ */
/* Modal Styles */
/* ============================================================ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #1f2937;
}

.modal-form {
  padding: 1.5rem;
}

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

.form-row .form-group {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.form-group input[type="checkbox"] {
  margin-right: 0.5rem;
}

.form-group label span {
  font-weight: 400;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-actions button {
  flex: 1;
}

.form-error {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.data-table thead {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  display: inline-block;
  margin-right: 0.5rem;
}

/* ============================================================ */
/* Image Upload Styles */
/* ============================================================ */

.image-upload-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.image-upload-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.image-upload-buttons .btn {
  margin: 0;
}

.image-upload-buttons small {
  color: #6b7280;
  font-size: 0.75rem;
}

/* ============================================================ */
/* Quill Editor Styles */
/* ============================================================ */

.quill-editor {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  min-height: 250px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
}

.ql-toolbar {
  border: 1px solid #d1d5db;
  border-bottom: none;
  border-radius: 0.375rem 0.375rem 0 0;
  background: #f9fafb;
}

.ql-toolbar.ql-snow {
  padding: 0.5rem;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}

.ql-container {
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  font-family: 'Inter', sans-serif;
}

.ql-container.ql-snow {
  border-top: 1px solid #d1d5db;
}

.ql-editor {
  min-height: 200px;
  padding: 1rem;
  font-size: 0.875rem;
  color: #1f2937;
}

.ql-editor.ql-blank::before {
  color: #9ca3af;
  font-style: italic;
}

.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote {
  margin-bottom: 0.5rem;
}

.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar.ql-snow button:hover,
.ql-snow .ql-toolbar.ql-snow button.ql-active {
  color: #2563eb;
}

.ql-snow .ql-stroke {
  stroke: #6b7280;
}

.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
  fill: #6b7280;
}

.ql-toolbar.ql-snow .ql-picker-label {
  color: #6b7280;
}

/* ============================================================ */
/* Change Password Form */
/* ============================================================ */

.change-password-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}

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

.change-password-form label {
  font-weight: 500;
  color: #1f2937;
  font-size: 0.95rem;
}

.change-password-form .form-input {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}

.change-password-form .form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.change-password-form .form-hint {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.change-password-form .form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.change-password-form .form-actions .btn {
  flex: 1;
}

.change-password-form .form-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

/* ============================================================ */
/* Site Settings Form Styles */
/* ============================================================ */

.settings-form {
  max-width: 800px;
}

.settings-form .form-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-form .form-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #1f2937;
}

.settings-form .form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
}

.settings-form .status-message {
  font-size: 0.9rem;
}

.settings-form .status-message.success {
  color: #059669;
}

.settings-form .status-message.error {
  color: #dc2626;
}

.logo-upload-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
