/* ============================================================================
   MERİDYEN v2.0 — yeni özellik stilleri
   (ders oynatıcı, kitap okuyucu, ödeme, paketler, plan, bildirim, eğitmen)
   ========================================================================== */

/* ---- Genel yardımcılar ---------------------------------------------------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.pg {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-12);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .pg {
    padding: var(--sp-4) var(--sp-4) var(--sp-8);
    gap: var(--sp-4);
  }
}
.pg__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-2); }

.cardbox {
  background: var(--surface, #fff); border: 1px solid var(--line, #e5e1d8);
  border-radius: 0; padding: var(--sp-5);
}
[data-theme="dark"] .cardbox { background: var(--surface, #161a17); }

.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
@media (max-width: 900px) { .statgrid { grid-template-columns: repeat(2, 1fr); } }
.statcard {
  border: 1px solid var(--line, #e5e1d8); border-radius: 0; padding: var(--sp-4);
  display: flex; flex-direction: column; gap: 2px; background: var(--surface, #fff);
}
[data-theme="dark"] .statcard { background: var(--surface, #161a17); }
.statcard__n { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.statcard__l { font-size: .72rem; color: var(--ink-soft, #6b6455); text-transform: uppercase; letter-spacing: .06em; }

.chip-toggle {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong, #cfc9bc);
  border-radius: 0; padding: 8px 14px; cursor: pointer; font-size: .85rem; color: var(--ink);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.chip-toggle:hover { background: var(--paper-deep); color: var(--ink-strong); }
.chip-toggle:has(input:checked) { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
[data-theme="dark"] .chip-toggle:hover { background: var(--surface-raised); color: var(--ink-strong); }
[data-theme="dark"] .chip-toggle:has(input:checked) { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.badge--danger { background: rgba(140, 47, 57, .12); color: #8C2F39; }

/* ---- Ödeme ---------------------------------------------------------------- */

.fake-card {
  background: linear-gradient(135deg, #1E5B4B, #122e26); color: #e8e6df;
  border-radius: 0; padding: 18px 20px; text-align: left;
  border: 1px solid rgba(255, 255, 255, .12);
}
.plan-card--pop { border-color: var(--ink, #1c1917); }
.pay-method:hover { border-color: var(--ink, #1c1917) !important; }

/* ---- Paket satırı --------------------------------------------------------- */

.bundle-row {
  display: flex; gap: var(--sp-5); justify-content: space-between; align-items: stretch;
  border: 1px solid var(--line, #e5e1d8); border-radius: 0; padding: var(--sp-6);
  background: var(--surface, #fff); flex-wrap: wrap;
}
[data-theme="dark"] .bundle-row { background: var(--surface, #161a17); }
.bundle-row__main { flex: 1 1 420px; min-width: 0; }
.bundle-row__side {
  flex: 0 1 240px; display: flex; flex-direction: column; gap: 10px; justify-content: center;
  border-left: 1px solid var(--line, #e5e1d8); padding-left: var(--sp-5);
}
.bundle-row__counts { font-size: .85rem; color: var(--ink-soft, #6b6455); }
@media (max-width: 760px) {
  .bundle-row__side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line, #e5e1d8); padding-top: var(--sp-4); }
}

/* ---- Bildirim satırı ------------------------------------------------------- */

.notif-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line, #e5e1d8); border-radius: 0; text-decoration: none; color: inherit;
}
.notif-row:hover { border-color: var(--line-strong, #cfc9bc); }
.notif-row.is-unread { border-left: 3px solid var(--ink, #1c1917); background: rgba(30, 91, 75, .04); }
.notif-row__ic {
  width: 34px; height: 34px; border-radius: 0; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(30, 91, 75, .1); color: #1E5B4B;
}
.notif-row__ic--success { background: rgba(30, 123, 75, .12); color: #1E7B4B; }
.notif-row__ic--warning, .notif-row__ic--error { background: rgba(140, 47, 57, .12); color: #8C2F39; }
.notif-row__dot { width: 8px; height: 8px; border-radius: 0; background: #1E5B4B; flex: 0 0 auto; }

/* ---- Çalışma planı ---------------------------------------------------------- */

.plan-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
.plan-col {
  border: 1px solid var(--line, #e5e1d8); border-radius: 0; padding: 10px;
  min-height: 120px; background: var(--surface, #fff);
}
[data-theme="dark"] .plan-col { background: var(--surface, #161a17); }
.plan-col.is-today { border-color: var(--ink, #1c1917); border-width: 2px; }
.plan-col__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 6px; }
.plan-task {
  display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 0; cursor: pointer;
}
.plan-task:hover { background: rgba(30, 91, 75, .06); }
.plan-task input[type="checkbox"] { margin-top: 3px; accent-color: #1E5B4B; }
.plan-task--sm { padding: 6px; border: 1px solid var(--line, #e5e1d8); }
.plan-ring { position: relative; width: 58px; height: 58px; flex: 0 0 auto; }
.plan-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.plan-ring circle { fill: none; stroke-width: 4; }
.plan-ring circle:first-child { stroke: var(--line, #e5e1d8); }
.plan-ring circle:last-child { stroke: #1E5B4B; stroke-linecap: square; }
.plan-ring span {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; font-weight: 700;
}

/* ---- Eğitmen paneli ---------------------------------------------------------- */

.inst-tabs { border-bottom: 1px solid var(--line, #e5e1d8); }
.inst-tabs .sideitem { border-radius: 0; border-bottom: 2px solid transparent; }
.inst-tabs .sideitem.is-active { border-bottom-color: var(--ink, #1c1917); }

.lesson-edit { border: 1px solid var(--line, #e5e1d8); border-radius: 0; }
.lesson-edit > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; cursor: pointer; list-style: none;
}
.lesson-edit > summary::-webkit-details-marker { display: none; }
.lesson-edit[open] > summary { border-bottom: 1px solid var(--line, #e5e1d8); }
.lesson-edit > *:not(summary) { padding: 0 var(--sp-4) var(--sp-4); }
.lesson-edit--new { border-style: dashed; }

/* ============================================================================
   DERS OYNATICI (lp)
   ========================================================================== */

.lp { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg, #faf8f3); }
.lp__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 10px 18px; border-bottom: 1px solid var(--line, #e5e1d8);
  background: var(--surface, #fff); position: sticky; top: 0; z-index: 20;
}
[data-theme="dark"] .lp__bar { background: var(--surface, #161a17); }
.lp__back { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 600; min-width: 0; }
.lp__back:hover { text-decoration: underline; }
.lp__bar-mid { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 480px; }
.lp__prog { flex: 1; height: 6px; border-radius: 0; background: var(--line, #e5e1d8); overflow: hidden; }
.lp__prog-fill { height: 100%; background: #1E5B4B; border-radius: 0; transition: width .4s; }

.lp__wrap { display: flex; gap: 0; flex: 1; align-items: stretch; }
.lp__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lp__side {
  flex: 0 0 320px; border-left: 1px solid var(--line, #e5e1d8); background: var(--surface, #fff);
  position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto;
}
[data-theme="dark"] .lp__side { background: var(--surface, #161a17); }
@media (max-width: 1000px) {
  .lp__side { position: fixed; right: -340px; top: 0; bottom: 0; z-index: 40; transition: right .25s; height: auto; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
  .lp__side.is-open { right: 0; }
}

.lp__stage { background: #0d0f0d; position: relative; }
.lp__stage.is-locked { background: var(--bg, #faf8f3); }
.lp__video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; outline: none; }
.lp__embed, .lp__embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.lp__lock {
  min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--sp-6);
}
.lp__notes { max-width: 760px; margin: 0 auto; padding: var(--sp-6) var(--sp-5); }
.lp__notes-head {
  display: flex; gap: 10px; align-items: center; color: #1E5B4B; font-weight: 700;
  border-bottom: 2px solid var(--ink, #1c1917); padding-bottom: 8px; margin-bottom: var(--sp-4);
}
.lp__notes-body { font-size: 1.02rem; line-height: 1.75; color: var(--ink-soft, #3d3830); }

.lp__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-4); max-width: 980px; margin: 0 auto; width: 100%;
  flex-wrap: wrap;
}
.lp__content { padding: 0 var(--sp-5) var(--sp-5); max-width: 980px; margin: 0 auto; width: 100%; }
.lp__content.ed-body { font-size: .98rem; line-height: 1.75; color: var(--ink-soft, #3d3830); }
.lp__content.ed-body p { margin: 0 0 1em; }
.lp__content.ed-body ul, .lp__content.ed-body ol { margin: 0 0 1em 1.2em; }
.lp__content.ed-body h3, .lp__content.ed-body h4 { margin: 1.2em 0 .4em; color: var(--ink, #1c1917); }
.lp__content.ed-body blockquote { border-left: 3px solid #1E5B4B; padding-left: 14px; margin: 1em 0; font-style: italic; }

.lp__nav {
  display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5) var(--sp-6);
  max-width: 980px; margin: 0 auto; width: 100%; flex-wrap: wrap;
}
.lp__nav-btn {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit;
  border: 1px solid var(--line, #e5e1d8); border-radius: 0; padding: 12px 16px; min-width: 220px;
}
.lp__nav-btn:hover { border-color: var(--ink, #1c1917); }
.lp__nav-btn--next { text-align: right; margin-left: auto; align-items: flex-end; }
.lp__nav-t { font-weight: 700; font-size: .92rem; }

.lp__side-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line, #e5e1d8); position: sticky; top: 0;
  background: var(--surface, #fff); z-index: 2;
}
.lp__sec { padding: 10px 8px; }
.lp__sec-t {
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft, #6b6455);
  padding: 6px 8px; font-weight: 700;
}
.lp__item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 0;
  text-decoration: none; color: var(--ink); font-size: .84rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.lp__item:hover { background: var(--paper-deep); color: var(--ink-strong); }
.lp__item.is-active { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.lp__item.is-active .lp__item-dur { color: color-mix(in srgb, var(--on-primary) 75%, transparent); }
.lp__item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp__item-dur { font-size: .7rem; color: var(--ink-soft); }
.lp__item-lock { color: var(--ink-soft); }

[data-theme="dark"] .lp__item { color: var(--ink); }
[data-theme="dark"] .lp__item:hover { background: var(--surface-raised); color: var(--ink-strong); }
[data-theme="dark"] .lp__item.is-active { background: var(--primary); color: var(--on-primary); }
[data-theme="dark"] .lp__item.is-active .lp__item-dur { color: color-mix(in srgb, var(--on-primary) 75%, transparent); }

/* Mobil: müfredat açma düğmesi */
.lp__side-toggle {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 45;
  border-radius: 0; padding: 12px 18px;
  background: var(--primary); color: var(--on-primary); border: 0; cursor: pointer; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
@media (max-width: 1000px) { .lp__side-toggle { display: inline-flex; gap: 8px; align-items: center; } }

/* ============================================================================
   KİTAP OKUYUCU (rd) — sayfa çevirmeli
   ========================================================================== */

.rd { display: flex; flex-direction: column; min-height: 100vh; background: #2b2926; }
.rd__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 10px 18px; background: #201e1b; color: #e8e6df; position: sticky; top: 0; z-index: 30;
}
.rd__bar--foot { top: auto; bottom: 0; border-top: 1px solid #3a3733; border-bottom: 0; }
.rd__back { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 600; }
.rd__back:hover { text-decoration: underline; }
.rd__tools { display: flex; gap: 6px; }
.rd__tools .icon-btn { color: #e8e6df; }

.rd__stage { flex: 1; display: grid; place-items: center; padding: 26px 16px 90px; position: relative; overflow: hidden; }
.rd__spread { display: flex; align-items: center; gap: 0; width: 100%; max-width: 1150px; position: relative; }

.rd__book {
  display: flex; gap: 0; perspective: 2200px; width: 100%; max-width: 980px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5); border-radius: 0; overflow: hidden;
}
.rd__page {
  flex: 1; min-width: 0; background: #f7f3ea; color: #26231e;
  min-height: 62vh; display: flex; flex-direction: column; position: relative;
}
.rd__spine { width: 2px; background: linear-gradient(90deg, #c9c2b2, #8d866f 45%, #c9c2b2); flex: 0 0 auto; z-index: 2; }
.rd__page-head { padding: 14px 22px 0; min-height: 34px; }
.rd__page-sec { color: #1E5B4B; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .66rem; }
.rd__page-body {
  flex: 1; padding: 8px 26px 18px; overflow-y: auto; font-size: .95rem; line-height: 1.8;
  white-space: pre-wrap; word-break: break-word; max-height: 68vh;
}
.rd__page-body.rd--font-lg { font-size: 1.12rem; line-height: 1.85; }
.rd__page-body.rd--font-xl { font-size: 1.28rem; line-height: 1.9; }
.rd__page-foot { padding: 8px 22px 12px; text-align: center; color: #8d866f; font-size: .72rem; }

/* Sayfa çevirme animasyonu */
@keyframes rd-flip-in { from { transform: rotateY(-9deg); opacity: .25; } to { transform: rotateY(0); opacity: 1; } }
@keyframes rd-flip-in-r { from { transform: rotateY(9deg); opacity: .25; } to { transform: rotateY(0); opacity: 1; } }
.rd__page.is-flipping { animation: rd-flip-in .3s ease-out; transform-origin: left center; }
.rd__page.is-flipping-r { animation: rd-flip-in-r .3s ease-out; transform-origin: right center; }

.rd__edge {
  position: absolute; top: 0; bottom: 0; width: 88px; z-index: 5; border: 0; background: transparent;
  color: rgba(232, 230, 223, .5); cursor: pointer; display: grid; place-items: center;
}
.rd__edge:hover { color: #fff; background: rgba(255,255,255,.04); }
.rd__edge--prev { left: -100px; }
.rd__edge--next { right: -100px; }
@media (max-width: 1250px) { .rd__edge { display: none; } }

.rd__slider { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 560px; }
.rd__slider input[type="range"] { width: 100%; accent-color: #e8e6df; }
.rd__slider .t-caption { color: #b7b2a4; white-space: nowrap; }

.rd__lock { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(24, 22, 19, .82); backdrop-filter: blur(3px); }
.rd__lock[hidden] { display: none; }
.rd__lock-card { background: #f7f3ea; color: #26231e; border-radius: 0; padding: var(--sp-7); text-align: center; max-width: 480px; margin: 0 16px; }

.rd__toc { position: fixed; inset: 0; z-index: 50; }
.rd__toc-back { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.rd__toc-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 92vw);
  background: #f7f3ea; color: #26231e; display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,.35);
}
.rd__toc-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #d8d2c2; }
.rd__toc-body { overflow-y: auto; padding: 8px; flex: 1; }
.rd__toc-item {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 12px;
  background: none; border: 0; border-radius: 0; cursor: pointer; font-size: .88rem; color: inherit;
}
.rd__toc-item:hover { background: rgba(30, 91, 75, .1); }
.rd__toc-no { color: #1E5B4B; font-weight: 700; min-width: 28px; }

.rd__loading { color: #8d866f; text-align: center; padding: 40px 0; font-size: .85rem; }

/* Mobil: tek sayfa */
@media (max-width: 860px) {
  .rd__spine { display: none; }
  .rd__book { max-width: 620px; }
  .rd__page-body { max-height: 56vh; font-size: .92rem; }
}

/* ---- Kabul onay kutusu ------------------------------------------------------ */
input[type="checkbox"], input[type="radio"] { accent-color: #1E5B4B; }

/* ---- Bildirim zili açılır listesi -------------------------------------------- */

.notifdrop {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, 92vw);
  background: var(--surface, #fff); border: 1px solid var(--line, #e5e1d8); border-radius: 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16); z-index: 60; display: none; overflow: hidden;
}
.notifdrop[data-theme="dark"] { background: var(--surface, #161a17); }
.notifdrop.is-open { display: block; }
.notifdrop__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line, #e5e1d8);
}
.notifdrop__list { max-height: 380px; overflow-y: auto; }
.notifdrop__item {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; text-decoration: none;
  color: inherit; border-bottom: 1px solid var(--line, #e5e1d8); font-size: .84rem;
}
.notifdrop__item:last-child { border-bottom: 0; }
.notifdrop__item:hover { background: rgba(30, 91, 75, .06); }
.notifdrop__item.is-unread { border-left: 3px solid #1E5B4B; background: rgba(30, 91, 75, .05); }
.notifdrop__t { font-weight: 650; }
[data-theme="dark"] .notifdrop { background: var(--surface, #161a17); }
.notifdrop.is-open { display: block; }
.notifdrop__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line, #e5e1d8);
}
.notifdrop__list { max-height: 380px; overflow-y: auto; }
.notifdrop__item {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; text-decoration: none;
  color: inherit; border-bottom: 1px solid var(--line, #e5e1d8); font-size: .84rem;
}
.notifdrop__item:last-child { border-bottom: 0; }
.notifdrop__item:hover { background: rgba(30, 91, 75, .06); }
.notifdrop__item.is-unread { border-left: 3px solid #1E5B4B; background: rgba(30, 91, 75, .05); }
.notifdrop__t { font-weight: 650; }
