/* ==========================================================================
   Pardus Akıllı Tahta - Öğretmen Mobil Portalı v1.3.11
   %100 Mobil Uyumlu, Sıfır Taşma, Ferah Açık Renk Arayüz Tasarımı
   ========================================================================== */

:root {
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-canvas: #f8fafc;
  --card-bg: #ffffff;
  --border-subtle: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-primary: #090d16;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --text-light: #64748b;

  --primary: #2563eb;
  --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  --primary-glow: rgba(37, 99, 235, 0.22);

  --success: #10b981;
  --success-dark: #059669;
  --success-glow: rgba(16, 185, 129, 0.22);
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;

  --danger: #ef4444;
  --danger-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  --danger-glow: rgba(239, 68, 68, 0.22);

  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hero: 0 10px 24px -3px rgba(37, 99, 235, 0.28);
}

/* Home-screen guidance is optional and stays below the active QR/lesson flow. */
.install-card[hidden], .install-action[hidden], .install-browser-hint[hidden] { display: none !important; }
.install-card { border: 1px solid #dce6f4; background: linear-gradient(135deg,#fff,#eff6ff); border-radius: 18px; padding: 18px; }
.install-intro { display: flex; align-items: center; gap: 12px; }
.install-app-icon { border-radius: 13px; flex-shrink: 0; box-shadow: 0 4px 12px #1d4ed826; }
.install-eyebrow { color: #2563eb; font-size: 9px; font-weight: 800; letter-spacing: 1.1px; }
.install-intro h2 { font-size: 15px; line-height: 1.4; margin: 3px 0; }
.install-intro p { font-size: 11px; line-height: 1.6; color: #64748b; }
.install-options { display: grid; gap: 9px; margin-top: 15px; }
.install-action { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 62px; padding: 12px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fff; text-decoration: none; text-align: left; color: #0f172a; font: inherit; cursor: pointer; }
.install-action > svg { flex-shrink: 0; }
.install-action > span:nth-child(2) { flex: 1; min-width: 0; }
.install-action strong { display: block; font-size: 12px; line-height: 1.5; }
.install-action small { display: block; color: #64748b; font-size: 10px; margin-top: 2px; }
.install-android { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.install-action:focus-visible, .install-dialog button:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
.install-dialog { width: min(440px,calc(100% - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 24px; color: #0f172a; background: #fff; box-shadow: 0 24px 80px #0f172a40; overflow-y: auto; overscroll-behavior: contain; }
.install-dialog::backdrop { background: #0f172aa6; backdrop-filter: blur(4px); }
.install-guide { position: relative; padding: 28px 22px 22px; }
.install-close { position: absolute; top: 10px; right: 10px; height: 36px; width: 36px; border: 0; border-radius: 50%; color: #64748b; background: #f1f5f9; cursor: pointer; }
.install-guide h2 { font-size: 22px; line-height: 1.3; margin: 10px 18px 8px 0; letter-spacing: -.6px; }
.install-guide-lead { color: #64748b; font-size: 12px; line-height: 1.7; }
.install-phone-scene { position: relative; display: flex; justify-content: center; align-items: center; margin: 18px 0; height: 184px; border-radius: 18px; background: radial-gradient(ellipse at 50% 85%,#c7d2fe,#eff6ff 70%); overflow: hidden; }
.install-phone { position: relative; width: 116px; height: 163px; margin-top: 22px; border: 5px solid #18253c; border-radius: 23px 23px 0 0; background: linear-gradient(150deg,#c8e8f8,#d8dcfc 60%,#adc7f3); box-shadow: 10px 10px 25px #3b4d872e; transform: rotate(-7deg); }
.phone-island { width: 35px; height: 8px; margin: 6px auto 0; border-radius: 8px; background: #18253c; }
.phone-time { text-align: center; font-size: 15px; font-weight: 700; color: #2d426b; margin: 8px 0; }
.phone-app { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.phone-app img { border-radius: 13px; width: 41px; height: 41px; }
.phone-app span { font-size: 7px; font-weight: 700; max-width: 92px; text-align: center; overflow-wrap: anywhere; }
.phone-dots { display: flex; justify-content: center; gap: 3px; margin-top: 9px; }
.phone-dots i { width: 3px; height: 3px; border-radius: 50%; background: #fff; }
.phone-dock { display: flex; justify-content: space-around; background: #ffffff70; border-radius: 12px; padding: 5px; margin: 8px; }
.phone-dock i { width: 18px; height: 18px; border-radius: 5px; background: #5b8ecb77; }
.phone-callout { position: absolute; top: 46px; right: 10px; white-space: nowrap; padding: 9px; border-radius: 11px; background: #fff; box-shadow: 0 5px 20px #4261851a; color: #334155; font-size: 10px; font-weight: 700; }
.phone-callout span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #059669; background: #d1fae5; margin-right: 4px; }
.install-browser-hint { border-radius: 10px; padding: 12px; background: #eff6ff; color: #1e40af; font-size: 12px; line-height: 1.6; margin-bottom: 15px; }
.install-steps { display: grid; gap: 17px; list-style: none; }
.install-steps li { display: flex; gap: 11px; }
.install-step-number { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; background: #eff6ff; color: #2563eb; font-size: 13px; font-weight: 800; }
.install-steps strong { font-size: 13px; line-height: 1.6; }
.install-steps p { font-size: 11px; line-height: 1.7; color: #64748b; margin-top: 3px; }
.share-symbol { width: 18px; height: 18px; vertical-align: middle; color: #2563eb; }
.install-copy-row { display: flex; gap: 6px; margin-top: 20px; }
.install-copy-row input { min-width: 0; flex: 1; border: 1px solid #e2e8f0; border-radius: 9px; padding: 10px; font-size: 12px; background: #f8fafc; color: #475569; }
.install-copy-row button { border: 0; border-radius: 9px; padding: 10px; background: #eff6ff; color: #1d4ed8; font-weight: 700; cursor: pointer; }
.install-copy-feedback { min-height: 20px; font-size: 11px; line-height: 1.6; color: #475569; margin: 6px 0; }
.install-guide-done { border: 0; border-radius: 12px; background: #2563eb; color: #fff; padding: 13px; width: 100%; font-size: 14px; font-weight: 700; cursor: pointer; }
@media (min-width: 640px) { .install-options { grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); } }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.mobile-app-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 12px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
}

@media (min-width: 480px) {
  .mobile-app-wrapper {
    max-width: 430px;
    padding: 16px 16px 36px;
  }
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 2px;
  width: 100%;
  gap: 10px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.school-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px var(--primary-glow);
  flex-shrink: 0;
}
.school-avatar img { width: 100%; height: 100%; object-fit: contain; }
.school-avatar.has-school-logo { background: #fff; box-shadow: none; }
.school-avatar [hidden], #mobileFooterText[hidden] { display: none !important; }

.header-titles {
  min-width: 0;
}

.header-titles h1 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.header-titles p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--success-dark);
  box-shadow: var(--shadow-sm);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulseLive 2s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

/* ==========================================================================
   APP CONTENT & CARDS
   ========================================================================== */
.app-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* DURATION CARD */
.duration-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 12px 12px;
  box-shadow: var(--shadow-card);
  width: 100%;
  overflow: hidden;
}

.card-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  width: 100%;
}

.headline-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.headline-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

.selected-duration-tag {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.duration-pill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.duration-pill {
  background-color: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 2px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: all 0.15s ease;
  user-select: none;
  width: 100%;
  min-width: 0;
}

.pill-min {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.pill-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.duration-pill.active {
  background: var(--primary-gradient);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px var(--primary-glow);
}

.duration-pill.active .pill-sub {
  color: #dbeafe;
}

.duration-pill:active {
  transform: scale(0.97);
}

/* CUSTOM STEPPER ACCORDION */
.custom-stepper-details {
  margin-top: 8px;
  border-top: 1px solid #f1f5f9;
  padding-top: 6px;
  width: 100%;
}

.custom-stepper-details summary {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}

.stepper-body {
  background-color: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-top: 6px;
  width: 100%;
}

.stepper-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  width: 100%;
}

.btn-step {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-step:active {
  background-color: #eff6ff;
}

.stepper-val-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

#customMinuteInput {
  background: transparent;
  border: none;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  width: 60px;
  text-align: right;
  outline: none;
}

.val-unit {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

#durationSlider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ==========================================================================
   MAIN SCANNER HERO CARD
   ========================================================================== */
.scanner-hero-card {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.camera-prompt {
  width: 100%;
}

/* TRIGGER HERO BUTTON */
.btn-trigger-camera {
  width: 100%;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  box-shadow: var(--shadow-hero);
  transition: transform 0.12s ease;
  overflow: hidden;
}

.btn-trigger-camera:active {
  transform: scale(0.98);
}


.camera-lens-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.camera-trigger-texts {
  flex: 1;
  min-width: 0;
}

.camera-trigger-texts h2 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 2px;
}

.camera-trigger-texts p {
  font-size: 0.82rem;
  color: #e0f2fe;
  line-height: 1.35;
  font-weight: 500;
}

.camera-trigger-arrow {
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.camera-perm-help {
  margin-top: 10px;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.camera-perm-help strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
  color: #7f1d1d;
}

.camera-perm-help p {
  margin: 0;
  color: #b91c1c;
}

.scanner-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* LIVE CAMERA VIEWFINDER */
.camera-live-container {
  background-color: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.3);
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.scanner-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
  width: 100%;
}

.scanner-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
}

.pulse-ring {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
  animation: pulseLive 1.5s infinite;
}

.btn-close-cam {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.camera-viewport-frame {
  --camera-view-size: clamp(205px, calc(100vw - 64px), 340px);
  position: relative;
  background-color: #000000;
  border-radius: 16px;
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  height: var(--camera-view-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Preserve camera aspect ratio: the decoder uses the video's client dimensions. */
#qrReader {
  width: 100%;
  border: none;
}

#cameraLiveArea[data-scanner-engine="native"] #qrReader {
  display: none;
}

#qrReader video {
  display: block;
  width: auto !important;
  height: auto;
  max-width: 100%;
  max-height: var(--camera-view-size);
  margin: 0 auto;
  object-fit: contain;
}

#webcamVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#qrReader__dashboard,
#qrReader__header_message {
  display: none !important;
}

/* RETICLE CORNER HUD */
.viewfinder-reticle {
  position: absolute;
  top: 15%;
  left: 15%;
  right: 15%;
  bottom: 15%;
  pointer-events: none;
  z-index: 10;
}

.reticle-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #38bdf8;
  border-style: solid;
}

.c-tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
.c-tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
.c-bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
.c-br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }

.animated-laser {
  position: absolute;
  top: 15%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #38bdf8;
  box-shadow: 0 0 10px 2px #38bdf8;
  animation: laserScanMotion 2s infinite ease-in-out;
  pointer-events: none;
  z-index: 11;
}

@keyframes laserScanMotion {
  0% { top: 15%; opacity: 0.9; }
  50% { top: 85%; opacity: 1; }
  100% { top: 15%; opacity: 0.9; }
}

.camera-hint-text {
  text-align: center;
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  padding: 8px 4px 2px;
}

@media (max-width: 380px) {
  .camera-live-container {
    padding: 8px;
  }

  .camera-viewport-frame {
    --camera-view-size: clamp(205px, calc(100vw - 64px), 280px);
  }
}

/* UNLOCKING LOADING OVERLAY */
.unlocking-overlay {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  width: 100%;
}

.animated-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotateSpin 0.75s infinite linear;
  margin: 0 auto 14px;
}

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

.unlocking-overlay h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.unlocking-overlay p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* SECURITY STRIP */
.security-info-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--success-dark);
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   ACTIVE SESSION SCREEN
   ========================================================================== */
.active-lesson-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  width: 100%;
}

.success-radiant-badge {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 18px var(--success-glow);
}

.qr-confirmation { width:96px; height:96px; margin:0 auto 12px; color:#059669; border-radius:50%; background:#ecfdf5; }
.qr-confirmation svg { width:100%; height:100%; stroke:currentColor; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.qr-check-ring { --stroke-length:189; stroke-dasharray:189; stroke-dashoffset:0; }
.qr-check-mark { --stroke-length:44; stroke-dasharray:44; stroke-dashoffset:0; }
.qr-detected .qr-confirmation { animation:qrBadgePop .42s cubic-bezier(.2,.8,.3,1.2) both; }
.qr-detected .qr-check-ring { animation:qrStroke .4s ease-out both; }
.qr-detected .qr-check-mark { animation:qrStroke .3s .22s ease-out both; }
.success-radiant-badge.is-animated { animation:qrBadgePop .5s cubic-bezier(.2,.8,.3,1.2) both, qrSuccessGlow 1.1s ease-out; }
.success-radiant-badge.is-animated polyline { --stroke-length:28; stroke-dasharray:28; animation:qrStroke .35s .15s ease-out both; }
.unlock-progress { display:block; width:90px; height:4px; border-radius:4px; margin:18px auto 0; background:linear-gradient(90deg,#d1fae5,#10b981,#d1fae5); background-size:200% 100%; animation:qrProgress 1s linear infinite; }
@keyframes qrBadgePop { from { transform:scale(.72); opacity:0; } to { transform:scale(1); opacity:1; } }
@keyframes qrStroke { from { stroke-dashoffset:var(--stroke-length); } to { stroke-dashoffset:0; } }
@keyframes qrSuccessGlow { from { box-shadow:0 0 0 0 rgba(16,185,129,.3); } to { box-shadow:0 0 0 22px rgba(16,185,129,0); } }
@keyframes qrProgress { to { background-position:200% 0; } }
.camera-zoom-controls { display:flex; justify-content:center; align-items:center; gap:8px; padding:10px 0 4px; color:#cbd5e1; font-size:.8rem; }
.camera-zoom-controls[hidden] { display:none; }
.camera-zoom-controls button { padding:10px 15px; min-height:44px; color:white; background:#1e293b; border:1px solid #475569; border-radius:22px; cursor:pointer; }
.camera-zoom-controls button[aria-pressed="true"] { background:#047857; border-color:#34d399; }
.camera-zoom-controls button:disabled { opacity:.5; cursor:default; }
@media (prefers-reduced-motion:reduce) {
  .qr-detected *, .success-radiant-badge.is-animated, .success-radiant-badge.is-animated *, .unlock-progress, .animated-laser { animation:none !important; }
}

.session-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

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

.board-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 5px 14px;
  border-radius: 20px;
  margin: 12px auto 0;
  font-size: 0.86rem;
  color: var(--text-primary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.countdown-hero {
  background: #f8fafc;
  border: 4px solid var(--success);
  border-radius: 50%;
  width: 155px;
  height: 155px;
  margin: 18px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px var(--success-glow);
}

.time-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--success-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 3px;
}

.time-sub {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.session-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  width: 100%;
}

.btn-extend {
  width: 100%;
  background-color: var(--success-bg);
  border: 1.5px solid var(--success-border);
  color: var(--success-dark);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-extend:active {
  transform: scale(0.98);
  background-color: #d1fae5;
}

.btn-scan-another {
  width: 100%;
  background-color: var(--primary-subtle);
  border: 1.5px solid var(--primary-light);
  color: var(--primary-dark);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-scan-another:active {
  transform: scale(0.98);
  background-color: #e0e7ff;
}

.btn-lock {
  width: 100%;
  background: var(--danger-gradient);
  border: none;
  color: #ffffff;
  padding: 13px;
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px var(--danger-glow);
  transition: transform 0.1s;
}

.btn-lock:active {
  transform: scale(0.98);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0f172a;
  color: #ffffff;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: none;
  z-index: 99999;
  max-width: 90%;
  text-align: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 500;
  padding: 2px 0 8px;
  width: 100%;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
:root { --offline-accent:#b45309; }
.offline-phone[hidden], .offline-phone [hidden] { display:none !important; }
.offline-phone-card { background:#fff; border:1px solid #fde68a; border-radius:24px; padding:26px 22px; box-shadow:0 12px 35px #78350f0d; text-align:center; }
.offline-read-check { display:flex; justify-content:center; align-items:center; gap:8px; color:#047857; font-size:.85rem; font-weight:700; margin-bottom:24px; }
.offline-read-check svg { width:30px; height:30px; fill:#ecfdf5; stroke:#059669; stroke-width:3; }
.offline-read-check path { fill:none; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:45; stroke-dashoffset:45; animation:offlineCheck .45s ease-out forwards; }
.offline-phone-tag { display:inline-block; background:#fffbeb; color:#92400e; font-size:.7rem; letter-spacing:.09em; font-weight:800; border-radius:30px; padding:7px 12px; }
.offline-phone h2 { margin:12px 0; font-size:1.9rem; color:#0f172a; }
.offline-phone-intro { color:#64748b; font-size:.9rem; line-height:1.7; }
.offline-board-badge { display:grid; gap:4px; background:#f8fafc; border-radius:14px; padding:14px; margin:20px 0; overflow-wrap:anywhere; }
.offline-board-badge strong { color:#0f172a; font-size:1rem; }
.offline-board-badge span { color:#64748b; font-size:.8rem; }
.offline-phone form { text-align:left; }
.offline-phone label { display:block; font-weight:700; color:#334155; margin-bottom:9px; font-size:.9rem; }
.offline-phone input { box-sizing:border-box; width:100%; border:1.5px solid #cbd5e1; background:#fff; color:#0f172a; border-radius:12px; padding:16px; font-size:20px; text-align:center; letter-spacing:.14em; }
.offline-phone input:focus { outline:3px solid #fef3c7; border-color:#b45309; }
.offline-phone small { display:block; color:#64748b; line-height:1.6; font-size:.78rem; margin:10px 0; }
.offline-phone button { width:100%; border:0; border-radius:12px; padding:16px 12px; background:#b45309; color:white; font:inherit; font-size:.95rem; font-weight:800; cursor:pointer; margin-top:14px; min-height:48px; }
.offline-phone button:disabled { opacity:.55; cursor:wait; }
.offline-phone .offline-back { color:#475569; background:#f1f5f9; }
.offline-code { display:block; font-size:clamp(1.6rem,8vw,2.8rem); font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; background:#fffbeb; color:#78350f; padding:20px 4px; border:1px dashed #f59e0b; border-radius:16px; margin:10px 0 20px; }
.offline-code-label { display:block; color:#92400e; font-size:.7rem; font-weight:800; letter-spacing:.08em; margin-top:20px; }
#offlineCodeResult p { font-size:.85rem; color:#475569; line-height:1.7; }
#offlinePhoneFeedback { font-size:.85rem; line-height:1.65; color:#92400e; margin-top:18px; }
@keyframes offlineCheck { to { stroke-dashoffset:0; } }
@media (prefers-reduced-motion:reduce) { .offline-read-check path { animation:none; stroke-dashoffset:0; } }

/* ==========================================================================
   2026-10 ARAYÜZ YENİLEMESİ
   Lacivert okul başlığı, vizör biçimli QR düğmesi, masaüstünde iki sütun.
   Kimlikler, sınıflar ve JS aynı kalır; bu katman önceki kuralları ezer.
   ========================================================================== */
:root {
  --ink: #0b1120;
  --bg-canvas: #f2f4f8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #bfdbfe;
  --primary-subtle: #eff6ff;
  --primary-gradient: #2563eb;
  --danger-gradient: #dc2626;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
}
button:focus-visible, summary:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* ---- Okul başlığı ---- */
.app-header { width: auto; margin: -10px -12px 0; padding: 14px 14px; background: var(--ink); color: #fff; }
.header-titles h1 { color: #fff; font-weight: 700; }
.header-titles p { color: #9fb0c9; font-weight: 500; }
.school-avatar { width: 46px; height: 46px; border-radius: 12px; box-shadow: none; overflow: hidden; }
.school-avatar.has-school-logo { background: #fff; }
.online-pill { background: transparent; border-color: rgba(255, 255, 255, .2); color: #6ee7b7; box-shadow: none; padding: 5px 10px; }
.header-desk { display: none; }

/* ---- Süre seçimi ---- */
.duration-card { padding: 16px 14px 12px; }
.card-headline { margin-bottom: 12px; }
.headline-title { font-size: .92rem; color: var(--text-primary); }
.selected-duration-tag { background: var(--primary-subtle); border: 0; padding: 4px 10px; }
.duration-pill { min-height: 58px; background: #fff; border-color: #d7deea; border-radius: 12px; }
.duration-pill.active { background: var(--primary); border-color: var(--primary); box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .7); }
.pill-min { font-size: .98rem; font-variant-numeric: tabular-nums; }
.custom-stepper-details { margin-top: 12px; padding-top: 10px; }
.custom-stepper-details summary { font-size: .82rem; padding: 6px 0; min-height: 32px; }
.btn-step { width: 44px; height: 44px; border-radius: 10px; }

/* ---- QR düğmesi: canlı kameradaki vizörün aynısı ---- */
.btn-trigger-camera {
  flex-direction: column; text-align: center; gap: 16px;
  padding: 30px 18px 26px; border-radius: 20px;
  background: var(--primary-dark);
  box-shadow: 0 16px 30px -14px rgba(29, 78, 216, .75);
}
.btn-trigger-camera:hover { background: #1e40af; }
.camera-lens-badge {
  --b: #fff; width: 92px; height: 92px; border-radius: 0;
  background:
    linear-gradient(var(--b), var(--b)) 0 0 / 24px 3px,
    linear-gradient(var(--b), var(--b)) 0 0 / 3px 24px,
    linear-gradient(var(--b), var(--b)) 100% 0 / 24px 3px,
    linear-gradient(var(--b), var(--b)) 100% 0 / 3px 24px,
    linear-gradient(var(--b), var(--b)) 0 100% / 24px 3px,
    linear-gradient(var(--b), var(--b)) 0 100% / 3px 24px,
    linear-gradient(var(--b), var(--b)) 100% 100% / 24px 3px,
    linear-gradient(var(--b), var(--b)) 100% 100% / 3px 24px;
  background-repeat: no-repeat;
}
.camera-trigger-texts { flex: none; }
.camera-trigger-texts h2 { font-size: 1.2rem; letter-spacing: -.01em; margin-bottom: 6px; }
.camera-trigger-texts p { max-width: 30ch; margin: 0 auto; color: #dbeafe; font-size: .88rem; line-height: 1.45; }
.camera-trigger-arrow { display: none; }
.camera-live-container { background: var(--ink); border-radius: 20px; }
.reticle-corner { border-color: #fff; }
.unlocking-overlay, .active-lesson-card { border-radius: 20px; }

.security-info-strip { background: none; border: 0; padding: 2px 8px; color: #64748b; font-weight: 500; font-size: .78rem; }
.security-info-strip svg { stroke: #64748b; }

/* ---- Ders ekranı ---- */
.session-btn-group { gap: 10px; }
.btn-extend, .btn-scan-another, .btn-lock { min-height: 50px; }
.btn-lock { box-shadow: none; }

/* ---- Ana ekrana ekle ---- */
.install-card { background: #fff; border-color: var(--border-subtle); border-radius: 16px; padding: 16px; }
.install-eyebrow { display: none; }
.install-guide .install-eyebrow { display: inline; color: #64748b; letter-spacing: .04em; font-size: 10px; }
.install-intro h2 { font-size: 15px; }
.install-intro p { font-size: 12px; }
.install-action { background: #f8fafc; }
.install-action strong { font-size: 13px; }
.install-action small { font-size: 11px; }
.app-footer { color: #7c8aa3; }

@media (min-width: 480px) {
  .app-header { margin: 0; border-radius: 16px; padding: 16px; }
}

/* ---- Masaüstü: solda okul paneli, sağda uygulama ---- */
@media (min-width: 900px) {
  body { display: block; }
  .mobile-app-wrapper {
    width: auto; max-width: none; min-height: 100vh; margin: 0 0 0 46vw;
    padding: 40px 24px; gap: 14px; align-items: center; justify-content: center;
  }
  .mobile-app-wrapper > :not(dialog):not(.toast-popup):not(.app-header) { width: 100%; max-width: 440px; }
  .app-header {
    position: fixed; inset: 0 auto 0 0; width: 46vw; margin: 0; border-radius: 0;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: 44px clamp(28px, 5vw, 72px);
  }
  .header-left { flex: none; gap: 14px; padding-right: 96px; }
  .school-avatar { width: 52px; height: 52px; }
  .header-titles h1 { font-size: 1.05rem; }
  .header-titles p { font-size: .85rem; }
  .header-right { position: absolute; top: 54px; right: clamp(28px, 5vw, 72px); }
  .header-desk { display: block; margin-top: auto; }
  .header-pitch { max-width: 20ch; font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 600; line-height: 1.3; letter-spacing: -.015em; color: #e2e8f0; }
  .header-admin-link { display: inline-block; margin-top: 28px; color: #93c5fd; font-size: .88rem; font-weight: 600; text-decoration: none; }
  .header-admin-link:hover { text-decoration: underline; }
  .btn-trigger-camera { padding: 38px 20px 32px; }
}
.scanner-hero-card { overflow: visible; }
