/* ============================================================
   css/admin.css
   Styling for the Admin Panel pages (login, dashboard, add-product)
   ============================================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables (Premium Design Tokens) ── */
:root {
  --primary: #F26522;         /* Brand Orange */
  --primary-hover: #D35400;
  --primary-glow: rgba(242, 101, 34, 0.15);
  --secondary: #2a322d;       /* Dark Green/Black */
  --accent: #FF8C42;          
  
  --bg-gradient: linear-gradient(135deg, #FFF5F0 0%, #FFFBF9 100%);
  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-hover: rgba(255, 255, 255, 0.9);
  
  --text: #1a1a1a;
  --text-muted: #666666;
  --bg: #f8fafc;
  --white: #ffffff;
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 99px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  --shadow-glass: 0 15px 35px 0 rgba(242, 101, 34, 0.08);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --danger: #ef4444;
  --danger-dark: #dc2626;
  --primary-light: rgba(242, 101, 34, 0.12);

  --sidebar-width: 280px;
  --sidebar-compact-width: 72px;
  --mobile-nav-height: 64px;
  --admin-mobile-header-height: 56px;
  --admin-mobile-logout-height: 48px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

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

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient);
  padding: 20px;
}

.login-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-glass);
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-logo {
  text-align: center;
  margin-bottom: 48px;
}

.login-logo h1 {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--white), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  margin-top: 8px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: var(--transition);
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  z-index: 5;
}

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

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
}

.remember-me input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 5px var(--primary-glow);
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: transparent; /* Hide placeholder so label can "float" */
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
  color: rgba(255,255,255,0.2);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--white);
  width: 100%;
  box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 12px 28px rgba(242, 101, 34, 0.25);
}

.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover  { background: var(--danger-dark); }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { filter: brightness(0.9); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(0.9); }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ── Alert Messages ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none; /* Hidden by default — shown via JS */
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert.show    { display: block; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 30px 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
  box-shadow: 10px 0 30px rgba(0,0,0,0.03);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-logo {
  padding: 0 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-logo h2 { 
  font-size: 1.8rem; 
  font-weight: 800; 
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1.5px;
}
.sidebar-logo p  { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.sidebar-nav { padding: 0 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
}

.nav-item .icon {
  font-size: 1.2rem;
  transition: var(--transition);
}

.nav-item:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff !important;
  transform: translateX(5px);
  box-shadow: 0 8px 20px rgba(242, 101, 34, 0.15);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(242, 101, 34, 0.2);
}

.nav-item.active .icon,
.nav-item:hover .icon {
  transform: scale(1.1);
}

.nav-item.nav-more-toggle {
  display: none;
}

.sidebar-footer { padding: 30px 16px; margin-top: auto; }

#logoutBtn {
  width: 100%;
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent);
  border: 1px solid rgba(244, 63, 94, 0.2);
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#logoutBtn:hover { 
  background: var(--accent); 
  color: var(--white);
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.4);
  transform: translateY(-2px);
}

/* ── Main Content Area ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  padding: 48px;
  animation: fadeIn 0.6s ease;
  box-sizing: border-box;
}

/* ── Top Bar ── */
.topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 48px;
  width: 100%;
  max-width: 100%;
}

.topbar-header-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px 20px;
  width: 100%;
}

.topbar-title,
.topbar-title-block {
  min-width: 0;
}

.topbar-title h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1.15;
  word-break: break-word;
}

.topbar-title p,
.topbar > .topbar-title p,
.topbar > div:not(.topbar-right):not(.topbar-header-row) p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.5;
}

.topbar h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1.15;
  word-break: break-word;
}

.topbar p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 4px;
}

.topbar-logout-wrap {
  flex-shrink: 0;
  align-self: start;
}

.topbar-logout-wrap #logoutBtn {
  width: auto;
  min-width: auto;
  padding: 10px 18px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.sidebar-footer.is-empty,
.sidebar-footer:empty {
  display: none !important;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (min-width: 769px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .topbar-header-row {
    width: 100%;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar--reviews .topbar-right,
  .topbar:has(.btn-primary) .topbar-right {
    justify-content: flex-start;
  }
}

.admin-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── Stats Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: var(--transition);
  cursor: default;
  box-shadow: var(--shadow-md);
}

.stat-card:hover { 
  transform: translateY(-8px); 
  background: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  transition: var(--transition);
}

.stat-icon.indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.stat-icon.green  { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon.amber  { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.stat-info h3 { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-info p  { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }

/* ── Section Card ── */
.section-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-glass);
}

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

.section-header h2 { font-size: 1.8rem; font-weight: 800; color: var(--text); letter-spacing: -1px; }

/* ── Events & Teacher Grid ── */
.events-grid, .teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.event-card, .teacher-card {
  background: var(--white);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-md);
}

.event-card:hover, .teacher-card:hover {
  transform: translateY(-12px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.teacher-card .teacher-img-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.teacher-card .teacher-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.teacher-card:hover .teacher-img {
  transform: scale(1.05);
}

.teacher-card .subject-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(99, 102, 241, 0.9);
  color: var(--white);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.teacher-info, .event-content {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.teacher-name, .event-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.teacher-lang {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.teacher-meta, .event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.teacher-rating {
  color: #f59e0b;
  display: flex;
  gap: 2px;
}

.teacher-desc, .event-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex: 1;
}

.teacher-actions, .event-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.btn-edit, .btn-delete {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn-edit {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}

.btn-edit:hover {
  background: #f59e0b;
  color: var(--white);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-delete {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.2);
}

.btn-delete:hover {
  background: #f43f5e;
  color: var(--white);
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.95rem; }

/* ── Modal Overlay ── */
.modal-overlay {
  display: none;
  position: fixed; 
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open { display: flex; animation: fadeIn 0.3s ease; }

.modal {
  background: var(--white);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.modal-header h3 { font-size: 2rem; font-weight: 800; color: var(--text); letter-spacing: -1.5px; }
.modal-close {
  width: 40px;
  height: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer; 
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { 
  background: var(--accent); 
  color: var(--white);
  transform: rotate(90deg);
}

/* ── Loading Spinner ── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── ADD EVENT PAGE ── */
.add-event-page {
  min-height: 100vh;
  background: var(--bg);
  padding: 40px 20px;
}

.add-event-container {
  max-width: 600px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-header p  { color: var(--text-muted); margin-top: 4px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.88rem;
  margin-bottom: 20px;
  transition: gap 0.2s;
}
.back-link:hover { gap: 10px; }

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Shared admin grids (contact, FAQ, reviews) ── */
.queries-grid,
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  margin-top: 24px;
}

.query-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  max-width: 100%;
}

.query-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.query-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.query-user h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-word;
}

.query-user p {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  word-break: break-word;
}

.query-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg, #f8fafc);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.query-message {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #444;
  background: #f8fafc;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 3px solid var(--primary);
  font-style: italic;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.query-phone {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.query-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.query-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 20px;
}

.status-new { background: #fff7ed; color: #c2410c; }
.status-read { background: #eff6ff; color: #1d4ed8; }
.status-replied { background: #ecfdf5; color: #047857; }

.query-lang,
.query-subject {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--bg, #f8fafc);
  border-radius: 8px;
  word-break: break-word;
}

.query-lang i,
.query-subject i {
  color: var(--primary);
  margin-right: 6px;
}

.query-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.btn-query-action {
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-read { background: #dbeafe; color: #1d4ed8; }
.btn-read:hover { background: #1d4ed8; color: #fff; }
.btn-replied { background: #d1fae5; color: #047857; }
.btn-replied:hover { background: #047857; color: #fff; }

.btn-delete-query {
  background: #fee2e2;
  color: var(--danger);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-delete-query:hover {
  background: var(--danger);
  color: #fff;
}

.queries-grid .loading-state,
.reviews-grid .loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: var(--glass);
  border-radius: var(--radius-md);
  border: 1px dashed var(--glass-border);
}

.queries-grid .loading-state i,
.reviews-grid .loading-state i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
}

.review-video-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  background: #000;
  max-width: 100%;
}

.review-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
}

.review-info { padding: 20px; }

.review-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.review-course {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.review-card .btn-delete {
  width: 100%;
  padding: 10px;
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.review-card .btn-delete:hover { background: #fecaca; }

.modal.modal-lg {
  max-width: min(900px, calc(100vw - 32px));
  width: 100%;
}

.admin-standalone-page {
  min-height: 100vh;
  padding: clamp(16px, 4vw, 48px) clamp(12px, 3vw, 24px);
  box-sizing: border-box;
}

.admin-mobile-header {
  display: none;
}

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

/* Mobile overflow menu panel */
.admin-nav-more-panel {
  display: none;
  position: fixed;
  bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0) + 8px);
  right: 12px;
  left: 12px;
  max-height: min(50vh, 320px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1102;
  padding: 10px;
  -webkit-overflow-scrolling: touch;
}

.admin-nav-more-panel.is-open {
  display: block;
}

.admin-nav-more-panel .nav-item {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.admin-nav-more-panel .nav-item > span:not(.icon) {
  display: inline !important;
  max-width: none;
  font-size: 0.9rem;
  white-space: normal;
}

.admin-nav-more-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1101;
  background: rgba(15, 23, 42, 0.35);
}

.admin-nav-more-backdrop.is-open {
  display: block;
}

/* Form utilities used across add/edit pages */
.form-grid,
.add-review-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid .full-width,
.add-review-form .full-width {
  grid-column: 1 / -1;
}

.add-review-form .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.add-review-form .tab-btn {
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.add-review-form .tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.add-review-form .image-preview {
  margin-top: 10px;
  width: 100%;
  max-width: 200px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px dashed #ddd;
}

.add-review-form .image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ============================================================
   MODERN UI UPGRADE (Add Event Page)
   ============================================================ */

.modern-gradient-bg {
  background: linear-gradient(135deg, #f0f7ff 0%, #f9f5ff 50%, #ffffff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  width: 100%;
}

.modern-card-container {
  width: 100%;
  max-width: 650px;
  padding: 20px; /* Reduced from 40px to 20px */
}

.page-header {
  margin-bottom: 25px;
}

.page-header h1 {
  margin: 8px 0 4px;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1f2937;
}

.page-header p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.header-icon-circle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px;
  box-shadow: 0 8px 16px rgba(147, 51, 234, 0.2);
}

.modern-form-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.floating-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.floating-group label i {
  margin-right: 6px;
  width: 16px;
  text-align: center;
}

.modern-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: #1f2937;
  background: #f9fafb;
  transition: all 0.3s ease;
}

.modern-input:focus {
  border-color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
  outline: none;
}

.modern-time-row {
  display: flex;
  gap: 20px;
}
.modern-time-row > div {
  flex: 1;
}

.custom-time-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.custom-time-picker select {
  flex: 1;
  padding: 12px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 0.95rem;
  color: #1f2937;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  appearance: none; /* Optional: style the arrow if needed */
}

.custom-time-picker select:focus {
  border-color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.time-sep {
  font-weight: 700;
  color: #64748b;
  font-size: 1.2rem;
}

.file-upload-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-drop-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  transition: all 0.3s ease;
  cursor: pointer;
}

.file-drop-area:hover {
  border-color: #7c3aed;
  background: #f3f0ff;
}

.file-drop-area.is-active {
  border-color: #4f46e5;
  background: #eef2ff;
}

.file-icon {
  font-size: 2.5rem;
  color: #94a3b8;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}
.file-drop-area:hover .file-icon {
  color: #7c3aed;
}

.file-msg {
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
}

.modern-file-input {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  cursor: pointer;
  opacity: 0;
}

.image-preview-wrapper {
  position: relative;
  margin-top: 16px;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modern-preview-img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  display: block;
}

.remove-img-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.remove-img-btn:hover {
  background: #ef4444;
}

.btn-modern-primary {
  width: 100%;
  background: linear-gradient(135deg, #f26522, #d35400);
  color: white;
  font-size: 1.05rem;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(242, 101, 34, 0.25);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-modern-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(242, 101, 34, 0.35);
}

.text-primary {
  color: #7c3aed !important;
}

/* ── Compact Admin Form Utilities ── */
.compact-form-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.modern-form-card.compact {
  padding: 32px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 48px;
}

.live-preview-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-preview-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--primary), transparent);
}

/* ── Event Preview Card ── */
.event-preview-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
}

.preview-img-box {
  width: 100%;
  height: 200px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-content {
  padding: 24px;
}

.preview-category {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.preview-title {
  margin-bottom: 12px;
  line-height: 1.4;
}

.preview-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.preview-meta i {
  width: 18px;
  color: var(--primary);
}

.preview-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Compact form stacking handled in responsive section below */

/* ============================================================
   GLOBAL ADMIN TOAST
   ============================================================ */
.admin-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}

.admin-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(242, 101, 34, 0.08);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(120%) scale(0.95);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.admin-toast-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.admin-toast-exit {
  opacity: 0;
  transform: translateX(120%) scale(0.95);
  transition: transform 0.32s ease, opacity 0.28s ease;
}

.admin-toast i:first-child {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.admin-toast-success i:first-child {
  color: #22c55e;
}

.admin-toast-error i:first-child {
  color: #ef4444;
}

.admin-toast-success {
  border-left: 4px solid #22c55e;
}

.admin-toast-error {
  border-left: 4px solid #ef4444;
}

.admin-toast-message {
  flex: 1;
}

.admin-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.admin-toast-close:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .admin-toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ============================================================
   ADMIN RESPONSIVE SYSTEM
   Breakpoints: 1200px | 992px | 768px | 576px
   ============================================================ */

/* ── ≤1200px (laptop) ── */
@media (max-width: 1200px) {
  :root {
    --sidebar-width: 260px;
  }

  .main-content {
    padding: 36px 28px;
  }

  .topbar h1 { font-size: 2.1rem; }
  .section-card { padding: 32px 28px; }
  .events-grid,
  .teachers-grid,
  .queries-grid,
  .reviews-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 24px;
  }
  .compact-form-container {
    max-width: 100%;
    gap: 28px;
  }
}

/* ── ≤992px (tablet — compact icon sidebar) ── */
@media (max-width: 992px) {
  :root {
    --sidebar-width: var(--sidebar-compact-width);
  }

  .sidebar {
    width: var(--sidebar-compact-width);
    padding: 20px 0;
  }

  .sidebar-logo {
    padding: 0 12px 24px;
    align-items: center;
    text-align: center;
  }

  .sidebar-logo h2 {
    font-size: 1.35rem;
    letter-spacing: -0.5px;
  }

  .sidebar-logo p,
  .nav-item > span:not(.icon) {
    display: none;
  }

  .sidebar-nav {
    padding: 0 8px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav-item {
    justify-content: center;
    padding: 14px 10px;
    gap: 0;
  }

  .nav-item:hover {
    transform: scale(1.05);
  }

  .sidebar-footer {
    padding: 16px 8px;
  }

  #logoutBtn {
    padding: 12px 10px;
    font-size: 0;
    gap: 0;
    min-width: 44px;
  }

  #logoutBtn span {
    font-size: 1.2rem;
  }

  .main-content {
    margin-left: var(--sidebar-compact-width);
    width: calc(100% - var(--sidebar-compact-width));
    padding: 28px 20px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
  }

  .topbar h1 { font-size: 1.85rem; letter-spacing: -1px; }
  .topbar p { font-size: 1rem; }

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

  .section-header {
    flex-wrap: wrap;
    gap: 12px;
  }

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

  .preview-sidebar {
    position: static;
  }

  .modern-form-card {
    padding: 28px 24px;
  }

  .modal.modal-lg {
    max-width: calc(100vw - 32px);
  }

  .query-header {
    flex-direction: column;
    gap: 12px;
  }

  .query-meta-right {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
}

/* ── ≤768px (mobile — bottom navigation) ── */
@media (max-width: 768px) {
  .admin-mobile-header,
  .admin-sidebar-overlay {
    display: none !important;
  }

  .dashboard-wrapper {
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0) + 12px);
    overflow-x: hidden;
    max-width: 100vw;
  }

  .sidebar {
    width: 100%;
    max-width: 100vw;
    height: var(--mobile-nav-height);
    min-height: var(--mobile-nav-height);
    max-height: var(--mobile-nav-height);
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-right: none;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    overflow: hidden;
  }

  .sidebar-logo {
    display: none;
  }

  /* Footer relocated to body on mobile — hide inside sidebar */
  .sidebar > .sidebar-footer {
    display: none !important;
  }

  .sidebar-nav {
    flex: 1;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav hr {
    display: none !important;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
  }

  /* Secondary links live in “More” panel (see admin-responsive.js) */
  .sidebar-nav .nav-item.nav-more-source {
    display: none !important;
  }

  .sidebar-nav .nav-item.nav-more-toggle {
    display: flex !important;
    flex-shrink: 0;
  }

  .nav-item > span:not(.icon) {
    display: none !important;
  }

  .nav-item {
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    margin: 0;
    min-width: 48px;
    max-width: 56px;
    flex: 0 0 auto;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    font-size: 0;
  }

  .nav-item .icon {
    font-size: 1.25rem;
    margin-right: 0;
    line-height: 1;
  }

  .nav-item:hover,
  .nav-item.active {
    transform: none;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 16px 16px 24px;
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0) + 28px);
    min-height: auto;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .topbar {
    gap: 16px;
    margin-bottom: 20px;
  }

  .topbar-header-row {
    gap: 10px 12px;
  }

  .topbar-title h1,
  .topbar h1 {
    font-size: 1.45rem;
    letter-spacing: -0.5px;
    padding-right: 0;
  }

  .topbar-title p,
  .topbar p {
    font-size: 0.88rem;
  }

  .topbar-logout-wrap #logoutBtn {
    padding: 8px 12px;
    font-size: 0.78rem;
    min-height: 40px;
  }

  .topbar-right {
    width: 100%;
    flex-wrap: wrap;
    margin-top: 4px;
  }

  .topbar-right .btn,
  .topbar-right .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 0;
  }

  .section-card {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .reviews-grid {
    margin-top: 16px;
  }

  .topbar--reviews {
    gap: 14px;
    margin-bottom: 22px;
  }

  .topbar--reviews .topbar-right {
    margin-top: 2px;
  }

  .section-card--reviews {
    padding: 18px 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }

  .stat-card {
    padding: 20px 18px;
    gap: 16px;
  }

  .stat-icon {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }

  .stat-info h3 { font-size: 1.65rem; }

  .section-card {
    padding: 20px 16px;
    margin-bottom: 28px;
  }

  .section-header h2 {
    font-size: 1.35rem;
  }

  .events-grid,
  .teachers-grid,
  .queries-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .event-card,
  .teacher-card,
  .query-card,
  .review-card {
    max-width: 100%;
  }

  .teacher-card .teacher-img-wrapper {
    height: 220px;
  }

  .teacher-actions,
  .event-actions,
  .query-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-actions .btn-edit,
  .teacher-actions .btn-delete,
  .event-actions .btn-edit,
  .event-actions .btn-delete,
  .query-footer .btn-query-action,
  .query-footer .btn-delete-query {
    width: 100%;
    justify-content: center;
  }

  .form-grid,
  .form-grid-2,
  .modern-time-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .modern-time-row > div {
    width: 100%;
  }

  .custom-time-picker {
    flex-wrap: wrap;
  }

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

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

  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .modal,
  .modal.modal-lg {
    max-height: 92vh;
    max-height: 92dvh;
    width: 100%;
    max-width: 100%;
    padding: 24px 18px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-header h3 {
    font-size: 1.45rem;
  }

  .modal-header {
    margin-bottom: 24px;
  }

  .compact-form-container {
    gap: 20px;
  }

  .modern-form-card.compact,
  .modern-form-card {
    padding: 20px 16px;
  }

  .file-drop-area {
    padding: 20px 16px;
  }

  .image-preview-wrapper,
  .modern-preview-img {
    max-width: 100%;
  }

  .modern-preview-img {
    max-height: 200px;
  }

  .preview-img-box {
    height: 160px;
  }

  .login-card {
    padding: 36px 24px;
    max-width: 100%;
  }

  .login-logo h1 {
    font-size: 2.2rem;
  }

  .login-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .btn {
    min-height: 44px;
  }

  #logoutBtn {
    font-size: 0.9rem;
    padding: 14px;
  }

  .admin-toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ── ≤576px (small phones) ── */
@media (max-width: 576px) {
  .main-content {
    padding: 14px 12px 20px;
  }

  .topbar h1 {
    font-size: 1.35rem;
  }

  .query-message {
    font-size: 0.88rem;
    padding: 12px;
  }

  .query-user h3 {
    font-size: 1rem;
  }

  .page-header h1,
  .form-main .page-header h1 {
    font-size: 1.75rem !important;
  }

  .add-event-page.modern-gradient-bg,
  .admin-standalone-page {
    padding: 12px 10px !important;
  }

  .modern-card-container {
    padding: 10px 0;
  }

  .stat-card {
    flex-direction: row;
    align-items: center;
  }

  .sidebar-nav .nav-item {
    min-width: 44px;
    max-width: 48px;
    padding: 6px 6px;
  }

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

  .tabs,
  .add-review-form .tabs {
    width: 100%;
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    min-width: 0;
  }
}
