/* Venom Fight Club — gündüz renkleri :root'ta, gece renkleri html.dark altında */
:root {
  --bg: #f4f4f5; --card: #fff; --text: #18181b; --muted: #71717a; --soft: #52525b;
  --line: #e4e4e7; --chip: #f4f4f5; --ring: rgba(0, 0, 0, .06); --timeline: #fafafa;
  --lime: #a3e635; --lime-text: #4d7c0f; --rose: #fb7185; --rose-text: #e11d48;
}
html.dark {
  --bg: #000; --card: #18181b; --text: #f4f4f5; --muted: #a1a1aa; --soft: #d4d4d8;
  --line: #27272a; --chip: #27272a; --ring: rgba(255, 255, 255, .06); --timeline: rgba(0, 0, 0, .3);
  --lime-text: #a3e635; --rose-text: #fb7185;
}

* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1 { font-size: 1.25rem; font-weight: 600; }

.wrap { max-width: 28rem; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; min-height: 100vh; }
.stack > * + * { margin-top: 1rem; }

.card { background: var(--card); border-radius: 1rem; padding: 1rem; box-shadow: 0 0 0 1px var(--ring); }
.card h2 { font-size: .875rem; font-weight: 500; color: var(--muted); margin-bottom: .75rem; }
.muted { color: var(--muted); }
.pos { color: var(--lime-text); }
.neg { color: var(--rose-text); }

/* Üst bar + menü */
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.top small { font-size: .75rem; color: var(--muted); }
.logo { height: 3.5rem; width: auto; display: block; }
html.dark .logo { filter: invert(1); }
.menu { position: relative; }
.avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--lime); color: #000; font-weight: 700; display: grid; place-items: center; }
.backdrop { position: fixed; inset: 0; z-index: 10; }
.pop { position: absolute; right: 0; z-index: 20; margin-top: .5rem; width: 14rem; background: var(--card); border-radius: 1rem; padding: .75rem; font-size: .875rem; box-shadow: 0 10px 25px rgba(0, 0, 0, .2), 0 0 0 1px var(--ring); }
.label { font-size: .75rem; font-weight: 500; color: var(--muted); margin-bottom: .5rem; }
.label.sub { font-weight: 400; margin-bottom: .375rem; }
.linklist { background: var(--chip); border-radius: .75rem; overflow: hidden; margin-bottom: .75rem; }
.linklist a { display: flex; justify-content: space-between; padding: .625rem .75rem; font-weight: 500; }
.linklist a + a { border-top: 1px solid var(--line); }
.seg { display: flex; gap: .25rem; background: var(--chip); border-radius: .75rem; padding: .25rem; }
.seg button { flex: 1; padding: .375rem 0; border-radius: .5rem; font-size: .75rem; font-weight: 500; color: var(--soft); }
.seg button.on { background: var(--lime); color: #000; }
.seg button.on.gider { background: #f43f5e; color: #fff; }

/* Özet kutuları */

/* Grafikler */
svg { width: 100%; display: block; }
.trainer { margin-bottom: .75rem; }
.trainer:last-child { margin-bottom: 0; }
.row { display: flex; justify-content: space-between; font-size: .75rem; margin-bottom: .25rem; }
.track { height: .5rem; border-radius: 9999px; background: var(--line); }
.fill { height: 100%; border-radius: 9999px; background: var(--lime); }
.head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.head h2 { margin: 0; }
.legend { display: flex; gap: .75rem; font-size: 10px; color: var(--muted); }
.legend i { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .25rem; }
.bars { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; height: 9rem; }
.bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.pair { display: flex; align-items: flex-end; justify-content: center; gap: .25rem; height: 7rem; width: 100%; }
.pair i { flex: 1; display: block; border-radius: .25rem .25rem 0 0; }
.i-in { background: var(--lime); }
.i-out { background: var(--rose); }
.bcol span { font-size: 10px; color: var(--muted); }

/* Ajanda takvimi */
.agenda { touch-action: pan-y; min-height: 34rem; }
.nav { display: flex; align-items: center; gap: .5rem; }
.arrow { width: 2rem; height: 2rem; border-radius: 50%; background: var(--chip); display: grid; place-items: center; color: var(--soft); }
.range { min-width: 6rem; text-align: center; font-size: .75rem; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; margin-bottom: .75rem; }
.day { display: flex; flex-direction: column; align-items: center; border-radius: .75rem; padding: .5rem 0; background: var(--chip); color: var(--soft); }
.day.sel { background: var(--lime); color: #000; }
.day.today:not(.sel) { box-shadow: 0 0 0 1px #84cc16; }
.day small { font-size: 10px; opacity: .7; }
.day b { font-size: .875rem; }
.day em { font-style: normal; font-size: 9px; opacity: .7; }
.tlwrap { position: relative; }
.tl { max-height: 26rem; overflow-y: auto; border-radius: .75rem; background: var(--timeline); padding: .5rem 0; touch-action: pan-y; }
.tlin { position: relative; }
.hour { position: absolute; left: 0; right: 0; display: flex; align-items: flex-start; }
.hour span { width: 3rem; transform: translateY(-6px); padding-right: .5rem; text-align: right; font-size: 10px; color: #71717a; }
.hour div { flex: 1; border-top: 1px solid var(--line); }
.evs { position: absolute; top: 0; bottom: 0; left: 3rem; right: .5rem; }
.ev { position: absolute; overflow: hidden; border-radius: .5rem; border-left: 4px solid; padding: .25rem .5rem; }
.ev b, .ev small { display: block; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev b { font-size: .75rem; font-weight: 600; }
.ev small { font-size: 10px; color: var(--soft); }
.c-pilates { border-color: #ec4899; background: rgba(236, 72, 153, .15); }
.c-yoga { border-color: #10b981; background: rgba(16, 185, 129, .15); }
.c-crossfit { border-color: #f97316; background: rgba(249, 115, 22, .15); }
.c-boks { border-color: #ef4444; background: rgba(239, 68, 68, .15); }
.c-spinning { border-color: #0ea5e9; background: rgba(14, 165, 233, .15); }
.c-fitness { border-color: #8b5cf6; background: rgba(139, 92, 246, .15); }
.now { position: absolute; left: 0; right: 0; z-index: 5; display: flex; align-items: center; pointer-events: none; }
.now span { width: 3rem; padding-right: .25rem; text-align: right; font-size: 10px; font-weight: 600; color: #f43f5e; }
.now i { width: .5rem; height: .5rem; border-radius: 50%; background: #f43f5e; margin-left: -.25rem; }
.now div { flex: 1; height: 1px; background: #f43f5e; }
.reset { position: absolute; bottom: .5rem; right: .75rem; z-index: 6; background: rgba(24, 24, 27, .8); color: #fff; font-size: 11px; padding: .25rem .75rem; border-radius: 9999px; backdrop-filter: blur(4px); }

/* Bütçem sayfası */
.back { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 1.125rem; box-shadow: 0 0 0 1px var(--ring); }
.list { padding: 0; }
.list p { padding: 1rem; font-size: .875rem; color: var(--muted); }
.tx { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.tx:first-child { border-top: 0; }
.tx > i { width: .625rem; height: .625rem; border-radius: 50%; flex: none; }
.tx .main { flex: 1; min-width: 0; }
.tx .main b { display: block; font-size: .875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx small { font-size: .75rem; color: var(--muted); }
.tx .amt { font-size: .875rem; font-weight: 600; }
.del { color: #a1a1aa; padding: .25rem; }
.fab { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 10; background: var(--lime); color: #000; font-weight: 600; font-size: .875rem; padding: .75rem 1.5rem; border-radius: 9999px; box-shadow: 0 10px 20px rgba(0, 0, 0, .25); }
.sheetbg { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .5); }
.sheet { width: 100%; max-width: 28rem; background: var(--card); border-radius: 1.5rem 1.5rem 0 0; padding: 1.25rem; }
.sheet > * + * { margin-top: .75rem; }
.field { display: block; width: 100%; border: 0; outline: 0; background: var(--chip); color: var(--text); border-radius: .75rem; padding: .625rem .75rem; font: inherit; font-size: .875rem; }
.primary { width: 100%; background: var(--lime); color: #000; font-weight: 600; border-radius: .75rem; padding: .75rem; font-size: .875rem; }

/* Tablet: iki sütun */
@media (min-width: 768px) {
  .wrap { max-width: 56rem; padding: 2rem 1.5rem 3rem; }
  .dash {
    display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "agenda agenda" "trainers money";
  }
  .dash > * { margin: 0; }
  .agenda { grid-area: agenda; }
  .c-trainers { grid-area: trainers; }
  .c-money { grid-area: money; }
  .tl { max-height: 32rem; }
  .logo { height: 4rem; }
  .sheetbg { align-items: center; }
  .sheet { max-width: 26rem; border-radius: 1.5rem; }
}

/* Masaüstü: takvim solda geniş, özetler sağda, grafikler altta */
@media (min-width: 1100px) {
  .wrap { max-width: 82rem; padding: 2rem 2.5rem 3rem; }
  .dash {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "agenda agenda agenda agenda agenda agenda agenda agenda trainers trainers trainers trainers"
      "agenda agenda agenda agenda agenda agenda agenda agenda money money money money";
  }
  .tl { max-height: 40rem; }
  .logo { height: 4.5rem; }
}

/* Bütçem ekranı */
#budget { padding-bottom: 5rem; }
.bhead { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.mnav { display: flex; align-items: center; gap: .375rem; margin-left: auto; }
.mnav span { min-width: 6.5rem; text-align: center; font-size: .8125rem; font-weight: 500; }
.btn { display: none; background: var(--lime); color: #000; font-weight: 600; font-size: .875rem; padding: .625rem 1.125rem; border-radius: 9999px; }
.bkpis { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.bkpis small { font-size: .75rem; color: var(--muted); }
.bkpis b { display: block; font-size: 1.375rem; font-weight: 600; margin: .25rem 0 .125rem; }
.bkpis p { font-size: .6875rem; line-height: 1.4; }
.dl { color: var(--muted); }
.gl { stroke: var(--line); stroke-width: 1; }
.zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.yl, .xl { fill: #71717a; font-size: 8px; }
.xl { font-size: 9px; }
.xl.on { fill: var(--text); font-weight: 600; }
.vl { fill: var(--text); font-size: 9px; font-weight: 600; }
.bi { fill: var(--lime); }
.be { fill: var(--rose); }
.netln { fill: none; stroke: #8b5cf6; stroke-width: 2; stroke-linejoin: round; }
.netdot { fill: #8b5cf6; stroke: var(--card); stroke-width: 1.5; }
.flowarea { fill: rgba(163, 230, 53, .18); }
.flowln { fill: none; stroke: var(--lime); stroke-width: 2.5; stroke-linejoin: round; }
.donutwrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.donut { width: 9.5rem; height: 9.5rem; flex: none; }
.dc1 { font-size: 15px; font-weight: 600; fill: var(--text); }
.dc2 { font-size: 7px; fill: #71717a; }
.lgl { flex: 1; min-width: 11rem; }
.lg { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; padding: .3rem 0; }
.lg i { width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
.lg b { margin-left: auto; font-weight: 600; }
.lg em { width: 2.5rem; text-align: right; color: var(--muted); font-style: normal; }
.empty { padding: 1rem 0; font-size: .875rem; color: var(--muted); }
.b-list { padding: 0; }
.lhead { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: 1rem; border-bottom: 1px solid var(--line); }
.lhead h2 { margin: 0; }
.fseg { width: 15rem; max-width: 100%; }
@media (min-width: 768px) {
  .btn { display: block; }
  .fab { display: none; }
  .bkpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bkpis b { font-size: 1.625rem; }
  .bgrid {
    display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "kpis kpis" "bars bars" "donut src" "flow flow" "list list";
  }
  .bgrid > * { margin: 0; }
  #kpis { grid-area: kpis; }
  .b-bars { grid-area: bars; }
  .b-donut { grid-area: donut; }
  .b-src { grid-area: src; }
  .b-flow { grid-area: flow; }
  .b-list { grid-area: list; }
}
@media (min-width: 1100px) {
  .bgrid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis"
      "bars bars bars bars bars bars bars bars donut donut donut donut"
      "flow flow flow flow flow flow flow flow src src src src"
      "list list list list list list list list list list list list";
  }
}

/* Aboneler ekranı */
#subs { padding-bottom: 5rem; }
.small { font-size: .75rem; }
.sheet { max-height: 92vh; overflow-y: auto; }
.sh-title { font-size: 1rem; font-weight: 600; }
.av { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; color: #fff; font-size: .8125rem; font-weight: 600; }
.av.lg { width: 4.5rem; height: 4.5rem; font-size: 1.375rem; }
.ginfo { flex: 1; min-width: 0; }
.ginfo b { display: block; font-size: .875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ginfo small { display: block; font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--line); cursor: pointer; }
.ur { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex: none; }
.pay-btn { background: var(--lime); color: #000; font-size: .75rem; font-weight: 600; padding: .375rem .75rem; border-radius: 9999px; flex: none; }
.s-list { padding: 0; }
.s-list .lhead > h2 { width: 100%; }
.s-list .lhead .field { flex: 1; min-width: 10rem; }
.mrow:first-child { border-top: 0; }
.badge { font-size: .6875rem; font-weight: 600; padding: .125rem .5rem; border-radius: 9999px; display: inline-block; }
.bd-late { background: rgba(244, 63, 94, .15); color: var(--rose-text); }
.bd-soon { background: rgba(245, 158, 11, .18); color: #b45309; }
.bd-ok { background: rgba(132, 204, 22, .18); color: var(--lime-text); }
html.dark .bd-soon, html.dark .due-soon { color: #fbbf24; }
.due-late { color: var(--rose-text) !important; }
.due-soon { color: #b45309 !important; }
.photo-panel { display: flex; align-items: center; gap: 1rem; }
.ph-prev { width: 5rem; height: 5rem; border-radius: 50%; background: var(--chip); color: var(--muted); display: grid; place-items: center; overflow: hidden; flex: none; }
.ph-prev img { width: 100%; height: 100%; object-fit: cover; }
.ph-btns { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.ph-btns.row { flex-direction: row; }
.ghost { background: var(--chip); border-radius: 9999px; padding: .4rem .9rem; font-size: .8125rem; font-weight: 500; }
.ghost.danger { color: var(--rose-text); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.lbl { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .25rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.sheet-actions { display: flex; gap: .5rem; }
.sheet-actions > * { flex: 1; }
.secondary { background: var(--chip); border-radius: .75rem; padding: .75rem; font-size: .875rem; font-weight: 500; }
.dangerbtn { color: var(--rose-text); }
.detail-head { display: flex; align-items: center; gap: 1rem; }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; background: var(--chip); border-radius: .75rem; padding: .75rem; }
.info small { display: block; font-size: .6875rem; color: var(--muted); }
.info b { font-size: .8125rem; font-weight: 500; }
.hist { max-height: 9rem; overflow-y: auto; }
.hrow { display: flex; justify-content: space-between; gap: .5rem; font-size: .8125rem; padding: .375rem 0; border-top: 1px solid var(--line); }
.hrow:first-child { border-top: 0; }
.s-add { display: none; }
.s-add > h2 { margin-bottom: 1rem; }
.addform .fsec { border: 0; padding: 0; margin: 0; min-width: 0; }
.addform .fsec + .fsec { margin-top: 1.25rem; }
.addform .fsec > * + * { margin-top: .75rem; }
.addform legend { padding: 0; margin-bottom: .75rem; font-size: .6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.savebar { position: sticky; bottom: 0; margin-top: 1.25rem; padding: .75rem 0 0; background: linear-gradient(to bottom, transparent, var(--card) 35%); }
#addpage { max-width: 40rem; margin: 0 auto; }
.fab { text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); z-index: 80; background: #18181b; color: #fff; padding: .625rem 1rem; border-radius: 9999px; font-size: .8125rem; max-width: 90vw; text-align: center; }
@media (min-width: 768px) {
  .sgrid {
    display: grid; gap: 1rem; align-items: start; grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "kpis" "list";
  }
  .sgrid > * { margin: 0; }
  #s-kpis { grid-area: kpis; }
  .s-list { grid-area: list; }
  .toast { bottom: 2rem; }
  .ur { flex-direction: row; align-items: center; gap: .75rem; }
}
@media (min-width: 1100px) {
  .sgrid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis"
      "add add add add list list list list list list list list";
  }
  /* Masaüstünde yeni öğrenci formu sol panel olarak sabit durur; daha dar ekranlarda ayrı sayfa (/ogrenci-ekle.php). */
  .s-add { display: block; grid-area: add; position: sticky; top: 1rem; }
  #add-d { display: none; }
}

/* Belgeler: düğmeler, belge ekranı, imza alanı */
.docbtn { display: block; width: 100%; padding: 1rem .875rem; background: var(--chip); border: 1px solid var(--line); border-radius: .75rem; font-size: .875rem; text-align: left; }
/* Izgara düğmenin içindeki span'de: <button> içinde flex her tarayıcıda güvenilir değil. Durum yazısı sabit sütunda, sağa yaslı. */
.dw { display: grid; grid-template-columns: minmax(0, 1fr) 5.75rem 1rem; align-items: center; column-gap: .5rem; }
.dw b { font-weight: 500; }
.dw em { text-align: right; font-style: normal; font-size: .75rem; font-weight: 600; color: #b45309; }
.dw i { text-align: right; font-style: normal; color: var(--muted); }
.docbtn.signed em { color: var(--lime-text); }
html.dark .docbtn em { color: #fbbf24; }
html.dark .docbtn.signed em { color: var(--lime-text); }
.docscreen { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; }
.dochead { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
.dochead h2 { flex: 1; margin: 0; font-size: 1rem; font-weight: 600; }
.docscroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; width: 100%; max-width: 44rem; margin: 0 auto; }
.docpaper { background: #fff; color: #18181b; border-radius: .5rem; padding: 1.25rem; box-shadow: 0 0 0 1px var(--ring); font-size: .875rem; line-height: 1.6; }
.docpaper h3 { font-size: .9375rem; margin: 1rem 0 .25rem; }
.docpaper h3:first-child { margin-top: 0; }
.docpaper p { margin: .25rem 0; }
.docpaper .meta { margin-top: 1rem; font-size: .75rem; color: #52525b; }
.signrow { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 1rem 0 .5rem; }
.signrow .check { flex: 1; align-items: flex-start; }
.sigbox { width: 11rem; height: 6rem; flex: none; display: grid; place-items: center; overflow: hidden; background: #fff; color: #71717a; border: 2px dashed var(--muted); border-radius: .75rem; font-size: .8125rem; }
.sigbox.done { border-style: solid; border-color: var(--lime); }
.sigbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.docfoot { padding: .75rem 1rem; background: var(--card); border-top: 1px solid var(--line); }
.docfoot .primary { display: block; max-width: 44rem; margin: 0 auto; }
.primary:disabled { opacity: .45; }
.sigpad { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; gap: .75rem; padding: 1rem; }
.sigpad > p { text-align: center; font-size: .8125rem; color: var(--muted); }
.sigwrap { position: relative; flex: 1; min-height: 10rem; background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px var(--ring); overflow: hidden; }
.sigwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sigline { position: absolute; left: 1rem; right: 1rem; bottom: 2rem; border-top: 1px solid #d4d4d8; padding-top: .25rem; font-size: .6875rem; color: #a1a1aa; pointer-events: none; }
#print-root { display: none; }
@media print {
  body.printing > :not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; padding: 1.5rem; color: #000; background: #fff; }
  body.printing #print-root h1 { font-size: 1.25rem; margin-bottom: 1rem; }
  body.printing #print-root .docpaper { box-shadow: none; padding: 0; }
  body.printing .printsig { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 2rem; }
  body.printing .printsig small { display: block; font-size: .7rem; color: #555; margin-top: .5rem; }
  body.printing .printsig img { max-height: 5rem; max-width: 14rem; }
}

/* Form alanları: zorunlu işareti, hata mesajı */
.req { color: var(--rose-text); font-weight: 600; }
.err { display: block; margin-top: .25rem; font-size: .75rem; color: var(--rose-text); }
.field.bad { box-shadow: 0 0 0 1.5px var(--rose); }
textarea.field { resize: vertical; min-height: 4.5rem; }
.info .full { grid-column: 1 / -1; }
.info b { overflow-wrap: anywhere; }
.info a { color: inherit; text-decoration: underline; }

/* Gün Belirle: pastel terracotta */
:root { --terra: #e5b29c; --terra-text: #5a2a18; }
.terra { display: block; width: 100%; margin-top: 1.25rem; padding: .8rem; border-radius: .75rem; background: var(--terra); color: var(--terra-text); font-size: .9375rem; text-align: center; }
.terra b { font-weight: 600; }
.terra small { display: block; margin-top: .125rem; font-size: .75rem; font-weight: 500; }
.terra:active { filter: brightness(.95); }
.terra + .savebar { margin-top: .5rem; }

.info b.sl span { display: block; }
.info b.sl em { display: inline-block; min-width: 2.25rem; font-style: normal; font-weight: 600; }

/* Gün Belirle: ajandada boş yerler ve eklenen dersler */
.gap { position: absolute; left: 0; right: 0; display: grid; place-items: center; border: 1.5px dashed var(--muted); border-radius: .5rem; color: var(--muted); font-size: .75rem; font-weight: 500; cursor: pointer; }
.gap:active, .gap:hover { background: rgba(163, 230, 53, .15); border-color: var(--lime); color: var(--lime-text); }
.ev.mine { outline: 2px solid var(--lime); outline-offset: -2px; background-color: rgba(163, 230, 53, .22); }
.c-ozel { border-color: #64748b; background: rgba(100, 116, 139, .15); }
#sch-agenda { min-height: 0; padding: .75rem; }
#sch-agenda .tl { max-height: calc(100vh - 20rem); min-height: 16rem; }
.schhint { margin-bottom: .75rem; }
#sh-lesson { z-index: 55; }

/* Paket(ler): çoklu seçim kutuları */
.pkgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.pk { display: flex; align-items: center; gap: .5rem; padding: .625rem .75rem; background: var(--chip); border-radius: .75rem; font-size: .875rem; cursor: pointer; }
.pk:has(input:checked) { background: rgba(163, 230, 53, .2); box-shadow: 0 0 0 1.5px var(--lime); }

/* Geciken ödemeler penceresi */
.bkpis button.card { width: 100%; text-align: left; color: inherit; cursor: pointer; }
.bkpis button.card:hover { box-shadow: 0 0 0 1.5px var(--rose); }
#sh-late .sheet { max-width: 32rem; }
.llist { display: grid; gap: .75rem; }
.lrow { padding: .75rem; background: var(--chip); border-radius: .75rem; }
.lrow > * + * { margin-top: .5rem; }
.lhd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: .75rem; }
.lhd .amt { font-size: .9375rem; font-weight: 600; }
.lmeta { display: grid; gap: .125rem; font-size: .75rem; color: var(--muted); }
.lmeta a { color: inherit; text-decoration: underline; }
.lact { display: flex; gap: .5rem; }
.lact .ghost { display: inline-block; text-align: center; background: var(--card); }
.lact .pay-btn { margin-left: auto; }

/* Boş / dolu zamanlar penceresi */
#sh-sched .sheet { max-width: 32rem; }
.sdays { display: grid; gap: 1rem; }
.sday h4 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .25rem; font-size: .9375rem; font-weight: 600; }
.sday h4 small { font-size: .75rem; font-weight: 500; color: var(--muted); }
.srow { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
.srow b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sday .empty { padding: .5rem 0; }

/* Gruplar: liste panelleri, grup seçimi, grup üyeleri */
.gpanel { margin: .75rem; overflow: hidden; border-radius: 1rem; box-shadow: 0 0 0 1.5px var(--lime); }
.ghead { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: .5rem; padding: .75rem 1rem; background: rgba(163, 230, 53, .16); }
.ghead .ginfo { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .ghead { grid-template-columns: minmax(0, 1fr) auto auto; }
  .ghead .ginfo { grid-column: auto; }
}
.ghead .ghost { background: var(--card); }
.gempty { padding: 1rem; }
.s-list .grp { margin: 1rem 1rem .25rem; font-size: .6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.gnew { margin-left: auto; }
.s-list .lhead > h2 { display: flex; align-items: center; gap: .5rem; }
.gsel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.gmrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.gmrow:first-child { border-top: 0; }
#sh-gmem .sheet { max-width: 32rem; }
#sh-gmem .field { margin-bottom: .5rem; }
.info select.field { background: var(--card); margin-top: .25rem; }

/* Hoca bazlı boş süre */
.bkpis .trs { margin-top: .375rem; font-size: .625rem; line-height: 1.5; color: var(--text); }
.bkpis .trs span { display: inline-block; margin-right: .5rem; white-space: nowrap; font-weight: 700; } /* hoca adı ve boş süre: koyu ve kalın */
.trblock { margin-bottom: 1rem; }
.trblock .srow:first-of-type { border-top: 0; }
.trblock .srow b { font-weight: 700; color: var(--text); }
.trblock .fv { font-weight: 700; color: var(--text); }

/* Ders penceresi (ana sayfa) ve iptal/erteleme görünümü */
.ev { cursor: pointer; }
.ev.cancelled { opacity: .5; }
.ev.cancelled b { text-decoration: line-through; }
.ev.moved { opacity: .55; }
.ev.moved b { font-style: italic; }
.ev.movedin { outline: 1.5px dashed var(--muted); outline-offset: -2px; }
#sh-lp .sheet { max-width: 32rem; }
.plist { display: grid; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.pgroup { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: .5rem; padding: .625rem .75rem; margin-top: .5rem; background: rgba(163, 230, 53, .16); border-radius: .75rem; }
.pgroup + .prow { border-top: 0; }
.lpact { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem; }
.opt { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.dangerfill { background: #f43f5e; color: #fff; }

/* Ana sayfa Gelir / Gider kartı ve ayrıntı penceresi */
.pair button { flex: 1; display: block; min-height: 2px; padding: 0; border: 0; border-radius: .25rem .25rem 0 0; cursor: pointer; }
.pair button:hover { filter: brightness(.92); }
.legend-btns button { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .5rem; border-radius: 9999px; background: var(--chip); font-size: 11px; color: var(--soft); cursor: pointer; }
.legend-btns b { color: var(--text); font-weight: 700; }
#sh-cash .sheet { max-width: 32rem; }
.cbig { font-size: 1.75rem; font-weight: 700; }
.cats2 { margin: .5rem 0 1rem; }
.cat { border-top: 1px solid var(--line); }
.cat summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 2.75rem; align-items: center; column-gap: .5rem; padding: .625rem 0; font-size: .875rem; cursor: pointer; list-style: none; }
.cat summary::-webkit-details-marker { display: none; }
.cat summary .muted { text-align: right; font-size: .75rem; }
.cname i { display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%; }
.cbar { height: .25rem; margin-bottom: .375rem; border-radius: 9999px; background: var(--line); }
.cbar div { height: 100%; border-radius: 9999px; }
.citem { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; column-gap: .5rem; padding: .25rem 0; font-size: .8125rem; }
