/* =====================================================================
   TeacherTrack — mobile-first stil dosyası
   Taban: 360–430px telefon. Büyük ekranlar min-width ile genişler.
   ===================================================================== */

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("/lib/fonts/nunito-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("/lib/fonts/nunito-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #fbf8f3;
    --surface: #ffffff;
    --ink: #1e2235;
    --ink-2: #4a5068;
    --muted: #6a7086;
    --line: #ebe6dc;
    --line-strong: #d9d2c4;

    --primary: #5b4ee8;
    --primary-600: #4a3dd1;
    --primary-700: #3d31b5;
    --primary-soft: #ecebff;
    --primary-ink: #3a2fb0;

    --blue: #2f7bf5;       --blue-soft: #e3eeff;   --blue-ink: #1b57b8;
    --green: #17a36b;      --green-soft: #dcf6ea;  --green-ink: #0d6e47;
    --yellow: #f4b11f;     --yellow-soft: #fff1cc; --yellow-ink: #8a5a00;
    --red: #e5484d;        --red-soft: #ffe4e5;    --red-ink: #b4232a;
    --purple: #9b5de5;     --purple-soft: #f1e6ff; --purple-ink: #6b2fb8;

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(48, 38, 20, .05), 0 2px 8px rgba(48, 38, 20, .05);
    --shadow: 0 2px 4px rgba(48, 38, 20, .05), 0 10px 24px rgba(48, 38, 20, .08);
    --shadow-pop: 0 12px 32px rgba(91, 78, 232, .35);

    --tap: 48px;                    /* minimum dokunma alanı */
    --nav-h: 68px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --focus: 0 0 0 4px rgba(91, 78, 232, .28);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -.01em; color: var(--ink); margin: 0; }
h1 { font-size: 1.6rem; line-height: 1.2; }
h2 { font-size: 1.2rem; }
p { margin: 0; }
a { color: var(--primary-600); text-decoration: none; }
img, svg { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
code { color: var(--ink-2); background: #f1ece2; padding: .1em .4em; border-radius: 6px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

/* ---------- Uygulama iskeleti ---------- */
.app-main { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    height: 58px; padding: 0 16px; padding-top: env(safe-area-inset-top, 0px);
    background: rgba(251, 248, 243, .88);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary-ink); font-size: 1.25rem;
}

.page {
    flex: 1;
    width: 100%; max-width: 760px; margin: 0 auto;
    padding: 18px 16px calc(var(--nav-h) + var(--safe-bottom) + 28px);
}

/* ---------- Marka ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 900; font-size: 1.15rem; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    color: #fff; font-size: 1.25rem;
    background: linear-gradient(135deg, #6f5cff 0%, #3f8cff 100%);
    box-shadow: 0 6px 14px rgba(91, 78, 232, .35);
}
.brand-mark--lg { width: 68px; height: 68px; border-radius: 24px; font-size: 2rem; }

/* ---------- Sidebar (yalnızca geniş ekran) ---------- */
.sidebar { display: none; }

/* ---------- Alt navigasyon (mobil) ---------- */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding: 6px 6px var(--safe-bottom);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(48, 38, 20, .06);
}
.bottom-nav-item {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 56px; color: var(--muted); font-size: .75rem; font-weight: 700;
}
.bottom-nav-icon { font-size: 1.45rem; line-height: 1; }
.bottom-nav-item.is-active { color: var(--primary-600); }
.bottom-nav-item.is-active::before {
    content: ""; position: absolute; top: -7px; width: 28px; height: 4px; border-radius: 0 0 4px 4px; background: var(--primary);
}
.bottom-nav-item.is-primary { color: var(--primary-600); }
.bottom-nav-item.is-primary .bottom-nav-icon {
    width: 58px; height: 58px; border-radius: 50%; margin-top: -26px;
    display: grid; place-items: center; font-size: 1.9rem; color: #fff;
    background: linear-gradient(135deg, #7a5cff 0%, #ff7a59 120%);
    box-shadow: var(--shadow-pop); border: 4px solid var(--bg);
}
.bottom-nav-item.is-primary.is-active::before { display: none; }

/* ---------- Sayfa başlığı ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head p { font-size: .92rem; margin-top: 2px; }
.page-head--back { justify-content: flex-start; }
.page-head--back h1 { font-size: 1.35rem; }
.push-end { margin-left: auto; }
.icon-btn {
    width: var(--tap); height: var(--tap); border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 1.3rem; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}

/* ---------- Kart ---------- */
.card-x {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 18px; margin-bottom: 16px;
}
.card-title { font-size: 1.05rem; margin-bottom: 10px; }

/* ---------- Butonlar ---------- */
.btn-x {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--tap); padding: 0 20px;
    border: 2px solid transparent; border-radius: 14px;
    font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.1; text-align: center;
    cursor: pointer; user-select: none; touch-action: manipulation;
    transition: transform .08s ease, background-color .15s, box-shadow .15s;
}
.btn-x:active { transform: scale(.98); }
.btn-x:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-x--block { display: flex; width: 100%; }
.btn-x--lg { min-height: 56px; font-size: 1.08rem; border-radius: 14px; }
.btn-x--sm { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.btn-x--primary { color: #fff; background: linear-gradient(135deg, #6a58f5, #4a3dd1); box-shadow: 0 8px 18px rgba(91, 78, 232, .3); }
.btn-x--primary:hover { color: #fff; background: linear-gradient(135deg, #5f4cf0, #3f33c2); }
.btn-x--soft { color: var(--primary-ink); background: var(--primary-soft); }
.btn-x--soft:hover { color: var(--primary-ink); background: #e0deff; }
.btn-x--ghost { color: var(--ink-2); background: transparent; }
.btn-x--ghost:hover { background: #f1ece2; color: var(--ink); }
.btn-x--danger { color: #fff; background: var(--red); box-shadow: 0 8px 18px rgba(229, 72, 77, .28); }
.btn-x--danger:hover { color: #fff; background: #d23a3f; }
.btn-x--success { color: #fff; background: var(--green); }
.btn-x--success:hover { color: #fff; background: #12905d; }
.btn-x--outline-danger { color: var(--red-ink); background: var(--red-soft); border-color: #f6b9bb; }
.btn-x--outline-danger:hover { color: var(--red-ink); background: #ffd6d8; }
.btn-x.is-disabled { opacity: .45; pointer-events: none; }

.btn-spinner { display: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-x.is-loading .btn-label { display: none; }
.btn-x.is-loading .btn-spinner { display: inline-block; }
.btn-x.is-loading { pointer-events: none; opacity: .9; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: .85rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--red-ink); }
.text-link { font-weight: 800; font-size: .95rem; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; }

/* ---------- Avatar ---------- */
.avatar {
    flex: none; width: 54px; height: 54px; border-radius: 18px;
    display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; letter-spacing: .02em;
    color: var(--primary-ink); background: var(--primary-soft);
}
.avatar--sm { width: 40px; height: 40px; border-radius: 14px; font-size: .95rem; }
.avatar--xl { width: 76px; height: 76px; border-radius: 24px; font-size: 1.6rem; }
.tone-0 { color: #3a2fb0; background: #e2dfff; }
.tone-1 { color: #1b57b8; background: #d6e6ff; }
.tone-2 { color: #0d6e47; background: #d0f3e2; }
.tone-3 { color: #8a5a00; background: #ffe9b0; }
.tone-4 { color: #b4232a; background: #ffd9db; }

/* ---------- Chip & puan ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; min-height: 26px; border-radius: 999px;
    font-size: .8rem; font-weight: 800; white-space: nowrap;
}
.chip--group { color: var(--primary-ink); background: var(--primary-soft); }
.chip--active { color: var(--green-ink); background: var(--green-soft); }
.chip--passive { color: var(--yellow-ink); background: var(--yellow-soft); }

.points {
    display: inline-flex; align-items: baseline; gap: 2px; flex: none;
    padding: 4px 12px 4px 8px; border-radius: 999px; font-size: 1rem; line-height: 1.4;
}
.points i { align-self: center; font-size: 1.1rem; }
.points small { font-size: .75rem; font-weight: 800; opacity: .8; }
.points strong { font-weight: 900; }
.points--pos { color: var(--green-ink); background: var(--green-soft); }
.points--neg { color: var(--red-ink); background: var(--red-soft); }
.points--zero { color: var(--ink-2); background: #efeadf; }

/* ---------- Hero / Dashboard ---------- */
.hero {
    position: relative; overflow: visible;
    margin: 0 0 18px; padding: 22px 18px 20px;
    border-radius: var(--radius-lg); color: #fff;
    background:
        radial-gradient(circle at 92% 6%, rgba(255, 255, 255, .16) 0 70px, transparent 71px),
        radial-gradient(circle at 78% 104%, rgba(255, 190, 90, .32) 0 48px, transparent 49px),
        linear-gradient(135deg, #6a58f5 0%, #4a6cf7 55%, #3f9bff 100%);
    box-shadow: 0 16px 34px rgba(74, 61, 209, .28);
}
.hero h1 { color: #fff; font-size: 1.55rem; position: relative; }
.hero-date { font-size: .85rem; font-weight: 700; opacity: .85; margin-bottom: 4px; position: relative; text-transform: capitalize; }
.hero-sub { margin-top: 6px; opacity: .92; font-size: .98rem; position: relative; }
.hero-text { margin-bottom: 18px; }

.finder { position: relative; z-index: 5; }
.finder .input { border-color: transparent; box-shadow: 0 6px 18px rgba(20, 15, 80, .22); }
.finder-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
    list-style: none; margin: 0; padding: 6px;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.finder-results[hidden] { display: none; }
.finder-item { display: flex; align-items: center; gap: 12px; padding: 8px; min-height: 56px; border-radius: 14px; color: var(--ink); }
.finder-item:hover, .finder-item.is-active { background: var(--primary-soft); }
.finder-info { display: flex; flex-direction: column; line-height: 1.25; }
.finder-info small { color: var(--muted); font-weight: 700; }
.finder-empty { padding: 14px; color: var(--muted); text-align: center; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.stat {
    display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius);
    border: 1px solid transparent; min-height: 128px;
}
.stat-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: rgba(255, 255, 255, .7); margin-bottom: 8px; }
.stat-value { font-size: 1.9rem; font-weight: 900; line-height: 1.05; }
.stat-label { font-size: .85rem; font-weight: 800; opacity: .9; }
.stat--blue { background: var(--blue-soft); color: var(--blue-ink); }
.stat--purple { background: var(--purple-soft); color: var(--purple-ink); }
.stat--yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.stat--green { background: var(--green-soft); color: var(--green-ink); }

.block { margin-bottom: 20px; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* ---------- Öğrenci kartları ---------- */
.student-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.student-grid > * { min-width: 0; }
.student-card {
    display: flex; flex-direction: column; gap: 12px; padding: 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.student-card.is-passive { background: #faf7f0; }
.student-card.is-passive .avatar { filter: grayscale(.6); opacity: .85; }
.student-card-main { display: flex; align-items: center; gap: 12px; color: inherit; min-height: 56px; }
.student-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.student-card-name { font-weight: 900; font-size: 1.1rem; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.student-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Filtreler ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: #f0ebe0; border-radius: 14px; }
.segment {
    min-height: 46px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
    font: inherit; font-weight: 800; font-size: .95rem; color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.segment.is-selected { background: var(--surface); color: var(--primary-ink); box-shadow: var(--shadow-sm); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.pager .btn-x { flex: 1; }
.pager-info { font-weight: 800; color: var(--muted); }


/* ---------- Form ---------- */
.form-card { padding: 20px 18px; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.field-label { display: block; margin-bottom: 6px; font-weight: 800; font-size: .95rem; color: var(--ink); }
.req { color: var(--red); margin-left: 2px; }

.input-wrap { position: relative; }
.input-wrap > i:first-child { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.15rem; color: var(--muted); pointer-events: none; }
.input-caret { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }

.input {
    display: block; width: 100%; min-height: 54px; padding: 12px 16px;
    font: inherit; font-size: 1rem;           /* 16px: iOS yakınlaştırmayı engeller */
    color: var(--ink); background: #fff;
    border: 2px solid var(--line-strong); border-radius: 14px;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #7d8398; }
.input:hover { border-color: #c7bfae; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input--icon { padding-left: 46px; }
.input--trail { padding-right: 56px; }
.input--select { padding-right: 44px; background-image: none; }
.input--area { min-height: 112px; resize: vertical; line-height: 1.45; }
.input--finder { min-height: 56px; border-radius: 14px; }
.input-trail {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; border: 0; background: transparent; border-radius: 12px;
    font-size: 1.2rem; color: var(--muted); cursor: pointer;
}
.input.input-validation-error { border-color: var(--red); background: #fff8f8; }
.field-error, .field-validation-error { display: block; margin-top: 6px; font-size: .88rem; font-weight: 700; color: var(--red-ink); }
.field-error:empty { display: none; }
.field-validation-error::before { content: "\F333"; font-family: "bootstrap-icons"; margin-right: 6px; }
.validation-summary-valid { display: none; }

.form-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.alert-x { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 14px; font-weight: 700; font-size: .95rem; }
.alert-x--error { color: var(--red-ink); background: var(--red-soft); border: 1px solid #f6b9bb; }
.alert-x ul { margin: 0; padding-left: 18px; }
.alert-x > i { margin-top: 2px; }
div.alert-x.validation-summary-errors { display: block; }

/* Büyük checkbox */
.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); margin-bottom: 14px; cursor: pointer; font-weight: 700; }
.check input { position: absolute; opacity: 0; width: 24px; height: 24px; }
.check-box {
    flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
    border: 2px solid var(--line-strong); background: #fff; color: transparent; font-size: 1rem; transition: all .12s;
}
.check input:checked + .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.check input:focus-visible + .check-box { box-shadow: var(--focus); }

/* ---------- Profil / Detay ---------- */
.profile-hero {
    display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center;
    padding: 18px; margin-bottom: 16px; border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #fff 0%, #f3f1ff 100%); border: 1px solid #e3e0fb; box-shadow: var(--shadow);
}
.profile-hero.is-passive { background: linear-gradient(160deg, #fff 0%, #fbf4e2 100%); border-color: #f1e2b6; }
.profile-hero h2 { font-size: 1.35rem; line-height: 1.2; margin-bottom: 6px; overflow-wrap: anywhere; }
.profile-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.profile-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px; }
.profile-card .avatar { margin-bottom: 6px; }
.profile-card + form { margin-top: 4px; }

.info-list { margin: 0; }
.info-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; padding-top: 0; }
.info-row dt { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 800; color: var(--muted); }
.info-row dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.info-row--note dd { white-space: pre-line; }
.call-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--green-ink); background: var(--green-soft); font-weight: 800; }



/* Açılır bölümler */
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.section > summary {
    display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 16px; cursor: pointer;
    font-weight: 900; font-size: 1.05rem; list-style: none; border-radius: var(--radius);
}
.section > summary::-webkit-details-marker { display: none; }
.section[open] > summary { border-bottom: 1px solid var(--line); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.section .count { margin-left: 2px; min-width: 26px; text-align: center; padding: 1px 8px; border-radius: 999px; font-size: .8rem; background: #f0ebe0; color: var(--ink-2); }
.section .caret { margin-left: auto; color: var(--muted); transition: transform .2s; }
.section[open] .caret { transform: rotate(180deg); }
.section-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; }
.section-icon--green { color: var(--green-ink); background: var(--green-soft); }
.section-icon--blue { color: var(--blue-ink); background: var(--blue-soft); }
.section-icon--yellow { color: var(--yellow-ink); background: var(--yellow-soft); }
.section-icon--purple { color: var(--purple-ink); background: var(--purple-soft); }
.section-icon--red { color: var(--red-ink); background: var(--red-soft); }
.section-body { padding: 6px 16px 12px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tl-item:first-child { border-top: 0; }
.tl-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; }
.tl-icon--green { color: var(--green-ink); background: var(--green-soft); }
.tl-icon--red { color: var(--red-ink); background: var(--red-soft); }
.tl-icon--yellow { color: var(--yellow-ink); background: var(--yellow-soft); }
.tl-icon--purple { color: var(--purple-ink); background: var(--purple-soft); }
.tl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.tl-text span { color: var(--ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.tl-text small { color: var(--muted); font-weight: 700; margin-top: 2px; }

.danger-zone h2 { font-size: 1.05rem; margin-bottom: 4px; }
.danger-zone p { margin-bottom: 12px; font-size: .92rem; }

/* ---------- Boş durum ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 12px; }
.empty-icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 2.1rem; color: var(--primary-ink); background: var(--primary-soft); margin-bottom: 4px; }
.empty-title { font-weight: 900; font-size: 1.1rem; }
.empty-text { color: var(--muted); max-width: 32ch; margin-bottom: 8px; }
.empty--compact { padding: 14px 8px; flex-direction: row; text-align: left; justify-content: center; gap: 12px; }
.empty--compact .empty-icon { width: 48px; height: 48px; border-radius: 14px; font-size: 1.4rem; margin: 0; flex: none; }
.empty--compact .empty-title { font-size: .98rem; font-weight: 800; color: var(--ink-2); }

/* ---------- Toast ---------- */
.toast-region {
    position: fixed; z-index: 90; left: 12px; right: 12px;
    bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
body.auth .toast-region { bottom: calc(12px + var(--safe-bottom)); }
.toast-x {
    pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px;
    min-height: 56px; border-radius: 14px; font-weight: 800; color: #fff; box-shadow: var(--shadow);
    animation: toast-in .28s cubic-bezier(.2, .9, .3, 1.2);
}
.toast-x > i { font-size: 1.3rem; }
.toast-x > span { flex: 1; }
.toast-x--success { background: #0f8a5a; }
.toast-x--error { background: #c9333a; }
.toast-x.is-leaving { opacity: 0; transform: translateY(10px); transition: all .25s; }
.toast-close { width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 1rem; border-radius: 12px; cursor: pointer; opacity: .85; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Onay penceresi (alt sheet) ---------- */
.sheet { border: 0; padding: 0; width: 100%; max-width: 440px; background: transparent; margin: auto auto 0; }
.sheet::backdrop { background: rgba(20, 18, 40, .55); backdrop-filter: blur(2px); }
.sheet-body {
    margin: 0 8px calc(8px + var(--safe-bottom)); padding: 24px 20px 20px; text-align: center;
    background: var(--surface); border-radius: 24px; box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
    animation: sheet-in .25s ease-out;
}
.sheet-icon { width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; color: var(--red-ink); background: var(--red-soft); }
.sheet-title { font-size: 1.25rem; margin-bottom: 6px; }
.sheet-text { color: var(--ink-2); margin-bottom: 18px; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
@keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Giriş / kimlik doğrulama ---------- */
body.auth { background: var(--bg); }
.auth-shell {
    min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px calc(24px + var(--safe-bottom));
    background:
        radial-gradient(520px 320px at 100% -5%, rgba(255, 150, 90, .28), transparent 70%),
        radial-gradient(560px 380px at -10% 0%, rgba(106, 88, 245, .28), transparent 70%),
        var(--bg);
}
.auth-hero { text-align: center; margin-bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.auth-hero h1 { font-size: 1.9rem; }
.auth-hero p { color: var(--ink-2); max-width: 26ch; font-weight: 600; }
.auth-card {
    width: 100%; max-width: 420px; padding: 24px 20px; border-radius: 24px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.auth-card--center { text-align: center; }
.auth-title { font-size: 1.4rem; }
.auth-sub { color: var(--muted); margin: 2px 0 20px; }

/* =====================================================================
   Tablet
   ===================================================================== */
@media (min-width: 640px) {
    .page { padding-left: 24px; padding-right: 24px; }
    .student-grid { grid-template-columns: 1fr 1fr; }
    .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .form-actions { flex-direction: row-reverse; }
    .form-actions .btn-x { width: auto; flex: 1; }
    .toast-region { left: auto; right: 20px; width: 400px; }
    .sheet { margin: auto; }
    .sheet-body { margin: 0; }
}

/* =====================================================================
   Masaüstü: sidebar, alt navigasyon gizlenir
   ===================================================================== */
@media (min-width: 992px) {
    .bottom-nav, .topbar { display: none; }
    .toast-region, body.auth .toast-region { bottom: 24px; }

    .sidebar {
        position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 30;
        display: flex; flex-direction: column; gap: 22px; padding: 22px 16px;
        background: var(--surface); border-right: 1px solid var(--line);
    }
    .sidebar .brand { padding: 0 8px; font-size: 1.25rem; }
    .sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
    .sidebar-link {
        display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px;
        border-radius: 14px; color: var(--ink-2); font-weight: 800;
    }
    .sidebar-link > i { font-size: 1.3rem; }
    .sidebar-link:hover { background: #f4f0e7; color: var(--ink); }
    .sidebar-link.is-active { background: var(--primary-soft); color: var(--primary-ink); }
    .sidebar-link.is-primary { margin: 6px 0; color: #fff; background: linear-gradient(135deg, #7a5cff, #ff7a59 140%); box-shadow: var(--shadow-pop); }
    .sidebar-link.is-primary:hover { color: #fff; filter: brightness(1.05); }
    .sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #f7f3ea; }
    .sidebar-user-text { display: flex; flex-direction: column; min-width: 0; }
    .sidebar-user-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .app-main { margin-left: 264px; }
    .page { max-width: 1120px; padding: 34px 40px 48px; }
    h1 { font-size: 1.9rem; }
    .student-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
    .hero { padding: 30px 32px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
    .hero-text { margin-bottom: 0; }
    .hero h1 { font-size: 2rem; }
    .stats { gap: 16px; }
    .form-card { max-width: 720px; }
    .page-head--back, .info-card, .section { max-width: 820px; }
    .profile-hero { max-width: 820px; }
    .filters { flex-direction: row; align-items: center; flex-wrap: wrap; }
    .filters > .input-wrap { flex: 1 1 260px; }
    .filters > .segmented { flex: 0 0 320px; }
    .filters > .input-wrap:last-of-type:not(:first-child) { flex: 0 0 220px; }
}

@media (min-width: 1280px) {
    .student-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 359px) {
    .page { padding-left: 12px; padding-right: 12px; }
    .stat-value { font-size: 1.6rem; }
}


/* =====================================================================
   AŞAMA 2 — Hızlı işlem, takip akışı, puan geçmişi
   ===================================================================== */
.avatar--lg { width: 60px; height: 60px; border-radius: 18px; font-size: 1.3rem; }
.quick-cta { margin-bottom: 18px; }
/* Öğrenciler üst özeti: iki kompakt kart, her genişlikte 2 sütun. */
.stats--summary { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stats--summary .stat { flex-direction: row; align-items: center; gap: 10px; min-height: 0; padding: 10px 12px; min-width: 0; }
.stats--summary .stat-icon { margin-bottom: 0; flex: none; }
.stats--summary .stat-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.stats--summary .stat-value { font-size: 1.5rem; }
.stats--summary .stat-label { font-size: .8rem; overflow-wrap: anywhere; }
@media (min-width: 640px) { .stats--summary { grid-template-columns: repeat(2, minmax(0, 220px)); } }
.stats--three { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats--three .stat { min-height: 112px; padding: 12px; }
.stats--three .stat-label { font-size: .8rem; }
.stat--red { background: var(--red-soft); color: var(--red-ink); }

.toast-action {
    flex: none; min-height: 44px; padding: 0 16px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 12px;
    background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-weight: 900; cursor: pointer;
}
.toast-action:active { background: rgba(255, 255, 255, .3); }

/* Öğrenci seçici */
.picker { padding: 16px; }
.pick-title { margin: 16px 0 6px; font-size: .85rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pick-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border-radius: 14px; background: #faf7f0; border: 1px solid var(--line); color: var(--ink); }
.pick-item:hover, .pick-item:active { background: var(--primary-soft); border-color: #cfcaff; }
.pick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pick-info strong { overflow-wrap: anywhere; }
.pick-info small { color: var(--muted); font-weight: 700; }
.pick-item > i { color: var(--muted); }
.pick-empty { padding: 14px; text-align: center; color: var(--muted); }

/* Seçili öğrenci kartı */
.q-student-card {
    padding: 16px; margin-bottom: 12px; border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #fff 0%, #f1efff 100%); border: 2px solid #d9d5ff; box-shadow: var(--shadow);
}
.q-student-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.q-student-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.q-student-info h2 { font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.q-change { flex: none; }
.q-scores { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; }
.q-score { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; transition: background-color .25s; }
.q-score span { font-size: .8rem; font-weight: 800; opacity: .85; }
.q-score strong { font-size: 1.7rem; font-weight: 900; line-height: 1.15; }
.q-score--pos { color: var(--green-ink); background: var(--green-soft); }
.q-score--neg { color: var(--red-ink); background: var(--red-soft); }
.q-score--zero { color: var(--ink-2); background: #efeadf; }

.q-heading { margin: 20px 0 10px; font-size: 1rem; font-weight: 900; color: var(--ink-2); }

/* Not alanı */
.q-note { margin-bottom: 4px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line-strong); }
.q-note > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; cursor: pointer; font-weight: 800; color: var(--primary-ink); list-style: none; }
.q-note > summary::-webkit-details-marker { display: none; }
.q-note > summary small { color: var(--muted); font-weight: 700; }
.q-note textarea { margin: 0 12px 12px; width: calc(100% - 24px); min-height: 84px; }

/* İşlem kartları: mobilde 2 kolon, min 92px */
.qa-grid, .card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-form { margin: 0; display: block; }
.qa-tile {
    width: 100%; min-height: 92px; padding: 10px 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 2px solid transparent; border-radius: 18px; font: inherit; text-align: center; cursor: pointer;
    touch-action: manipulation; transition: transform .08s ease, box-shadow .15s;
}
.qa-tile:active:not(:disabled) { transform: scale(.96); }
.qa-tile:disabled, .bcard:disabled, .row-undo:disabled { opacity: .55; cursor: wait; }
.qa-icon { font-size: 1.6rem; line-height: 1; }
.qa-label { font-weight: 800; font-size: .95rem; line-height: 1.2; }
.qa-points { font-weight: 900; font-size: 1.05rem; }
.qa-tile--green { color: var(--green-ink); background: var(--green-soft); border-color: #b7ebd3; }
.qa-tile--blue { color: var(--blue-ink); background: var(--blue-soft); border-color: #bcd5ff; }
.qa-tile--purple { color: var(--purple-ink); background: var(--purple-soft); border-color: #dcc5fb; }
.qa-tile--orange { color: #9a4a00; background: #ffeadb; border-color: #ffcfa8; }
.qa-tile--red { color: var(--red-ink); background: var(--red-soft); border-color: #f6b9bb; }
.qa-tile--mixed { color: var(--ink-2); background: #f3efe6; border-color: var(--line-strong); }

.qa-pair { display: block; }
.qa-pair-forms { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 10px; border-radius: 18px; background: #f3efe6; min-height: 92px; }
.qa-pair-title { font-weight: 900; font-size: .9rem; margin: 0; }
.qa-pair-open { display: none; }
.js .qa-pair-open { display: flex; }
.js .qa-pair-forms { display: none; }
.qa-option { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 14px; border: 2px solid transparent; font: inherit; font-weight: 800; cursor: pointer; }
.qa-option--pos { color: var(--green-ink); background: var(--green-soft); }
.qa-option--neg { color: var(--red-ink); background: var(--red-soft); }

/* Davranış kartları */
.bcard {
    width: 100%; min-height: 108px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 2px solid transparent; border-radius: 18px; font: inherit; cursor: pointer; touch-action: manipulation; color: var(--ink);
    transition: transform .08s ease;
}
.bcard:active:not(:disabled) { transform: scale(.96); }
.bcard-face { width: 38px; height: 50px; border-radius: 9px; display: grid; place-items: center; font-size: 1.4rem; box-shadow: 0 3px 8px rgba(0, 0, 0, .18); transform: rotate(-6deg); }
.bcard-face i { color: #fff; }
.bcard-label { font-weight: 800; font-size: .95rem; }
.bcard-points { font-weight: 900; font-size: 1.1rem; }
.bcard--red { background: var(--red-soft); border-color: #f6b9bb; color: var(--red-ink); }
.bcard--red .bcard-face { background: #e5484d; }
.bcard--yellow { background: var(--yellow-soft); border-color: #f5d782; color: var(--yellow-ink); }
.bcard--yellow .bcard-face { background: #f4b11f; }
.bcard--green { background: var(--green-soft); border-color: #b7ebd3; color: var(--green-ink); }
.bcard--green .bcard-face { background: #17a36b; }
.bcard--red .bcard-face i, .bcard--yellow .bcard-face i, .bcard--green .bcard-face i { visibility: hidden; }
.bcard--perfect { color: #6b3f00; background: linear-gradient(135deg, #fff3c4 0%, #ffe08a 45%, #ffd0f0 100%); border-color: #f3c64f; box-shadow: 0 6px 16px rgba(244, 177, 31, .35); }
.bcard--perfect .bcard-face { background: linear-gradient(135deg, #ffb703, #fb5607); font-size: 1.5rem; }

/* Bugün listesi */
.today-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.today-list:empty { display: none; }
.today-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); min-height: 56px; }
.today-row:first-child { border-top: 0; }
.today-time { flex: none; font-weight: 900; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.today-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.today-main small { color: var(--muted); font-weight: 700; overflow-wrap: anywhere; }
.today-row.is-cancelled .today-main strong, .feed-item.is-cancelled strong, .tl-item.is-cancelled .tl-text strong { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.today-row.is-cancelled .points { opacity: .5; }
.today-main .chip { align-self: flex-start; margin-top: 2px; }
.today-empty { padding: 10px 4px; text-align: center; }
.today-empty[hidden] { display: none; }
.row-undo { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: #f3efe6; color: var(--ink-2); font-size: 1.15rem; cursor: pointer; }
.row-undo:active { background: var(--red-soft); color: var(--red-ink); }
.quick .is-busy { cursor: progress; }

/* Sheet içerikleri */
.sheet-icon--primary { color: var(--primary-ink); background: var(--primary-soft); }
.sheet-icon--danger { color: var(--red-ink); background: var(--red-soft); }
.sheet-text { display: flex; flex-direction: column; gap: 2px; }
.sheet-text:empty { display: none; }
.sheet-strong { font-weight: 900; font-size: 1.15rem; color: var(--ink); overflow-wrap: anywhere; }
.sheet-line { font-weight: 800; }
.sheet-points { font-weight: 900; font-size: 1.8rem; color: var(--red-ink); }
.sheet-note { color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.sheet-body { max-height: calc(100dvh - 24px); overflow-y: auto; }

/* Takip akışı */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 64px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.feed-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.feed-text strong { overflow-wrap: anywhere; }
.feed-text small { color: var(--muted); font-weight: 700; }

/* Puan geçmişi */
.day-label { margin: 14px 0 0; font-size: .8rem; font-weight: 900; letter-spacing: .06em; color: var(--muted); }
.day-groups .day-label:first-child { margin-top: 4px; }
.tl-text time { font-variant-numeric: tabular-nums; color: var(--muted); }
.tl-item.is-cancelled { opacity: .8; }
.tl-text .chip { align-self: flex-start; margin: 2px 0; }

@media (min-width: 640px) {
    .qa-grid, .card-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 992px) {
    .quick { max-width: 820px; }
    .quick-cta { max-width: 420px; }
    .pick-list { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 359px) {
    .q-scores { grid-template-columns: 1fr; }
    .qa-label { font-size: .88rem; }
}

/* =====================================================================
   AŞAMA 3 — Takip Merkezi: sekmeler, kitap, ezber, ödev, grup özeti
   ===================================================================== */
a.stat { text-decoration: none; }
.icon-btn--sm { width: 44px; height: 44px; font-size: 1.1rem; box-shadow: none; }
.tl-icon--orange { color: #9a4a00; background: #ffeadb; }
.late-text { color: var(--red-ink) !important; font-weight: 800; }
.static-field { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 16px; margin: 0; border-radius: 14px; background: #f3efe6; font-weight: 800; }
.hint { margin-top: 6px; }
.info-box { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--blue-soft); color: var(--blue-ink); font-weight: 700; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: -6px 0 18px; }
.section-cta { margin-top: 10px; }
.section-link { display: flex; justify-content: flex-end; }

/* Sekmeler (yatay taşma yok: 4 eşit sütun) */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin-bottom: 14px; background: #f0ebe0; border-radius: 18px; }
.tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 58px; padding: 6px 2px; border-radius: 14px; color: var(--ink-2);
    font-weight: 800; font-size: .82rem; text-align: center; line-height: 1.15;
}
.tab i { font-size: 1.25rem; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--primary-ink); box-shadow: var(--shadow-sm); }

/* Ay seçici */
.month-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 12px; }
.month-btn { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 800; font-size: .9rem; }
.month-btn:last-child { justify-self: end; }
.month-btn:first-child { justify-self: start; }
.month-current { font-size: 1.05rem; font-weight: 900; text-align: center; }

/* Uyarı şeridi */
.notice { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; margin-bottom: 14px; border-radius: 14px; font-weight: 700; }
.notice span { flex: 1; }
.notice--red { color: var(--red-ink); background: var(--red-soft); border: 1px solid #f6b9bb; }
.notice--red:hover { color: var(--red-ink); }

.segmented--4 { grid-template-columns: repeat(4, 1fr); }
.segmented--4 .segment { font-size: .85rem; padding: 0 2px; min-height: 46px; }
.segment--late.is-selected { color: var(--red-ink); }
.filter-pair { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* Kitap kartları */
.book-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.book-card.is-overdue { border: 2px solid #f1a3a6; background: #fffafa; }
.book-card.is-returned { background: #fafaf6; }
.book-card-head { display: flex; align-items: center; gap: 10px; color: var(--ink); min-height: 48px; }
.book-card-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.book-card-who strong { overflow-wrap: anywhere; }
.book-card-who small { color: var(--muted); font-weight: 700; }
.book-title { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 1.1rem; font-weight: 900; line-height: 1.3; }
.book-title i { color: var(--purple); margin-top: 3px; }
.book-title span { overflow-wrap: anywhere; min-width: 0; }
.book-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.book-dates div { padding: 8px 10px; background: #f6f2ea; border-radius: 12px; }
.book-dates dt { font-size: .75rem; font-weight: 800; color: var(--muted); }
.book-dates dd { margin: 0; font-weight: 800; font-size: .92rem; }
.book-state { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 12px; font-weight: 900; }
.book-state--active { color: var(--yellow-ink); background: var(--yellow-soft); }
.book-state--late { color: var(--red-ink); background: var(--red-soft); }
.book-state--ok { color: var(--green-ink); background: var(--green-soft); }
.book-note { margin: 0; color: var(--ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.book-actions { display: flex; gap: 8px; align-items: center; }
.book-actions .book-form { flex: 1; margin: 0; }

/* Aranabilir öğrenci seçici */
.spicker-ui { display: none; }
.js .spicker-ui { display: block; }
.js .spicker-select { display: none; }
.spicker-chosen { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--primary-soft); border: 2px solid #cfcaff; }
.spicker-chosen .pick-info { flex: 1; }
.spicker-search .pick-list { margin-top: 8px; }
.spicker .pick-item { width: 100%; text-align: left; font: inherit; cursor: pointer; }

/* Grup özeti */
.gsum { padding: 16px; }
.gsum-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gsum-head h2 { font-size: 1.25rem; }
.gsum-sub { margin: 2px 0 12px; color: var(--muted); font-weight: 800; font-size: .85rem; }
.gsum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gsum-item { display: flex; flex-direction: column; gap: 1px; padding: 12px; border-radius: 14px; min-height: 108px; text-decoration: none; }
.gsum-item i { font-size: 1.25rem; }
.gsum-item strong { font-size: 1.7rem; font-weight: 900; line-height: 1.1; }
.gsum-item span { font-weight: 800; font-size: .85rem; }
.gsum-item small { font-weight: 700; opacity: .8; font-size: .75rem; }
.gsum-item--green { color: var(--green-ink); background: var(--green-soft); }
.gsum-item--yellow { color: var(--yellow-ink); background: var(--yellow-soft); }
.gsum-item--purple { color: var(--purple-ink); background: var(--purple-soft); }
.gsum-item--red { color: var(--red-ink); background: var(--red-soft); }

/* Ezber */
.mem-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.mem-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mem-card-top h2 { font-size: 1.15rem; overflow-wrap: anywhere; min-width: 0; }
.progress-x { height: 10px; border-radius: 999px; background: #ece6d9; overflow: hidden; }
.progress-x span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #17a36b, #4ccf9b); }
.mem-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mem-counts--big { margin-bottom: 14px; }
.mstat { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.mstat--done { color: var(--green-ink); background: var(--green-soft); }
.mstat--practice { color: #9a4a00; background: #ffeadb; }
.mstat--pending { color: var(--yellow-ink); background: var(--yellow-soft); }

.mem-list { display: flex; flex-direction: column; gap: 8px; }
.mem-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.mem-row > summary { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 8px 12px; cursor: pointer; list-style: none; border-radius: var(--radius); }
.mem-row > summary::-webkit-details-marker { display: none; }
.mem-name { flex: 1; min-width: 0; font-weight: 800; overflow-wrap: anywhere; line-height: 1.25; }
.mem-row .caret { color: var(--muted); transition: transform .2s; }
.mem-row[open] .caret { transform: rotate(180deg); }
.mem-row[open] > summary { border-bottom: 1px solid var(--line); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.mem-row-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mem-row-body form { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mem-who { margin: 0; font-weight: 900; }
.mem-options { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mem-opt { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border: 2px solid transparent; border-radius: 14px; font: inherit; font-weight: 800; cursor: pointer; }
.mem-opt:disabled { opacity: .55; }
.mem-opt--done { color: var(--green-ink); background: var(--green-soft); }
.mem-opt--practice { color: #9a4a00; background: #ffeadb; }
.mem-opt--pending { color: var(--yellow-ink); background: var(--yellow-soft); }
.mem-opt.is-current { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.mem-note { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.mem-audit { margin: 0; }

.target-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.target-opt { position: relative; margin: 0; cursor: pointer; }
.target-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.target-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px 4px; border-radius: 14px; border: 2px solid var(--line-strong); background: #fff; font-weight: 800; font-size: .88rem; text-align: center; line-height: 1.15; }
.target-card i { font-size: 1.4rem; color: var(--muted); }
.target-opt input:checked + .target-card { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.target-opt input:checked + .target-card i { color: var(--primary); }
.target-opt input:focus-visible + .target-card { box-shadow: var(--focus); }
.target-set { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.target-set legend { float: none; width: auto; padding: 0; font-size: inherit; }

/* Ödev */
.hw-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.hw-summary .stat { min-height: 84px; padding: 12px; }
.hw-total { grid-column: 1 / -1; min-height: 76px !important; flex-direction: row; align-items: center; justify-content: space-between; }
.hw-total .stat-value { font-size: 2rem; }
.hw-summary .stat-value { font-size: 1.5rem; display: flex; align-items: center; gap: 6px; }
.hw-summary .stat-value i { font-size: 1.1rem; }
.hw-row { align-items: flex-start; }
.hw-row > i { align-self: center; color: var(--muted); }
.hw-counts { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.hwc { font-size: .85rem; font-weight: 800; white-space: nowrap; }
.hwc--done { color: var(--green-ink); }
.hwc--badge { color: var(--purple-ink); }
.hwc--warn { color: #9a4a00; }
.hwc--bad { color: var(--red-ink); }

@media (min-width: 640px) {
    .mem-options { grid-template-columns: repeat(3, 1fr); }
    .gsum-grid { grid-template-columns: repeat(4, 1fr); }
    .hw-summary { grid-template-columns: repeat(4, 1fr); }
    .filter-pair { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 992px) {
    .tabs { max-width: 560px; }
    .month-nav { max-width: 520px; }
    .gsum, .hw-summary, .mem-list { max-width: 900px; }
    .feed { max-width: 900px; }
    .detail-actions { max-width: 420px; }
}



/* =====================================================================
   KALİTE TURU — tutarlılık, kompakt yerleşim, tek tasarım sistemi
   Radius ölçeği: 12 (küçük kutu) · 14 (kontrol) · 18 (kart) · 24 (büyük kart/sheet)
   ===================================================================== */
:root { --r-sm: 12px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; }

.btn-x--light { color: var(--primary-700); background: #fff; box-shadow: 0 8px 18px rgba(20, 15, 80, .25); }
.btn-x--light:hover { color: var(--primary-700); background: #f6f5ff; }
.page-head > div { min-width: 0; }
.page-head .btn-x { flex: none; }
.icon-btn--accent { color: var(--primary-ink); background: var(--primary-soft); border-color: transparent; box-shadow: none; flex: none; }
.bottom-nav-item { font-size: .75rem; }

/* Dashboard: CTA hero içinde, kartlar yatay ve kompakt */
.hero { padding: 18px 16px 16px; margin-bottom: 14px; }
.hero h1 { font-size: 1.45rem; }
.hero-text { margin-bottom: 14px; }
.hero-cta { margin-top: 12px; }
.stats:not(.stats--three) { gap: 8px; margin-bottom: 16px; }
.stats:not(.stats--three) .stat {
    min-height: 0; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr;
    grid-template-areas: "icon value" "icon label"; column-gap: 10px; align-items: center;
}
.stats:not(.stats--three) .stat-icon { grid-area: icon; width: 40px; height: 40px; margin: 0; }
.stats:not(.stats--three) .stat-value { grid-area: value; font-size: 1.6rem; }
.stats:not(.stats--three) .stat-label { grid-area: label; font-size: .82rem; line-height: 1.2; }
.stats--three .stat { min-height: 92px; }
.stats--three .stat-label { font-size: .82rem; }

/* Öğrenci kartı: tek satır, tüm kart dokunulabilir + hızlı işlem kısayolu */
.student-card { flex-direction: row; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; }
.student-card-main { flex: 1; min-width: 0; min-height: 52px; }
.student-card .avatar { width: 48px; height: 48px; border-radius: var(--r-md); font-size: 1.05rem; }
.student-card-name { font-size: 1.05rem; }
.student-card .points { padding: 3px 10px 3px 6px; font-size: .95rem; }

/* Quick: daha az scroll */
.q-student-card { padding: 12px; margin-bottom: 8px; }
.q-student-top { flex-wrap: nowrap; gap: 10px; margin-bottom: 10px; }
.q-student-top .avatar { width: 48px; height: 48px; border-radius: var(--r-md); font-size: 1.1rem; }
.q-student-info h2 { font-size: 1.15rem; }
.q-change { padding: 0 12px; }
.q-score { padding: 8px 12px; }
.q-score strong { font-size: 1.45rem; }
.q-heading { margin: 14px 0 8px; }
.q-note > summary { min-height: 44px; }
.qa-grid, .card-grid { gap: 8px; }
.qa-tile { min-height: 84px; }
.bcard { min-height: 96px; padding: 10px 8px; }
.bcard-face { width: 32px; height: 42px; }

/* Öğrenci detayı */
.profile-hero { display: block; padding: 14px; margin-bottom: 12px; }
.profile-hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.profile-hero-top .avatar { flex: none; }
.profile-hero h2 { font-size: 1.25rem; margin-bottom: 6px; }
.detail-actions { margin: -4px 0 14px; gap: 8px; }
.detail-actions .btn-x { background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.info-card { padding: 14px 16px; }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.info-row { padding: 10px 0; }
.info-row--wide { grid-column: 1 / -1; }
.info-row:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.info-row--note dd { white-space: pre-line; }

/* Filtreler: taşma yok, sayaç rozeti tek satırda */
.segmented--4 .segment { white-space: nowrap; font-size: .85rem; }
.segment-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 900; line-height: 1; }
.segmented--5 { grid-template-columns: repeat(5, 1fr); margin-bottom: 14px; }
.segmented--5 .segment { font-size: .82rem; padding: 0 2px; min-height: 46px; text-align: center; white-space: nowrap; }
a.segment { text-decoration: none; }
.filter-pair { grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-pair .input--icon { padding-left: 40px; padding-right: 30px; }
.filter-pair .input-wrap > i:first-child { left: 13px; }
.filter-pair .input-caret { right: 12px; }

/* Ezber sayıları: 3 eşit sütun, etiket altta */
.mem-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mem-counts .mstat { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 4px; border-radius: var(--r-sm); white-space: normal; text-align: center; line-height: 1.2; }
.mstat-top { display: inline-flex; align-items: center; gap: 5px; font-size: 1.1rem; }
.mstat-label { font-size: .8rem; font-weight: 800; }

/* Grup özeti: kompakt kutular */
.gsum-item { min-height: 0; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.gsum-item i { grid-row: 1; grid-column: 1; }
.gsum-item strong { grid-row: 1; grid-column: 2; font-size: 1.5rem; }
.gsum-item span, .gsum-item small { grid-column: 1 / -1; }
.gsum-item small { font-size: .8rem; }

/* Ödev özeti: tek satır 4 kutu */
.hw-summary { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hw-summary .stat { min-height: 68px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0; }
.hw-summary .stat-value { font-size: 1.3rem; justify-content: center; gap: 4px; }
.hw-summary .stat-label { font-size: .8rem; }
.hw-total { grid-column: 1 / -1; min-height: 56px !important; flex-direction: row !important; justify-content: space-between !important; padding: 8px 14px !important; }
.hw-total .stat-value { font-size: 1.6rem; }

.book-dates dt { font-size: .8rem; }

@media (min-width: 640px) {
    .hw-summary { grid-template-columns: repeat(5, 1fr); }
    .hw-total { grid-column: auto; }
    .segmented--5 { max-width: 480px; }
}
@media (min-width: 992px) {
    .form-card, .danger-zone, .page-head--back { max-width: 720px; }
    .stats:not(.stats--three) { grid-template-columns: repeat(4, 1fr); }
    .stats:not(.stats--three) .stat { min-height: 76px; }
    .hero-cta { max-width: 320px; }
    .student-card { padding: 12px 12px 12px 14px; }
    .info-list { grid-template-columns: repeat(4, auto); }
    .info-row--wide { grid-column: auto; }
}

.more { margin-top: 8px; }
.more > summary { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--r-md); background: #f3efe6; color: var(--primary-ink); font-weight: 800; cursor: pointer; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { margin-bottom: 4px; }

.topbar-avatar { width: 44px; height: 44px; }
.brand--compact { min-height: 44px; }

/* =====================================================================
   AŞAMA 4 — Yönetim, profil, PWA kurulum
   ===================================================================== */
.stack-top { margin-top: 12px; }
.profile-actions { display: grid; gap: 8px; margin-bottom: 16px; }
.install-card .card-title { display: flex; align-items: center; gap: 8px; }
.install-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; color: var(--ink-2); font-size: .95rem; }
.install-steps li { padding: 10px 12px; border-radius: var(--r-md); background: #f6f2ea; }
.install-card [data-install-btn] { margin-bottom: 4px; }
.install-card[hidden] { display: none; }

.page-head-back-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-tiles { display: grid; gap: 10px; }
.admin-tile { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); }
.admin-tile:hover { color: var(--ink); border-color: #cfcaff; }
.admin-tile-icon { flex: none; width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; font-size: 1.4rem; }
.admin-tile-icon--purple { color: var(--purple-ink); background: var(--purple-soft); }
.admin-tile-icon--blue { color: var(--blue-ink); background: var(--blue-soft); }
.admin-tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.admin-tile-text small { color: var(--muted); font-weight: 700; }
.admin-tile > i { color: var(--muted); }

.user-email { color: var(--muted); font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.user-date { color: var(--muted); font-size: .82rem; font-weight: 700; }
.user-card .student-card-info { gap: 3px; }
.info-list--single { grid-template-columns: 1fr; }

@media (min-width: 992px) {
    .admin-tiles { max-width: 640px; }
    .info-list--single { grid-template-columns: 1fr; max-width: 520px; }
    .profile-actions, .install-card { max-width: 520px; }
}

@media (min-width: 992px) { .profile-card, .profile-card + .profile-actions, form[action$="/Account/Logout"] { max-width: 520px; } }
