/* Birlikte İyilik Akademi · tasarım sistemi
   Gece mavisi, altın ve krem; seri renkleri: Fıkıh, Siyer, Âdâb, İbremetre, Okuma. */
:root {
  --font-display: 'Baloo 2', 'Nunito', ui-rounded, system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --night-950: #0a1230; --night-900: #0f1b45; --night-800: #17275b; --night-700: #213678; --night-600: #2f4796; --night-400: #6f86d6;
  --gold-200: #fff1c7; --gold-300: #ffe39a; --gold-400: #ffd25e; --gold-500: #f5b73a; --gold-600: #d9921a; --gold-700: #a86a0c;
  --cream-0: #ffffff; --cream-50: #fffdf8; --cream-100: #fff8ec; --cream-200: #fcf0dc; --cream-300: #f5e3c4;
  --ink-900: #1b2142; --ink-700: #3b4468; --ink-500: #677091; --ink-400: #8a91ad; --ink-300: #b5b9cc;
  --line: #eee2cd; --line-strong: #e2d1b3;
  --fikih: #12a38c; --fikih-deep: #0a6b61; --fikih-soft: #e0f6f0;
  --siyer: #f08a3c; --siyer-deep: #bd5219; --siyer-soft: #ffefdc;
  --adab: #e5607a; --adab-deep: #ac3352; --adab-soft: #ffe7ed;
  --ibre: #5b6cf0; --ibre-deep: #3442b8; --ibre-soft: #e8eaff;
  --akaid: #c9972f; --akaid-deep: #8a6517; --akaid-soft: #fbf1d8;
  --okuma: #1f9d66; --okuma-deep: #0f7448; --okuma-soft: #dcf6e9;
  --live: #ef4d6b; --success: #179a62; --warning: #d98a12; --danger: #c8395b;
  --radius-xs: 10px; --radius-s: 14px; --radius-m: 20px; --radius-l: 26px; --radius-xl: 34px;
  --shadow-1: 0 1px 2px rgba(27, 33, 66, .05), 0 3px 10px rgba(27, 33, 66, .05);
  --shadow-2: 0 2px 4px rgba(27, 33, 66, .05), 0 12px 28px rgba(27, 33, 66, .09);
  --shadow-3: 0 24px 60px rgba(10, 18, 48, .24);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; min-height: 100svh; background: var(--cream-100); color: var(--ink-900); font: 600 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--night-700); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; color: var(--ink-900); }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--night-900); color: #fff; font-weight: 800; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: calc(12px + var(--safe-top)); }
/* Logo dikdörtgendir; kutunun yüksekliğine oturur, genişliği kendiliğinden gelir. */
.brand-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark .biri-logo { width: auto; height: 100%; max-width: 100%; }

/* ---------- Düğmeler ---------- */
.btn, .primary-button, .secondary-button { --tone: var(--night-800); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 16px; border: 0; font: 800 15.5px/1 var(--font-body); letter-spacing: .005em; text-decoration: none; white-space: nowrap; transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .2s, filter .2s; user-select: none; }
.btn svg, .primary-button svg, .secondary-button svg { width: 19px; height: 19px; flex: none; }
.btn:active, .primary-button:active, .secondary-button:active { transform: translateY(2px) scale(.985); }
.btn:disabled, .primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; filter: grayscale(.4); opacity: .55; transform: none; }
.btn-gold, .primary-button { color: #3d2604; background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); box-shadow: 0 4px 0 var(--gold-700), 0 10px 22px rgba(217, 146, 26, .32); }
.btn-gold:hover, .primary-button:hover { filter: brightness(1.04); }
.btn-gold:active, .primary-button:active { box-shadow: 0 2px 0 var(--gold-700), 0 4px 10px rgba(217, 146, 26, .3); }
.btn-night { color: #fff; background: linear-gradient(180deg, var(--night-700), var(--night-900)); box-shadow: 0 4px 0 var(--night-950), 0 10px 22px rgba(15, 27, 69, .25); }
.btn-tone { color: #fff; background: var(--tone); box-shadow: 0 4px 0 color-mix(in srgb, var(--tone) 70%, #000), 0 8px 18px color-mix(in srgb, var(--tone) 30%, transparent); }
.btn-soft, .secondary-button { color: var(--ink-900); background: var(--cream-0); box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 3px 0 var(--cream-300); }
.btn-soft:hover, .secondary-button:hover { background: var(--cream-50); }
.btn-ghost { min-height: 40px; padding: 0 14px; color: var(--night-700); background: transparent; }
.btn-ghost:hover { background: rgba(33, 54, 120, .07); }
.btn-small { min-height: 38px; padding: 0 14px; border-radius: 13px; font-size: 14px; }
.btn-live { color: #fff; background: linear-gradient(180deg, #ff6f8a, var(--live)); box-shadow: 0 4px 0 #b52745, 0 10px 24px rgba(239, 77, 107, .36); }
.btn-block { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 14px; color: var(--ink-700); background: var(--cream-0); box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .15s var(--ease), background .2s; }
.icon-button svg { width: 20px; height: 20px; }
.icon-button:active { transform: scale(.94); }

/* ---------- Kartlar, çipler ---------- */
.card { position: relative; background: var(--cream-50); border-radius: var(--radius-l); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 11px; border-radius: 999px; background: var(--cream-200); color: var(--ink-700); font: 800 12.5px/1.2 var(--font-body); letter-spacing: .02em; white-space: nowrap; }
.chip svg { width: 15px; height: 15px; }
.chip-tone { background: color-mix(in srgb, var(--tone) 14%, #fff); color: color-mix(in srgb, var(--tone) 78%, #000); }
.chip-live { background: var(--live); color: #fff; }
.chip-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse-dot 1.4s infinite; }
.chip-gold { background: var(--gold-200); color: var(--gold-700); }
.eyebrow { font: 900 12px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); }
.muted { color: var(--ink-500); }
.tone-fikih { --tone: var(--fikih); --tone-deep: var(--fikih-deep); --tone-soft: var(--fikih-soft); }
.tone-siyer { --tone: var(--siyer); --tone-deep: var(--siyer-deep); --tone-soft: var(--siyer-soft); }
.tone-adab { --tone: var(--adab); --tone-deep: var(--adab-deep); --tone-soft: var(--adab-soft); }
.tone-ibre { --tone: var(--ibre); --tone-deep: var(--ibre-deep); --tone-soft: var(--ibre-soft); }
.tone-akaid { --tone: var(--akaid); --tone-deep: var(--akaid-deep); --tone-soft: var(--akaid-soft); }
.tone-okuma, .tone-kuran { --tone: var(--okuma); --tone-deep: var(--okuma-deep); --tone-soft: var(--okuma-soft); }

/* İlerleme halkası: --p yüzde, --tone renk. */
.ring { --p: 0; --size: 64px; --stroke: 8px; position: relative; display: grid; place-items: center; width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  background: conic-gradient(var(--tone, var(--gold-500)) calc(var(--p) * 1%), color-mix(in srgb, var(--tone, var(--gold-500)) 16%, #fff) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--stroke) - .5px), #000 calc(100% - var(--stroke))); mask: radial-gradient(farthest-side, transparent calc(100% - var(--stroke) - .5px), #000 calc(100% - var(--stroke))); }
.ring-wrap { position: relative; display: grid; place-items: center; flex: none; }
.ring-wrap > .ring-label { position: absolute; inset: 0; display: grid; place-items: center; font: 800 16px/1 var(--font-display); color: var(--ink-900); }
.bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--tone, var(--gold-500)) 16%, #fff); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--tone, var(--gold-400)), color-mix(in srgb, var(--tone, var(--gold-500)) 70%, #000)); transition: width .9s var(--ease); }

/* ---------- Form alanları ---------- */
.beta-field, .field { display: grid; gap: 7px; font-weight: 800; font-size: 14.5px; color: var(--ink-700); }
.beta-field input, .beta-field select, .beta-field textarea, .field input, .field select, .field textarea, .input {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 0; border-radius: 15px; background: var(--cream-0); color: var(--ink-900); font: 700 16px/1.35 var(--font-body);
  box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow .2s; }
.beta-field textarea, .field textarea { min-height: 96px; resize: vertical; }
.beta-field input:focus, .beta-field select:focus, .beta-field textarea:focus, .field input:focus, .input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--night-600), 0 0 0 4px rgba(47, 71, 150, .14); }
.field-note { font-size: 13.5px; font-weight: 700; color: var(--ink-500); }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; width: 19px; height: 19px; color: var(--ink-400); pointer-events: none; }
.search input { padding-left: 42px; }

/* ---------- Alt pencere (sheet) ---------- */
.beta-sheet { width: min(640px, calc(100vw - 24px)); max-height: min(88svh, 860px); margin: auto; padding: 0; border: 0; border-radius: 30px; background: var(--cream-50); color: var(--ink-900); box-shadow: var(--shadow-3); overflow: auto; overscroll-behavior: contain; }
.beta-sheet[open] { display: flex; flex-direction: column; animation: sheet-in .34s var(--ease); }
.beta-sheet::backdrop { background: rgba(10, 18, 48, .46); backdrop-filter: blur(3px); animation: fade-in .25s ease; }
.beta-sheet > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 10px; background: linear-gradient(var(--cream-50) 75%, rgba(255, 253, 248, 0)); }
.beta-sheet > header h2 { font-size: 24px; }
.beta-sheet-close { min-height: 38px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--cream-200); color: var(--ink-700); font: 800 13.5px/1 var(--font-body); }
.beta-sheet-description { padding: 0 22px 6px; color: var(--ink-500); font-weight: 700; }
.beta-sheet-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 10px 22px 6px; }
.beta-sheet-body > *, .beta-section > * { min-width: 0; }
.beta-form-status { margin: 0 22px; min-height: 0; font-weight: 800; font-size: 14px; color: var(--ink-700); }
.beta-form-status:empty { display: none; }
.beta-form-status.is-error { padding: 10px 14px; border-radius: 14px; background: #fff0f2; color: var(--danger); }
.beta-sheet > footer.beta-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px calc(18px + var(--safe-bottom)); background: linear-gradient(rgba(255, 253, 248, 0), var(--cream-50) 30%); }
.beta-sheet > footer.beta-actions:empty { display: none; }
.beta-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.beta-card { padding: 16px 18px; border-radius: var(--radius-m); background: var(--cream-0); box-shadow: inset 0 0 0 1px var(--line); }
.beta-card h3 { font-size: 18px; margin-bottom: 4px; }
.beta-section { display: grid; gap: 10px; }
.beta-section > h3 { font-size: 18px; }
.beta-empty, .beta-muted { color: var(--ink-500); font-weight: 700; }
.beta-status { color: var(--night-700); font-weight: 800; }
.beta-record-meta { color: var(--ink-500); font-size: 13px; font-weight: 700; }
.beta-records-list { display: grid; gap: 8px; }
.beta-records-more { justify-self: start; }
.beta-history-row { justify-content: flex-start; width: 100%; text-align: left; }
.beta-history-assess { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; background: var(--cream-0); box-shadow: inset 0 0 0 1px var(--line); }
.beta-history-assess > span { font-weight: 700; color: var(--ink-700); }
.beta-family { display: grid; justify-items: start; gap: 8px; }
.beta-family > * { margin: 0; }
.beta-family-note { font-weight: 700; color: var(--ink-900); overflow-wrap: anywhere; }
.beta-family-note.is-empty { font-weight: 600; color: var(--ink-500); }
.beta-teacher-note { padding: 12px 14px; border-radius: 16px; background: var(--gold-200); }
.beta-teacher-note p { font-weight: 700; }
.beta-calendar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--cream-0); box-shadow: inset 0 0 0 1px var(--line); }
.beta-calendar-row strong { font-family: var(--font-display); font-size: 17px; }
.beta-calendar-row p { color: var(--ink-700); font-weight: 700; }
.beta-calendar-row small { color: var(--ink-500); font-weight: 800; }
.beta-choice-list { display: grid; gap: 8px; }
.beta-choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--cream-0); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.beta-choice input { width: 22px; height: 22px; accent-color: var(--night-700); }
.beta-choice span { display: grid; }
.beta-choice small { color: var(--ink-500); font-weight: 700; }
.beta-choice.is-unavailable { opacity: .5; }
.beta-title-button { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.beta-summary-path { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-700); font-weight: 800; }
.beta-summary-answers { border-radius: 16px; background: var(--cream-100); padding: 10px 14px; }
.beta-summary-answers summary { cursor: pointer; font-weight: 900; }
.beta-summary-answers article { padding: 8px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.beta-answer-result { font-size: 13px; color: var(--ink-500); font-weight: 800; }
.beta-whiteboard-pages { display: grid; gap: 10px; }
.beta-whiteboard-pages figure { margin: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.beta-whiteboard-pages figcaption { padding: 6px 12px; font-size: 13px; color: var(--ink-500); font-weight: 800; }
.lesson-brief { display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; background: var(--fikih-soft); }
.lesson-brief blockquote { margin: 6px 0 0; padding: 10px 14px; border-radius: 14px; background: #fff; font-weight: 700; }
.group-selection-status { font-weight: 800; color: var(--ink-700); }

/* ---------- Hareket ---------- */
@keyframes sheet-in { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes pulse-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .6; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone, var(--gold-500)) 55%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
@keyframes shimmer { from { background-position: -320px 0; } to { background-position: 320px 0; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.twinkle { animation: twinkle 3.2s ease-in-out infinite; }
.twinkle.t1 { animation-delay: .8s; } .twinkle.t2 { animation-delay: 1.6s; } .twinkle.t3 { animation-delay: 2.4s; }
.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--cream-200) 0, #fff7e8 120px, var(--cream-200) 240px) no-repeat, var(--cream-200); background-size: 320px 100%; animation: shimmer 1.3s linear infinite; }
@media (max-width: 640px) {
  .beta-sheet { width: 100vw; max-width: none; max-height: 92svh; margin: auto 0 0; border-radius: 30px 30px 0 0; }
  .beta-sheet[open] { animation: sheet-up .36s var(--ease); }
  .beta-sheet > header { padding: 18px 18px 8px; }
  .beta-sheet > header::before { content: ''; position: absolute; top: 7px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 9px; background: var(--line-strong); }
  .beta-sheet-body { padding: 8px 18px 4px; }
  .beta-sheet-description { padding: 0 18px 4px; }
  .beta-sheet > footer.beta-actions { padding: 12px 18px calc(16px + var(--safe-bottom)); }
  .beta-sheet > footer.beta-actions > * { flex: 1 1 auto; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.install-steps { display: grid; gap: 10px; margin: 0; padding-left: 22px; font-weight: 800; color: var(--ink-700); }
.install-steps li::marker { color: var(--gold-600); font-weight: 900; }
/* Ders geçmişinde yoklama: dersi işleyen hoca durumu satırdan düzeltir. */
.beta-history-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.beta-attendance { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.beta-attendance > span { font-size: .85rem; color: var(--ink-700); }
.beta-attendance select { min-height: 36px; padding: 4px 10px; width: auto; }
.beta-attendance-note { font-size: .8rem; color: var(--ink-500, var(--ink-700)); }
.beta-attendance[data-state="error"] .beta-attendance-note { color: var(--red-600, #b3261e); }
.beta-attendance-label { font-size: .85rem; color: var(--ink-700); }
