/* ==========================================================================
   MAKTABGO - Milliy Maktablar Veb-Platformasi & CMS Tizimi
   Zamonaviy Dizayn Tizimi (Design System)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand Theme Variables (Dynamic by School) */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-rgb: 2, 132, 199;
  --primary-light: #e0f2fe;
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --danger: #ef4444;

  /* Neutrals & Surfaces */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #94a3b8;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-white: #ffffff;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.16);
  --shadow-primary: 0 10px 25px rgba(var(--primary-rgb), 0.3);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 52px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PLATFORM TOPBAR: SUBDOMAIN & MULTI-TENANT SIMULATOR
   ========================================================================== */
.platform-bar {
  background: #090d16;
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.platform-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.platform-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
}

.platform-badge {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subdomain-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.86rem;
  font-weight: 600;
}

.platform-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.school-selector-dropdown {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}

.school-selector-dropdown option {
  background: #0f172a;
  color: #fff;
}

.mode-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.82rem;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
  transition: all var(--transition-normal);
}

.mode-toggle-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.mode-toggle-btn.active-admin {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.lang-btn {
  padding: 3px 8px;
  border-radius: 4px;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.78rem;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ==========================================================================
   BREAKING NEWS TICKER / JONLI E'LONLAR SATRI
   ========================================================================== */
.ticker-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  font-size: 0.84rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 0;
  overflow: hidden;
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.97); }
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ticker-text {
  color: #cbd5e1;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.ticker-text:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.ticker-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  white-space: nowrap;
  font-size: 0.82rem;
}

.ticker-phone a:hover {
  color: #fff;
}

/* ==========================================================================
   MAKTAB IJTIMOIY TARMOG'I (SCHOOL COMMUNITY & SOCIAL FEED)
   ========================================================================== */
.stories-section {
  padding: 24px 0 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.stories-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  scrollbar-width: none;
}

.stories-carousel::-webkit-scrollbar {
  display: none;
}

.story-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.story-circle-item:hover {
  transform: translateY(-3px);
}

.story-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f59e0b, #ef4444, #8b5cf6, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rotate-gradient 8s linear infinite;
}

.story-ring.viewed {
  background: #cbd5e1;
  animation: none;
}

.story-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.story-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* 3-Column Social Network Section */
.social-hub-section {
  padding: 60px 0;
  background: #f8fafc;
}

.social-hub-layout {
  display: grid;
  grid-template-columns: 300px 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* Left Sidebar: School Leaders & Badges */
.social-sidebar-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.sidebar-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leader-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.leader-item:last-child {
  border-bottom: none;
}

.leader-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

.leader-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.leader-badge {
  font-size: 0.76rem;
  color: var(--primary);
  font-weight: 600;
}

/* Center Feed */
.create-post-box {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.create-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.create-post-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.95rem;
  resize: none;
}

.create-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Feed Post Card */
.feed-post-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: transform var(--transition-fast);
}

.feed-post-card:hover {
  box-shadow: var(--shadow-md);
}

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

.post-author-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.post-author-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.post-author-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.post-text {
  font-size: 0.98rem;
  line-height: 1.65;
  color: #334155;
  margin-bottom: 16px;
}

.post-media-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  max-height: 380px;
  background: #0f172a;
}

.post-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-engagement-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.reaction-btn:hover, .reaction-btn.active {
  background: #fee2e2;
  color: #ef4444;
}

.reaction-btn.clap:hover {
  background: #fef3c7;
  color: #d97706;
}

/* Comments Section in Feed */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.comment-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 14px;
  border-radius: 12px;
  flex: 1;
}

.comment-author {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.comment-text {
  font-size: 0.88rem;
  color: #475569;
}

.comment-input-form {
  display: flex;
  gap: 8px;
}

.comment-input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
}

/* Community Poll Widget */
.poll-widget {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.poll-question {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--text-main);
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.poll-opt-btn {
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.poll-opt-btn:hover {
  border-color: var(--primary);
}

.poll-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary-light);
  opacity: 0.7;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.poll-opt-text-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 1024px) {
  .social-hub-layout {
    grid-template-columns: 1fr;
  }
}

.school-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 41px;
  z-index: 900;
  transition: all var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.school-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.school-emblem {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
  flex-shrink: 0;
}

.school-titles {
  display: flex;
  flex-direction: column;
}

.school-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.school-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.school-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 8px 4px;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-trigger-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.search-trigger-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-primary);
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-focus);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.72) 100%),
              url('../assets/images/hero_banner.jpg') center/cover no-repeat;
  color: white;
  padding: 80px 0 120px;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.45) 0%, transparent 70%);
  top: -100px;
  right: -50px;
  filter: blur(80px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.hero-badge-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-title-highlight {
  background: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 680px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.45);
  transition: all var(--transition-normal);
}

.btn-hero-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(var(--primary-rgb), 0.6);
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  transition: all var(--transition-normal);
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  transform: translateY(-2px);
}

/* Hero Live Metric Strip */
.hero-stats-bar {
  margin-top: -60px;
  position: relative;
  z-index: 10;
  margin-bottom: 60px;
}

.stats-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border);
  padding-right: 20px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ==========================================================================
   QUICK ACTION SHORTCUTS (4 BIG TILES)
   ========================================================================== */
.quick-actions-section {
  margin-bottom: 70px;
}

.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.action-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.action-card:hover::after {
  opacity: 1;
}

.action-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all var(--transition-fast);
}

.action-card:hover .action-card-icon {
  background: var(--primary);
  color: white;
}

.action-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.action-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.action-card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   DYNAMIC NEWS & EVENTS SECTION
   ========================================================================== */
.news-section {
  padding: 60px 0;
}

.news-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.news-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.news-img-box {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: #0f172a;
}

.news-card.featured .news-img-box {
  height: 100%;
  min-height: 280px;
}

.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

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

.news-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  backdrop-filter: blur(8px);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.news-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.news-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text-main);
  transition: color var(--transition-fast);
}

.news-card:hover .news-title {
  color: var(--primary);
}

.news-snippet {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.read-more-btn {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-more-btn:hover {
  text-decoration: underline;
}

/* ==========================================================================
   HALL OF FAME & ACHIEVEMENTS / SHON-SHARAF ZALI
   ========================================================================== */
.achievements-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  position: relative;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.achievement-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.achievement-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.medal-ribbon {
  position: absolute;
  top: -12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.achievement-card.gold .medal-ribbon {
  background: linear-gradient(135deg, #fbbf24, #d97706);
}

.achievement-card.silver .medal-ribbon {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.student-avatar-box {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 14px 0 16px;
  position: relative;
}

.student-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
}

.student-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.student-grade {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.competition-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 12px;
  min-height: 38px;
}

.achievement-details-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  width: 100%;
  margin-bottom: 14px;
}

.achievement-score {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--success);
}

.achievement-mentor {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==========================================================================
   PRINCIPAL'S MESSAGE (DIREKTORGA MUROJAAT)
   ========================================================================== */
.principal-section {
  padding: 80px 0;
  background: var(--bg-surface);
}

.principal-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.principal-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.3) 0%, transparent 70%);
  top: -80px;
  left: -80px;
  filter: blur(60px);
  pointer-events: none;
}

.principal-img-col {
  position: relative;
}

.principal-portrait {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  border: 4px solid rgba(255, 255, 255, 0.15);
}

.principal-badge-floating {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.principal-content-col {
  position: relative;
  z-index: 2;
}

.principal-quote-icon {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  margin-bottom: 14px;
}

.principal-heading {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.principal-title-text {
  font-size: 0.95rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 22px;
}

.principal-speech {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #e2e8f0;
  margin-bottom: 28px;
}

.principal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.reception-hours-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   UPCOMING EVENTS CALENDAR
   ========================================================================== */
.events-section {
  padding: 80px 0;
  background: var(--bg-page);
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.event-row-card {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px 32px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.event-row-card:hover {
  transform: translateX(6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.event-date-block {
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: center;
}

.event-day {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.event-month {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-hover);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-badge {
  display: inline-block;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   CLUBS & STEAM EXTRACURRICULAR (TO'GARAKLAR)
   ========================================================================== */
.clubs-section {
  padding: 80px 0;
  background: var(--bg-surface);
}

.clubs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.club-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-normal);
}

.club-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  background: var(--bg-surface);
}

.club-category-tag {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.club-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.club-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.club-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 12px;
  border-radius: var(--radius-md);
}

.club-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   TEACHERS & FACULTY (PEDAGOGLAR JAMOA)
   ========================================================================== */
.teachers-section {
  padding: 80px 0;
  background: var(--bg-page);
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.teacher-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all var(--transition-normal);
}

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

.teacher-img-wrap {
  height: 240px;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

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

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

.teacher-subject-tag {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: white;
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.teacher-body {
  padding: 20px;
}

.teacher-name {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.teacher-degree {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.teacher-exp {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GALLERY (MEDIA HUB)
   ========================================================================== */
.gallery-section {
  padding: 80px 0;
  background: var(--bg-surface);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  height: 260px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: white;
  transition: background var(--transition-fast);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-card:hover .gallery-overlay {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.gallery-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.gallery-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   TIMETABLE & BELLS SCHEDULE (DARSLAR VA QO'NG'IROQLAR JADVALI)
   ========================================================================== */
.schedule-section {
  padding: 80px 0;
  background: var(--bg-page);
}

.schedule-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.schedule-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.schedule-tab-btn {
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.schedule-tab-btn.active {
  background: var(--primary);
  color: white;
}

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

.bell-table th, .bell-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.bell-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.bell-table tr:hover td {
  background: var(--primary-light);
}

/* ==========================================================================
   VIRTUAL RECEPTION & CONTACT (DIREKTORGA VIRTUAL QABULXONA)
   ========================================================================== */
.reception-section {
  padding: 80px 0;
  background: var(--bg-surface);
}

.reception-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.reception-info-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.reception-info-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.reception-info-text {
  color: #cbd5e1;
  font-size: 0.98rem;
  margin-bottom: 30px;
}

.contact-items-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.contact-val {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.reception-form-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */
.school-footer {
  background: #090d16;
  color: #94a3b8;
  padding: 60px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand-name {
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-about-text {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-heading {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: #38bdf8;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   MAKTAB ADMINISTRATORI PANELI (CMS VIEW)
   ========================================================================== */
.admin-view-container {
  display: none;
  background: #f1f5f9;
  min-height: calc(100vh - 41px);
}

.admin-view-container.active {
  display: block;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 41px);
}

/* Admin Sidebar */
.admin-sidebar {
  background: #0f172a;
  color: #e2e8f0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #1e293b;
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 20px;
}

.admin-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.admin-user-role {
  font-size: 0.78rem;
  color: #94a3b8;
}

.admin-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-nav-item.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
}

.admin-nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: white;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

/* Admin Main Content */
.admin-main {
  padding: 32px;
  overflow-y: auto;
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-page-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.admin-page-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.admin-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.admin-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.admin-stat-txt {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-content-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

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

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

.admin-table th, .admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-status.published {
  background: #dcfce7;
  color: #15803d;
}

.badge-status.new {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-status.replied {
  background: #e0f2fe;
  color: #0369a1;
}

.action-btns-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.btn-icon-action:hover {
  background: var(--bg-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-icon-action.delete:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #ef4444;
}

/* Theme & Settings Tab in Admin */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.color-picker-group {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.color-preset-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.color-preset-circle:hover {
  transform: scale(1.1);
}

.color-preset-circle.active {
  border-color: #0f172a;
  transform: scale(1.15);
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-dialog {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  position: relative;
  animation: modal-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog.large {
  max-width: 840px;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-body {
  padding: 28px;
}

.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-subtle);
}

/* Lightbox preview modal */
.lightbox-img-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  background: #0f172a;
}

.lightbox-img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #0f172a;
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  border-left: 4px solid var(--primary);
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

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

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.6rem;
  }
  .stats-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
  .action-cards-grid,
  .achievements-grid,
  .clubs-grid,
  .teachers-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .principal-card {
    grid-template-columns: 1fr;
    padding: 32px;
  }
  .principal-portrait {
    height: 320px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
  .reception-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .school-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .stats-card-grid {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-right: none !important;
  }
  .action-cards-grid,
  .achievements-grid,
  .clubs-grid,
  .teachers-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .event-row-card {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 16px;
  }
  .event-date-block {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
  }
  .admin-quick-stats {
    grid-template-columns: 1fr 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}
