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

:root {
  --bg: #f8fafc;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #475569;
  --faint: #64748b;
  --primary: #2563eb;
  --primary-2: #0284c7;
  --grad: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  --grad-subtle: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(2, 132, 199, 0.05));
  --success: #059669;
  --success-bg: rgba(16, 185, 129, 0.12);
  --danger: #dc2626;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --warn: #d97706;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.08), 0 4px 12px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Outfit', var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: -0.01em; color: var(--text); }
a { color: inherit; text-decoration: none; }
code { background: var(--surface-2); color: #1e293b; padding: 2px 6px; border-radius: 6px; font-size: .9em; border: 1px solid var(--border); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Arka plan ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs::before, .bg-orbs::after, .bg-orbs span {
  content: ''; position: absolute; border-radius: 50%; filter: blur(100px); opacity: .7;
  animation: float 18s ease-in-out infinite alternate;
}
.bg-orbs::before { width: 560px; height: 560px; background: #dbeafe; top: -160px; left: -100px; }
.bg-orbs::after { width: 480px; height: 480px; background: #e0f2fe; bottom: -160px; right: -100px; animation-delay: -6s; }
.bg-orbs span { width: 380px; height: 380px; background: #ede9fe; top: 35%; left: 50%; opacity: .45; animation-delay: -12s; }
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  transition: opacity 0.4s ease;
}
#interactive-grid-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
}
@keyframes float { to { transform: translate(60px, 40px) scale(1.12); } }

/* ---------- Ortak bileşenler ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 28px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-head); text-decoration: none; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #ffffff; color: #fff; box-shadow: 0 4px 14px -3px rgba(15, 23, 42, 0.18);
  overflow: hidden; flex-shrink: 0; border: 1px solid rgba(226, 232, 240, 0.9);
}
.brand-logo img, .brand-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}
.brand-logo svg { width: 24px; height: 24px; }
.brand-text-wrap {
  display: flex; flex-direction: column; justify-content: center; text-align: left; line-height: 1.25;
}
.brand-title {
  font-size: 1.25rem; font-weight: 800; color: #0f172a; letter-spacing: -0.015em;
}
.brand-subtitle {
  font-size: 0.82rem; font-weight: 600; color: #64748b; letter-spacing: 0.015em; margin-top: 2px;
}

/* Genel Tasarımla Uyumlu Alt Bilgi (Footer) */
.app-footer {
  width: 100%; max-width: 1400px; margin: 36px auto 20px auto; padding: 14px 22px;
  text-align: center; font-size: 0.83rem; color: #64748b; border-radius: var(--radius-md);
  border: 1px solid rgba(226, 232, 240, 0.85); background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.04); line-height: 1.6;
}
.app-footer strong { color: #0f172a; font-weight: 600; }
.kiosk-footer {
  margin-top: auto; margin-bottom: 0; width: 100%; max-width: 100%;
  font-size: 0.76rem; padding: 10px 16px;
}

.btn {
  --b: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--b); color: var(--text); font: 600 .92rem var(--font); cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-strong); background: #e2e8f0; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); border: 1px solid transparent; color: #fff; box-shadow: 0 10px 24px -8px rgba(37, 99, 235, 0.45); }
.btn-primary:hover { background: var(--grad); box-shadow: 0 14px 28px -8px rgba(37, 99, 235, 0.55); filter: brightness(1.05); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(220, 38, 38, .2); }
.btn-danger:hover { background: rgba(220, 38, 38, .18); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); }
.btn-sm { padding: 7px 12px; font-size: .82rem; border-radius: 9px; }
.btn svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.page-btn { padding: 6px 12px; font-size: .84rem; border-radius: 9px; border: 1px solid var(--border); background: #ffffff; color: var(--text); cursor: pointer; transition: .2s; font-family: var(--font); font-weight: 600; }
.page-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.page-btn.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; box-shadow: 0 4px 14px -4px var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.input, select.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: #ffffff; border: 1px solid var(--border-strong); color: var(--text);
  font: 500 .95rem var(--font); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
select.input option { background: #ffffff; color: var(--text); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

input[type="date"] {
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  padding: 0;
  margin: 0 0 0 4px;
  transition: opacity 0.15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-success { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
.badge-danger { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }
.badge-warn { color: #b45309; background: #fef3c7; border-color: #fde68a; }
.badge-ogrenci { color: #0369a1; background: #e0f2fe; border-color: #bae6fd; }
.badge-ogretmen { color: #4338ca; background: #e0e7ff; border-color: #c7d2fe; }
.badge-personel { color: #9d174d; background: #fce7f3; border-color: #fbcfe8; }
.badge-gecici_isci { color: #0e7490; background: #cffafe; border-color: #a5f3fc; }
.badge-memur { color: #4338ca; background: #e0e7ff; border-color: #c7d2fe; }
.badge-sofor { color: #c2410c; background: #ffedd5; border-color: #fed7aa; }
.badge-usta_ogretici { color: #6d28d9; background: #ede9fe; border-color: #ddd6fe; }
.badge-yardimci_hizmetler { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
.badge-leave { color: #4338ca; background: #e0e7ff; border-color: #c7d2fe; }
.badge-holiday { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; font-weight: 700; }
.badge-soft { color: #64748b; background: #f1f5f9; border-color: #cbd5e1; }

/* Rol Rozetleri: Nokta yerine rol ikonu */
.badge-role {
  gap: 6px;
  padding: 4px 10px 4px 7px;
  font-weight: 600;
}
.badge-role::before {
  display: none !important;
}
.badge-role svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--primary);
  animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toast-box { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem;
  background: #ffffff; color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  animation: toastIn .3s ease; transition: opacity .3s, transform .3s;
}
.toast-success { border-color: #10b981; color: #047857; background: #f0fdf4; }
.toast-error { border-color: #ef4444; color: #b91c1c; background: #fef2f2; }
.toast.out { opacity: 0; transform: translateY(10px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Animasyonlu sonuç ikonları ---------- */
.result-icon { width: 104px; height: 104px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.result-icon::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: ring 1.6s ease-out .4s infinite; }
.result-icon.success { color: var(--success); background: var(--success-bg); box-shadow: 0 0 40px -8px rgba(16, 185, 129, 0.4); }
.result-icon.exit { color: #ea580c; background: #ffedd5; box-shadow: 0 0 40px -8px rgba(234, 88, 12, 0.45); }
.result-icon.fail { color: var(--danger); background: var(--danger-bg); box-shadow: 0 0 40px -8px rgba(239, 68, 68, 0.4); }
.result-icon.warn { color: var(--warn); background: var(--warn-bg); }
.anim-icon { width: 64px; height: 64px; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.anim-icon circle { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .6s ease forwards; opacity: .35; }
.anim-icon path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .45s ease .45s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ring { 0% { transform: scale(.9); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }

/* ---------- Mobil sayfalar (giriş / kayıt) ---------- */
.mobile-shell { max-width: 480px; margin: 0 auto; padding: 22px 16px 40px; min-height: 100dvh; display: flex; flex-direction: column; gap: 18px; }
.mobile-head { display: flex; justify-content: space-between; align-items: center; }
.clock-mini { font-family: var(--font-head); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.center-card { text-align: center; animation: rise .5s ease; }
.center-card h1 { font-size: 1.75rem; margin-bottom: 8px; }
.center-card p { line-height: 1.55; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.result-card.success { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 20px 60px -20px rgba(16, 185, 129, 0.35); }
.result-card.exit { border-color: rgba(234, 88, 12, 0.45); box-shadow: 0 20px 60px -20px rgba(234, 88, 12, 0.35); }
.result-card.fail { border-color: rgba(239, 68, 68, 0.4); box-shadow: 0 20px 60px -20px rgba(239, 68, 68, 0.35); }
.result-title.success { color: var(--success); }
.result-title.exit { color: #ea580c; }
.result-title.fail { color: var(--danger); }
.person-name { font-size: 1.15rem; font-weight: 600; margin: 6px 0 12px; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.result-time { font-family: var(--font-head); font-size: 1.05rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.reason-box {
  text-align: left; margin: 18px 0 4px; padding: 14px 16px; border-radius: 13px;
  background: #fef2f2; border: 1px solid #fecaca; line-height: 1.5; font-size: .93rem; color: #991b1b;
}
.reason-box b { display: block; color: var(--danger); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); text-align: left; margin: 24px 0 10px; font-family: var(--font); font-weight: 600; }
.info-grid { display: grid; gap: 1px; background: var(--border); border-radius: 13px; overflow: hidden; border: 1px solid var(--border); margin: 0; text-align: left; }
.info-grid > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; background: #ffffff; font-size: .88rem; }
.info-grid dt { color: var(--muted); }
.info-grid dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; color: var(--text); }
.compare { width: 100%; border-collapse: collapse; font-size: .85rem; text-align: left; border-radius: 13px; overflow: hidden; }
.compare th, .compare td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.compare th { color: var(--faint); font-weight: 600; font-size: .75rem; text-transform: uppercase; background: #f8fafc; }
.compare td.bad { color: var(--danger); font-weight: 600; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.code-input { text-align: center; font-family: var(--font-head); font-size: 1.6rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 700; background: #ffffff; }
.steps { text-align: left; padding-left: 20px; color: var(--muted); line-height: 1.7; font-size: .9rem; }

/* ---------- Ana sayfa ---------- */
.landing { max-width: 1100px; margin: 0 auto; padding: 28px 22px 60px; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 70px; }
.hero { text-align: center; max-width: 760px; margin: 0 auto 60px; animation: rise .6s ease; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: #ffffff; font-size: .8rem; color: var(--muted); margin-bottom: 22px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: 1.05; font-weight: 800; margin-bottom: 18px; color: #0f172a; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.1rem; color: var(--muted); line-height: 1.6; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 60px; }
.tile { padding: 26px; transition: transform .25s, border-color .25s, box-shadow .25s; display: flex; flex-direction: column; gap: 10px; background: #ffffff; }
.tile:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.tile-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: #eff6ff; font-size: 1.4rem; margin-bottom: 6px; }
.tile h3 { font-size: 1.2rem; color: var(--text); }
.tile p { color: var(--muted); line-height: 1.55; margin: 0 0 8px; font-size: .93rem; flex: 1; }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; counter-reset: s; }
.flow div { padding: 20px; counter-increment: s; position: relative; background: #ffffff; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.flow div::before { content: counter(s); font-family: var(--font-head); font-weight: 800; font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 6px; }
.flow p { color: var(--muted); margin: 0; font-size: .9rem; line-height: 1.5; }

/* ---------- Kiosk (giriş ekranı) ---------- */
.kiosk {
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-rows: 1fr auto;
  gap: 18px 24px;
  padding: 24px;
}
.kiosk-main {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}
.kiosk-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.kiosk-head h1 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); font-weight: 800; color: var(--text); }
.kiosk-head p { color: var(--muted); font-size: 1.15rem; margin-top: 8px; }
.qr-wrap { position: relative; padding: 22px; border-radius: 30px; }
.qr-frame { background: #fff; padding: 18px; border-radius: 20px; position: relative; transition: opacity .3s, transform .3s; box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.12); border: 1px solid var(--border); }
.qr-frame.swap { opacity: 0; transform: scale(.96); }
.qr-frame canvas { display: block; width: min(52vh, 440px) !important; height: min(52vh, 440px) !important; }
.qr-corners::before, .qr-corners::after, .qr-corners span::before, .qr-corners span::after {
  content: ''; position: absolute; width: 38px; height: 38px; border: 4px solid var(--primary);
}
.qr-corners::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 22px; }
.qr-corners::after { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 22px; }
.qr-corners span::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 22px; }
.qr-corners span::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 22px; }
.scan-line { position: absolute; left: 40px; right: 40px; height: 3px; background: linear-gradient(90deg, transparent, var(--primary), transparent); box-shadow: 0 0 14px var(--primary); animation: scan 2.8s ease-in-out infinite; top: 40px; border-radius: 3px; }
@keyframes scan { 50% { top: calc(100% - 42px); } }
.countdown { display: flex; align-items: center; gap: 14px; color: var(--muted); font-weight: 500; }
.bar { width: 260px; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width 1s linear; }
.kiosk-side {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}
.kiosk-footer {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
}
.big-clock { padding: 22px; text-align: center; }
.big-clock .t { font-family: var(--font-head); font-size: 3.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.big-clock .d { color: var(--muted); margin-top: 8px; }
.feed { flex: 1; padding: 20px; display: flex; flex-direction: column; min-height: 0; }
.feed h2 { font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.feed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; background: #ffffff; border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(15,23,42,.03); animation: slideIn .4s ease; }
.feed li .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.feed li.ok .ic { background: var(--success-bg); color: var(--success); }
.feed li.ok.exit .ic { background: #ffedd5; color: #ea580c; border: 1px solid #fdba74; }
.feed li.ok.exit { border-left: 3px solid #f97316; }
.feed li.no .ic { background: var(--danger-bg); color: var(--danger); }
.feed li .n { font-weight: 600; font-size: .92rem; color: var(--text); }
.feed li .s { font-size: .78rem; color: var(--muted); }
.feed li.ok.exit .s { color: #c2410c; }
.feed li time { margin-left: auto; color: var(--faint); font-size: .8rem; font-variant-numeric: tabular-nums; }
.feed-empty { color: var(--faint); text-align: center; padding: 30px 0; font-size: .9rem; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } }
.flash { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; pointer-events: none; animation: flashIn .3s ease; }
.flash.out { animation: flashOut .4s ease forwards; }
.flash-card { padding: 40px 60px; text-align: center; border-radius: 28px; backdrop-filter: blur(20px); }
.flash.ok { background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%); }
.flash.ok.exit { background: radial-gradient(circle, rgba(234, 88, 12, 0.28), transparent 70%); }
.flash.no { background: radial-gradient(circle, rgba(239, 68, 68, 0.25), transparent 70%); }
.flash.ok .flash-card { background: #ffffff; border: 2px solid var(--success); box-shadow: 0 20px 60px rgba(5, 150, 105, 0.25); color: var(--text); }
.flash.ok.exit .flash-card { background: #ffffff; border: 2px solid #ea580c; box-shadow: 0 20px 60px rgba(234, 88, 12, 0.28); color: var(--text); }
.flash.no .flash-card { background: #ffffff; border: 2px solid var(--danger); box-shadow: 0 20px 60px rgba(220, 38, 38, 0.25); color: var(--text); }
.flash h2 { font-size: 2.4rem; margin-bottom: 6px; }
.flash p { font-size: 1.2rem; margin: 0; color: var(--muted); }
@keyframes flashIn { from { opacity: 0; transform: scale(1.05); } }
@keyframes flashOut { to { opacity: 0; } }
.kiosk-setup { max-width: 440px; margin: 15vh auto; }

@media (max-width: 900px) {
  .kiosk {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    padding: 12px 14px 24px;
    gap: 14px;
  }
  .kiosk-topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .kiosk-topbar .brand {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }
  .kiosk-topbar .brand-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .kiosk-topbar .brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
  }
  .kiosk-topbar .brand-subtitle {
    font-size: 0.72rem;
    margin-top: 1px;
    white-space: normal;
  }
  .kiosk-topbar #nav-to-admin {
    font-size: 0.76rem;
    padding: 6px 10px;
    white-space: nowrap;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    flex-shrink: 0;
  }
  .kiosk-main {
    gap: 10px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    flex: none;
  }
  .kiosk-head h1 {
    font-size: 1.28rem;
    margin: 4px 0 2px 0;
    line-height: 1.25;
  }
  .kiosk-head p {
    font-size: 0.84rem;
    margin: 2px 0 0 0;
    color: var(--muted);
  }
  .qr-wrap {
    padding: 12px;
    border-radius: 20px;
  }
  .qr-frame {
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.12);
  }
  .qr-frame canvas {
    width: min(62vw, 220px) !important;
    height: min(62vw, 220px) !important;
  }
  .qr-corners::before, .qr-corners::after, .qr-corners span::before, .qr-corners span::after {
    width: 24px;
    height: 24px;
    border-width: 3px;
    border-radius: 10px;
  }
  .scan-line {
    left: 16px;
    right: 16px;
    height: 2.5px;
  }
  .countdown {
    gap: 8px;
    font-size: 0.80rem;
    color: var(--muted);
    margin-top: 2px;
  }
  .countdown .bar {
    width: min(48vw, 160px);
    height: 5px;
  }
  .countdown b {
    font-size: 0.90rem;
    min-width: 16px;
  }

  /* Mobil Saat & Canlı Akış */
  .kiosk-side {
    width: 100%;
    max-width: 480px;
    margin: 4px auto 0;
    gap: 10px;
    flex: none;
  }
  .big-clock {
    padding: 10px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background: #ffffff;
    box-shadow: var(--shadow);
  }
  .big-clock .t {
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 700;
  }
  .big-clock .d {
    margin-top: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--muted);
    text-align: right;
  }
  .feed {
    padding: 12px 14px;
    border-radius: 16px;
    max-height: 260px;
  }
  .feed h2 {
    font-size: 0.88rem;
    margin-bottom: 8px;
  }
  .feed ul {
    gap: 8px;
  }
  .feed li {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 10px;
  }
  .feed li .ic {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 0.75rem;
  }
  .feed li .n {
    font-size: 0.84rem;
  }
  .feed li .s {
    font-size: 0.72rem;
  }
  .feed li time {
    font-size: 0.72rem;
  }
  .kiosk-footer {
    width: 100%;
    max-width: 480px;
    margin: 8px auto 0;
    padding: 8px 12px;
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .kiosk {
    padding: 8px 10px 18px;
    gap: 12px;
  }
  .kiosk-topbar .brand-title {
    font-size: 0.86rem;
  }
  .kiosk-topbar .brand-subtitle {
    font-size: 0.68rem;
  }
  .kiosk-topbar #nav-to-admin {
    font-size: 0.72rem;
    padding: 5px 8px;
  }
  .qr-frame canvas {
    width: min(65vw, 205px) !important;
    height: min(65vw, 205px) !important;
  }
  .big-clock .t {
    font-size: 1.7rem;
  }
  .big-clock .d {
    font-size: 0.78rem;
  }
}

/* ---------- Yönetim paneli ---------- */
.admin-wrap { max-width: 1280px; margin: 0 auto; padding: 22px; }
.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "brand tabs"
    "brand actions";
  align-items: center;
  padding: 16px 22px;
  margin-bottom: 22px;
  row-gap: 10px;
  column-gap: 20px;
}
.topbar .brand {
  grid-area: brand;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.topbar .tabs {
  grid-area: tabs;
  justify-self: end;
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 13px;
  border: 1px solid var(--border);
}
.topbar .top-actions {
  grid-area: actions;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;
}
.top-user-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab { padding: 8px 16px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font: 600 .9rem var(--font); cursor: pointer; transition: .2s; }
.tab.active { background: #ffffff; color: var(--text); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "brand"
      "tabs"
      "actions";
    justify-items: center;
    gap: 12px;
    padding: 14px 16px;
  }
  .topbar .brand {
    justify-content: center;
    text-align: center;
  }
  .topbar .brand-text-wrap {
    text-align: center;
  }
  .topbar .tabs {
    justify-self: center;
    flex-wrap: wrap;
    justify-content: center;
  }
  .topbar .top-actions {
    justify-self: center;
    flex-wrap: wrap;
    justify-content: center;
  }
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid #cbd5e1;
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all .2s ease;
}
.user-chip:hover {
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.user-chip-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ---------- Canvas Modern Selectbox ---------- */
.canvas-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.canvas-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 11px 40px 11px 16px;
  font-family: var(--font);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.canvas-select:hover {
  border-color: #94a3b8;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.canvas-select:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16), 0 4px 12px rgba(37, 99, 235, 0.08);
}
.canvas-select-arrow {
  position: absolute;
  right: 14px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease;
}
.canvas-select:focus + .canvas-select-arrow {
  color: #2563eb;
  transform: rotate(180deg);
}
.canvas-select option {
  padding: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  background: #ffffff;
  color: var(--text);
}
/* ---------- İstatistik Kartları ---------- */
.stats { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; width: 100%; }
.stats-reports { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }

/* 2 Satırlı Kişiler İstatistik Düzeni */
.stats-two-rows { display: flex; flex-direction: column; gap: 12px; width: 100%; }

/* Üst Satır: Genel Özet (3 Kart) */
.stats-row-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Alt Satır: Roller (A-Z Sıralı 6 Kart) */
.stats-row-roles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.stat-highlight {
  padding: 16px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
}
.stat-highlight .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
}
.stat-highlight .stat-icon svg {
  width: 26px;
  height: 26px;
}
.stat-highlight .v {
  font-size: 2rem;
}
.stat-highlight .l {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.stat-role {
  padding: 13px 15px;
  border-radius: 14px;
  background: #ffffff;
}
.stat-role .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.stat-role .stat-icon svg {
  width: 20px;
  height: 20px;
}
.stat-role .v {
  font-size: 1.55rem;
}
.stat-role .l {
  font-size: 0.72rem;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .stats-row-roles {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1080px) {
  .stats-reports { grid-template-columns: repeat(2, 1fr); }
}

.stat, .stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.stat:hover, .stat-card:hover {
  transform: translateY(-2px);
  border-color: #94a3b8;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
}
.stat.active, .stat-card.active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px #2563eb, 0 8px 20px -4px rgba(37, 99, 235, 0.22) !important;
}
.stat.active .v, .stat-card.active .stat-num {
  color: #1d4ed8 !important;
}
.stat.active .l, .stat-card.active .stat-label {
  color: #1e40af !important;
}
.stat::after, .stat-card::after {
  content: ''; position: absolute; right: -25px; top: -25px; width: 90px; height: 90px;
  border-radius: 50%; background: var(--grad); opacity: .06; pointer-events: none;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.stat-icon.green { background: #ecfdf5; color: #047857; border: 1px solid #d1fae5; }
.stat-icon.red { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; }
.stat-icon.purple { background: #f5f3ff; color: #6d28d9; border: 1px solid #ede9fe; }
.stat-icon.cyan { background: #ecfeff; color: #0e7490; border: 1px solid #cffafe; }
.stat-icon.amber { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.stat-icon.indigo { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.stat-icon.rose { background: #ffe4e6; color: #be123c; border: 1px solid #fecdd3; }
.stat-icon.orange { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }

.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-num, .stat .v {
  font-family: var(--font-head);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.stat-label, .stat .l {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .input { max-width: 300px; }
.toolbar select.input { max-width: 180px; }
.toolbar .spacer { flex: 1; }

/* ---------- Raporlar & Geçişler Üst Araç Çubuğu ---------- */
.reports-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.period-button-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  gap: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.period-btn {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.period-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.period-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
  font-weight: 700;
}

.reports-export-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-excel {
  background: #047857 !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.2);
  gap: 6px;
}

.btn-excel:hover {
  background: #065f46 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

.btn-csv {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text);
  gap: 6px;
}

.btn-csv:hover {
  background: var(--surface-2);
  border-color: #94a3b8;
}

.reports-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  width: 100%;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 2;
  min-width: 220px;
}

.search-ic {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.input-with-icon {
  padding-left: 36px !important;
}

.reports-filter-bar select.input,
.reports-filter-bar select {
  flex: 1.1;
  min-width: 155px;
}

.reports-filter-bar select#log-status,
.reports-filter-bar select#att-filter-status {
  flex: 1.1;
  min-width: 160px;
}

.date-range-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1.8;
  min-width: 330px;
}

.date-range-box .input {
  flex: 1;
  min-width: 150px;
  max-width: none;
  padding: 9px 8px 9px 12px;
  font-size: 0.90rem;
  letter-spacing: -0.01em;
}

.reports-filter-bar button.btn-ghost {
  flex-shrink: 0;
  white-space: nowrap;
}

.date-sep {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .reports-top-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .period-button-group {
    width: 100%;
    display: flex;
    overflow-x: auto;
  }
  .period-btn {
    flex: 1;
    justify-content: center;
    padding: 7px 8px;
    font-size: 0.8rem;
  }
  .reports-export-group {
    width: 100%;
    justify-content: stretch;
  }
  .reports-export-group .btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .reports-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box, .reports-filter-bar select.input, .date-range-box, .date-range-box .input {
    max-width: 100% !important;
    width: 100%;
  }
}

/* ---------- Devamsızlık Takibi Modülü Stilleri ---------- */
.stats-attendance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.att-stat-card {
  cursor: pointer;
  user-select: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.att-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.1);
  border-color: #94a3b8;
}
.att-stat-card.active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary), 0 8px 20px -4px rgba(37, 99, 235, 0.25) !important;
  background: #ffffff !important;
}

.att-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.att-date-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.att-date-picker-wrap .input {
  min-width: 150px;
  max-width: 175px;
  padding: 6px 8px 6px 12px;
  font-weight: 600;
  font-size: 0.90rem;
  border-radius: 8px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background-color: #cbd5e1;
  transition: .3s ease;
  border-radius: 999px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

@media (max-width: 1100px) {
  .stats-attendance {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 680px) {
  .stats-attendance {
    grid-template-columns: repeat(2, 1fr);
  }
  .att-header-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .att-date-picker-wrap {
    width: 100%;
    justify-content: space-between;
  }
}

.table-card { padding: 0; overflow: hidden; background: #ffffff; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; padding: 14px 16px; color: var(--faint); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; border-bottom: 1px solid var(--border); background: #f8fafc; }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
table.data tr { transition: background .15s; }
table.data tbody tr:hover { background: #f8fafc; }
table.data tr:last-child td { border-bottom: 0; }
.p-name { font-weight: 600; color: var(--text); }
.p-sub { color: var(--faint); font-size: .8rem; margin-top: 2px; }
.dev-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.dev-cell button.link { background: none; border: 0; color: var(--primary); font: 500 .8rem var(--font); cursor: pointer; padding: 0; text-align: left; }
.dev-cell button.link:hover { color: #1d4ed8; text-decoration: underline; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 2.6rem; margin-bottom: 10px; }

.login-wrap { max-width: 440px; margin: 8vh auto 10vh; padding: 0 16px; }
.login-card {
  position: relative;
  animation: rise .5s ease;
  background: #ffffff;
  padding: 30px 24px 24px;
}
.login-corner-link {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.2s ease;
  z-index: 2;
}
.login-corner-link:hover {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.login-brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 4px;
}
.brand-logo-embossed {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 16px 32px rgba(37, 99, 235, 0.25)) drop-shadow(0 6px 14px rgba(15, 23, 42, 0.12));
}
.brand-logo-embossed:hover {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 20px 38px rgba(37, 99, 235, 0.35)) drop-shadow(0 8px 18px rgba(15, 23, 42, 0.16));
}
.brand-logo-embossed img,
.brand-logo-embossed .brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}
.login-school-title {
  font-family: var(--font-head);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin: 16px 0 4px;
  text-align: center;
  letter-spacing: -0.015em;
}
.login-school-subtitle {
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.015em;
  text-align: center;
}
.login-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
  margin: 18px 0 16px;
}
.login-headline {
  text-align: left;
  margin-bottom: 16px;
}
.login-headline h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 3px;
  color: var(--text);
}
.login-headline p {
  font-size: 0.88rem;
  margin: 0;
  color: var(--muted);
}
.login-header-bar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.login-header-bar .brand {
  gap: 12px;
  width: 100%;
}
.login-header-bar .brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.login-header-bar .brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: normal;
}
.login-header-bar .brand-subtitle {
  font-size: 0.74rem;
  margin-top: 2px;
  white-space: normal;
}
.login-headline-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
}
.login-back-btn {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.login-back-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.form-error { color: var(--danger); font-size: .88rem; min-height: 1.2em; margin: 4px 0 12px; }

dialog.modal {
  border: 1px solid var(--border); background: #ffffff; color: var(--text);
  border-radius: 22px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 30px 70px -15px rgba(15, 23, 42, 0.2);
}
dialog.modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: rise .25s ease; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 1.2rem; color: var(--text); }
.modal-close { background: none; border: 0; color: var(--muted); font-size: 1.5rem; cursor: pointer; line-height: 1; transition: color .2s; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 22px 24px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); }
.reg-qr { background: #f8fafc; border: 1px solid var(--border); padding: 14px; border-radius: 16px; width: fit-content; margin: 0 auto 16px; }
.reg-qr canvas { display: block; }
.reg-code { font-family: var(--font-head); font-size: 2rem; font-weight: 800; letter-spacing: .25em; text-align: center; margin-bottom: 6px; color: var(--primary); }
.copy-row { display: flex; gap: 8px; margin-top: 14px; }
.copy-row .input { font-size: .8rem; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.settings-grid > .card {
  display: flex;
  flex-direction: column;
}
.settings-grid > .card form {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.settings-grid > .card form button[type="submit"],
.settings-grid > .card form .btn-primary,
.settings-grid > .card .kiosk-actions {
  margin-top: auto;
}
.kiosk-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  width: 100%;
}
.kiosk-actions .btn {
  flex: 1;
}
@media (max-width: 480px) {
  .kiosk-actions {
    flex-direction: column;
  }
}
.settings-grid h3 { font-size: 1.15rem; margin-bottom: 6px; color: var(--text); }
.settings-grid p { margin: 0 0 18px; font-size: .9rem; line-height: 1.5; color: var(--muted); }

@media (max-width: 960px) {
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ================================================================
   MOBİL & TABLET UYUMLULUK (Responsive Design System)
   ================================================================ */

@media (max-width: 768px) {
  /* Sayfa Sarmalayıcı */
  .admin-wrap {
    padding: 10px 10px 36px;
  }

  /* Üst Bar (Topbar & Navigasyon) */
  .topbar {
    padding: 12px 14px;
    margin-bottom: 14px;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    font-size: 0.95rem;
    gap: 10px;
    width: 100%;
  }
  .brand-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .brand-title, #inst-title {
    font-size: 0.98rem;
    line-height: 1.25;
    font-weight: 800;
    white-space: normal;
  }
  .brand-subtitle {
    font-size: 0.72rem;
    white-space: normal;
  }
  .app-footer {
    margin: 24px auto 16px auto;
    padding: 12px 14px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
  }

  /* Sekmeler (Tabs): Yatay kaydırılabilir, tek satırda temiz düzen */
  .tabs {
    width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px;
    gap: 4px;
    border-radius: 12px;
    flex-wrap: nowrap;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tab {
    flex: 1 0 auto;
    padding: 8px 12px;
    font-size: 0.80rem;
    white-space: nowrap;
    text-align: center;
    border-radius: 8px;
  }

  /* Üst Eylemler: Karekod Ekranı (Sol) --- Kullanıcı & Çıkış (Sağ) */
  .top-actions {
    width: 100%;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
  }
  .top-actions #btn-to-kiosk {
    padding: 6px 10px;
    font-size: 0.76rem;
    border-radius: 8px;
  }
  .top-user-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .user-chip {
    padding: 4px 8px;
    font-size: 0.74rem;
    gap: 4px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-chip-title {
    font-size: 0.65rem;
    padding: 1px 5px;
  }
  #logout-btn {
    padding: 6px 10px;
    font-size: 0.76rem;
    border-radius: 8px;
  }

  /* Kişiler İstatistik Kartları: 3 Sütunlu Kompakt Izgara */
  .stats-two-rows {
    gap: 8px;
    width: 100%;
  }
  .stats-row-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px;
  }
  .stat-highlight {
    padding: 8px 5px;
    gap: 6px;
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .stat-highlight .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .stat-highlight .stat-icon svg {
    width: 16px;
    height: 16px;
  }
  .stat-highlight .stat-body {
    align-items: center;
    width: 100%;
  }
  .stat-highlight .v {
    font-size: 1.35rem;
    line-height: 1.1;
  }
  .stat-highlight .l {
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
    overflow: visible;
    text-overflow: clip;
  }

  /* Rol Kartları: 3 Sütun, 2 Satır */
  .stats-row-roles {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px;
  }
  .stat-role {
    padding: 7px 4px;
    gap: 4px;
    border-radius: 10px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .stat-role .stat-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .stat-role .stat-icon svg {
    width: 13px;
    height: 13px;
  }
  .stat-role .stat-body {
    align-items: center;
    width: 100%;
  }
  .stat-role .v {
    font-size: 1.15rem;
    line-height: 1.1;
  }
  .stat-role .l {
    font-size: 0.60rem;
    font-weight: 600;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
  }

  /* Kişiler Toolbar (Arama & Filtreler) */
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }
  .toolbar #search {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    font-size: 0.88rem;
  }
  .toolbar select.input {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
    max-width: none;
    padding: 10px 8px;
    font-size: 0.82rem;
  }
  .toolbar #add-btn {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    padding: 11px;
    font-size: 0.90rem;
  }
  .toolbar .spacer {
    display: none;
  }

  /* Raporlar & Geçişler İstatistikleri: 2x2 Izgara */
  .stats-reports {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    margin-bottom: 14px;
  }
  .stats-reports .stat {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 12px;
  }
  .stats-reports .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .stats-reports .stat-icon svg {
    width: 18px;
    height: 18px;
  }
  .stats-reports .v {
    font-size: 1.35rem;
  }
  .stats-reports .l {
    font-size: 0.68rem;
    white-space: normal;
  }

  /* Raporlar Toolbar & Filtreler */
  .reports-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
  }
  .period-button-group {
    width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 3px;
    border-radius: 10px;
    flex-wrap: nowrap;
  }
  .period-button-group::-webkit-scrollbar {
    display: none;
  }
  .period-btn {
    flex: 1 0 auto;
    padding: 7px 9px;
    font-size: 0.76rem;
    white-space: nowrap;
    justify-content: center;
  }
  .reports-export-group {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .reports-export-group .btn {
    flex: 1;
    padding: 8px 4px;
    font-size: 0.74rem;
    justify-content: center;
    gap: 4px;
  }

  .reports-filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 8px;
    margin-bottom: 12px;
  }
  .search-box {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }
  .search-box .input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    font-size: 0.88rem;
  }
  .reports-filter-bar select.canvas-select {
    width: 100%;
    max-width: 100%;
    padding: 10px 32px 10px 12px;
    font-size: 0.84rem;
  }
  .date-range-box {
    display: flex;
    width: 100%;
    gap: 6px;
    align-items: center;
  }
  .date-range-box .input {
    flex: 1;
    min-width: 140px;
    width: 100%;
    max-width: none;
    padding: 8px 6px 8px 8px;
    font-size: 0.84rem;
  }
  #reset-logs-filter-btn {
    width: 100%;
    justify-content: center;
    padding: 9px;
    font-size: 0.84rem;
  }

  /* Devamsızlık Takibi */
  .stats-attendance {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    margin-bottom: 12px;
  }
  .att-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
  }
  .att-date-picker-wrap {
    width: 100%;
    justify-content: space-between;
    padding: 5px 8px;
  }
  .att-date-picker-wrap .input {
    max-width: none;
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
  }

  /* Tablolar ve Kaydırma */
  .table-card {
    border-radius: var(--radius-sm);
  }
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  table.data th, table.data td {
    padding: 9px 10px;
    font-size: 0.82rem;
  }
  .actions {
    gap: 4px;
  }
  .actions .btn {
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  /* Sayfalama Kontrolleri */
  #logs-pagination {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
  }
  #logs-pagination > div {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Modallar & Formlar */
  .row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  dialog.modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin: auto;
    border-radius: 16px;
  }
  .modal-head {
    padding: 12px 16px;
  }
  .modal-head h2 {
    font-size: 1.05rem;
  }
  .modal-body {
    padding: 14px 16px;
    max-height: 75vh;
  }
  .modal-foot {
    padding: 10px 16px;
    gap: 8px;
  }
  .modal-foot .btn {
    flex: 1;
    justify-content: center;
  }

  /* Ayarlar Sekmesi */
  .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .settings-grid .card {
    padding: 16px;
  }
}

/* Netlify Rozeti & Widget'larını Gizleme */
#nl-hud-frame,
#nl-badge-frame,
iframe[id*="nl-"],
iframe[srcdoc*="netlify"],
iframe[src*="netlify"],
#netlify-badge,
.netlify-badge,
[data-netlify-badge],
[class*="netlify-badge"],
[id*="netlify-badge"],
netlify-drawer,
#netlify-drawer-button,
a[href*="netlify.com"],
a[href*="netlify.app"][class*="badge"],
div[class*="netlify-badge"],
div[id*="netlify-feedback"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
  position: fixed !important;
  bottom: -9999px !important;
  right: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
}

/* ---------- Baskı & PDF Ortak Belge Stilleri (Hem Önizleme Hem Yazdırma) ---------- */
.print-only { display: none !important; }
dialog.modal.modal-xl { width: min(1060px, calc(100vw - 32px)); }

.print-preview-container {
  background: #ffffff;
  padding: 24px 30px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-family: var(--font), system-ui, -apple-system, sans-serif;
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.print-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
  gap: 16px;
}

.print-logo {
  width: 68px !important;
  height: 68px !important;
  max-width: 68px !important;
  max-height: 68px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
}

.print-titles {
  text-align: center;
  flex: 1;
  padding: 0 10px;
}

.print-titles h1 {
  font-size: 11pt;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
  line-height: 1.3;
}

.print-titles h2 {
  font-size: 13pt;
  font-weight: 800;
  margin: 4px 0;
  color: #0f172a;
  line-height: 1.3;
}

.print-titles h3 {
  font-size: 10pt;
  font-weight: 700;
  margin: 0;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.print-meta {
  font-size: 8.5pt;
  text-align: right;
  line-height: 1.5;
  color: #475569;
  min-width: 160px;
  flex-shrink: 0;
}

.print-summary-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.print-sum-item {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  text-align: center;
}

.print-sum-val {
  font-size: 14pt;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.print-sum-lbl {
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  margin-top: 3px;
  letter-spacing: 0.04em;
}

table.print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 8.5pt;
}

table.print-table th, table.print-table td {
  border: 1px solid #cbd5e1;
  padding: 7px 9px;
  text-align: left;
  page-break-inside: avoid;
}

table.print-table th {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 8pt;
  text-transform: uppercase;
  color: #0f172a;
  letter-spacing: 0.03em;
}

table.print-table tr:nth-child(even) td {
  background: #f8fafc;
}

.print-badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 7.5pt;
  font-weight: 700;
  text-align: center;
}

.print-badge-success {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.print-badge-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.print-badge-warn {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.print-badge-leave {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.print-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 10px;
  page-break-inside: avoid;
}

.print-sign-box {
  width: 240px;
  text-align: center;
  line-height: 1.5;
  font-size: 8.5pt;
}

.print-sign-line {
  margin-top: 45px;
  border-top: 1px dotted #475569;
  padding-top: 4px;
  font-weight: 700;
}

.print-foot {
  margin-top: 18px;
  border-top: 1px solid #cbd5e1;
  padding-top: 6px;
  font-size: 7.5pt;
  color: #64748b;
  display: flex;
  justify-content: space-between;
}

/* ---------- Tablo Sütun Sıralama (Sortable Table Headers) ---------- */
th.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}
th.sortable:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.sort-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.76rem;
  color: #94a3b8;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
  vertical-align: middle;
}
th.sortable:hover .sort-icon {
  color: #475569;
}
th.sortable.active {
  color: #1e40af;
  background: #eff6ff;
  border-bottom: 2px solid #2563eb;
}
th.sortable.active .sort-icon {
  color: #2563eb;
  font-weight: 700;
}

/* ---------- Cihaz ve Tarayıcı Çipleri / Rozetleri ---------- */
.device-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 3px;
  vertical-align: middle;
}

.device-chip {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.73rem;
  font-weight: 550;
  color: #334155;
  line-height: 1.25;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.device-chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.device-chip svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.device-chip .chip-text {
  display: inline-block;
  line-height: 1;
}

/* İşletim Sistemine Özel Vurgular */
.device-chip.os-android {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.device-chip.os-android:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.device-chip.os-ios,
.device-chip.os-ipados,
.device-chip.os-macos {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.device-chip.os-ios:hover,
.device-chip.os-ipados:hover,
.device-chip.os-macos:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.device-chip.os-windows {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

/* Tarayıcıya Özel Vurgular */
.device-chip.browser-opera {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}
.device-chip.browser-opera:hover {
  background: #ffe4e6;
}

.device-chip.browser-chrome {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

.device-chip.browser-safari {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.device-chip.browser-samsung-internet {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.device-chip.browser-firefox {
  background: #fff7ed;
  border-color: #ffedd5;
  color: #c2410c;
}

.device-chip.browser-edge {
  background: #f0fdfa;
  border-color: #ccfbf1;
  color: #0f766e;
}

/* Cihaz Modeli */
.device-chip.model-chip {
  background: #f8fafc;
  border-color: #cbd5e1;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  gap: 5px;
}
.device-chip.model-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.device-chip.model-chip svg {
  stroke: #64748b;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  transition: stroke 0.15s ease;
}
.device-chip.model-chip:hover svg {
  stroke: #0f172a;
}

.dev-cell-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
}
.dev-cell-btn:hover .device-chip {
  filter: brightness(0.96);
}

/* ---------- Oturum Süresi Dolmak Üzere Modalı ---------- */
.session-timeout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.session-timeout-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.session-timeout-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 34px 28px 28px;
  width: 90%;
  max-width: 430px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.session-timeout-overlay.active .session-timeout-card {
  transform: scale(1) translateY(0);
}

.session-timeout-icon-wrap {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.session-timeout-title {
  font-size: 1.28rem;
  font-weight: 750;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}

.session-timeout-desc {
  font-size: 0.90rem;
  color: #64748b;
  margin: 0 0 20px;
  line-height: 1.5;
  padding: 0 12px;
}

.session-timeout-timer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  color: #e11d48;
  font-weight: 750;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.08);
}

.session-timeout-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.session-timeout-btn-logout {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.15s ease;
  cursor: pointer;
}
.session-timeout-btn-logout:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.session-timeout-btn-extend {
  flex: 1.25;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 0.94rem;
  background: #0284c7 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all 0.15s ease;
  cursor: pointer;
}
.session-timeout-btn-extend:hover {
  background: #0369a1 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm 10mm 12mm 10mm;
  }
  
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 9pt !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Ekrana ait tüm arayüzü ve dialog pencerelerini gizle */
  body > * {
    display: none !important;
  }
  
  /* Yalnızca resmi baskı alanını göster */
  body > #print-area, #print-area {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  table.print-table th {
    background: #e2e8f0 !important;
  }
  table.print-table tr:nth-child(even) td {
    background: #f8fafc !important;
  }
  .print-sum-item {
    background: #f8fafc !important;
  }
  .print-badge-success { background: #d1fae5 !important; color: #047857 !important; }
  .print-badge-danger { background: #fee2e2 !important; color: #b91c1c !important; }
}

