/* ===== Junior Lab — Mobil Uygulama Teması =====
   Palet: Lacivert #0B2545 · Petrol #0E6973 · Turkuaz #14B8A6
   Font: Quicksand
*/

:root {
  --navy: #0B2545;
  --navy-light: #13315C;
  --petrol: #0E6973;
  --petrol-light: #12808C;
  --turquoise: #14B8A6;
  --turquoise-light: #2DD4BF;
  --mist: #F0F5F7;
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: 'Quicksand', sans-serif; }

/* ===== Giriş ekranı ===== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 45%, var(--petrol) 100%);
  animation: fadeUp 0.3s ease;
}

/* ===== Üst bar ===== */
.app-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 55%, var(--petrol) 100%);
}

/* ===== Alt navigasyon ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 32rem;
  display: flex;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid #E2ECF0;
  box-shadow: 0 -4px 20px rgba(11,37,69,0.10);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}
.bottom-nav .nav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px 5px;
  border-radius: 14px;
  color: #7C93A6;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.18s ease;
}
.bottom-nav .nav-btn i { font-size: 1.05rem; transition: transform 0.18s ease; }
.bottom-nav .nav-btn.active {
  color: var(--petrol);
}
.bottom-nav .nav-btn.active i {
  transform: translateY(-1px);
  color: var(--turquoise);
}
.bottom-nav .nav-btn:active { transform: scale(0.93); }

/* ===== Kartlar ===== */
.card {
  background: white;
  border-radius: 1.15rem;
  box-shadow: 0 2px 12px rgba(11,37,69,0.07);
  padding: 1.1rem;
  border: 1px solid rgba(14,105,115,0.06);
}

.stat-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(11,37,69,0.10);
  padding: 0.6rem 0.25rem 0.5rem;
  text-align: center;
  border: 1px solid rgba(20,184,166,0.10);
}
.stat-card .num { font-size: 1.15rem; font-weight: 700; line-height: 1.1; }
.stat-card .lbl { font-size: 0.55rem; color: #64798B; margin-top: 2px; font-weight: 600; letter-spacing: 0.02em; }
.stat-card .lbl i { display: block; font-size: 0.7rem; margin-bottom: 2px; }

/* ===== Sayfa başlığı ===== */
.page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  display: flex; align-items: center; gap: 8px;
}
.page-title i { color: var(--turquoise); font-size: 0.95rem; }
.page-sub { font-size: 0.72rem; color: #64798B; font-weight: 500; margin-top: 2px; }

/* ===== Form elemanları ===== */
.input {
  width: 100%;
  border: 1.5px solid #DAE6EB;
  border-radius: 0.85rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  color: var(--navy);
  background: white;
  outline: none;
  transition: all 0.15s;
}
.input:focus {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.14);
}
.input::placeholder { color: #9DB2C0; font-weight: 500; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230E6973' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.2rem; }

.field-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--petrol);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Butonlar ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--petrol) 100%);
  color: white;
  padding: 0.7rem 1.3rem;
  border-radius: 0.9rem;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: 'Quicksand', sans-serif;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(20,184,166,0.30);
  transition: all 0.15s;
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(20,184,166,0.25); }

.btn-secondary {
  background: #E5EFF2;
  color: var(--petrol);
  padding: 0.55rem 1rem;
  border-radius: 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
  transition: all 0.15s;
}
.btn-secondary:active { transform: scale(0.96); background: #D5E5EA; }
.jl-mode-active { background: var(--petrol); color: #fff; }

.btn-danger {
  background: linear-gradient(135deg, #F43F5E, #E11D48);
  color: white;
  padding: 0.55rem 1.1rem;
  border-radius: 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
  box-shadow: 0 4px 12px rgba(225,29,72,0.25);
  transition: all 0.15s;
}
.btn-danger:active { transform: scale(0.96); }

/* ===== Öğrenci satırları ===== */
.student-row {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.9rem;
  border: 1.5px solid #E4EDF1;
  background: white;
  transition: all 0.15s;
}
.student-row.absent {
  background: #FFF1F3;
  border-color: #FDCFD8;
}

/* Checkbox */
input[type="checkbox"] {
  accent-color: var(--turquoise);
  width: 1.1rem; height: 1.1rem;
  border-radius: 6px;
}
.att-check { accent-color: #E11D48 !important; }

/* ===== Rozetler ===== */
.badge {
  display: inline-block;
  padding: 2.5px 9px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-red    { background: #FFE1E7; color: #BE123C; }
.badge-amber  { background: #FEF0C7; color: #A16207; }
.badge-green  { background: #CCFBF1; color: #0F766E; }
.badge-indigo { background: #DCEEF2; color: #0E6973; }
.badge-navy   { background: #DBE4F0; color: #0B2545; }

/* ===== Ses kaydı ===== */
.rec-pulse { animation: recpulse 1.2s infinite; }
@keyframes recpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

audio {
  width: 100%;
  height: 40px;
  border-radius: 999px;
}

/* ===== Günlük Ders Planı Widget'ı ===== */
.plan-widget {
  border-radius: 1.3rem;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 45%, var(--petrol) 100%);
  box-shadow: 0 8px 24px rgba(11,37,69,0.22);
}
.plan-widget-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 0.6rem 0.75rem;
}
.plan-nav-arrow {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  color: #E8F4F1;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: all 0.15s;
  border: 1px solid rgba(255,255,255,0.14);
  position: relative;
  z-index: 5;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.plan-nav-arrow:hover { background: rgba(255,255,255,0.22); }
.plan-nav-arrow:active { transform: scale(0.88); }
/* Dokunma alanını görsel boyuttan büyütür (mobilde kaçırılan tıklamaları önler) */
.plan-nav-arrow::before {
  content: '';
  position: absolute;
  top: -8px; bottom: -8px; left: -8px; right: -8px;
}
.plan-widget-title { text-align: center; flex: 1; min-width: 0; }
.plan-day-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.plan-day-date {
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 1px;
}
.plan-today-pill {
  display: inline-block;
  background: var(--turquoise);
  color: #06251F;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 1.5px 7px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 3px;
}
.plan-widget-body {
  background: #F6FAFB;
  border-radius: 1.1rem 1.1rem 0 0;
  padding: 0.85rem 0.7rem calc(0.85rem + 2px);
  min-height: 64px;
}
.plan-empty {
  text-align: center;
  padding: 1.4rem 0.5rem 1.1rem;
  color: #8FA5B4;
}
.plan-empty i { font-size: 1.6rem; margin-bottom: 6px; color: #B9CDD7; }
.plan-empty p { font-size: 0.8rem; font-weight: 600; }

.plan-entry {
  width: 100%;
  display: flex; align-items: center; gap: 0.65rem;
  background: white;
  border: 1.5px solid #E4EDF1;
  border-radius: 0.95rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  text-align: left;
  transition: all 0.15s;
  animation: fadeUp 0.3s ease both;
  animation-delay: var(--d, 0s);
}
.plan-entry:last-child { margin-bottom: 0; }
.plan-entry:active { transform: scale(0.98); background: #EFFBF9; border-color: var(--turquoise-light); }
.plan-entry-time {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  min-width: 46px;
  padding: 0.3rem 0.35rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(20,184,166,0.14), rgba(14,105,115,0.12));
  color: var(--petrol);
  font-weight: 700;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.plan-entry-time i { font-size: 0.65rem; opacity: 0.8; }
.plan-entry-main { flex: 1; min-width: 0; }
.plan-entry-name { font-weight: 700; font-size: 0.86rem; color: var(--navy); }
.plan-entry-desc { font-size: 0.68rem; color: #7C93A6; font-weight: 600; margin-top: 1px; }
.plan-entry-note { color: #A16207; }
.plan-entry-note i { font-size: 0.6rem; }
.plan-entry-count {
  display: flex; align-items: center; gap: 3px;
  font-size: 0.68rem; font-weight: 700; color: var(--petrol);
  flex-shrink: 0;
}
.plan-entry-go { color: #B9CDD7; font-size: 0.7rem; flex-shrink: 0; }

/* ===== Koordinatör: Haftalık Ders Programı ===== */
.sched-widget {
  border-radius: 1.3rem;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 45%, var(--petrol) 100%);
  box-shadow: 0 8px 24px rgba(11,37,69,0.22);
}
.sched-widget-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 0.6rem 0.6rem;
}
.sched-summary {
  padding: 0 0.9rem 0.9rem;
}
.sched-summary-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.14);
  color: #E8F4F1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
}
.teacher-sched-card .section-head h3 { font-size: 0.95rem; }
.sched-entry {
  border-radius: 0.9rem;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid #E4EDF1;
  background: #F9FBFC;
  transition: all 0.15s;
}
.sched-entry-done {
  background: #F2FBF9;
  border-color: rgba(20,184,166,0.28);
}
.sched-entry-pending {
  background: #FFFBF0;
  border-color: rgba(245,158,11,0.22);
}

/* ===== Bölüm ikon başlıkları ===== */
.section-head {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 0.7rem;
}
.section-head .icon-chip {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.icon-chip.chip-turquoise { background: #CCFBF1; color: #0F766E; }
.icon-chip.chip-petrol    { background: #DCEEF2; color: var(--petrol); }
.icon-chip.chip-navy      { background: #DBE4F0; color: var(--navy); }
.icon-chip.chip-red       { background: #FFE1E7; color: #BE123C; }
.icon-chip.chip-amber     { background: #FEF0C7; color: #A16207; }
.section-head h3 { font-weight: 700; font-size: 0.92rem; color: var(--navy); }
.section-head p  { font-size: 0.68rem; color: #64798B; font-weight: 500; }

/* ===== Animasyon ===== */
.tab-panel { animation: fadeUp 0.25s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Masaüstünde telefon çerçevesi hissi ===== */
@media (min-width: 640px) {
  body { background: linear-gradient(135deg, #0B2545 0%, #0E6973 100%); }
  #app-shell { min-height: 100vh; }
}

@media print {
  header, #dashboard-cards, .bottom-nav, .no-print { display: none !important; }
}

/* ===== PWA "Ana Ekrana Ekle" bildirimi ===== */
.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 84px;
  z-index: 90;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 12px 12px 12px 14px;
  box-shadow: 0 10px 30px rgba(11, 37, 69, 0.25), 0 2px 8px rgba(11, 37, 69, 0.12);
  border: 1px solid rgba(11, 37, 69, 0.06);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.pwa-install-banner.show { transform: translateY(0); opacity: 1; }
.pwa-install-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--petrol) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-title { font-weight: 700; font-size: 0.82rem; color: var(--navy); line-height: 1.15; }
.pwa-install-sub { font-size: 0.68rem; color: #64798B; font-weight: 500; line-height: 1.3; margin-top: 2px; }
.pwa-install-action {
  flex-shrink: 0; background: var(--turquoise); color: #fff; border: none;
  padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 0.78rem; cursor: pointer;
}
.pwa-install-action:active { transform: scale(0.95); }
.pwa-install-close {
  flex-shrink: 0; width: 26px; height: 26px; border: none; background: #F0F5F7;
  border-radius: 8px; color: #64798B; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
@media (min-width: 640px) {
  .pwa-install-banner { max-width: 420px; left: auto; right: 24px; bottom: 24px; }
}
