/* Ders takvimi, yoklama, giriş kontrol (D) */

/* ------------------------------------------------------------ Takvim */
.sch-toolbar .segmented button { white-space: nowrap; }
.sch-range { font-size: 14.5px; margin-left: 6px; white-space: nowrap; }
.sch-card { overflow: hidden; }
.sch-scroll { overflow: auto; max-height: calc(100vh - 230px); min-height: 360px; }
.sch-cal { min-width: calc(56px + var(--cols) * 120px); }
.sch-cal-head {
  display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); position: sticky; top: 0; z-index: 4;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.sch-day-head { display: flex; flex-direction: column; align-items: center; padding: 8px 0; cursor: pointer; border-left: 1px solid var(--border); line-height: 1.2; }
.sch-day-head span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sch-day-head strong { font-size: 18px; }
.sch-day-head:hover { background: var(--surface-2); }
.sch-day-head.is-today strong { background: var(--primary); color: #fff; border-radius: 999px; min-width: 30px; text-align: center; padding: 0 6px; }
.sch-cal-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); position: relative; }
.sch-hours { position: relative; }
.sch-hour { position: relative; border-top: 1px solid transparent; }
.sch-hour span { position: absolute; top: -8px; right: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sch-hour:first-child span { top: 2px; }
.sch-col {
  position: relative; border-left: 1px solid var(--border); cursor: copy;
  background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px);
}
.sch-col.is-today { background-color: rgba(37, 99, 235, .035); }
.sch-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.sch-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.sch-ev {
  position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 0; overflow: hidden; text-align: left;
  padding: 3px 6px; border: 0; border-left: 3px solid var(--c); border-radius: 6px; cursor: pointer; font: inherit; font-size: 12px; line-height: 1.3;
  background: color-mix(in srgb, var(--c) 14%, white); color: var(--text);
}
.sch-ev:hover { background: color-mix(in srgb, var(--c) 24%, white); z-index: 5; box-shadow: var(--shadow); }
.sch-ev-time { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sch-ev-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sch-ev-sub { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sch-ev-badge { position: absolute; top: 3px; right: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; }
.sch-ev.is-cancelled { opacity: .55; background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface) 6px 12px); }
.sch-ev.is-cancelled .sch-ev-title { text-decoration: line-through; }
.sch-empty-note { padding: 10px 16px; border-top: 1px solid var(--border); }

.sch-agenda { display: flex; flex-direction: column; }
.sch-agenda-day { display: flex; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.sch-agenda-day:last-child { border-bottom: 0; }
.sch-agenda-date { width: 64px; flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding-top: 6px; }
.sch-agenda-date strong { font-size: 22px; }
.sch-agenda-date span { font-size: 11.5px; color: var(--muted); }
.sch-agenda-date.is-today strong { color: var(--primary); }
.sch-agenda-item, .att-lesson { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; border-bottom: 1px solid var(--border); }
.sch-agenda-item:hover, .att-lesson:hover { background: var(--surface-2); }
.sch-agenda-item.is-cancelled strong { text-decoration: line-through; color: var(--muted); }
.sch-agenda-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }

/* Ders formu & ayrıntı */
.sch-form-top { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.sch-form-top .segmented button { display: inline-flex; align-items: center; gap: 6px; }
.sch-member { display: flex; align-items: center; background: var(--surface-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sch-weekdays { display: flex; gap: 6px; flex-wrap: wrap; }
.sch-wd { cursor: pointer; }
.sch-wd input { position: absolute; opacity: 0; pointer-events: none; }
.sch-wd span { display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; background: var(--surface); }
.sch-wd input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.sch-wd input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.sch-detail-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sch-detail-date {
  width: 54px; flex: none; text-align: center; border-radius: 10px; padding: 6px 0; line-height: 1.1;
  background: color-mix(in srgb, var(--c, var(--primary)) 14%, white); border-left: 4px solid var(--c, var(--primary));
}
.sch-detail-date strong { display: block; font-size: 20px; }
.sch-detail-date span { font-size: 11.5px; color: var(--text-2); text-transform: uppercase; }

/* ------------------------------------------------------------ Yoklama */
.att-list .att-lesson { padding: 12px 16px; }
.att-list .att-lesson:last-child { border-bottom: 0; }
.att-time { display: flex; flex-direction: column; align-items: center; width: 52px; flex: none; line-height: 1.2; font-variant-numeric: tabular-nums; }
.att-time small { color: var(--muted); }
.att-count { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.att-lesson.is-cancelled strong { text-decoration: line-through; color: var(--muted); }
.att-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.att-title { font-size: 20px; }
.att-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.att-sum { display: flex; gap: 6px; flex-wrap: wrap; }
.att-chip { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.att-chip.present { background: var(--success-100); color: #14532d; }
.att-chip.late { background: var(--warning-100); color: #7c2d12; }
.att-chip.excused { background: var(--info-100); color: #0c4a6e; }
.att-chip.absent { background: var(--danger-100); color: #991b1b; }
.att-chip.none { background: var(--neutral-100); color: var(--text-2); }
.att-rows { display: flex; flex-direction: column; }
.att-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.att-row:last-child { border-bottom: 0; }
.att-row.is-present { background: color-mix(in srgb, var(--success-50) 70%, transparent); }
.att-row.is-absent { background: color-mix(in srgb, var(--danger-50) 70%, transparent); }
.att-who { color: inherit; text-decoration: none !important; flex: 1 1 200px; min-width: 0; }
.att-health { color: var(--danger); display: inline-grid; }
.att-btns { display: inline-flex; flex: none; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; background: var(--surface); }
.att-btn { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; cursor: pointer; color: var(--text-2); min-width: 64px; }
.att-btn + .att-btn { border-left: 1px solid var(--border); }
.att-btn:hover:not(:disabled) { background: var(--surface-3); }
.att-btn:disabled { cursor: default; opacity: .7; }
.att-btn.present.on { background: var(--success); color: #fff; }
.att-btn.late.on { background: #d97706; color: #fff; }
.att-btn.excused.on { background: var(--info); color: #fff; }
.att-btn.absent.on { background: var(--danger); color: #fff; }
.att-note { flex: 1 1 140px; max-width: 240px; min-width: 120px; width: auto; }
@media (max-width: 560px) { .att-btn { min-width: 0; padding: 8px 9px; } .att-note { max-width: none; } }
.att-rate { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.att-rate .progress { flex: 1; }

/* ------------------------------------------------------------ Giriş kontrol */
.chk-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 16px; align-items: start; }
@media (max-width: 1180px) { .chk-layout { grid-template-columns: minmax(0, 1fr); } }
.chk-search { position: relative; display: flex; align-items: center; }
.chk-search > .icon { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.chk-search .input { height: 58px; font-size: 19px; padding-left: 52px; border-radius: var(--radius-lg); border-width: 2px; box-shadow: var(--shadow-sm); }
.chk-results { overflow: hidden; }
.chk-result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.chk-result:last-child { border-bottom: 0; }
.chk-result .grow { display: flex; flex-direction: column; min-width: 0; }
.chk-result small { color: var(--muted); }
.chk-result:hover, .chk-result.is-active { background: var(--primary-50); }
.chk-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.chk-dot.is-allowed { background: var(--success); }
.chk-dot.is-warned { background: #d97706; }
.chk-dot.is-denied { background: var(--danger); }
.chk-eval { border-radius: var(--radius-lg); overflow: hidden; border: 2px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.chk-eval.is-allowed { border-color: var(--success); }
.chk-eval.is-warned { border-color: #d97706; }
.chk-eval.is-denied { border-color: var(--danger); }
.chk-eval-banner { display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 19px; font-weight: 700; color: #fff; }
.chk-eval.is-allowed .chk-eval-banner { background: var(--success); }
.chk-eval.is-warned .chk-eval-banner { background: #d97706; }
.chk-eval.is-denied .chk-eval-banner { background: var(--danger); }
.chk-eval-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chk-person { display: flex; gap: 18px; align-items: center; }
.chk-person-info { min-width: 0; }
.chk-name { font-size: 22px; font-weight: 700; color: var(--text); }
.chk-birthday { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: #fdf2f8; color: #be185d; font-weight: 600; }
.chk-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chk-reasons li { display: flex; gap: 8px; align-items: flex-start; font-weight: 550; }
.chk-reasons li.text-muted { color: var(--muted); }
.chk-lessons { display: flex; flex-direction: column; gap: 3px; }
.chk-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.chk-today { max-height: 70vh; overflow-y: auto; }
