/* ==========================================================================
   KIRŞEHİR BİL KOLEJİ SINAV VE BİLGİLENDİRME PORTALI
   Dünya İnovasyon Okulu • 2026 Mobil Öncelikli & Kusursuz Arayüz
   ========================================================================== */

:root {
  /* Kurumsal BİL Koleji Renkleri */
  --bil-navy: #0c347d;
  --bil-navy-dark: #071f4d;
  --bil-navy-light: #164bb0;
  --bil-red: #d71920;
  --bil-red-dark: #b31218;
  --bil-red-soft: #fef2f2;
  --bil-gold: #f59e0b;
  
  /* Açık Tema (Varsayılan - Temiz & Prestijli) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-accent: #eff6ff;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #0c347d;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(12, 52, 125, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(12, 52, 125, 0.12);
  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.05);
  
  /* T.C. Optik Kutucukları */
  --tc-box-bg: #eff6ff;
  --tc-box-border: #bfdbfe;
  --tc-box-text: #1e3a8a;

  /* Durum Renkleri */
  --success: #10b981;
  --success-bg: #ecfdf5;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   KOYU MOD (KARANLIK TEMA) - DENGELİ, YORMAYAN SLATE TONLARI
   ========================================================================== */
[data-theme="dark"] {
  --bg-main: #0b1120;
  --bg-card: #131f37;
  --bg-subtle: #1a2947;
  --bg-accent: #1e2e4e;
  --bg-input: #15223c;
  --border-color: #233557;
  --border-subtle: #1e2c47;
  --border-focus: #60a5fa;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  --tc-box-bg: #0f182c;
  --tc-box-border: #2b416a;
  --tc-box-text: #93c5fd;
  
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Temel Sıfırlama */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   1. TOP BAR
   ========================================================================== */
.top-bar {
  background: var(--bil-navy-dark);
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
}

.top-bar-item:hover {
  color: #ffffff;
}

.top-bar-item span.icon {
  color: var(--bil-red);
}

@media (max-width: 767px) {
  .top-bar {
    display: none;
  }
}

/* ==========================================================================
   2. NAVBAR & BRAND (MOBİLDE ASLA TAŞMAYAN VE KIRILMAYAN TASARIM)
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  width: 100%;
}

[data-theme="dark"] .navbar {
  background: rgba(17, 24, 39, 0.94);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--bil-navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .brand-title {
  color: #93c5fd;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bil-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

@media (max-width: 991px) {
  .brand-logo-img {
    width: 36px;
    height: 36px;
  }
  .brand-title {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-subtitle {
    display: none !important; /* Mobilde dar alanda dikey kırılmayı tamamen önler */
  }
}

@media (max-width: 640px) {
  .nav-container {
    padding: 0.4rem 0.55rem;
    gap: 0.25rem;
  }
  .brand-wrapper {
    gap: 0.35rem;
  }
  .nav-actions {
    gap: 0.25rem;
  }
  .btn-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
  .btn-teacher-nav {
    padding: 0.35rem 0.5rem;
    font-size: 0.74rem;
  }
  .brand-logo-img {
    width: 32px;
    height: 32px;
  }
  .brand-title {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: -0.01em;
  }
}

@media (max-width: 360px) {
  .brand-title {
    font-size: 0.72rem;
  }
  .btn-teacher-nav {
    padding: 0.3rem 0.45rem;
    font-size: 0.7rem;
  }
}

/* Navigasyon Linkleri (Masaüstü) */
.nav-links {
  display: none;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

@media (min-width: 992px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  padding: 0.45rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--bil-navy);
  background: var(--bg-subtle);
}

[data-theme="dark"] .nav-link:hover {
  color: #60a5fa;
}

.nav-link.highlight {
  background: var(--bil-red-soft);
  color: var(--bil-red);
  font-weight: 700;
}

[data-theme="dark"] .nav-link.highlight {
  background: rgba(215, 25, 32, 0.2);
  color: #fca5a5;
}

/* Sağ Aksiyonlar */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--bil-navy);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(12, 52, 125, 0.25);
}

.btn-primary:hover {
  background: var(--bil-navy-light);
}

[data-theme="dark"] .btn-primary {
  background: #2563eb;
}

.btn-red {
  background: var(--bil-red);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(215, 25, 32, 0.25);
}

.btn-red:hover {
  background: var(--bil-red-dark);
}

.btn-admin-accent {
  background: #7c3aed;
  color: #ffffff;
  border-radius: var(--radius-md);
}

.btn-admin-accent:hover {
  background: #6d28d9;
}

.btn-teacher-nav {
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-full);
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
  border: 1px solid #334155;
}

.btn-teacher-nav:hover {
  background: var(--bil-navy);
  border-color: var(--bil-navy-light);
}

[data-theme="dark"] .btn-teacher-nav {
  background: #1e293b;
  border-color: #3b82f6;
  color: #93c5fd;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-subtle);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-full);
}

.mobile-menu-btn {
  display: inline-flex;
  font-size: 1.25rem;
}

@media (min-width: 992px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobil Menü Çekmecesi */
.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  animation: slideDown 0.2s ease;
}

.mobile-drawer.active {
  display: flex;
}

@media (min-width: 992px) {
  .mobile-drawer {
    display: none !important;
  }
}

/* ==========================================================================
   PWA BANNER
   ========================================================================== */
.pwa-banner {
  background: linear-gradient(135deg, var(--bil-navy), #1e40af);
  color: #ffffff;
  padding: 0.65rem 1rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

.pwa-banner.active {
  display: flex;
}

/* ==========================================================================
   3. GÖRKEMLİ KAMPÜS KARŞILAMA ALANI (HERO)
   ========================================================================== */
.hero-showcase {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.25rem auto;
  max-width: 1200px;
  box-shadow: var(--shadow-lg);
  background: #0f172a;
}

.hero-img-container {
  position: relative;
  width: 100%;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .hero-img-container {
    min-height: 500px;
  }
}

.hero-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  transition: transform 6s ease;
}

.hero-showcase:hover .hero-bg-photo {
  transform: scale(1.05);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 52, 125, 0.25) 0%,
    rgba(15, 23, 42, 0.65) 55%,
    rgba(7, 15, 30, 0.94) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 2rem 1.25rem;
  max-width: 800px;
  color: #ffffff;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 3rem 2.25rem;
  }
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hero-main-title {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
  .hero-main-title {
    font-size: 2.75rem;
  }
}

.hero-highlight-red {
  color: #ff4d58;
}

.hero-lead-text {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-bottom: 1.5rem;
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--bil-red) 0%, #ef4444 100%);
  color: #ffffff;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(215, 25, 32, 0.4);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(215, 25, 32, 0.55);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 0.92rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-full);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.28);
}

.campus-grades-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.75rem 1rem;
}

.grade-bar-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   4. MERKEZİ SINAV & DENEME DUYURULARI (TEK SATIR KOMPAKT LİSTE)
   ========================================================================== */
.section-wrapper {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1rem;
  width: 100%;
}

.section-header-centered {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 1.75rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fee2e2;
  color: var(--bil-red);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .section-tag {
  background: rgba(215, 25, 32, 0.18);
  color: #fca5a5;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .section-title {
    font-size: 1.4rem;
  }
}

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

/* Duyuru Kademe Sekmeleri */
.announcement-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.45rem 1rem;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
  border-color: var(--bil-navy);
}

.tab-btn.active {
  background: var(--bil-navy);
  color: #ffffff;
  border-color: var(--bil-navy);
  box-shadow: 0 2px 8px rgba(12, 52, 125, 0.25);
}

[data-theme="dark"] .tab-btn.active {
  background: #2563eb;
  border-color: #2563eb;
}

/* TEK SATIR / KOMPAKT DUYURU LİSTESİ */
.announcements-container {
  width: 100%;
}

.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.ann-row {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.ann-row:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

[data-theme="dark"] .ann-row {
  border-color: var(--border-color);
  background: var(--bg-card);
}

[data-theme="dark"] .ann-row:hover {
  background: #182542;
  border-color: #3b82f6;
}

.ann-row-badge-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 320px;
  min-width: 0;
}

.ann-row-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ann-row-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ann-meta-chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.ann-meta-chip.kademe {
  color: var(--bil-navy);
  background: #eff6ff;
  border-color: #dbeafe;
}

[data-theme="dark"] .ann-meta-chip.kademe {
  color: #93c5fd;
  background: #1e2e4e;
  border-color: #2b416a;
}

.ann-row-action {
  flex-shrink: 0;
}

.btn-ann-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bil-navy);
  color: #ffffff;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-ann-link:hover {
  background: var(--bil-navy-light);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-ann-link {
  background: #2563eb;
}

/* Yanıp Sönen Rozetler */
.ann-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.ann-badge.pulse-red {
  background: var(--bil-red);
  color: #ffffff;
  animation: pulseGlow 1.8s infinite;
}

.ann-badge.pulse-green {
  background: var(--success);
  color: #ffffff;
  animation: pulseGreenGlow 1.8s infinite;
}

.ann-badge.normal {
  background: #e2e8f0;
  color: var(--text-main);
}

[data-theme="dark"] .ann-badge.normal {
  background: #1e293b;
  color: #cbd5e1;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(215, 25, 32, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(215, 25, 32, 0);
    transform: scale(1.02);
  }
}

@keyframes pulseGreenGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    transform: scale(1.02);
  }
}

@media (max-width: 640px) {
  .ann-row {
    padding: 0.75rem 0.9rem;
    gap: 0.5rem;
  }
  .ann-row-badge-title {
    width: 100%;
    flex: 1 1 100%;
  }
  .ann-row-title {
    font-size: 0.88rem;
    white-space: normal;
  }
  .ann-row-meta {
    width: 100%;
    justify-content: flex-start;
  }
  .ann-row-action {
    width: 100%;
    margin-top: 0.25rem;
  }
  .btn-ann-link {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   5. HAKKIMIZDA & İLETİŞİM
   ========================================================================== */
.about-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 1rem;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-banner-wrapper {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #ffffff;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.about-banner-img {
  max-width: 680px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 992px) {
  .about-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.about-text h3 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--bil-navy);
  margin-bottom: 0.85rem;
  line-height: 1.25;
}

[data-theme="dark"] .about-text h3 {
  color: #93c5fd;
}

.about-text p {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.65;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.about-stat-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  border-left: 3px solid var(--bil-navy);
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--bil-navy);
  line-height: 1;
  margin-bottom: 0.25rem;
}

[data-theme="dark"] .stat-number {
  color: #60a5fa;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.contact-section {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.contact-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .contact-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: var(--bil-navy);
  transform: translateY(-2px);
}

.contact-icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--bil-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

[data-theme="dark"] .contact-icon-bubble {
  background: #1e293b;
  color: #60a5fa;
}

.contact-title {
  font-size: 1rem;
  font-weight: 800;
}

.contact-detail {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.contact-link {
  color: var(--bil-navy);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.88rem;
}

[data-theme="dark"] .contact-link {
  color: #60a5fa;
}

.site-footer {
  background: var(--bil-navy-dark);
  color: #94a3b8;
  padding: 2.5rem 1rem 1.5rem 1rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

.footer-brand-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
}

/* ==========================================================================
   6. ÖĞRETMEN OPTİK YARDIMCISI BÖLÜMÜ (MOBİLDE SIFIR TAŞMA)
   ========================================================================== */
.teacher-section {
  display: none;
  flex-direction: column;
  gap: 1rem;
  max-width: 1200px;
  margin: 1rem auto 2.5rem auto;
  padding: 0 1rem;
  animation: fadeIn 0.3s ease;
  width: 100%;
}

.teacher-section.active {
  display: flex;
}

.panel-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.panel-title-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.panel-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--bil-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

[data-theme="dark"] .panel-icon-badge {
  background: #1e293b;
  color: #60a5fa;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
}

.panel-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.user-role-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-role-badge.teacher {
  background: #eff6ff;
  color: var(--bil-navy);
  border: 1px solid #bfdbfe;
}

.user-role-badge.admin {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

[data-theme="dark"] .user-role-badge.teacher {
  background: #1e293b;
  color: #93c5fd;
  border-color: #2b416a;
}

[data-theme="dark"] .user-role-badge.admin {
  background: #2e1065;
  color: #c4b5fd;
  border-color: #5b21b6;
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.admin-controls-group {
  display: none !important;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.admin-controls-group.is-admin {
  display: flex !important;
}

@media (max-width: 767px) {
  .panel-header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
  }
  .panel-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    width: 100%;
  }
  .admin-controls-group.is-admin {
    display: contents !important; /* grid ebeveyni ile uyum sağlar */
  }
  .admin-controls-group:not(.is-admin) {
    display: none !important;
  }
  .panel-controls .btn {
    width: 100%;
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
  }
}

/* Filtre Kartı */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  font-size: 0.95rem;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(12, 52, 125, 0.12);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.05rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  display: none;
  padding: 0.25rem;
}

.search-clear-btn.visible {
  display: block;
}

.filter-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.pills-scroll-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.pills-scroll-container::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  touch-action: manipulation;
  flex-shrink: 0;
}

.filter-pill:hover {
  background: #e2e8f0;
}

.filter-pill.active {
  background: var(--bil-navy);
  color: #ffffff;
  border-color: var(--bil-navy);
  box-shadow: 0 2px 6px rgba(12, 52, 125, 0.25);
}

[data-theme="dark"] .filter-pill.active {
  background: #2563eb;
  border-color: #2563eb;
}

.list-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.list-count-badge {
  background: var(--bg-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  color: var(--bil-navy);
}

[data-theme="dark"] .list-count-badge {
  color: #60a5fa;
}

/* ==========================================================================
   7. ÖĞRENCİ KARTLARI & 11 HANELİ KUTULU T.C. (MOBİLDE SIFIR TAŞMA)
   ========================================================================== */
.students-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
}

@media (min-width: 640px) {
  .students-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.student-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition);
  width: 100%;
  overflow: hidden;
}

.student-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.student-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  min-width: 0;
}

.student-name-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.student-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-class-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--bil-navy);
  margin-top: 0.15rem;
}

[data-theme="dark"] .student-class-tag {
  color: #93c5fd;
}

.student-no-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--bil-red);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* 11 HANELİ KUTULU T.C. NUMARASI (HER EKRANDA KUSURSUZ YAN YANA) */
.tc-optical-section {
  background: var(--tc-box-bg);
  border: 1px solid var(--tc-box-border);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  width: 100%;
  overflow: hidden;
}

.tc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--tc-box-text);
  letter-spacing: 0.05em;
}

.tc-boxes-row {
  display: grid !important;
  grid-template-columns: repeat(11, minmax(0, 1fr)) !important;
  gap: 2px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tc-digit-box {
  width: 100% !important;
  min-width: 0 !important;
  aspect-ratio: 1;
  max-width: 32px;
  min-height: 22px;
  background: var(--bg-card);
  border: 1px solid var(--tc-box-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.68rem, 3.2vw, 0.95rem);
  font-weight: 800;
  color: var(--tc-box-text);
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

/* Açık BİL Learn Giriş Bilgileri */
.billearn-creds {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.cred-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cred-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cred-val {
  font-weight: 800;
  color: var(--text-main);
  word-break: break-all;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
}

.student-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.65rem;
}

.btn-card-action {
  flex: 1;
  padding: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-action:hover {
  background: var(--bg-subtle);
}

.btn-magnify {
  color: var(--bil-navy);
  border-color: #bfdbfe;
  background: #eff6ff;
}

[data-theme="dark"] .btn-magnify {
  background: #1e293b;
  color: #bfdbfe;
  border-color: #2b416a;
}

/* ==========================================================================
   8. MODALLAR (GİRİŞ, BÜYÜTEÇ, DUYURU YÖNETİMİ, EXCEL)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

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

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

/* Dev Büyüteç */
.magnifier-modal-box {
  max-width: 520px;
  text-align: center;
}

.magnifier-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--bil-navy);
  margin-bottom: 0.25rem;
}

[data-theme="dark"] .magnifier-name {
  color: #93c5fd;
}

.magnifier-class {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bil-red);
  margin-bottom: 1rem;
}

.magnifier-tc-container {
  background: #eff6ff;
  border: 2px dashed #93c5fd;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

[data-theme="dark"] .magnifier-tc-container {
  background: #0f182c;
  border-color: #2b416a;
}

.magnifier-tc-digits {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.magnifier-digit-box {
  width: 36px;
  height: 50px;
  background: #ffffff;
  border: 2px solid var(--bil-navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--bil-navy);
  font-family: 'JetBrains Mono', monospace;
}

[data-theme="dark"] .magnifier-digit-box {
  background: #15223c;
  border-color: #60a5fa;
  color: #93c5fd;
}

.magnifier-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  text-align: left;
  background: var(--bg-subtle);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

/* Excel Dropzone */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
}

.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--bil-navy);
  background: #eff6ff;
}

/* Duyuru Yönetim Satırı */
.manage-ann-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.manage-ann-item-title {
  font-weight: 800;
  color: var(--text-main);
}

.manage-ann-item-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   YAZDIRMA VE A4 ÇIKTI STİLLERİ (@media print)
   ========================================================================== */
.print-roster-container {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 8mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
  }
  
  .top-bar,
  .navbar,
  .pwa-banner,
  #homeSection,
  .panel-header,
  .filter-card,
  .students-grid,
  .modal-backdrop,
  .toast-notice,
  .site-footer {
    display: none !important;
  }
  
  .teacher-section {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  
  .print-roster-container {
    display: block !important;
  }
  
  .print-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }
  
  .print-title {
    font-size: 13pt;
    font-weight: 900;
    margin-bottom: 2px;
  }
  
  .print-subtitle {
    font-size: 10pt;
    font-weight: 700;
    color: #333;
  }
  
  .print-meta-row {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 8.5pt;
    font-weight: 600;
  }
  
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
  }
  
  .print-table th, .print-table td {
    border: 1px solid #444;
    padding: 4px 6px;
    font-size: 8.5pt;
    text-align: left;
  }
  
  .print-table th {
    background: #f1f5f9 !important;
    font-weight: 800;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .print-tc-col {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }
}

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

@keyframes slideDown {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
