/* =========================================================
   RENKLER — logo paletinden: kraliyet mavisi + beyaz + altın çember
   Koyu tema sadece bu değişkenleri ezer; bileşenler hep var(--...) kullanır.
   ========================================================= */
:root {
    --blue: #1E4FB0;
    --blue-dark: #163A86;
    --blue-soft: #E8EFFC;
    --gold: #D4A72C;
    --gold-dark: #A9821C;
    --gold-soft: #FBF1D6;
    --green: #22A06B;
    --green-soft: #DFF5EA;

    --bg: #F5F7FB;
    --surface: #FFFFFF;
    --text: #1B2333;
    --text-muted: #667085;
    --border: #E4E8F0;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.04);

    /* Ders renkleri: video, not, kart ve görevlerde hep aynı renk = öğrenci bir bakışta tanır */
    --mat: #2F6FED;
    --tr: #E5484D;
    --fen: #22A06B;
    --sos: #F08C2E;

    --radius: 18px;
    --sidebar-width: 256px;
}

[data-theme="dark"] {
    --blue-soft: #1C2D52;
    --gold-soft: #3A3120;
    --green-soft: #133528;
    --bg: #0E1626;
    --surface: #172238;
    --text: #E7ECF5;
    --text-muted: #98A2B3;
    --border: #26324A;
    --shadow: none;
}

/* =========================================================
   TEMEL
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Nunito', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

/* hidden özelliği, display: flex verilmiş öğeleri de gerçekten gizlesin */
[hidden] {
    display: none !important;
}

.muted {
    color: var(--text-muted);
    font-size: 14px;
}

/* Lucide ikonlarının varsayılan boyutu */
svg.lucide {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
    flex-shrink: 0;
}

/* =========================================================
   SAYFA İSKELETİ: sol sidebar + içerik
   ========================================================= */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 24px 16px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.brand img {
    width: 48px;
    height: 48px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 18px;
    font-weight: 900;
    color: var(--blue);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

[data-theme="dark"] .brand-text strong {
    color: var(--text);
}

.brand-text small {
    color: var(--gold-dark);
    font-weight: 700;
    font-size: 13px;
}

[data-theme="dark"] .brand-text small {
    color: var(--gold);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text-muted);
    font-weight: 700;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: var(--blue-soft);
    color: var(--blue);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 3px 0 var(--blue-dark);
}

.nav-section {
    margin: 18px 14px 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: -6px;
    padding: 6px;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
}

.user-box:hover,
.user-box.active {
    background: var(--bg);
}

.user-box-arrow {
    width: 16px;
    height: 16px;
    margin-left: auto;
    flex-shrink: 0;
    color: var(--text-muted);
}

.avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold);
}

.avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 14px;
    box-shadow: none;
}

.user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.user-text strong,
.user-text small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-text small {
    color: var(--text-muted);
    font-size: 12px;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.sidebar-actions form {
    margin: 0;
}

.mobile-only,
.mobile-only-inline {
    display: none !important;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
}

.icon-btn:hover {
    color: var(--blue);
}

/* Tema butonunda sadece o anki temaya uygun ikon görünür */
[data-theme="dark"] .show-light,
:root:not([data-theme="dark"]) .show-dark {
    display: none;
}

.content {
    width: 100%;
    min-width: 0; /* grid hücresi uzun içerikle genişleyip sayfayı yatay taşırmasın */
    max-width: 1440px;
    margin: 0 auto; /* çok geniş ekranlarda içerik ortalanır, sağda boşluk birikmez */
    padding: 32px 40px 48px;
}

/* =========================================================
   BİLEŞENLER
   ========================================================= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card-head h2,
.section-title {
    font-size: 18px;
    font-weight: 800;
}

.section-title {
    margin: 32px 0 14px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Duolingo tarzı "basılabilir" buton: alttaki gölge basınca kaybolur, buton aşağı iner */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 14px;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--blue-dark);
    transition: transform 0.08s, box-shadow 0.08s;
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--blue-dark);
}

.btn-block {
    width: 100%;
    margin-top: 18px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
}

[data-theme="dark"] .badge {
    color: var(--gold);
}

/* Ders etiketleri: yazı ders renginde, zemin aynı rengin %12'si */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, transparent);
}

.tag-mat, .tag-bg-mat { --c: var(--mat); }
.tag-tr, .tag-bg-tr { --c: var(--tr); }
.tag-fen, .tag-bg-fen { --c: var(--fen); }
.tag-sos, .tag-bg-sos { --c: var(--sos); }

[class*="tag-bg-"] {
    background: var(--c);
    color: #fff;
}

.progress {
    height: 10px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
    transition: width 0.4s ease;
}

.progress-gold > span {
    background: var(--gold);
}

/* =========================================================
   ANA SAYFA
   ========================================================= */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 30px 32px;
    margin-bottom: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
}

/* Logodaki altın çemberin yankısı: sağ üstte büyük dekoratif halka */
.hero::after {
    content: '';
    position: absolute;
    right: -70px;
    top: -90px;
    width: 260px;
    height: 260px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.55;
    pointer-events: none;
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    color: var(--gold);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.hero h1 {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 4px;
}

.hero p {
    opacity: 0.85;
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-chip-countdown {
    background: color-mix(in srgb, var(--gold) 30%, transparent);
}

.stat-chip-countdown svg.lucide {
    color: var(--gold);
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.stat-chip strong {
    font-weight: 900;
    font-size: 18px;
}

.stat-chip-gold svg.lucide {
    color: var(--gold);
    fill: var(--gold);
}

.grid-main {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Görev ilerleme halkası: conic-gradient ile, --p değişkenini JS günceller */
.ring {
    --size: 64px;
    position: relative;
    display: grid;
    place-items: center;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--border) 0);
    transition: background 0.3s;
}

.ring::before {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: var(--surface);
}

.ring span {
    position: relative;
    font-weight: 900;
    font-size: 14px;
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.task:hover {
    border-color: var(--blue);
}

.task-check {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    color: transparent;
    transition: all 0.2s;
}

.task-check svg.lucide {
    width: 16px;
    height: 16px;
    stroke-width: 3.5;
}

.task-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.task-title {
    font-weight: 700;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.task-meta svg.lucide {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

.task.done {
    background: var(--green-soft);
    border-color: transparent;
}

.task.done .task-check {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    animation: pop 0.25s ease;
}

.task.done .task-title {
    color: var(--text-muted);
    text-decoration: line-through;
}

@keyframes pop {
    50% { transform: scale(1.25); }
}

.video-continue {
    display: flex;
    gap: 14px;
    align-items: center;
}

.video-thumb {
    display: grid;
    place-items: center;
    width: 96px;
    height: 72px;
    border-radius: 14px;
    flex-shrink: 0;
}

.video-thumb svg.lucide {
    width: 28px;
    height: 28px;
}

.video-thumb-img svg.lucide {
    fill: #fff;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.video-info .tag {
    align-self: flex-start;
}

.video-info .progress {
    height: 6px;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.15s, border-color 0.15s;
}

a.tile:hover {
    transform: translateY(-3px);
    border-color: var(--blue);
}

.tile-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    margin-bottom: 10px;
}

.tile strong {
    font-weight: 800;
}

.tile small {
    color: var(--text-muted);
}

.tile .badge {
    position: absolute;
    top: 16px;
    right: 16px;
}

.tile-disabled {
    opacity: 0.7;
}

/* =========================================================
   BUTON ÇEŞİTLERİ VE BİLDİRİMLER
   ========================================================= */
.btn-outline {
    background: var(--surface);
    color: var(--blue);
    box-shadow: 0 4px 0 var(--border), inset 0 0 0 2px var(--border);
}

[data-theme="dark"] .btn-outline {
    color: var(--text);
}

.btn-outline:active {
    box-shadow: 0 0 0 var(--border), inset 0 0 0 2px var(--border);
}

.btn-light {
    position: relative;
    z-index: 1;
    background: #fff;
    color: var(--blue);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 12px;
}

.btn.is-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.flashes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--a-border);
    background: var(--a-bg);
    color: var(--a-text);
    font-weight: 700;
    animation: slide-in 0.25s ease;
    transition: opacity 0.25s, transform 0.25s;
}

.alert > span {
    flex: 1;
    word-break: break-word;
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.alert-success { --a-bg: var(--green-soft); --a-border: #A6E2C3; --a-text: #11734A; }
.alert-error   { --a-bg: #FDECEC; --a-border: #F7B9BB; --a-text: #B42318; }
.alert-info    { --a-bg: var(--blue-soft); --a-border: #BCD0F7; --a-text: var(--blue-dark); }

[data-theme="dark"] .alert-success { --a-border: #1F5A40; --a-text: #7EE2B0; }
[data-theme="dark"] .alert-error   { --a-bg: #3A1A1D; --a-border: #6B2A2E; --a-text: #FDA4A6; }
[data-theme="dark"] .alert-info    { --a-border: #2B4479; --a-text: #A9C2F7; }

.alert-close {
    display: grid;
    place-items: center;
    padding: 4px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    opacity: 0.6;
}

.alert-close:hover {
    opacity: 1;
}

.alert-close svg.lucide {
    width: 16px;
    height: 16px;
}

@keyframes slide-in {
    from { opacity: 0; transform: translateY(-6px); }
}

/* =========================================================
   FORMLAR
   ========================================================= */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field > span:first-child {
    font-size: 14px;
    font-weight: 800;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent);
}

.field select:disabled {
    opacity: 0.55;
}

.password-wrap {
    position: relative;
    display: block;
}

.password-wrap input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    padding: 6px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* İki seçenekli düğme grubu (YKS | LGS): radio input gizli, yanındaki span buton gibi görünür */
.segmented {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.segmented label {
    position: relative;
    flex: 1;
    min-width: 80px;
}

/* Gizli radyo kutusu: genel "input {width: 100%}" kuralı yüzünden sayfayı yana taşırmasın */
.segmented input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.segmented span {
    display: block;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
}

.segmented span:hover {
    border-color: var(--blue);
}

.segmented input:checked + span {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--blue);
}

[data-theme="dark"] .segmented input:checked + span {
    color: var(--text);
}

.segmented input:focus-visible + span {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 25%, transparent);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--blue);
    flex-shrink: 0;
}

.form-section {
    font-size: 15px;
    font-weight: 900;
    color: var(--blue);
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.form-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

[data-theme="dark"] .form-section {
    color: var(--gold);
}

/* =========================================================
   GİRİŞ / KAYIT EKRANI: solda marka paneli, sağda form
   ========================================================= */
.auth {
    display: grid;
    grid-template-columns: minmax(360px, 5fr) 7fr;
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 48px;
    background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
}

/* Logodaki altın çemberin büyük yankıları */
.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
}

.auth-brand::before {
    width: 420px;
    height: 420px;
    right: -180px;
    bottom: -160px;
}

.auth-brand::after {
    width: 220px;
    height: 220px;
    left: -90px;
    top: -80px;
    opacity: 0.25;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 400px;
    margin: 0 auto;
}

.auth-logo {
    width: 96px;
    height: 96px;
    margin-bottom: 24px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.auth-brand h1 {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
}

.auth-brand p {
    opacity: 0.85;
    font-size: 17px;
    margin-bottom: 32px;
}

.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-weight: 700;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-features li > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--gold);
}

.auth-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card-wide {
    max-width: 560px;
}

.auth-theme {
    position: absolute;
    top: 20px;
    right: 20px;
}

.auth-mobile-brand {
    display: none;
}

.auth-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 15px;
    margin-bottom: 24px;
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--blue);
    font-weight: 800;
}

[data-theme="dark"] .auth-switch a {
    color: var(--gold);
}

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.link-muted {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.link-muted:hover {
    color: var(--blue);
    text-decoration: underline;
}

.auth-done {
    text-align: center;
}

.auth-done-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    color: var(--green);
    background: color-mix(in srgb, var(--green) 14%, transparent);
}

.auth-done-icon svg.lucide {
    width: 30px;
    height: 30px;
}

.auth-done .btn {
    margin-top: 20px;
}

.auth-hint {
    margin-top: 16px;
}

.auth-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin-top: 32px;
    font-size: 13px;
}

.auth-legal a,
.checkbox a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkbox a {
    color: var(--blue);
}

[data-theme="dark"] .checkbox a {
    color: var(--gold);
}

.profile-legal {
    display: block;
    padding: 0 6px;
    font-size: 13px;
}

/* =========================================================
   YASAL METİNLER
   ========================================================= */
.legal-body {
    background: var(--bg);
}

.legal-top {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px max(16px, calc((100% - 1140px) / 2));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.legal-top .brand img {
    width: 42px;
    height: 42px;
}

.legal-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 16px 64px;
    align-items: start;
}

.legal-nav {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-nav .eyebrow {
    margin-bottom: 8px;
}

.legal-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.legal-nav-link svg.lucide {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.legal-nav-link:hover {
    background: var(--surface);
    color: var(--text);
}

.legal-nav-link.active {
    background: var(--blue-soft);
    color: var(--blue);
}

[data-theme="dark"] .legal-nav-link.active {
    color: var(--text);
}

.legal-doc {
    min-width: 0;
    padding: 36px 40px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    line-height: 1.7;
}

.legal-doc h1 {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.25;
}

.legal-doc h2 {
    margin: 32px 0 10px;
    font-size: 18px;
    font-weight: 900;
}

.legal-doc h3 {
    margin: 18px 0 8px;
    font-size: 15px;
    font-weight: 800;
}

.legal-doc p,
.legal-doc ul {
    margin: 0 0 12px;
}

.legal-doc ul {
    padding-left: 22px;
}

.legal-doc li {
    margin-bottom: 6px;
}

.legal-doc a {
    color: var(--blue);
    font-weight: 700;
}

[data-theme="dark"] .legal-doc a {
    color: #6F9BF2;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px !important;
}

.legal-draft {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 24px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gold-dark);
    background: color-mix(in srgb, var(--gold) 16%, transparent);
}

[data-theme="dark"] .legal-draft {
    color: var(--gold);
}

.legal-draft svg.lucide {
    flex-shrink: 0;
    margin-top: 1px;
}

mark.placeholder {
    padding: 1px 4px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--gold) 35%, transparent);
    color: inherit;
}

.legal-info {
    display: grid;
    gap: 0;
    margin: 0 0 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.legal-info > div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 16px;
}

.legal-info > div + div {
    border-top: 1px solid var(--border);
}

.legal-info dt {
    color: var(--text-muted);
    font-weight: 700;
}

.legal-info dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.legal-table {
    width: 100%;
    margin: 0 0 12px;
    border-collapse: collapse;
    font-size: 14px;
}

.legal-table th,
.legal-table td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--bg);
    font-weight: 800;
}

.legal-note,
.legal-summary {
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--bg);
}

.legal-summary h2 {
    margin-top: 0;
}

.legal-summary ul {
    margin: 0;
}

.legal-cards {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.legal-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text) !important;
    text-decoration: none;
}

.legal-card:hover {
    border-color: var(--blue);
}

.legal-card > svg.lucide {
    margin-left: auto;
    color: var(--text-muted);
}

.legal-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--blue);
    background: var(--blue-soft);
}

@media (max-width: 860px) {
    .legal {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-top: 16px;
    }

    .legal-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .legal-nav::-webkit-scrollbar {
        display: none;
    }

    .legal-nav .eyebrow {
        display: none;
    }

    .legal-nav-link {
        flex-shrink: 0;
        border: 1px solid var(--border);
        background: var(--surface);
    }

    .legal-doc {
        padding: 22px 18px;
    }

    .legal-doc h1 {
        font-size: 23px;
    }

    .legal-info > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .legal-table {
        display: block;
        overflow-x: auto;
    }

    .legal-top .brand-text small {
        display: none;
    }
}

/* =========================================================
   ABONELİK SAYFASI
   ========================================================= */
.sub-status {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px 32px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
}

.sub-status::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -80px;
    width: 220px;
    height: 220px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.5;
}

.sub-status > div {
    flex: 1;
    min-width: 240px;
}

.sub-status h1 {
    font-size: 24px;
    font-weight: 900;
}

.sub-status p {
    opacity: 0.88;
}

.sub-status-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--gold);
}

.sub-status-icon svg.lucide {
    width: 30px;
    height: 30px;
}

.packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.package {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 22px 22px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
}

.package h3 {
    font-size: 24px;
    font-weight: 900;
}

.package ul {
    list-style: none;
    margin: 18px 0 22px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.package li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-weight: 600;
    font-size: 15px;
}

.package li svg.lucide {
    color: var(--green);
    width: 18px;
    height: 18px;
    margin-top: 2px;
    stroke-width: 3;
}

.package .btn-block {
    margin-top: 0;
}

.package-featured {
    border-color: var(--gold);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--gold) 20%, transparent);
}

.package-ribbon {
    position: absolute;
    top: -13px;
    left: 22px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.sub-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.sub-note svg.lucide {
    width: 16px;
    height: 16px;
}

/* =========================================================
   YÖNETİM (ADMIN)
   ========================================================= */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-head h1 {
    font-size: 28px;
    font-weight: 900;
}

.eyebrow {
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

[data-theme="dark"] .eyebrow {
    color: var(--gold);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-weight: 700;
}

.back-link:hover {
    color: var(--blue);
}

.back-link svg.lucide {
    width: 16px;
    height: 16px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

a.stat:hover {
    border-color: var(--gold);
}

.stat-icon {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
}

.stat-blue { --c: var(--blue); }
.stat-green { --c: var(--green); }
.stat-gold { --c: var(--gold); }
.stat-purple { --c: #7C5CDB; }
.stat-red { --c: #D92D20; }

[data-theme="dark"] .stat-blue { --c: #6F9BF2; }

.stat strong {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.1;
}

.stat small {
    color: var(--text-muted);
    font-weight: 600;
}

.card-flush {
    padding: 0;
    overflow: hidden;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.search {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search svg.lucide {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    outline: none;
}

.search input:focus {
    border-color: var(--blue);
}

.chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.chip:hover {
    color: var(--blue);
    border-color: var(--blue);
}

.chip.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    padding: 12px 18px;
    text-align: left;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--bg);
    white-space: nowrap;
}

.table td {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: color-mix(in srgb, var(--blue) 4%, transparent);
}

.table tr.is-suspended {
    opacity: 0.55;
}

.text-right {
    text-align: right;
}

.block {
    display: block;
}

.person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.person > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.person strong {
    font-weight: 800;
}

.person:hover strong {
    color: var(--blue);
}

.person small {
    color: var(--text-muted);
}

.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
}

.pill-blue { --c: var(--blue); }
.pill-green { --c: var(--green); }
.pill-gold { --c: var(--gold-dark); }
.pill-red { --c: #D92D20; }
.pill-gray { --c: var(--text-muted); }

[data-theme="dark"] .pill-blue { --c: #6F9BF2; }
[data-theme="dark"] .pill-gold { --c: var(--gold); }
[data-theme="dark"] .pill-red { --c: #F97066; }

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 56px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty svg.lucide {
    width: 40px;
    height: 40px;
    color: var(--border);
}

.grid-form {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.card-subtitle {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 14px;
}

.sub-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, transparent);
}

.sub-mini strong {
    font-size: 22px;
    font-weight: 900;
}

.sub-mini-active { --c: var(--green); }
.sub-mini-expiring { --c: var(--gold-dark); }
.sub-mini-expired { --c: #D92D20; }
.sub-mini-none { --c: var(--text-muted); }

.small-gap {
    margin: 14px 0 8px;
}

.quick-extend {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.quick-extend .btn {
    width: 100%;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    margin-bottom: 6px;
    border: none;
    border-radius: 12px;
    background: none;
    text-align: left;
    cursor: pointer;
}

.action-row:hover {
    background: var(--bg);
}

.action-row > svg.lucide {
    color: var(--text-muted);
}

.action-row > span {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.action-row small {
    color: var(--text-muted);
    font-size: 13px;
}

.action-danger strong,
.action-danger > svg.lucide {
    color: #D92D20;
}

/* =========================================================
   KİTAP İNDİRİMLERİ
   ========================================================= */
.book-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.book-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.book-cover {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: var(--bg);
    color: var(--text-muted);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.book-cover svg.lucide {
    width: 48px;
    height: 48px;
}

.book-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.book-body h2 {
    font-size: 17px;
    font-weight: 900;
    margin: 0;
}

.book-body p {
    margin: 0;
    font-size: 14px;
}

.book-body .btn-block {
    margin-top: auto;
}

.book-code {
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-code code {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 2px dashed var(--gold);
    border-radius: 10px;
    background: color-mix(in srgb, var(--gold) 10%, transparent);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap;          /* kod bölünmesin; çok uzunsa sonu ... olur, kopyala tam kodu alır */
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-code .btn {
    flex-shrink: 0;
}

.book-thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
}

/* =========================================================
   ABONELİK: "Sınava kadar" paketi, ödeme, site ayarları fiyat tablosu
   ========================================================= */
.package-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin: 32px 0 20px;     /* "Tek paket" etiketi üstteki bilgi kutusuna değmesin */
}

.package-single h2 {
    font-size: 26px;
    font-weight: 900;
    margin: 0;
}

.package-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 14px 0 6px;
}

.package-price strong {
    font-size: 40px;
    font-weight: 900;
    color: var(--blue);
    line-height: 1;
}

[data-theme="dark"] .package-price strong {
    color: var(--text);
}

.package-discount {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-weight: 800;
}

.package-done {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.package-done > svg.lucide {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--blue);
}

.package-done p {
    margin: 4px 0 10px;
}

.price-schedule ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.price-schedule li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
}

.price-schedule li strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.price-schedule li.is-current {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--blue);
}

.checkout-frame {
    padding: 8px;
}

.payment-result {
    max-width: 560px;
    margin: 40px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.payment-result h1 {
    font-size: 24px;
    font-weight: 900;
}

.payment-result-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: #fff;
    background: var(--blue);
}

.payment-result-icon svg.lucide {
    width: 34px;
    height: 34px;
}

.payment-result.is-ok .payment-result-icon { background: var(--green); }
.payment-result.is-fail .payment-result-icon { background: #D92D20; }

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 820px;
}

.price-table input {
    width: 120px;
    padding: 8px 10px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

@media (max-width: 860px) {
    .package-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   YÖNETİM: ÖĞRENCİ GRUPLARI
   ========================================================= */
.group-filter {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

.group-name-edit {
    flex: 1;
    min-width: 0;
}

.group-name-input {
    width: 100%;
    max-width: 520px;
    padding: 4px 8px;
    margin-left: -8px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
}

.group-name-input:hover,
.group-name-input:focus {
    border-color: var(--border);
    outline: none;
}

.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.member-list li {
    border-top: 1px solid var(--border);
}

.member-row {
    align-items: center;
    padding: 12px 18px;
    margin: 0;
    cursor: pointer;
}

.member-row:hover {
    background: var(--bg);
}

.member-row small {
    font-weight: 600;
}

/* =========================================================
   YÖNETİM: EXCEL'DEN ÖĞRENCİ EKLEME
   ========================================================= */
.import-steps {
    display: grid;
    gap: 14px;
    max-width: 820px;
}

.import-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.import-step p {
    margin: 0 0 12px;
}

.import-step-num {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 900;
}

.import-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.import-table tr.is-invalid {
    background: color-mix(in srgb, #D92D20 6%, transparent);
}

/* =========================================================
   YANLIŞ DEFTERİ (Testler → Yanlış defterim)
   ========================================================= */
.wrong-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.wrong-subject-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

.wrong-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.wrong-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.wrong-card.is-learned {
    opacity: 0.75;
}

.wrong-photo {
    display: block;
    aspect-ratio: 4 / 3;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.wrong-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.wrong-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px;
    font-size: 14px;
}

.wrong-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.wrong-note {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wrong-delete {
    position: absolute;
    top: 8px;
    right: 8px;
}

.wrong-delete .icon-btn {
    background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.wrong-upload {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 140px;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    color: var(--text-muted);
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
}

.wrong-upload:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.wrong-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.wrong-upload img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 10px;
}

.wrong-upload span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.form-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, #D92D20 12%, transparent);
    color: #D92D20;
    font-weight: 700;
}

.wrong-review {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wrong-review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wrong-review-photo {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.wrong-answer summary {
    list-style: none;
    cursor: pointer;
}

.wrong-answer summary::-webkit-details-marker {
    display: none;
}

.wrong-answer[open] summary {
    display: none;
}

.wrong-answer-body {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg);
}

.wrong-answer-body p {
    margin: 0 0 6px;
}

.wrong-review .grade-row form {
    flex: 1;
    margin: 0;
}

/* =========================================================
   ROZETLER (profil)
   ========================================================= */
.badges-card {
    margin-bottom: 20px;
}

.badge-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
    font-size: 14px;
}

.badge-item small {
    font-size: 12px;
    line-height: 1.3;
}

.badge-medal {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
}

.badge-medal svg.lucide {
    width: 24px;
    height: 24px;
}

.badge-item.is-earned {
    border-color: color-mix(in srgb, var(--c) 40%, var(--border));
    background: color-mix(in srgb, var(--c) 6%, var(--surface));
}

.badge-item.is-earned .badge-medal {
    background: var(--c);
    color: #fff;
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px color-mix(in srgb, var(--c) 45%, transparent);
}

.badge-item:not(.is-earned) strong {
    color: var(--text-muted);
}

.badge-date {
    color: var(--c);
    font-weight: 800;
}

[data-theme="dark"] .badge-date {
    color: var(--text);
}

.badge-progress {
    width: 80%;
    height: 5px;
    margin-top: 4px;
    border-radius: 999px;
    background: var(--bg);
    overflow: hidden;
}

.badge-progress span {
    display: block;
    height: 100%;
    background: var(--text-muted);
    border-radius: 999px;
}

/* =========================================================
   ÇALIŞMA SAYACI (Programım → Sayaç)
   ========================================================= */
.timer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.timer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.timer-modes {
    width: 100%;
    max-width: 360px;
}

.timer-lengths {
    display: flex;
    gap: 6px;
}

.timer-lengths[hidden] {
    display: none;
}

.timer-face {
    --size: min(280px, 72vw);
    position: relative;
    display: grid;
    place-items: center;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--bg) 0);
}

.timer-face.is-break {
    background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--bg) 0);
}

.timer-face::before {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}

.timer-face-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.timer-phase {
    color: var(--blue);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.timer-face.is-break .timer-phase {
    color: var(--green);
}

[data-theme="dark"] .timer-phase {
    color: var(--chart-line);
}

.timer-time {
    font-size: clamp(44px, 12vw, 64px);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.timer-subject {
    width: 100%;
    max-width: 360px;
    text-align: left;
}

.timer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.timer-actions [hidden] {
    display: none;
}

.timer-note {
    margin: 0;
}

.timer-saved {
    margin: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 800;
}

.timer-saved.is-error {
    background: color-mix(in srgb, #D92D20 12%, transparent);
    color: #D92D20;
}

.timer-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.timer-totals > div {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg);
}

.timer-totals strong {
    font-size: 18px;
    font-weight: 900;
}

.timer-totals small {
    color: var(--text-muted);
    font-weight: 700;
}

.day-bars {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    height: 120px;
}

.day-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

.day-bar-fill {
    width: 100%;
    max-width: 28px;
    border-radius: 6px 6px 2px 2px;
    background: color-mix(in srgb, var(--chart-line) 55%, transparent);
}

.day-bar.is-today .day-bar-fill {
    background: var(--chart-line);
}

.day-bar small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.day-bar.is-today small {
    color: var(--text);
}

.split-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.split-list li {
    display: grid;
    grid-template-columns: minmax(0, 130px) 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.split-name {
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.split-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--bg);
    overflow: hidden;
}

.split-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--c);
}

@media (max-width: 860px) {
    .timer-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   KONU TAKİBİ (Programım → Konu takibi)
   ========================================================= */
:root {
    --status-done: var(--green);
    --status-review: var(--gold-dark);
    --status-weak: #D92D20;
}

[data-theme="dark"] {
    --status-review: var(--gold);
    --status-weak: #F97066;
}

.topic-overview {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.topic-overview-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.topic-overview-stats > div {
    display: flex;
    flex-direction: column;
}

.topic-overview-stats strong {
    font-size: 24px;
    font-weight: 900;
}

.topic-overview-stats small {
    color: var(--text-muted);
    font-weight: 700;
}

.topic-overview-stats .is-review strong { color: var(--status-review); }
.topic-overview-stats .is-weak strong { color: var(--status-weak); }

.topic-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.topic-subjects {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.topic-subjects .eyebrow {
    margin: 8px 0 2px;
}

.topic-subject {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--c);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.topic-subject:hover {
    border-color: var(--c);
}

.topic-subject.active {
    background: color-mix(in srgb, var(--c) 10%, var(--surface));
    border-color: var(--c);
}

.topic-bar {
    grid-column: 1 / -1;
    display: flex;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bg);
}

.topic-bar .is-done { background: var(--status-done); }
.topic-bar .is-review { background: var(--status-review); }
.topic-bar .is-weak { background: var(--status-weak); }

.topic-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.topic-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    border-left: 4px solid transparent;
    transition: background 0.15s;
}

.topic-check.is-done { border-left-color: var(--status-done); }
.topic-check.is-review { border-left-color: var(--status-review); }
.topic-check.is-weak { border-left-color: var(--status-weak); }

.topic-check.is-done .topic-check-name strong {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--status-done) 60%, transparent);
}

.topic-check-num {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.topic-check.is-done .topic-check-num {
    background: var(--status-done);
    color: #fff;
}

.topic-check-name {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topic-check-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-check-content a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.topic-check-content a:hover {
    color: var(--blue);
}

.topic-check-content svg.lucide {
    width: 13px;
    height: 13px;
}

.topic-status-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.topic-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.topic-status svg.lucide {
    width: 15px;
    height: 15px;
}

.topic-status:hover {
    color: var(--text);
}

.topic-status[aria-pressed="true"] {
    color: #fff;
    border-color: transparent;
}

.topic-status-done[aria-pressed="true"] { background: var(--status-done); }
.topic-status-review[aria-pressed="true"] { background: var(--status-review); }
.topic-status-weak[aria-pressed="true"] { background: var(--status-weak); }

.section-prefix {
    display: none;   /* masaüstünde ders grupları başlıkla ayrılıyor; telefonda başlık gizli olduğu için gösterilir */
}

.standard-topics {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

@media (max-width: 860px) {
    .topic-layout {
        grid-template-columns: 1fr;
    }

    .topic-subjects {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .topic-subjects .eyebrow {
        display: none;
    }

    .section-prefix {
        display: inline;
    }

    .topic-subject {
        flex-shrink: 0;
        min-width: 150px;
    }

    .topic-check {
        flex-wrap: wrap;
        padding: 12px 14px;
    }

    .topic-status-buttons {
        width: 100%;
        padding-left: 38px;
    }

    .topic-status {
        flex: 1;
        justify-content: center;
    }
}

/* =========================================================
   DENEME TAKİBİ: net grafiği (sunucuda çizilen SVG) ve giriş formu
   ========================================================= */
:root {
    --chart-line: var(--blue);
    --chart-grid: color-mix(in srgb, var(--border) 70%, transparent);
}

[data-theme="dark"] {
    --chart-line: #7EA6F5;   /* koyu zeminde okunur mavi */
}

.mock-chart {
    position: relative;
}

.mock-chart svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart-grid {
    stroke: var(--chart-grid);
    stroke-width: 1;
}

.chart-grid.is-zero {
    stroke: var(--border);
}

/* SVG birimleri: grafik telefonda ~%70 küçüldüğü için yazılar burada biraz büyük tutulur */
.chart-tick {
    fill: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.chart-line {
    fill: none;
    stroke: var(--chart-line);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.chart-dot {
    fill: var(--chart-line);
    stroke: var(--surface);     /* 2px zemin halkası: noktalar çizgiden ayrışır */
    stroke-width: 2;
    transition: r 0.12s;
}

.chart-dot.is-active {
    r: 6.5;
}

.chart-value {
    fill: var(--text);
    font-size: 15px;
    font-weight: 900;
}

.chart-crosshair {
    stroke: var(--text-muted);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    pointer-events: none;
}

.chart-hit {
    fill: transparent;
    cursor: pointer;
    outline: none;
}

.chart-tooltip {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 150px;
    max-width: 240px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
    font-size: 13px;
    pointer-events: none;
}

.chart-tooltip strong {
    font-size: 17px;
    font-weight: 900;
}

.chart-tooltip small {
    color: var(--text-muted);
}

.chart-tooltip-row:first-of-type {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.sparkline path {
    fill: none;
    stroke: var(--chart-line);
    stroke-width: 2;
    stroke-linejoin: round;
}

.sparkline circle {
    fill: var(--chart-line);
}

.trend-up { color: var(--green); font-weight: 800; }
.trend-down { color: #D92D20; font-weight: 800; }
[data-theme="dark"] .trend-down { color: #F97066; }

.mock-net {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue);
    line-height: 1.1;
}

[data-theme="dark"] .mock-net {
    color: var(--text);
}

.mock-net strong {
    font-size: 17px;
    font-weight: 900;
}

.mock-net small {
    font-size: 11px;
    font-weight: 700;
}

.mock-list .admin-row-main > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mock-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mock-subject {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.mock-subject strong {
    color: var(--text);
}

.mock-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-inputs-head,
.mock-input-row,
.mock-input-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 58px 52px;
    gap: 6px;
    align-items: center;
}

.mock-inputs-head {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.mock-inputs-head span:not(:first-child),
.mock-input-row output,
.mock-input-total output {
    text-align: center;
}

.mock-input-row > span {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.mock-input-row > span small {
    font-size: 11px;
}

.mock-input-row input {
    width: 100%;
    padding: 8px 4px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
}

.mock-input-row input::-webkit-outer-spin-button,
.mock-input-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mock-input-row input:focus {
    border-color: var(--blue);
}

.mock-input-row output {
    font-weight: 800;
}

.mock-input-row.is-invalid input {
    border-color: #D92D20;
}

.mock-input-row.is-invalid output {
    color: #D92D20;
}

.mock-input-total {
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-weight: 900;
}

.mock-input-total span {
    grid-column: 1 / 4;
}

.mock-input-total output {
    font-size: 18px;
    color: var(--blue);
}

[data-theme="dark"] .mock-input-total output {
    color: var(--chart-line);
}

/* =========================================================
   TELEFONA KURULUM (PWA) KUTUSU
   ========================================================= */
.install-app {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.install-app[hidden] {
    display: none;
}

.install-app-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
}

.install-app-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    color: var(--text-muted);
}

.install-app-text > strong {
    color: var(--text);
    font-size: 15px;
}

.install-app-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.install-app [hidden] {
    display: none !important;
}

/* =========================================================
   DUYURULAR (öğrenci ana sayfası + yönetim)
   ========================================================= */
.announcement {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--border));
    border-left: 5px solid var(--blue);
    border-radius: 16px;
    background: var(--surface);
}

.announcement.is-pinned {
    border-color: color-mix(in srgb, var(--gold) 45%, var(--border));
    border-left-color: var(--gold);
}

.announcement-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    color: var(--blue);
    background: var(--blue-soft);
}

.announcement.is-pinned .announcement-icon,
.announcement-icon.is-pinned {
    color: var(--gold-dark);
    background: color-mix(in srgb, var(--gold) 18%, transparent);
}

.announcement-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.announcement-text strong {
    font-size: 16px;
    font-weight: 900;
}

.announcement-text p {
    margin: 2px 0 0;
    color: var(--text-muted);
}

.announcement-from {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.announcement-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.announcement-actions form {
    margin: 0;
}

.announcement-admin-list .admin-row-main > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-row.is-muted {
    opacity: 0.55;
}

@media (max-width: 640px) {
    .announcement {
        flex-wrap: wrap;
    }

    .announcement-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* =========================================================
   YÖNETİM: ÖĞRENCİ GELİŞİM SAYFASI
   ========================================================= */
.text-green { color: var(--green); font-weight: 800; }
.text-red { color: #D92D20; font-weight: 800; }
[data-theme="dark"] .text-red { color: #F97066; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }

.student-head {
    align-items: center;
}

.person-lg h1 {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
}

.person-lg .avatar {
    width: 52px;
    height: 52px;
    font-size: 22px;
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.row-icons {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.weak-outcomes {
    margin-top: 12px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: -1px;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-weight: 800;
    white-space: nowrap;
    text-decoration: none;
}

.tab svg.lucide {
    width: 18px;
    height: 18px;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

[data-theme="dark"] .tab.active {
    color: var(--text);
    border-bottom-color: var(--gold);
}

.progress-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 14px;
    color: var(--gold-dark);
    background: color-mix(in srgb, var(--gold) 16%, transparent);
}

[data-theme="dark"] .progress-alert {
    color: var(--gold);
}

.progress-alert > span {
    flex: 1;
    min-width: 200px;
}

/* Çalışma takvimi: sütunlar hafta, satırlar gün */
.heatmap {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.heatmap-days,
.heatmap-week {
    display: grid;
    grid-template-rows: repeat(7, 22px);
    gap: 5px;
}

.heatmap-days span {
    width: 16px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 22px;
}

.heat {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.heat-legend .heat {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    vertical-align: -1px;
}

.heat-1 { background: color-mix(in srgb, var(--green) 30%, transparent); border-color: transparent; }
.heat-2 { background: color-mix(in srgb, var(--green) 60%, transparent); border-color: transparent; }
.heat-3 { background: var(--green); border-color: transparent; }
.heat.is-future { opacity: 0.35; border-style: dashed; }

.heat-legend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.weak-outcomes,
.recent-list,
.plan-weeks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weak-outcomes li,
.recent-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.weak-outcomes li > span:last-child,
.recent-list li > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.weak-outcomes small,
.recent-list small {
    font-size: 12px;
}

.weak-count {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    color: #D92D20;
    background: color-mix(in srgb, #D92D20 12%, transparent);
    font-weight: 900;
}

.recent-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--blue);
}

.recent-dot.is-done {
    background: var(--green);
    border-color: var(--green);
}

.plan-weeks li {
    display: grid;
    grid-template-columns: 110px 1fr 64px;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
}

.plan-weeks li small {
    text-align: right;
}

.plan-weeks li.is-current {
    color: var(--blue);
}

.usage {
    display: grid;
    gap: 10px;
    margin: 0;
}

.usage > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.usage dt {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 700;
}

.usage dt svg.lucide {
    width: 16px;
    height: 16px;
}

.usage dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

/* =========================================================
   PROFİL
   ========================================================= */
.profile-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.avatar-lg {
    width: 72px;
    height: 72px;
    font-size: 30px;
}

.profile-id {
    flex: 1;
    min-width: 200px;
}

.profile-id h1 {
    font-size: 24px;
    font-weight: 900;
}

.profile-id .muted {
    overflow-wrap: anywhere;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 8px;
    margin: 0;
}

.profile-stats > div {
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--bg);
}

.profile-stats dt {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.profile-stats dt svg.lucide {
    width: 14px;
    height: 14px;
}

.profile-stats dd {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 900;
}

/* =========================================================
   HATA SAYFALARI (404 / 500)
   ========================================================= */
.error-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: var(--bg);
}

.error-page {
    max-width: 440px;
    text-align: center;
}

.error-logo {
    width: 72px;
    height: 72px;
}

.error-code {
    margin: 8px 0 4px;
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    color: var(--blue);
}

.error-page h1 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

/* =========================================================
   VİDEOLAR
   ========================================================= */
.section-title-first {
    margin-top: 8px;
}

.progress-thin {
    height: 6px;
}

/* YouTube küçük resmi: 16:9, üstünde oynat ikonu, süre ve ilerleme çubuğu */
.thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: var(--border);
    flex-shrink: 0;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-sm { width: 128px; border-radius: 10px; }
.thumb-xs { width: 72px; border-radius: 8px; }

.thumb-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.25);
    opacity: 0;
    transition: opacity 0.2s;
}

.thumb-play svg.lucide {
    width: 44px;
    height: 44px;
    padding: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blue);
    fill: var(--blue);
}

.thumb-duration {
    position: absolute;
    right: 8px;
    bottom: 10px;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.thumb-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
}

.thumb-progress > span {
    display: block;
    height: 100%;
    background: var(--gold);
}

.subject-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    border-radius: 14px;
    flex-shrink: 0;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
}

.subject-icon svg.lucide {
    width: 24px;
    height: 24px;
}

.subject-icon-sm {
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 12px;
}

.subject-icon-sm svg.lucide {
    width: 20px;
    height: 20px;
}

.topic-index {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
    font-size: 14px;
}

[data-theme="dark"] .topic-index {
    color: var(--text);
}

.topic-index svg.lucide {
    width: 18px;
    height: 18px;
    stroke-width: 3;
}

/* Koçluk videoları vitrini: solda büyük küçük resim, sağda başlık ve "izle" butonu */
.coach-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
}

.coach-hero::after {
    content: '';
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.45;
    pointer-events: none;
}

.coach-hero-empty {
    grid-template-columns: 1fr;
    padding: 40px;
}

.coach-hero-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.coach-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.coach-hero-media:hover img {
    transform: scale(1.04);
}

.coach-hero-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 60%);
}

.coach-hero-play svg.lucide {
    width: 72px;
    height: 72px;
    padding: 22px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    fill: #fff;
    box-shadow: 0 0 0 10px rgba(212, 167, 44, 0.3);
    transition: transform 0.2s;
}

.coach-hero-media:hover .coach-hero-play svg.lucide {
    transform: scale(1.08);
}

.coach-hero-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.coach-hero .hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.coach-hero .hero-eyebrow svg.lucide {
    width: 16px;
    height: 16px;
}

.coach-hero h1 {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
}

.coach-hero-desc {
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coach-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-light {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 700;
}

.chip-light svg.lucide {
    width: 15px;
    height: 15px;
}

.btn-gold {
    margin-top: 4px;
    background: var(--gold);
    box-shadow: 0 4px 0 var(--gold-dark);
}

.btn-gold:active {
    box-shadow: 0 0 0 var(--gold-dark);
}

.btn-gold svg.lucide {
    fill: #fff;
}

/* Kategori filtreleri: mobilde yatay kaydırılır */
.category-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.category-chip {
    --c: var(--blue);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 9px 16px;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.category-chip svg.lucide {
    width: 17px;
    height: 17px;
    color: var(--c);
}

.category-chip:hover {
    border-color: var(--c);
}

.category-chip.active {
    background: var(--c);
    border-color: var(--c);
    color: #fff;
}

.category-chip.active svg.lucide {
    color: #fff;
}

.category-chip-admin {
    border-style: dashed;
    color: var(--gold-dark);
}

.category-chip-admin svg.lucide {
    color: var(--gold-dark);
}

/* Raf başlığı: kategori ikonu + adı + "Tümünü gör" */
.shelf-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 14px;
}

.shelf-head > div {
    flex: 1;
    min-width: 0;
}

.shelf-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 19px;
    font-weight: 900;
}

.shelf-head h2 svg.lucide {
    color: var(--gold);
}

.shelf-head .muted {
    font-size: 14px;
}

.shelf-count {
    flex-shrink: 0;
    font-weight: 700;
}

.shelf-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
}

[data-theme="dark"] .shelf-more {
    color: var(--gold);
}

.shelf-more svg.lucide {
    width: 16px;
    height: 16px;
    transition: transform 0.15s;
}

.shelf-more:hover svg.lucide {
    transform: translateX(3px);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.video-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.video-card .thumb {
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover .thumb {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.video-card:hover .thumb-play {
    opacity: 1;
}

.video-card.is-done .thumb img {
    opacity: 0.6;
}

.video-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.video-card-body strong {
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card:hover .video-card-body strong {
    color: var(--blue);
}

[data-theme="dark"] .video-card:hover .video-card-body strong {
    color: var(--gold);
}

.thumb-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.thumb-badge-done {
    background: var(--green);
}

.thumb-badge svg.lucide {
    width: 13px;
    height: 13px;
    stroke-width: 3;
}

.video-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.video-summary svg.lucide {
    color: var(--gold);
    width: 18px;
    height: 18px;
}

/* Videolar merkez sayfası: koçluk videoları büyük vitrin kutucuğu */
.coach-tile {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 28px;
    align-items: center;
    padding: 28px;
    margin-bottom: 8px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    transition: transform 0.2s, box-shadow 0.2s;
}

.coach-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(30, 79, 176, 0.3);
}

.coach-tile::after {
    content: '';
    position: absolute;
    left: -90px;
    bottom: -150px;
    width: 320px;
    height: 320px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
}

.coach-tile-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.coach-tile-text .hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.coach-tile-text .hero-eyebrow svg.lucide {
    width: 16px;
    height: 16px;
}

.coach-tile-text strong {
    font-size: 40px;
    font-weight: 900;
    line-height: 1.05;
}

.coach-tile-desc {
    max-width: 440px;
    opacity: 0.85;
    font-size: 16px;
}

.chip-new {
    background: var(--gold) !important;
}

.coach-tile-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.coach-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.coach-tile:hover .coach-tile-media img {
    transform: scale(1.04);
}

.coach-tile:hover .coach-hero-play svg.lucide {
    transform: scale(1.08);
}

.coach-tile-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.coach-tile-placeholder svg.lucide {
    width: 64px;
    height: 64px;
    opacity: 0.4;
}

.coach-tile-media::after {
    content: '';
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(transparent, rgba(8, 20, 50, 0.85));
    pointer-events: none;
}

.coach-tile-media .coach-hero-play {
    z-index: 1;
}

.coach-tile-latest {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    font-weight: 800;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.coach-tile-latest small {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Ders videoları: konu listesi (açılır) + video satırları */
.banner-cta {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.text-new {
    color: var(--gold-dark);
    font-weight: 800;
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.topic summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
}

.topic summary::-webkit-details-marker {
    display: none;
}

.topic summary:hover {
    background: color-mix(in srgb, var(--blue) 4%, transparent);
}

.topic.is-done .topic-index {
    background: var(--green);
    color: #fff;
}

.topic-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.topic-title strong {
    font-weight: 800;
}

.topic-chevron {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.topic[open] .topic-chevron {
    transform: rotate(180deg);
}

.video-list {
    list-style: none;
    margin: 0;
    padding: 0 12px 12px;
}

.video-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 14px;
}

.video-row:hover {
    background: var(--bg);
}

.video-row-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.3;
}

.video-row-title strong {
    font-weight: 700;
}

.video-row-status {
    color: var(--border);
}

.video-row:hover .video-row-status {
    color: var(--blue);
}

.video-row.is-done .video-row-status {
    color: var(--green);
}

.video-row.is-done .video-row-title strong {
    color: var(--text-muted);
}

/* İzleme sayfası */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--blue);
}

.breadcrumb svg.lucide {
    width: 14px;
    height: 14px;
}

.breadcrumb span {
    color: var(--text);
}

.watch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.player-frame iframe,
.player-frame #player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.watch-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0 16px;
}

.watch-title {
    flex: 1;
    min-width: 240px;
}

.watch-title h1 {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.25;
    margin-top: 8px;
}

.resume-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.resume-note svg.lucide {
    width: 16px;
    height: 16px;
}

.btn-success {
    background: var(--green);
    box-shadow: 0 4px 0 #17794F;
}

.btn-success:active {
    box-shadow: 0 0 0 #17794F;
}

.watch-description {
    margin-bottom: 16px;
    white-space: pre-line;
}

.watch-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.watch-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    min-width: 0;
}

.watch-nav-link:hover {
    border-color: var(--blue);
}

.watch-nav-link > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.watch-nav-link strong {
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.watch-nav-next {
    justify-content: flex-end;
    text-align: right;
}

.playlist {
    position: sticky;
    top: 24px;
}

.playlist-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.playlist-head > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.playlist-head strong {
    font-weight: 900;
}

.watch-coach {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    font-weight: 600;
}

.watch-coach svg.lucide {
    width: 15px;
    height: 15px;
}

.avatar-xs {
    width: 24px;
    height: 24px;
    font-size: 12px;
    box-shadow: 0 0 0 2px var(--gold);
}

.playlist-items {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
}

.playlist-item:hover {
    background: var(--bg);
}

.playlist-item.is-current {
    background: var(--blue-soft);
}

.playlist-num {
    width: 22px;
    flex-shrink: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.playlist-num svg.lucide {
    width: 16px;
    height: 16px;
}

.playlist-item.is-current .playlist-num {
    color: var(--blue);
}

.playlist-item.is-done .playlist-num {
    color: var(--green);
}

.playlist-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
    font-size: 14px;
}

.playlist-title strong {
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ana sayfadaki "kaldığın yerden devam et" kartı */
.video-thumb-img {
    position: relative;
    overflow: hidden;
    background: #000;
}

.video-thumb-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.video-thumb-img svg.lucide {
    position: relative;
}

.video-empty {
    display: flex;
    gap: 14px;
    align-items: center;
}

/* =========================================================
   DERS NOTLARI
   ========================================================= */
.shelf-head .topic-index {
    width: 30px;
    height: 30px;
    font-size: 13px;
}

.subject-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.subject-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* Kartın solunda dersin renginde şerit: kitap sırtı gibi */
.subject-tile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--c);
}

.subject-tile:hover {
    transform: translateY(-3px);
    border-color: var(--c);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 16%, transparent);
}

.subject-tile .subject-icon {
    margin-bottom: 6px;
}

.subject-tile-name {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.subject-tile .progress {
    margin-top: 8px;
}

.subject-tile.is-empty {
    opacity: 0.55;
}

.subject-tile.is-empty:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.note-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.note-card:hover {
    transform: translateY(-2px);
    border-color: var(--c);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 14%, transparent);
}

/* Doküman simgesi: sağ üst köşesi kıvrık kâğıt */
.note-doc {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 52px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 8px 16px 8px 8px;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, transparent);
    border: 2px solid color-mix(in srgb, var(--c) 30%, transparent);
}

.note-doc small {
    font-size: 11px;
    font-weight: 800;
}

.note-card.is-done .note-doc {
    color: var(--green);
    background: var(--green-soft);
    border-color: color-mix(in srgb, var(--green) 30%, transparent);
}

.note-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.note-body strong {
    font-weight: 800;
    line-height: 1.3;
}

.note-card:hover .note-body strong {
    color: var(--c);
}

.note-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-size: 13px;
}

.note-status svg.lucide {
    width: 15px;
    height: 15px;
}

.note-status-done {
    color: var(--green);
}

.note-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-top: 4px;
}

.note-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.subject-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    margin-bottom: 12px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 60%, #0B1430) 100%);
}

.subject-banner::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -80px;
    width: 220px;
    height: 220px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.subject-banner-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
}

.subject-banner-icon svg.lucide {
    width: 30px;
    height: 30px;
}

.subject-banner-text {
    flex: 1;
    min-width: 0;
}

.subject-banner-text p {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.subject-banner h1 {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
}

.subject-banner small {
    opacity: 0.85;
}

.ring-on-color {
    position: relative;
    z-index: 1;
    background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, 0.25) 0);
}

.ring-on-color::before {
    background: color-mix(in srgb, var(--c) 75%, #0B1430);
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--gold-dark);
    font-size: 14px;
    font-weight: 700;
}

.admin-link a {
    text-decoration: underline;
}

.admin-link svg.lucide {
    width: 16px;
    height: 16px;
}

/* ---------------------------------------------------------------- okuyucu */
.reader {
    margin: -8px 0 0;
}

.reader-toolbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.reader-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.reader-title strong {
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.reader-title small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reader-pager,
.reader-zoom {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.reader-pager input {
    width: 56px;
    padding: 6px 4px;
    border: 2px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    text-align: center;
    font-weight: 800;
    outline: none;
    -moz-appearance: textfield;
}

.reader-pager input::-webkit-outer-spin-button,
.reader-pager input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.reader-pager input:focus {
    border-color: var(--c);
}

.reader-zoom-label {
    min-width: 54px;
    padding: 6px 4px;
    border: none;
    border-radius: 9px;
    background: none;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}

.reader-zoom-label:hover {
    background: var(--bg);
}

/* Toolbar'ın alt kenarında okuma ilerleme çizgisi */
.reader-progress {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px;
    overflow: hidden;
}

.reader-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--c);
    transition: width 0.3s ease;
}

.reader-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    min-height: 60vh;
    padding: 24px 12px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--text) 6%, var(--bg));
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.reader-page {
    position: relative;
    display: grid;
    place-items: center;
    max-width: none;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08), 0 12px 32px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    scroll-margin-top: 96px;
}

.reader-page canvas {
    display: block;
}

.reader-page-num {
    color: #C5CCD8;
    font-size: 28px;
    font-weight: 900;
}

.reader-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: auto;
    color: var(--text-muted);
    font-weight: 700;
}

.reader-status.is-error {
    color: #D92D20;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--border);
    border-top-color: var(--c, var(--blue));
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.reader-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 36px 0 12px;
    text-align: center;
}

.reader-end .watch-nav {
    width: 100%;
    max-width: 760px;
}

.reader-end h2 {
    font-size: 22px;
    font-weight: 900;
}

.reader-end-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.reader-end-icon svg.lucide {
    width: 30px;
    height: 30px;
}

/* Odak modu: kenar çubuğu ve menüler gizlenir, not tüm ekranı kaplar */
body.reading-focus .sidebar {
    display: none;
}

body.reading-focus .app {
    grid-template-columns: 1fr;
}

body.reading-focus .content {
    max-width: none;
    padding: 12px 16px 32px;
}

/* Yazdırma engeli (tarayıcı menüsünden yazdır denenirse boş sayfa + uyarı çıkar) */
@media print {
    .reader-pages,
    .reader-toolbar {
        display: none !important;
    }

    .reader::before {
        content: 'Bu ders notu Beyaz Koç Dijital Kütüphane üyelerine özeldir ve yazdırılamaz.';
        font-weight: 800;
    }
}

/* =========================================================
   TEKRAR KARTLARI
   ========================================================= */
.flash-inline {
    margin-bottom: 18px;
}

.btn-lg {
    padding: 15px 24px;
    font-size: 17px;
    border-radius: 16px;
}

.btn-lg small {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 13px;
}

.btn kbd {
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    opacity: 0.8;
}

.btn-danger {
    background: #E5484D;
    box-shadow: 0 4px 0 #B42318;
}

.btn-danger:active {
    box-shadow: 0 0 0 #B42318;
}

/* Kartlar ana sayfası üst alanı: hedef halkası + metin + haftalık seri */
.cards-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
    padding: 28px 32px;
    margin-bottom: 8px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
}

.cards-hero::after {
    content: '';
    position: absolute;
    left: -90px;
    bottom: -140px;
    width: 300px;
    height: 300px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.35;
    pointer-events: none;
}

.goal-ring {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.18) 0);
}

.goal-ring::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: var(--blue-dark);
}

.goal-ring > span {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.goal-ring strong {
    font-size: 38px;
    font-weight: 900;
}

.goal-ring small {
    opacity: 0.8;
    font-weight: 700;
}

.cards-hero-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.cards-hero-text .hero-eyebrow {
    margin: 0;
}

.cards-hero-text h1 {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
}

.cards-hero-hint {
    font-weight: 700;
    opacity: 0.9;
}

.chip-streak svg.lucide {
    color: rgba(255, 255, 255, 0.6);
}

.chip-streak.is-on svg.lucide {
    color: var(--gold);
    fill: var(--gold);
}

.goal-form {
    margin: 0;
}

.goal-form select {
    border: none;
    background: transparent;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    outline: none;
}

.goal-form option {
    color: var(--text);
}

.week-strip {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
}

.week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-weight: 800;
}

.week-day small {
    font-size: 12px;
    opacity: 0.75;
}

.week-dot {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.35);
}

.week-day.is-done .week-dot {
    border: none;
    background: var(--gold);
    box-shadow: 0 3px 0 var(--gold-dark);
}

.week-dot svg.lucide {
    width: 18px;
    height: 18px;
    color: #fff;
    fill: #fff;
}

.week-day.is-today small {
    opacity: 1;
    color: var(--gold);
}

.week-day.is-today:not(.is-done) .week-dot {
    border-color: var(--gold);
    border-style: solid;
}

.week-day.is-future {
    opacity: 0.45;
}

.tile-count {
    position: absolute;
    top: 14px;
    right: 14px;
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #E5484D;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

/* ---------------------------------------------------------------- yol haritası (Duolingo) */
.path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    padding: 60px 0 48px;
}

.path-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 220px;
    transform: translateX(calc(var(--offset) * 70px));
}

/* Halka: öğrenilen kart yüzdesi */
.path-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) calc(var(--p, 0) * 1%), var(--border) 0);
}

/* Basılabilir 3D düğme */
.path-button {
    display: grid;
    place-items: center;
    width: 76px;
    height: 72px;
    margin-top: -6px;
    border-radius: 50%;
    background: var(--c);
    color: #fff;
    box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 65%, #000);
    transition: transform 0.1s, box-shadow 0.1s;
}

.path-button svg.lucide {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.path-ring:hover .path-button {
    transform: translateY(2px);
    box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 65%, #000);
}

.path-ring:active .path-button {
    transform: translateY(7px);
    box-shadow: 0 0 0 color-mix(in srgb, var(--c) 65%, #000);
}

.path-node.is-new .path-button {
    background: color-mix(in srgb, var(--c) 45%, var(--surface));
    box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 45%, var(--border));
}

.path-node.is-done .path-button {
    background: var(--gold);
    box-shadow: 0 7px 0 var(--gold-dark);
}

.path-node.is-current .path-ring {
    animation: pulse-ring 1.8s ease-in-out infinite;
}

@keyframes pulse-ring {
    50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--gold) 20%, transparent); }
}

.path-bubble {
    position: absolute;
    top: -38px;
    z-index: 2;
    padding: 6px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--c);
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0.06em;
    animation: bob 1.4s ease-in-out infinite;
}

.path-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 12px;
    height: 12px;
    background: var(--surface);
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    transform: translateX(-50%) rotate(45deg);
}

@keyframes bob {
    50% { transform: translateY(-5px); }
}

.path-due {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 26px;
    padding: 2px 7px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: #E5484D;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.path-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.3;
}

.path-label strong {
    font-weight: 800;
}

.path-label small {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.path-trophy .path-ring {
    background: none;
}

.path-trophy .path-button {
    background: var(--border);
    box-shadow: 0 7px 0 color-mix(in srgb, var(--border) 70%, #000);
}

.path-trophy .path-button svg.lucide {
    color: var(--text-muted);
    fill: none;
}

/* ---------------------------------------------------------------- çalışma turu */
body.study-mode .sidebar {
    display: none;
}

body.study-mode .app {
    grid-template-columns: 1fr;
}

body.study-mode .content {
    max-width: 760px;
    padding: 20px 20px 140px;
}

.study {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.study-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.study-icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    border-radius: 12px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}

.study-icon-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.study .sound-off,
.study.sound-muted .sound-on {
    display: none;
}

.study.sound-muted .sound-off {
    display: block;
}

.study-progress {
    flex: 1;
    height: 16px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.study-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--green);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), inset 0 4px 0 rgba(255, 255, 255, 0.25);
    transition: width 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

.study-streak {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-weight: 900;
    font-size: 18px;
}

.study-streak.is-on {
    color: #F08C2E;
}

.study-streak.is-on svg.lucide {
    fill: #F08C2E;
}

.study-mode-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -12px 0 18px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
}

.study-stage {
    position: relative;
    flex: 1;
}

.study-stage.is-entering {
    animation: card-in 0.3s ease;
}

@keyframes card-in {
    from { opacity: 0; transform: translateX(24px); }
}

.study-card-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.study-retry {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
}

.study-prompt {
    width: 100%;
    font-size: 24px;
    font-weight: 900;
}

.study-question {
    margin-bottom: 22px;
    padding: 22px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    white-space: pre-line;
}

/* Yönetim: formül yardımı ve önizleme */
.math-help {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
}

.math-help summary {
    cursor: pointer;
    font-weight: 800;
}

.math-help[open] summary {
    margin-bottom: 8px;
}

.math-help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.math-help-table td {
    padding: 5px 4px;
    border-top: 1px solid var(--border);
    vertical-align: top;
}

.math-help-table td:first-child {
    width: 34%;
    color: var(--text-muted);
    font-weight: 700;
}

.math-help-table code {
    font-size: 12px;
}

.math-preview {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--bg);
}

.math-preview-front {
    font-size: 18px;
    font-weight: 800;
    white-space: pre-line;
}

.math-preview-back {
    color: var(--text-muted);
    font-weight: 700;
    white-space: pre-line;
}

.math-preview-back:not(:empty)::before {
    content: '→ ';
}

.card-image-current {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.card-image-current img {
    max-width: 220px;
    max-height: 140px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

/* Kart resmi (şekil, grafik) */
.study-image {
    display: block;
    max-width: 100%;
    max-height: 260px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: #fff;   /* şeffaf PNG'ler koyu temada da okunur kalsın */
    object-fit: contain;
}

.flip-face .study-image {
    margin-bottom: 0;
}

.study-question .katex,
.flip-text .katex,
.option-text .katex {
    font-size: 1.1em;
}

/* Klasik kart: 3D dönen kart */
.flip-card {
    perspective: 1200px;
    cursor: pointer;
}

.flip-inner {
    position: relative;
    display: grid;
    min-height: 260px;
    transition: transform 0.55s cubic-bezier(.4, .2, .2, 1);
    transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-face {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 28px;
    border: 2px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 6px 0 var(--border);
    text-align: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flip-back {
    transform: rotateY(180deg);
    border-color: var(--blue);
    box-shadow: 0 6px 0 var(--blue-dark);
}

.flip-text {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.4;
    white-space: pre-line;
}

.flip-hint,
.flip-question {
    color: var(--text-muted);
    font-weight: 700;
}

.flip-explanation {
    max-width: 520px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--blue-soft);
    font-size: 15px;
}

.flip-card.is-correct .flip-back {
    border-color: var(--green);
    box-shadow: 0 6px 0 #17794F;
    animation: pop 0.3s ease;
}

.flip-card.is-wrong .flip-back {
    border-color: #E5484D;
    box-shadow: 0 6px 0 #B42318;
    animation: shake 0.4s ease;
}

@keyframes shake {
    20%, 60% { translate: -8px 0; }
    40%, 80% { translate: 8px 0; }
}

/* Şıklar */
.option-list {
    display: grid;
    gap: 12px;
}

.option-list-tf {
    grid-template-columns: 1fr 1fr;
}

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 4px 0 var(--border);
    text-align: left;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.08s, box-shadow 0.08s, border-color 0.15s, background 0.15s;
}

.option:hover:not(:disabled) {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.option:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border);
}

.option:disabled {
    cursor: default;
}

.option-list-tf .option {
    justify-content: center;
    padding: 22px;
    font-size: 19px;
}

.option-key {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: 2px solid var(--border);
    border-radius: 9px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 900;
}

.option-text {
    white-space: pre-line;
}

.option.is-correct {
    border-color: var(--green);
    background: var(--green-soft);
    box-shadow: 0 4px 0 var(--green);
    color: #11734A;
    animation: pop 0.3s ease;
}

.option.is-wrong {
    border-color: #E5484D;
    background: #FDECEC;
    box-shadow: 0 4px 0 #E5484D;
    color: #B42318;
    animation: shake 0.4s ease;
}

[data-theme="dark"] .option.is-correct { color: #7EE2B0; }
[data-theme="dark"] .option.is-wrong { background: #3A1A1D; color: #FDA4A6; }

.option-list.is-answered .option:not(.is-correct):not(.is-wrong) {
    opacity: 0.5;
}

.study-footer {
    position: sticky;
    bottom: 0;
    padding: 20px 0 12px;
    background: linear-gradient(to top, var(--bg) 70%, transparent);
}

.grade-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.grade-row .btn {
    width: 100%;
}

/* Alttan kayan geri bildirim çubuğu */
.study-feedback {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    animation: slide-up 0.25s ease;
}

.study-feedback.is-correct {
    background: var(--green-soft);
    border-top: 2px solid #A6E2C3;
    --fb: #17794F;
}

.study-feedback.is-wrong {
    background: #FDECEC;
    border-top: 2px solid #F7B9BB;
    --fb: #B42318;
}

[data-theme="dark"] .study-feedback.is-correct { background: #10301F; border-color: #1F5A40; --fb: #7EE2B0; }
[data-theme="dark"] .study-feedback.is-wrong { background: #3A1A1D; border-color: #6B2A2E; --fb: #FDA4A6; }

@keyframes slide-up {
    from { transform: translateY(100%); }
}

.study-feedback-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
}

.study-feedback-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface);
    color: var(--fb);
}

.study-feedback-icon svg.lucide {
    width: 30px;
    height: 30px;
}

.study-feedback-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--fb);
    min-width: 0;
}

.study-feedback-text strong {
    font-size: 20px;
    font-weight: 900;
}

.study-feedback.is-correct .btn {
    background: var(--green);
    box-shadow: 0 4px 0 #17794F;
}

.study-feedback.is-wrong .btn {
    background: #E5484D;
    box-shadow: 0 4px 0 #B42318;
}

.xp-pop {
    position: absolute;
    left: 50%;
    top: 40%;
    z-index: 5;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    pointer-events: none;
    animation: xp-float 0.9s ease forwards;
}

@keyframes xp-float {
    from { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
    30% { opacity: 1; transform: translate(-50%, -10px) scale(1.1); }
    to { opacity: 0; transform: translate(-50%, -60px) scale(1); }
}

/* Tur sonu */
.study-top.is-done .study-progress span {
    background: var(--gold);
}

.study-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 10px;
    text-align: center;
    animation: card-in 0.4s ease;
}

.study-end-badge {
    display: grid;
    place-items: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    box-shadow: 0 8px 0 var(--gold-dark), 0 0 0 12px var(--gold-soft);
    animation: pop 0.5s ease;
}

.study-end-badge svg.lucide {
    width: 52px;
    height: 52px;
}

.study-end h1 {
    margin-top: 10px;
    font-size: 30px;
    font-weight: 900;
}

.study-end-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.end-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
    border: 2px solid var(--c);
    border-radius: 16px;
    background: var(--c);
    overflow: hidden;
}

.end-stat small {
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.end-stat strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--c);
    font-size: 22px;
    font-weight: 900;
}

.end-stat-gold { --c: var(--gold); }
.end-stat-green { --c: var(--green); }
.end-stat-blue { --c: var(--blue); }

.study-end-goal {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    font-weight: 800;
    text-align: left;
}

.study-end-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-top: 6px;
}

.confetti {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    overflow: hidden;
}

.confetti span {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 16px;
    border-radius: 3px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    to { transform: translate(var(--drift), 105vh) rotate(720deg); }
}

/* ---------------------------------------------------------------- yönetim: kartlar */
.card-type-badge {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 13%, transparent);
}

.card-type-classic { --c: var(--blue); }
.card-type-choice { --c: #7C5CDB; }
.card-type-truefalse { --c: var(--green); }

.card-admin-list .admin-row-main strong {
    font-weight: 700;
    white-space: pre-line;
}

.wrong-options {
    color: #D92D20;
    opacity: 0.8;
}

.segmented-sm span {
    padding: 8px 6px;
    font-size: 13px;
}

.segmented-sm label {
    min-width: 0;
}

.format-help {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    font-size: 13px;
}

.format-help code {
    display: block;
    margin-top: 8px;
    padding: 10px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px dashed var(--border);
    font-family: 'Cascadia Code', Consolas, monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.card-form-narrow {
    max-width: 720px;
}

/* =========================================================
   BİTİRME PROGRAMLARI
   ========================================================= */
/* Görev satırı: işaret düğmesi + "Aç" bağlantısı */
.task-item {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.task-item .task {
    flex: 1;
    min-width: 0;
}

.task.is-locked {
    cursor: default;
}

.task-type svg.lucide,
.task-auto svg.lucide {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

.task-meta {
    flex-wrap: wrap;
}

.task-auto {
    color: var(--green);
    font-weight: 800;
}

.task-details {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.task-open {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    color: var(--blue);
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.task-open:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
}

[data-theme="dark"] .task-open {
    color: var(--text);
}

.task-open svg.lucide {
    width: 16px;
    height: 16px;
}

.empty-sm {
    padding: 28px 16px;
}

.card .btn-block {
    margin-top: 16px;
}

.program-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 8px 8px;
    text-align: center;
}

.program-cta-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: var(--blue-soft);
    color: var(--blue);
}

.program-cta-icon svg.lucide {
    width: 34px;
    height: 34px;
}

.program-cta strong {
    font-size: 18px;
    font-weight: 900;
}

/* Katalog */
.program-intro {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.program-intro h1 {
    font-size: 28px;
    font-weight: 900;
}

.program-intro .muted {
    max-width: 640px;
    font-size: 15px;
}

.program-intro-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 22px;
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.program-intro-icon svg.lucide {
    width: 34px;
    height: 34px;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.program-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px color-mix(in srgb, var(--c) 20%, transparent);
}

.program-card-band {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 22px 22px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 60%, #0B1430) 100%);
}

.program-card-band::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -50px;
    width: 140px;
    height: 140px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
}

.program-card-months {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}

.program-card-band small {
    font-weight: 700;
    opacity: 0.85;
}

.program-card-band .badge {
    align-self: flex-start;
    margin-top: 8px;
}

.program-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
}

.program-card-body strong {
    font-size: 18px;
    font-weight: 900;
}

.program-card-meta {
    display: flex;
    gap: 14px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.program-card-meta svg.lucide {
    width: 16px;
    height: 16px;
    vertical-align: -3px;
}

.program-card-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    color: var(--c);
    font-weight: 900;
}

.program-card-cta svg.lucide {
    width: 18px;
    height: 18px;
    transition: transform 0.15s;
}

.program-card:hover .program-card-cta svg.lucide {
    transform: translateX(4px);
}

.inline-code {
    display: inline !important;
    margin: 0 !important;
    padding: 1px 6px !important;
    border-radius: 6px;
}

.format-help p {
    margin-top: 8px;
}

.format-help details summary {
    margin-top: 8px;
    cursor: pointer;
    font-weight: 800;
}

/* =========================================================
   HAFTALIK PLAN (Programım)
   ========================================================= */
.planner-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.week-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.week-switch h1 {
    font-size: 28px;
    font-weight: 900;
    min-width: 200px;
    text-align: center;
}

.planner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.planner-actions form {
    margin: 0;
}

.planner-top {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.week-summary {
    display: flex;
    align-items: center;
    gap: 22px;
}

.week-ring {
    --size: 84px;
    flex-shrink: 0;
}

.week-ring span {
    font-size: 17px;
}

.week-stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.week-stats > div {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.week-stats strong {
    font-size: 19px;
    font-weight: 900;
}

.week-stats small {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.streak-num {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #F08C2E;
}

.streak-num svg.lucide {
    fill: #F08C2E;
}

.guide-follow {
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 5px solid var(--c, var(--gold));
    transition: border-color 0.15s, transform 0.15s;
}

.guide-follow:hover {
    transform: translateY(-2px);
}

.guide-follow-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    color: var(--c, var(--gold-dark));
    background: color-mix(in srgb, var(--c, var(--gold)) 14%, transparent);
}

.guide-follow-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.guide-follow-text strong {
    font-weight: 900;
}

.guide-follow-empty {
    --c: var(--gold);
    border-left-style: dashed;
}

.subject-split {
    margin-bottom: 16px;
}

.subject-split ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 8px 28px;
}

.subject-split li {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 10px;
}

.subject-split-name {
    font-weight: 800;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.subject-split-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.subject-split-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--c);
}

.subject-split small {
    font-size: 12px;
    white-space: nowrap;
}

.planner-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 2px dashed var(--border);
    border-radius: 18px;
}

.planner-empty > svg.lucide {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: var(--blue);
}

.planner-empty strong {
    font-weight: 900;
}

/* Hafta tahtası: 7 sütun; sütunlar 200 px'ten daralmaz, sığmazsa yatay kayar (açılışta bugüne
   kaydırılır). Mobilde günler alt alta. */
.week-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(200px, 1fr));
    gap: 10px;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.day-col {
    scroll-snap-align: start;
}

.day-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    scroll-margin-top: 20px;
}

.day-col.is-today {
    border: 2px solid var(--gold);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--gold) 18%, transparent);
}

.day-col.is-past {
    background: color-mix(in srgb, var(--surface) 70%, var(--bg));
}

.day-col-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    padding: 12px 12px 8px;
}

.day-col-head > div {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.day-col-head strong {
    font-weight: 900;
}

.day-col.is-today .day-col-head small {
    color: var(--gold-dark);
    font-weight: 800;
}

.day-count {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg);
    font-size: 12px;
    font-weight: 900;
}

.plan-list {
    list-style: none;
    margin: 0;
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-task {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.plan-task.is-done {
    background: var(--green-soft);
    border-color: transparent;
}

/* Sürükle-bırak (planner.js) */
.plan-drag {
    display: grid;
    place-items: center;
    width: 14px;
    height: 26px;
    margin: 0 -4px 0 -4px;
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.45;
    cursor: grab;
    touch-action: none;   /* dokunmatikte tutamak sayfayı kaydırmasın, sürüklesin */
}

.plan-drag svg.lucide {
    width: 14px;
    height: 14px;
}

.plan-task:hover .plan-drag {
    opacity: 1;
}

.plan-task-ghost {
    opacity: 0.35;
    border-style: dashed;
    border-color: var(--blue);
}

.plan-task-chosen {
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18);
}

.plan-task.is-saving {
    opacity: 0.7;
}

body.is-dragging-task,
body.is-dragging-task * {
    cursor: grabbing !important;
}

/* Boş günlere de bırakılabilsin */
body.is-dragging-task .plan-list {
    min-height: 48px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 12px;
    outline: 2px dashed color-mix(in srgb, var(--blue) 30%, transparent);
    outline-offset: -2px;
}

.planner-hint {
    margin-top: 12px;
}

@media (hover: none) {
    .plan-drag {
        opacity: 0.8;
        width: 20px;
    }
}

.plan-check {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 1px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.plan-check:hover {
    border-color: var(--green);
}

.plan-check svg.lucide {
    width: 14px;
    height: 14px;
    stroke-width: 3.5;
}

.plan-check.done {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
    animation: pop 0.25s ease;
}

.plan-task-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.plan-task-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: break-word;   /* kelimeyi sadece tek başına sığmıyorsa böler */
}

.plan-task.is-done .plan-task-title {
    color: var(--text-muted);
    text-decoration: line-through;
}

.plan-task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.plan-task-meta .tag {
    font-size: 11px;
    padding: 1px 7px;
}

.plan-task-meta svg.lucide {
    width: 12px;
    height: 12px;
    vertical-align: -2px;
}

/* Ana sayfadaki büyük görev satırında meta biraz daha büyük */
.task .plan-task-meta {
    font-size: 13px;
}

.plan-task-menu {
    flex-shrink: 0;
}

/* "⋯" düğmesi kartın sağ üst köşesinde durur; başlığa yer kalsın */
.plan-task-menu summary {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
}

.plan-task-menu summary::-webkit-details-marker {
    display: none;
}

.plan-task-menu summary:hover {
    background: var(--bg);
    color: var(--text);
}

.plan-task-menu summary svg.lucide {
    width: 16px;
    height: 16px;
}

/* Düzenleme formu kartın altında, kart genişliğinde açılır (yatay kaydırılan tahtada kırpılmasın diye
   üstte yüzen bir menü değil, akış içinde). "⋯" düğmesi açıkken de sağ üstte kalır. */
.plan-task {
    flex-wrap: wrap;
    padding-right: 32px;
}

.plan-task-menu[open] {
    order: 3;
    flex-basis: 100%;
}

.plan-task-menu[open] summary {
    background: var(--bg);
}

.plan-task-edit {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.plan-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-form input,
.plan-form select {
    width: 100%;
    min-width: 0;
    padding: 7px 9px;
    border: 2px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    font-size: 13px;
    outline: none;
}

.plan-form input:focus,
.plan-form select:focus {
    border-color: var(--blue);
}

.plan-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.plan-form .btn-block {
    margin-top: 2px;
}

.plan-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
    padding: 7px;
    border: none;
    border-radius: 9px;
    background: none;
    color: #D92D20;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.plan-delete:hover {
    background: #FDECEC;
}

.plan-delete svg.lucide {
    width: 14px;
    height: 14px;
}

.plan-add {
    margin: 8px;
}

.plan-add summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    list-style: none;
}

.plan-add summary::-webkit-details-marker {
    display: none;
}

.plan-add summary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.plan-add summary svg.lucide {
    width: 16px;
    height: 16px;
}

.plan-add[open] summary {
    margin-bottom: 8px;
    border-style: solid;
    color: var(--blue);
}

.guide-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
}

.guide-actions form {
    margin: 0;
}

.program-card.is-following {
    outline: 3px solid var(--gold);
    outline-offset: -1px;
}

.unfollow-row {
    max-width: 420px;
    margin-top: 24px;
}

/* =========================================================
   TESTLER (konu tarama testleri, branş denemeleri)
   ========================================================= */
.tests-intro-icon {
    background: color-mix(in srgb, #E5484D 14%, transparent);
    color: #E5484D;
}

.text-danger {
    color: #D92D20;
    font-weight: 800;
}

.recent-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.recent-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.recent-result:hover {
    border-color: var(--c);
}

.recent-result > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.recent-result strong {
    font-weight: 800;
}

.mini-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 50%;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--border) 0);
}

.mini-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--surface);
}

.mini-ring span {
    position: relative;
    font-weight: 900;
    font-size: 14px;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.test-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.test-card:hover {
    transform: translateY(-2px);
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.test-card-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
}

.test-card.is-solved .test-card-icon {
    background: var(--green-soft);
    color: var(--green);
}

.test-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.test-card-body strong {
    font-weight: 800;
}

.test-level {
    padding: 2px 10px;
    border-radius: 999px;
    background: #FDECEC;
    color: #B42318;
    font-size: 12px;
    font-weight: 800;
}

[data-theme="dark"] .test-level {
    background: #3A1A1D;
    color: #FDA4A6;
}

.test-card-meta {
    display: flex;
    gap: 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.test-card-meta svg.lucide {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

.test-card-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.test-card-score strong {
    font-size: 22px;
    font-weight: 900;
    color: var(--green);
}

.test-card-score small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.test-card-go {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 3px 0 var(--blue-dark);
}

.test-card-go svg.lucide {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.test-draft {
    position: absolute;
    top: -9px;
    right: 14px;
}

/* Test giriş sayfası */
.test-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.test-intro-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 28px;
    border-top: 6px solid var(--c);
}

.test-intro-card h1 {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.15;
}

.test-intro-badge {
    color: var(--c);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.test-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin: 12px 0 4px;
}

.test-facts > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 8px;
    border-radius: 14px;
    background: var(--bg);
    text-align: center;
}

.test-facts svg.lucide {
    color: var(--c);
}

.test-facts strong {
    font-size: 20px;
    font-weight: 900;
}

.test-facts small {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
}

.test-rules {
    list-style: none;
    margin: 4px 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-rules li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 15px;
}

.test-rules svg.lucide {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--green);
    stroke-width: 3;
}

.attempt-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attempt-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 12px;
}

.attempt-row:hover {
    background: var(--bg);
}

.attempt-row > span:nth-child(2) {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.attempt-row svg.lucide {
    color: var(--text-muted);
}

.attempt-net {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    padding: 6px 8px;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
}

.attempt-net small {
    font-size: 11px;
}

/* ---------------------------------------------------------------- test çözme ekranı */
body.test-mode .sidebar {
    display: none;
}

body.test-mode .app {
    grid-template-columns: 1fr;
}

body.test-mode .content {
    max-width: 1500px;
    padding: 0 24px 40px;
}

.solve-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    margin-bottom: 4px;
    background: var(--bg);
}

.solve-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.solve-title strong {
    font-weight: 900;
    font-size: 18px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.solve-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.solve-timer.is-over {
    border-color: #F79009;
    color: #B54708;
    background: #FFFAEB;
}

.solve-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.solve-reader .reader-toolbar {
    top: 72px;
    margin-bottom: 14px;
}

.solve-reader .reader-controls {
    width: 100%;
    justify-content: space-between;
}

/* Optik form */
.optic {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 92px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.optic-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.optic-head strong {
    flex: 1;
    font-weight: 900;
}

.optic-count {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
    font-size: 14px;
}

[data-theme="dark"] .optic-count {
    color: var(--text);
}

.optic-close,
.optic-toggle {
    display: none;
}

.optic-list {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
    overflow-y: auto;
}

.optic-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 4px;
    border-radius: 10px;
}

.optic-row:nth-child(5n) {
    border-bottom: 1px dashed var(--border);
    border-radius: 10px 10px 0 0;
    padding-bottom: 8px;
    margin-bottom: 3px;
}

.optic-num {
    width: 28px;
    color: var(--text-muted);
    font-weight: 900;
    text-align: right;
    margin-right: 4px;
}

.optic-row.is-answered .optic-num {
    color: var(--text);
}

/* Optik baloncuk: boşken ince çerçeve, işaretlenince kurşun kalemle doldurulmuş gibi */
.bubble {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 2px solid color-mix(in srgb, #E5484D 45%, var(--border));
    border-radius: 50%;
    background: var(--surface);
    color: color-mix(in srgb, #E5484D 70%, var(--text-muted));
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.08s, background 0.12s;
}

.bubble:hover {
    background: #FDECEC;
}

.bubble:active {
    transform: scale(0.9);
}

.bubble.is-filled {
    border-color: #1B2333;
    background: #1B2333;
    color: #fff;
}

[data-theme="dark"] .bubble.is-filled {
    border-color: #E7ECF5;
    background: #E7ECF5;
    color: #0E1626;
}

.bubble.is-correct {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.bubble.is-wrong {
    border-color: #E5484D;
    background: #E5484D;
    color: #fff;
}

.bubble-sm {
    width: 30px;
    height: 30px;
    font-size: 13px;
    cursor: default;
}

span.bubble:hover {
    background: inherit;
}

span.bubble.is-filled:hover { background: #1B2333; }
span.bubble.is-correct:hover { background: var(--green); }
span.bubble.is-wrong:hover { background: #E5484D; }

.optic-hint {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

/* Onay penceresi */
.modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(11, 20, 48, 0.55);
    animation: fade-in 0.15s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
}

.modal-card {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 24px 22px;
    border-radius: 22px;
    background: var(--surface);
    text-align: center;
    animation: card-in 0.25s ease;
}

.modal-card h2 {
    font-size: 22px;
    font-weight: 900;
}

.modal-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
}

/* ---------------------------------------------------------------- sonuç sayfası */
.result-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 26px 30px;
    margin-bottom: 18px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 55%, #0B1430) 100%);
}

.result-hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -100px;
    width: 260px;
    height: 260px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.4;
}

.result-ring {
    width: 136px;
    height: 136px;
    flex-shrink: 0;
}

.result-ring::before {
    background: color-mix(in srgb, var(--c) 65%, #0B1430);
}

.result-ring strong {
    font-size: 36px;
}

.result-hero-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.result-hero-text .hero-eyebrow {
    margin: 0;
}

.result-hero-text h1 {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
}

.result-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 700;
}

.result-chip strong {
    font-size: 18px;
    font-weight: 900;
}

.result-chip svg.lucide {
    width: 18px;
    height: 18px;
    stroke-width: 3;
}

.result-chip.is-correct { background: #22A06B; }
.result-chip.is-wrong { background: #E5484D; }
.result-chip.is-empty { background: rgba(255, 255, 255, 0.25); }

.result-compare {
    opacity: 0.9;
    font-size: 14px;
}

.coach-feedback {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    margin-bottom: 20px;
    border: 2px solid var(--gold);
    border-radius: 20px;
    background: var(--gold-soft);
}

.coach-feedback-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--gold);
}

.coach-feedback-text {
    margin: 4px 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.result-filter {
    display: flex;
    gap: 6px;
}

.result-filter .chip {
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.result-filter .chip.active {
    background: var(--blue);
    color: #fff;
}

.answer-review {
    list-style: none;
    margin: 0;
    padding: 8px;
}

.review-item {
    border-radius: 14px;
    margin-bottom: 6px;
    border: 1px solid transparent;
}

.review-item.is-wrong {
    border-color: #F7B9BB;
    background: color-mix(in srgb, #E5484D 5%, transparent);
}

.review-item.is-empty {
    border-color: var(--border);
    background: var(--bg);
}

.review-item summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.review-item summary::-webkit-details-marker {
    display: none;
}

.review-num {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--bg);
    font-weight: 900;
    font-size: 14px;
}

.review-num-sm {
    width: 24px;
    height: 24px;
    font-size: 12px;
    border-radius: 7px;
}

.review-answers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.review-outcome {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    font-size: 14px;
}

.review-status svg.lucide {
    width: 22px;
    height: 22px;
}

.review-item.is-correct .review-status { color: var(--green); }
.review-item.is-wrong .review-status { color: #E5484D; }
.review-item.is-empty .review-status,
.review-item.is-cancelled .review-status { color: var(--text-muted); }

.review-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 14px 14px 54px;
    font-size: 14px;
    line-height: 1.55;
}

.review-mistake strong {
    color: #D92D20;
}

.review-remedy strong {
    color: var(--green);
}

.weak-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weak-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
}

.perfect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.perfect-card .study-end-badge {
    width: 80px;
    height: 80px;
}

.net-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding-top: 6px;
}

.net-bar {
    flex: 1;
    max-width: 48px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.net-bar-fill {
    width: 100%;
    border-radius: 8px 8px 4px 4px;
    background: color-mix(in srgb, var(--blue) 35%, var(--surface));
}

.net-bar.is-current .net-bar-fill {
    background: var(--gold);
}

.net-bar small {
    font-weight: 800;
    font-size: 12px;
}

.test-guide {
    font-size: 14px;
    line-height: 1.55;
}

/* ---------------------------------------------------------------- yönetim: testler */
.setup-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.setup-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 800;
    font-size: 14px;
}

.setup-step.is-done {
    border-color: var(--green);
    background: var(--green-soft);
    color: var(--green);
}

.setup-step svg.lucide {
    width: 18px;
    height: 18px;
}

.file-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 700;
}

.key-input {
    font-family: 'Cascadia Code', Consolas, monospace !important;
    font-size: 20px !important;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.question-admin-list {
    padding: 4px 8px;
}

.question-admin-list > li {
    border-bottom: 1px dashed var(--border);
}

.question-edit summary {
    cursor: pointer;
    list-style: none;
}

.question-edit summary::-webkit-details-marker {
    display: none;
}

.question-outcome {
    flex: 1;
    min-width: 0;
    font-weight: 700;
}

.question-form {
    padding: 4px 12px 16px 50px;
}

.bulk-analysis {
    padding: 16px;
    border-top: 1px solid var(--border);
}

/* =========================================================
   YÖNETİM: İÇERİK
   ========================================================= */
.list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.list-head h2 {
    font-size: 18px;
    font-weight: 900;
}

.list-empty {
    padding: 16px 20px;
}

.admin-list {
    list-style: none;
    margin: 0;
    padding: 6px;
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
}

.admin-row:hover {
    background: var(--bg);
}

.admin-row.is-selected {
    background: var(--blue-soft);
}

.admin-split {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-category-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--c) 6%, transparent);
}

.admin-category-head .subject-icon {
    margin: 0;
}

.admin-category-head h2 {
    font-size: 20px;
    font-weight: 900;
}

.inline-icon {
    width: 13px !important;
    height: 13px !important;
    vertical-align: -2px;
}

.admin-row-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-row-main > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.admin-row-main strong {
    font-weight: 800;
}

.admin-row-main:hover strong {
    color: var(--blue);
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.row-actions form {
    margin: 0;
}

.move-buttons {
    display: flex;
    gap: 2px;
}

.icon-btn-sm {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.icon-btn-sm svg.lucide {
    width: 16px;
    height: 16px;
}

.icon-btn-danger:hover {
    color: #D92D20;
    border-color: #F7B9BB;
}

.sticky-card {
    position: sticky;
    top: 24px;
}

.page-head-subject {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-head-subject .subject-icon {
    margin: 0;
    width: 56px;
    height: 56px;
}

.admin-topic {
    scroll-margin-top: 24px;
}

.admin-topic:target {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent);
}

.admin-topic-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--blue) 3%, transparent);
}

.inline-edit {
    flex: 1;
    min-width: 0;
}

.inline-edit summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    font-size: 16px;
}

.inline-edit summary::-webkit-details-marker {
    display: none;
}

.inline-edit-icon {
    width: 14px !important;
    height: 14px !important;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.15s;
}

.inline-edit summary:hover .inline-edit-icon {
    opacity: 1;
}

.inline-edit[open] summary {
    display: none;
}

.inline-form {
    display: flex;
    gap: 8px;
}

.inline-form input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--blue);
    border-radius: 10px;
    background: var(--surface);
    outline: none;
}

.add-video {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px dashed var(--border);
}

.add-video > svg.lucide {
    color: var(--text-muted);
}

.add-video input,
.add-video select {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    outline: none;
}

.add-video select {
    flex: 0 1 auto;
    min-width: 0;
}

.admin-sub-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-sub-head svg.lucide {
    width: 15px;
    height: 15px;
}

.add-video-top {
    border-top: none;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.add-video-top input,
.add-video-top select {
    background: var(--surface);
}

.add-video input:focus {
    border-color: var(--blue);
    background: var(--surface);
}

.details-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.details-card summary::-webkit-details-marker {
    display: none;
}

.details-card[open] summary {
    margin-bottom: 16px;
}

.details-card .form {
    margin-bottom: 12px;
}

.file-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px 12px 6px 6px;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, transparent);
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px dashed var(--border);
}

.upload-drop {
    position: relative;
    flex: 1.4;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.upload-drop:hover,
.upload-row.has-files .upload-drop {
    border-color: var(--blue);
    background: var(--blue-soft);
}

/* Gerçek dosya kutusu tüm alanı kaplar ama görünmez: sürükle-bırak da çalışır */
.upload-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-drop svg.lucide {
    color: var(--blue);
}

.upload-row > input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 9px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    outline: none;
}

.upload-row button:disabled {
    opacity: 0.7;
    cursor: progress;
}

.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    margin: 0;
}

.info-list dt {
    color: var(--text-muted);
    font-weight: 600;
}

.info-list dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.color-input {
    height: 48px;
    padding: 4px !important;
    cursor: pointer;
}

.thumb-preview {
    border-radius: 0;
}

.preview-meta {
    display: flex;
    flex-direction: column;
    padding: 14px 18px;
}

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1080px) {
    .grid-main {
        grid-template-columns: 1fr;
    }

    .tiles,
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .packages,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .packages {
        max-width: 480px;
    }

    .watch,
    .admin-split,
    .test-intro,
    .result-layout,
    .planner-top {
        grid-template-columns: 1fr;
    }

    .playlist,
    .sticky-card {
        position: static;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .coach-hero,
    .coach-tile {
        grid-template-columns: 1fr;
    }

    .coach-tile-media {
        order: -1;
    }

    .cards-hero {
        grid-template-columns: auto 1fr;
    }

    .cards-hero .week-strip {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    /* Giriş ekranında marka paneli gizlenir, logo formun üstüne gelir */
    .auth {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 28px;
        color: var(--blue);
        font-weight: 900;
        font-size: 18px;
    }

    [data-theme="dark"] .auth-mobile-brand {
        color: var(--text);
    }

    .auth-mobile-brand img {
        width: 52px;
        height: 52px;
    }
}

/* =========================================================
   MOBİL: sidebar üstte ince bara, menü alta sabit sekme çubuğuna dönüşür
   ========================================================= */
@media (max-width: 860px) {
    .app {
        grid-template-columns: 1fr;
        /* Sayfa ekrandan kısa olduğunda artan boşluk üst çubuğa değil içeriğe gitsin */
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        position: sticky;
        z-index: 20;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 16px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .brand img {
        width: 38px;
        height: 38px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .sidebar-footer {
        margin-left: auto;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .user-box,
    .nav-section,
    .nav-link-admin,
    .nav-link-wide {
        display: none;
    }

    .mobile-only {
        display: grid !important;
    }

    .mobile-only-inline {
        display: inline-flex !important;
    }

    .desktop-only,
    .hide-mobile {
        display: none !important;
    }

    .sidebar-actions .avatar {
        align-self: center;
        text-decoration: none;
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background: var(--surface);
        border-top: 1px solid var(--border);
    }

    .nav-link {
        flex: 1;
        flex-direction: column;
        gap: 2px;
        padding: 6px 2px;
        font-size: 11px;
    }

    .nav-link:hover {
        background: none;
    }

    .nav-link.active {
        background: none;
        color: var(--blue);
        box-shadow: none;
    }

    [data-theme="dark"] .nav-link.active {
        color: var(--gold);
    }

    .nav-link svg.lucide {
        width: 24px;
        height: 24px;
    }

    .content {
        padding: 20px 16px 100px;
    }

    .hero {
        padding: 24px 22px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .stat-chip {
        padding: 8px 12px;
    }

    .tiles {
        gap: 12px;
    }

    .tile {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        gap: 12px;
    }

    .stat {
        padding: 14px;
    }

    .stat strong {
        font-size: 22px;
    }

    .sub-status {
        padding: 22px;
    }

    .page-head h1 {
        font-size: 24px;
    }

    .auth-main {
        align-items: flex-start;
        padding: 32px 20px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .coach-hero {
        padding: 16px;
    }

    .coach-hero h1 {
        font-size: 22px;
    }

    .coach-tile {
        padding: 16px;
        gap: 18px;
    }

    .coach-tile-text strong {
        font-size: 28px;
    }

    .subject-banner {
        flex-wrap: wrap;
    }

    .thumb-sm {
        width: 104px;
    }

    .shelf-head-category .muted {
        display: none;
    }

    .note-grid {
        grid-template-columns: 1fr;
    }

    /* Haftalık plan: günler alt alta */
    .week-board {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .week-switch h1 {
        font-size: 20px;
        min-width: 0;
    }

    .week-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .week-ring {
        align-self: center;
    }

    .week-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .subject-split ul {
        grid-template-columns: 1fr;
    }

    .subject-split li {
        grid-template-columns: 110px 1fr auto;
    }

    .planner-actions {
        width: 100%;
    }

    .planner-actions form:first-child {
        flex: 1;
    }

    .planner-actions .btn {
        width: 100%;
    }

    .plan-task-title {
        font-size: 15px;
    }

    /* Test çözme: kitapçık tam genişlik, optik form alttan açılan panel */
    body.test-mode .content {
        padding: 0 10px 90px;
    }

    .solve-top {
        gap: 8px;
        padding: 10px 0;
    }

    .solve-title strong {
        font-size: 15px;
    }

    .solve-title small {
        display: none;
    }

    .solve-timer {
        padding: 6px 10px;
        font-size: 14px;
    }

    .solve-layout {
        grid-template-columns: 1fr;
    }

    .solve-reader .reader-toolbar {
        top: 58px;
    }

    .optic {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        max-height: 78vh;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.25);
        transform: translateY(105%);
        transition: transform 0.25s ease;
    }

    .optic.is-open {
        transform: translateY(0);
    }

    .optic-close {
        display: grid;
    }

    .optic-list {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .optic-row {
        justify-content: space-between;
    }

    .bubble {
        width: 40px;
        height: 40px;
    }

    .optic-toggle {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 40;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 15px;
        border: none;
        border-radius: 16px;
        background: var(--blue);
        color: #fff;
        font-weight: 900;
        font-size: 16px;
        box-shadow: 0 4px 0 var(--blue-dark), 0 10px 24px rgba(30, 79, 176, 0.35);
        cursor: pointer;
    }

    .result-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 18px;
        gap: 16px;
    }

    .result-hero-text {
        align-items: center;
    }

    .result-hero-text h1 {
        font-size: 22px;
    }

    .result-chips {
        justify-content: center;
    }

    .review-detail {
        padding-left: 14px;
    }

    .review-outcome {
        font-size: 13px;
    }

    .test-intro-card {
        padding: 22px 18px;
    }

    .test-intro-card h1 {
        font-size: 24px;
    }

    .test-grid {
        grid-template-columns: 1fr;
    }

    .program-intro {
        align-items: flex-start;
    }

    .program-intro-icon {
        width: 56px;
        height: 56px;
    }

    .program-intro h1 {
        font-size: 22px;
    }

    .task-open {
        padding: 0 10px;
        font-size: 0;      /* mobilde sadece ok ikonu */
        gap: 0;
    }

    .cards-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 20px;
        padding: 24px 18px;
        text-align: center;
    }

    .cards-hero-text {
        align-items: center;
    }

    .cards-hero-text h1 {
        font-size: 22px;
    }

    .cards-hero .coach-hero-meta {
        justify-content: center;
    }

    .goal-ring {
        width: 120px;
        height: 120px;
    }

    .week-strip {
        width: 100%;
        gap: 4px;
        padding: 12px 10px;
    }

    .week-dot {
        width: 30px;
        height: 30px;
    }

    .path-node {
        transform: translateX(calc(var(--offset) * 42px));
    }

    /* Çalışma turu: üst marka çubuğu ve alt menü gizli, tüm ekran kartın */
    body.study-mode .content {
        padding: 14px 14px 150px;
    }

    .study-prompt {
        font-size: 20px;
    }

    .flip-text {
        font-size: 20px;
    }

    .flip-inner {
        min-height: 220px;
    }

    .study-question {
        font-size: 18px;
        padding: 18px;
    }

    .option {
        padding: 14px;
        font-size: 16px;
    }

    .btn kbd,
    .option-key {
        display: none;
    }

    .study-feedback-inner {
        flex-wrap: wrap;
    }

    .study-feedback-inner .btn {
        width: 100%;
    }

    .study-feedback-icon {
        width: 42px;
        height: 42px;
    }

    .study-end-stats {
        gap: 8px;
    }

    .end-stat strong {
        font-size: 18px;
    }

    .subject-tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .subject-banner {
        padding: 20px;
    }

    .subject-banner h1 {
        font-size: 22px;
    }

    /* Okuyucu: üstteki sabit marka çubuğunun hemen altına yapışır, kontroller ikinci satıra iner */
    .reader-toolbar {
        top: 58px;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
        margin-left: -6px;
        margin-right: -6px;
    }

    .reader-controls {
        width: 100%;
        justify-content: space-between;
    }

    .reader-pages {
        margin: 0 -16px;
        padding: 12px 6px;
        border-radius: 0;
        gap: 10px;
    }

    .reader-page {
        scroll-margin-top: 170px;
    }

    body.reading-focus .reader-toolbar {
        top: 0;
    }

    body.reading-focus .content {
        padding: 8px 8px 24px;
    }

    .thumb-sm {
        width: 104px;
    }

    .player-frame {
        margin: 0 -16px;
        border-radius: 0;
    }

    .watch-title h1 {
        font-size: 20px;
    }

    .watch-info form,
    .watch-info .btn {
        width: 100%;
    }

    .watch-nav {
        grid-template-columns: 1fr;
    }

    .admin-row {
        flex-wrap: wrap;
    }
}

/* =========================================================
   TANITIM SAYFASI (giriş yapmamış ziyaretçi, "/")
   ========================================================= */
.lp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 16px;
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text);
}

.lp-logo img {
    width: 40px;
    height: 40px;
}

.lp-logo b {
    color: var(--blue);
}

[data-theme="dark"] .lp-logo b {
    color: var(--gold);
}

.lp-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.lp-top-link {
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 8px;
}

.lp-hero {
    position: relative;
    overflow: hidden;
    margin: 0 16px;
    border-radius: 28px;
    background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
    max-width: 1080px;
}

@media (min-width: 1112px) {
    .lp-hero {
        margin: 0 auto;
    }
}

.lp-hero::before,
.lp-hero::after {
    content: '';
    position: absolute;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.35;
    pointer-events: none;
}

.lp-hero::before {
    width: 420px;
    height: 420px;
    right: -150px;
    bottom: -200px;
}

.lp-hero::after {
    width: 200px;
    height: 200px;
    right: 120px;
    top: -110px;
    opacity: 0.2;
}

.lp-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 56px 48px;
}

.lp-kicker {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 14px;
}

.lp-hero h1 {
    font-size: 40px;
    font-weight: 900;
    line-height: 1.12;
    margin: 0 0 14px;
}

.lp-hero p {
    font-size: 18px;
    opacity: 0.9;
    margin: 0 0 24px;
}

.lp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.lp-hero-link {
    color: #fff;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lp-hero .lp-hero-note {
    font-size: 14px;
    opacity: 0.75;
    margin: 18px 0 0;
}

.lp-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.lp-section {
    padding: 56px 0 8px;
}

.lp-section h2 {
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 10px;
    text-align: center;
}

.lp-lead {
    max-width: 680px;
    margin: 0 auto 28px;
    text-align: center;
    color: var(--text-muted);
}

.lp-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.lp-feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.lp-feature-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
    margin-bottom: 12px;
}

[data-theme="dark"] .lp-feature-icon {
    color: var(--gold);
}

.lp-feature h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 6px;
}

.lp-feature p {
    margin: 0;
    color: var(--text-muted);
}

.lp-prices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.lp-price {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.lp-price header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.lp-price-exam {
    font-size: 22px;
    font-weight: 900;
}

.lp-price-who {
    color: var(--text-muted);
    font-weight: 700;
}

.lp-price-now {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 4px;
}

.lp-price-now strong {
    font-size: 38px;
    font-weight: 900;
    color: var(--blue);
}

[data-theme="dark"] .lp-price-now strong {
    color: var(--gold);
}

.lp-price-now span {
    color: var(--text-muted);
    font-weight: 700;
}

.lp-price-end {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    font-weight: 700;
}

.lp-price-end svg {
    width: 18px;
    height: 18px;
}

.lp-price-once {
    margin: 0;
    color: var(--text-muted);
    font-weight: 700;
}

.lp-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.lp-price-table td {
    padding: 7px 10px;
    border-top: 1px solid var(--border);
}

.lp-price-table td:last-child {
    text-align: right;
    font-weight: 800;
}

.lp-price-table tr.is-now td {
    background: var(--gold-soft);
}

.lp-includes {
    list-style: none;
    padding: 0;
    margin: 24px auto 0;
    max-width: 640px;
    display: grid;
    gap: 10px;
    font-weight: 700;
}

.lp-includes li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.lp-includes svg {
    flex: none;
    color: var(--green);
}

.lp-center {
    text-align: center;
    margin-top: 28px;
}

.lp-faq {
    max-width: 720px;
    margin: 24px auto 0;
    display: grid;
    gap: 10px;
}

.lp-faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
}

.lp-faq summary {
    cursor: pointer;
    font-weight: 800;
}

.lp-faq p {
    margin: 10px 0 0;
    color: var(--text-muted);
}

.lp-faq a,
.lp-footer a {
    color: var(--blue);
    font-weight: 700;
}

[data-theme="dark"] .lp-faq a,
[data-theme="dark"] .lp-footer a {
    color: var(--gold);
}

.lp-footer {
    margin-top: 64px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.lp-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 16px 36px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
}

.lp-footer-inner p {
    margin: 4px 0 0;
    color: var(--text-muted);
}

.lp-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    max-width: 560px;
}

@media (max-width: 860px) {
    .lp-features {
        grid-template-columns: 1fr 1fr;
    }

    .lp-prices {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .lp-top-link {
        display: none;
    }

    .lp-logo span {
        font-size: 14px;
    }

    .lp-hero-inner {
        padding: 36px 22px;
    }

    .lp-hero h1 {
        font-size: 30px;
    }

    .lp-hero p {
        font-size: 16px;
    }

    .lp-features {
        grid-template-columns: 1fr;
    }

    .lp-section h2 {
        font-size: 24px;
    }
}
