/* Beyza Biyoloji — modern çalışma paneli */
:root {
  --bg: #f8f9ff;
  --surface: #ffffff;
  --surface-2: #eff4ff;
  --surface-3: #e5eeff;
  --ink: #0b1c30;
  --ink-2: #464651;
  --ink-3: #777682;
  --line: #dbe3f6;
  --line-2: #eff4ff;

  --primary: #2f327d;
  --primary-dark: #21245c;
  --primary-soft: #dce9ff;
  --on-primary: #ffffff;

  --good: #006e2f;
  --good-soft: #e3f8ea;
  --warn: #ba1a1a;
  --warn-soft: #ffdad6;
  --blank: #a7b2ab;

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(11, 28, 48, .05);
  --shadow: 0 6px 20px rgba(11, 28, 48, .06);
  --shadow-lg: 0 16px 36px rgba(11, 28, 48, .1);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.5 var(--sans);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  width: 100%;
}

body.noscroll {
  overflow: hidden;
}

#app {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--primary);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

small {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: 0.875rem;
}

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
}

main:focus {
  outline: none;
}

/* ---------- Kabuk ---------- */
/* Tek araç çubuğu: logo | sekmeler | bildirim/avatar — hepsi aynı satırda (bkz. masaüstü notu aşağıda) */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: calc(env(safe-area-inset-top) + 10px) max(28px, calc((100vw - 1600px) / 2)) 10px;
  background: rgba(248, 249, 255, .88);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 8px rgba(11, 28, 48, .05);
}

.brand {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font: 700 1.0625rem/1 var(--head);
  letter-spacing: -.01em;
  min-width: 0;
  margin-right: 10px;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 8px;
  flex: none;
}

nav.tabs {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  background: var(--surface-2);
  border-radius: var(--r);
  padding: 4px;
}

nav.tabs a {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
  position: relative;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color .15s, background .15s;
}

nav.tabs a svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

nav.tabs a:hover {
  color: var(--ink);
  background: var(--surface-3);
}

nav.tabs a.on {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.tabs-links {
  display: contents;
}

.tabs-brand {
  display: none;
}

.bell,
.me {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  flex: none;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, color .15s;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.bell:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.me {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  margin-left: 2px;
}

.me.on {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
}

#badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--warn);
  color: #fff;
  font: 700 11px/18px var(--head);
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px max(28px, calc((100vw - 1600px) / 2)) 40px;
}

.view>*+* {
  margin-top: 14px;
}

.view>.sec {
  margin-top: 28px;
}

.view {
  animation: view-in .35s ease both;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.section-card>.sec {
  margin-bottom: 14px;
}

.section-card>.card {
  box-shadow: none;
  border-color: var(--line-2);
  padding: 16px;
}

.menu-toggle {
  display: none;
}

/* ---------- Tipografi ---------- */
.page-title {
  font: 700 1.6rem/1.2 var(--head);
  color: var(--ink);
  letter-spacing: -.02em;
}

.hello {
  font: 600 1.05rem/1.3 var(--head);
  color: var(--ink-2);
}

.sec {
  font: 700 1.0625rem/1.3 var(--head);
  color: var(--ink);
  letter-spacing: -.01em;
}

.grp-h {
  font: 700 .75rem/1.3 var(--sans);
  color: var(--ink-3);
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.title-row,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.heading-with-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.count-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
}

.intro-copy {
  margin-top: 5px;
}

.crumb {
  font-size: 0.875rem;
}

/* ---------- Bileşenler ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.card.stack {
  width: 100%;
  min-width: 0;
}

.card>*+* {
  margin-top: 10px;
}

.stack>*+* {
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  font-size: 0.9375rem;
}

.btn:active {
  transform: translateY(1px);
}

.btn:hover {
  border-color: var(--ink-3);
}

.btn.primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn.ghost {
  background: transparent;
}

.btn.ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}

.btn.wide {
  width: 100%;
}

.btn.sm {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.875rem;
}

.btn.danger,
.btn.no {
  color: var(--warn);
  border-color: var(--warn-soft);
  background: var(--warn-soft);
}

.btn.danger:hover,
.btn.no:hover {
  background: #f6dccf;
}

.btn.yes {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}

.btn[disabled] {
  opacity: .5;
  cursor: default;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row>.btn {
  flex: 1;
}

.btn-row.wrap {
  flex-wrap: wrap;
}

.btn-row.wrap>.btn {
  flex: 0 1 auto;
}

.link {
  background: none;
  border: 0;
  padding: 4px 2px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link.danger {
  color: var(--warn);
}

.logout {
  margin-top: 24px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}

label>input:not([type=checkbox]):not([type=radio]),
label>select,
label>textarea {
  margin-top: 6px;
}

input:not([type=checkbox]):not([type=radio]),
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 400;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

input[type=checkbox],
input[type=radio] {
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  flex: none;
}

.form-err,
.err {
  color: var(--warn);
  font-size: 0.9375rem;
}

.ok {
  color: var(--good);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 2px 0 4px;
}

.filters select {
  width: auto;
  max-width: min(48vw, 220px);
}

.inline-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.inline-form .btn {
  flex: none;
}

details.more>summary {
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--primary);
  font-weight: 600;
  padding: 4px 0;
}

details.more label {
  margin-top: 10px;
}

.seg {
  display: flex;
  background: var(--line-2);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}

.seg button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  padding: 0 10px;
}

.seg button.on {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.row-between .seg {
  flex: 1 1 200px;
  max-width: 280px;
}

.empty {
  text-align: center;
  padding: 32px 12px;
  color: var(--ink-2);
}

.empty .btn {
  margin-top: 14px;
}

.loading {
  padding: 40px;
  text-align: center;
  color: var(--ink-2);
}

/* ---------- İmza: doğru / yanlış / boş şeridi ---------- */
.strip {
  display: flex;
  gap: 2px;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line-2);
}

.strip.tall {
  height: 13px;
}

.strip i {
  display: block;
  height: 100%;
  min-width: 0;
}

.strip .sd {
  background: var(--good);
}

.strip .sy {
  background: var(--warn);
}

.strip .sb {
  background: var(--blank);
}

.strip.no-data {
  background: var(--line-2);
}

.dyb {
  display: inline-flex;
  gap: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dyb small {
  margin-left: 1px;
  font-weight: 600;
  color: inherit;
  opacity: .75;
  font-size: .72rem;
}

.cd {
  color: var(--good);
}

.cy {
  color: var(--warn);
}

.cb {
  color: var(--ink-3);
}

/* ---------- Ana sayfa ---------- */
.hero {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.hero>*+* {
  margin-top: 12px;
}

.hero-topline,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  color: var(--ink-3);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

.eyebrow-chip {
  margin-bottom: 8px;
}

.status-pill {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--good-soft);
  color: var(--good);
  font-size: .72rem;
  font-weight: 700;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-action,
.task-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.quick-action>span:nth-child(2),
.task-preview-row>span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.quick-action strong,
.task-preview-row strong {
  font-size: .9rem;
}

.quick-action small,
.task-preview-row small {
  color: var(--ink-2);
  font-size: .75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-action>b,
.task-preview-row>b {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 1.25rem;
}

.quick-icon,
.task-preview-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
}

.quick-icon.green,
.task-preview-icon.green {
  background: var(--good-soft);
  color: var(--good);
}

.task-preview {
  display: grid;
  gap: 10px;
}

.task-preview-row {
  border-radius: var(--r-sm);
  box-shadow: none;
}

.task-preview-row>span:nth-child(2) {
  flex: 1;
}

.hero-n {
  font: 800 clamp(2.75rem, 12vw, 3.75rem)/1 var(--head);
  color: var(--ink);
  letter-spacing: -.03em;
}

.hero-n span {
  font: 500 1rem/1.3 var(--sans);
  color: var(--ink-2);
  letter-spacing: 0;
}

.hero-f {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1rem;
}

.todos {
  display: grid;
  gap: 8px;
}

.todo {
  display: block;
  padding: 13px 16px;
  background: var(--primary-soft);
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
  border-left: 3px solid var(--primary);
}

.todo strong {
  color: var(--warn);
}

.week-n strong {
  font: 800 1.5rem/1 var(--head);
  color: var(--ink);
  margin-right: 4px;
  letter-spacing: -.02em;
}

.days {
  display: flex;
  gap: 4px;
  align-items: end;
  padding-top: 6px;
}

.day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.day .col {
  width: 100%;
  height: 52px;
  background: var(--line-2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.day .col i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ink-3);
  border-radius: 4px 4px 0 0;
}

.day.today .col i {
  background: var(--primary);
}

.day .dn {
  font-size: 0.6875rem;
  color: var(--ink-2);
  height: 13px;
  font-variant-numeric: tabular-nums;
}

.day .dl {
  font-size: 0.6875rem;
  color: var(--ink-3);
}

/* ---------- Soru ekle ---------- */
.nums {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.nums input {
  text-align: center;
  padding: 9px 4px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.n-d input {
  border-color: var(--good);
}

.n-d {
  color: var(--good);
}

.n-y input {
  border-color: var(--warn);
}

.n-y {
  color: var(--warn);
}

.n-b input {
  border-color: var(--blank);
}

.calc {
  font-size: 0.875rem;
  color: var(--ink-2);
  min-height: 1.3em;
}

.calc.ok {
  color: var(--good);
  font-weight: 600;
}

.calc.err {
  color: var(--warn);
  font-weight: 600;
}

.ok-card {
  border-color: var(--good);
  background: var(--good-soft);
}

.entries,
.lines,
.topics,
.tasks,
.kcards,
.notifs,
.slist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}

.e-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.e-topic {
  font-weight: 600;
}

.e-meta {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.e-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.875rem;
}

.e-total {
  font: 700 1.0625rem/1 var(--head);
  letter-spacing: -.01em;
}

.icon-btn {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 1.25rem;
  line-height: 1;
  padding: 6px 10px;
  margin: -4px -8px -4px 0;
  cursor: pointer;
  border-radius: 8px;
}

.icon-btn:hover {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ---------- Analiz: sıralı konu listesi ---------- */
.trow {
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  display: grid;
  gap: 8px;
}

.trow+.trow {
  margin-top: 8px;
}

.trow-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rank {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: .8125rem;
  font-weight: 800;
  background: var(--line-2);
  color: var(--ink-2);
}

.rank-weak {
  background: var(--warn-soft);
  color: var(--warn);
}

.rank-good {
  background: var(--good-soft);
  color: var(--good);
}

.rank-master {
  background: var(--primary-soft);
  color: var(--primary);
}

.trow-info {
  flex: 1;
  min-width: 0;
}

.tname {
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.grp {
  background: var(--line-2);
  color: var(--ink-2);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
  font-weight: 600;
  font-size: .75rem;
}

.trow-pct {
  flex: none;
  text-align: right;
}

.trow-pct strong {
  font: 800 1.1875rem/1 var(--head);
  letter-spacing: -.01em;
}

.pct-weak {
  color: var(--warn);
}

.pct-good {
  color: var(--good);
}

.pct-master {
  color: var(--primary);
}

.pct-mid {
  color: var(--ink);
}

.tier-label {
  display: block;
  font-size: .6875rem;
  font-weight: 700;
  margin-top: 2px;
}

.tier-label.tier-weak {
  color: var(--warn);
}

.tier-label.tier-good {
  color: var(--good);
}

.tier-label.tier-master {
  color: var(--primary);
}

.tier-label.tier-mid {
  color: var(--ink-3);
}

.trow-bar {
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line-2);
}

.trow-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.bar-weak {
  background: var(--warn);
}

.bar-good {
  background: var(--good);
}

.bar-master {
  background: var(--primary);
}

.bar-mid {
  background: var(--ink-3);
}

.trow-f {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.trow-f .link {
  margin-left: auto;
}

.group-select {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
}

.group-select select {
  width: auto;
  min-height: auto;
  border: 0;
  background: transparent;
  padding: 0;
  font: 700 .9375rem var(--head);
  color: var(--primary);
}

.pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.pulse-pill strong {
  color: var(--primary);
  font: 800 .9375rem var(--head);
}

.pulse-pill .dot {
  color: var(--ink-3);
}

.analysis-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.analysis-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.analysis-total strong {
  font: 800 2.25rem/1 var(--head);
  color: var(--primary);
  letter-spacing: -.02em;
}

.analysis-total span {
  color: var(--ink-2);
  font-weight: 600;
}

.metric-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .875rem;
  background: var(--line-2);
  color: var(--ink-2);
}

.metric-pill.good {
  background: var(--good-soft);
  color: var(--good);
}

.metric-pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.metric-pill.primary {
  background: var(--primary);
  color: #fff;
}

.metric-pill small {
  font-weight: 600;
  font-size: .75rem;
  opacity: .85;
}

.advice-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: grid;
  gap: 10px;
}

.advice-card .sec {
  color: #fff;
}

.advice-card .small {
  color: #d5d8f7;
}

.advice-card .quick-icon {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.advice-card .btn.primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.summary-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-box strong {
  color: var(--ink);
}

/* ---------- Kartlar ---------- */
.review-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.review-cta>*+* {
  margin-top: 0;
}

.kcards {
  margin-top: 12px;
}

.kli {
  border-bottom: 1px solid var(--line-2);
}

.kcard summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  font-weight: 600;
}

.kcard summary::-webkit-details-marker {
  display: none;
}

.kcard[open] summary {
  color: var(--primary);
  padding-bottom: 6px;
}

.kb {
  padding: 0 0 8px;
  color: var(--ink);
  white-space: pre-wrap;
}

.km {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding-bottom: 14px;
}

.km-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.tag {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 6px;
  padding: 1px 7px;
  font-weight: 600;
  flex: none;
}

.review>*+* {
  margin-top: 16px;
}

.rv-top {
  display: flex;
  justify-content: space-between;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.progress {
  height: 6px;
  background: var(--line-2);
  border-radius: 9px;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--primary);
  transition: width .25s;
}

.flash {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 22px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  box-shadow: var(--shadow);
}

.flash hr {
  border: 0;
  border-top: 1px dashed var(--line);
  width: 100%;
  margin: 0;
}

.rv-front {
  font: 600 1.25rem/1.4 var(--sans);
  white-space: pre-wrap;
}

.rv-back {
  font-size: 1.0625rem;
  color: var(--ink);
  white-space: pre-wrap;
}

.rv-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rv-actions .btn {
  min-height: 50px;
  font-size: 1rem;
}

/* ---------- Öğretmen: Görevler panosu ---------- */
.tasks-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.kpi-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.kpi-banner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.kpi-banner-card {
  background: rgba(255, 255, 255, .1);
  border-radius: var(--r-sm);
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.kpi-banner-card>span {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #c7cbf6;
}

.kpi-banner-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #fff;
}

.kpi-banner-num strong {
  font: 800 1.75rem/1 var(--head);
  letter-spacing: -.02em;
}

.kpi-banner-num small {
  color: #8fe3ab;
  font-weight: 700;
  font-size: .75rem;
}

.tasks-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}

.tasks-side {
  display: grid;
  gap: 16px;
}

.section-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-icon-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.section-icon-head p {
  margin-top: 2px;
}

.item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  transition: background .15s;
}

.item-row:hover {
  background: var(--surface-3);
}

.item-row+.item-row {
  margin-top: 8px;
}

.item-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.0625rem;
}

.item-icon.green {
  background: var(--good-soft);
  color: var(--good);
}

.item-main {
  flex: 1;
  min-width: 0;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.item-title-row strong {
  font-weight: 700;
  color: var(--ink);
}

.item-badge {
  font-size: .6875rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--line-2);
  color: var(--ink-2);
}

.item-badge.soon,
.item-badge.late {
  background: var(--warn-soft);
  color: var(--warn);
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 4px;
  font-size: .8125rem;
  color: var(--ink-2);
}

.item-meta .ok {
  color: var(--good);
  font-weight: 600;
}

.item-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-stat {
  text-align: right;
}

.item-stat strong {
  font: 700 1.0625rem var(--head);
  color: var(--ink);
}

.item-stat small {
  display: block;
  font-size: .6875rem;
  color: var(--ink-3);
}

.item-row-stack {
  flex-direction: column;
  align-items: stretch;
}

.item-row-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.item-progress {
  margin-top: 10px;
}

.goal-row.small {
  font-size: .75rem;
  margin-top: 0;
}

.deadlines {
  display: grid;
  gap: 2px;
}

.deadline-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-radius: var(--r-sm);
}

.deadline-row:hover {
  background: var(--line-2);
}

.deadline-box {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--line-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.deadline-box span:first-child {
  font-size: .625rem;
  font-weight: 700;
  color: var(--ink-3);
}

.deadline-box span:last-child {
  font: 700 1rem var(--head);
  color: var(--ink);
}

.deadline-box.urgent {
  background: var(--warn-soft);
}

.deadline-box.urgent span {
  color: var(--warn);
}

.content-grid {
  grid-template-columns: 5fr 7fr;
}

.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}

.item-row.off {
  opacity: .55;
}

.icon-kpi {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.icon-kpi small {
  display: block;
  color: var(--ink-2);
  font-size: .75rem;
}

.icon-kpi strong {
  font: 800 1.375rem/1.1 var(--head);
  color: var(--ink);
}

.grp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 18px;
  padding: 7px 10px;
  background: var(--surface-2);
  border-radius: 8px;
}

.grp-head .grp-h {
  margin-top: 0;
}

.topic-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.topic-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  transition: background .15s;
}

.topic-row:hover {
  background: var(--surface-3);
}

.topic-row.off {
  opacity: .55;
}

.topic-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.topic-dot.green {
  background: var(--good);
}

.note-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: .8125rem;
  color: var(--ink-2);
  margin-top: 14px;
}

@media (max-width: 900px) {
  .tasks-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 719px) {
  .kpi-banner-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tasks {
  display: grid;
  gap: 10px;
}

.task {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.task>*+* {
  margin-top: 0;
}

.task.done {
  opacity: .65;
}

.task.late {
  border-color: var(--warn);
}

.t-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.t-main p {
  font-size: 0.9375rem;
}

.t-side {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
  flex: none;
}

.link-card {
  text-decoration: none;
  color: inherit;
}

.quiz>*+* {
  margin-top: 14px;
}

.quiz-bar {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 57px);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.qtimer {
  font: 700 1.1875rem/1 var(--head);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -.01em;
}

.qtimer.low {
  color: var(--warn);
}

.qs {
  list-style: decimal;
  padding-left: 1.3em;
  margin: 0;
  display: grid;
  gap: 22px;
}

.qs>li::marker {
  font: 700 1rem var(--sans);
  color: var(--primary);
}

.q {
  padding-left: 4px;
}

.qt {
  font-weight: 600;
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.opts {
  display: grid;
  gap: 8px;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

div.opt {
  cursor: default;
}

.opt b {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--line-2);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
}

.opt span {
  flex: 1;
}

.opt small {
  flex: none;
  align-self: center;
}

.opt.on {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.opt.on b {
  background: var(--primary);
  color: #fff;
}

.opt.right {
  border-color: var(--good);
  background: var(--good-soft);
}

.opt.right b {
  background: var(--good);
  color: #fff;
}

.opt.wrong {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.opt.wrong b {
  background: var(--warn);
  color: #fff;
}

/* ---------- Bildirim, ayar ---------- */
.notifs li a {
  display: grid;
  gap: 2px;
  padding: 13px 4px 13px 14px;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
  color: var(--ink);
  border-left: 3px solid transparent;
}

.notifs li.unread a {
  border-left-color: var(--primary);
}

.notifs time {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.push-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.push-card>*+* {
  margin-top: 0;
}

.who {
  display: grid;
}

.who span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.profile-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.profile-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1.5rem;
  font-weight: 800;
}

.profile-panel .who strong {
  font-size: 1.15rem;
}

.profile-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

.profile-stats span {
  display: grid;
  gap: 2px;
  text-align: center;
}

.profile-stats b {
  color: var(--primary);
  font-size: 1.2rem;
}

.profile-stats small {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Öğretmen ---------- */
.summary {
  background: var(--primary-dark);
  color: #f4f8f6;
  border: 0;
}

.summary .strip {
  background: rgba(255, 255, 255, .16);
}

.summary .strip .sd {
  background: #6ad19a;
}

.summary .strip .sy {
  background: #e3987a;
}

.summary .strip .sb {
  background: rgba(255, 255, 255, .4);
}

.teacher-summary {
  background: linear-gradient(135deg, #2f327d, #181a67);
  padding: 24px;
  box-shadow: 0 16px 32px rgba(24, 26, 103, .2);
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.teacher-summary .eyebrow {
  color: #aeb3f4;
}

.teacher-summary .summary-head p {
  font-size: 1.15rem;
  margin-top: 4px;
}

.teacher-summary .summary-head p strong {
  font-size: 1.55rem;
}

.live-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 14px;
}

.summary-metrics>div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
}

.summary-metrics small,
.summary-metrics span {
  color: #b8bcf5;
  font-size: .75rem;
}

.summary-metrics strong {
  grid-row: 2;
  font-size: 1.8rem;
  line-height: 1;
}

.summary-metrics span {
  grid-row: 2;
  align-self: end;
  margin-left: 5px;
}

.teacher-summary .strip {
  background: rgba(255, 255, 255, .18);
}

.teacher-summary .strip .sd {
  background: #6bff8f;
}

.teacher-summary .strip .sy {
  background: #ffab91;
}

.goal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: .8125rem;
  color: var(--ink-2);
  margin-top: 16px;
}

.goal-row strong {
  color: var(--ink);
  font: 700 .8125rem var(--head);
}

.goal-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line-2);
  margin-top: 6px;
}

.goal-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .4s;
}

.teacher-summary .goal-row {
  color: #c7cbf6;
}

.teacher-summary .goal-row strong {
  color: #fff;
}

.teacher-summary .goal-bar {
  background: rgba(255, 255, 255, .16);
}

.teacher-summary .goal-bar i {
  background: #8fe3ab;
}

.heat-strip {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}

.heat-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.heat-cell .bar {
  width: 100%;
  height: 20px;
  background: var(--line-2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.heat-cell .bar i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
}

.heat-cell small {
  font-size: .625rem;
  color: var(--ink-3);
}

.teacher-summary .heat-cell .bar {
  background: rgba(255, 255, 255, .14);
}

.teacher-summary .heat-cell .bar i {
  background: #8fe3ab;
}

.teacher-summary .heat-cell small {
  color: #aeb3f4;
}

.s-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.student-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 800;
  flex: none;
}

.avatar-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--good);
  border: 2px solid var(--surface);
}

.slist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.srow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

.srow:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.srow>.strip {
  grid-column: 1 / -1;
}

.srow.off {
  opacity: .55;
}

.s-name {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.s-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.search-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin: 2px 0 4px;
}

.icon-field {
  position: relative;
  display: block;
}

.icon-field input,
.icon-field select {
  padding-left: 32px;
}

.icon-field-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .8125rem;
  pointer-events: none;
  color: var(--ink-3);
  z-index: 1;
}

@media (max-width: 719px) {
  .search-filters {
    grid-template-columns: 1fr;
  }
}

.s-nums {
  display: flex;
  gap: 14px;
}

.sn {
  display: grid;
  text-align: center;
  min-width: 38px;
}

.sn b {
  font: 700 1.0625rem/1.2 var(--head);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sn small {
  font-size: 0.6875rem;
}

.foot-actions {
  text-align: center;
  margin-top: 16px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
  display: grid;
  gap: 3px;
  box-shadow: var(--shadow-sm);
}

.kpi strong {
  font: 800 1.625rem/1.1 var(--head);
  color: var(--ink);
  letter-spacing: -.02em;
}

.kpi span {
  font-size: 0.75rem;
  color: var(--ink-2);
}

.kpi .strip {
  margin-top: 4px;
}

.lines li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}

.lines li.off>span:first-child {
  text-decoration: line-through;
  opacity: .6;
}

.lines li.pending small {
  color: var(--warn);
}

.lines li>span:last-child,
.lines li>small {
  text-align: right;
  flex: none;
}

.line-actions {
  display: flex;
  gap: 12px;
}

.note {
  display: block;
  font-style: italic;
}

.targets {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin: 0;
  min-width: 0;
}

.targets legend {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--ink-2);
  padding: 0 6px;
}

.radio,
.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--ink);
  font-size: 1rem;
  padding: 6px 0;
}

.radio span,
.chk span {
  min-width: 0;
}

.pick {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.pick-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 4px 10px;
}

.preview {
  font-size: 0.9375rem;
}

.preview ul {
  margin: 6px 0 0;
  padding-left: 1.2em;
  color: var(--warn);
}

.creds table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.creds th,
.creds td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line-2);
}

.creds .warn {
  color: var(--warn);
  font-weight: 600;
  font-size: 0.9375rem;
}

.pw {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--ink);
  margin: 6px 0;
  letter-spacing: -.01em;
}

/* ---------- Giriş ---------- */
.login {
  max-width: 460px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 42px) 24px 40px;
  display: grid;
  gap: 18px;
}

.login-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  justify-self: center;
  border-radius: 20px;
  filter: drop-shadow(0 10px 16px rgba(16, 33, 23, .1));
}

.login form {
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px;
  box-shadow: var(--shadow);
}

.login form label+label {
  margin-top: 20px;
}

.login form input {
  min-height: 52px;
  font-size: 1rem;
}

.login .btn.primary {
  min-height: 54px;
  margin-top: 18px;
  font-size: 1rem;
}

.login-switch {
  justify-self: center;
  margin-top: 18px;
}

/* ---------- Modal, toast ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16, 24, 19, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 22px 20px calc(env(safe-area-inset-bottom) + 24px);
  animation: up .2s ease-out;
}

.sheet h2 {
  font: 700 1.1875rem/1.3 var(--head);
  margin-bottom: 12px;
  padding-right: 36px;
  color: var(--ink);
  letter-spacing: -.01em;
}

.sheet .x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--line-2);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-2);
}

@keyframes up {
  from {
    transform: translateY(24px);
    opacity: .4;
  }
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  transform: translate(-50%, 20px);
  z-index: 60;
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  max-width: min(90vw, 460px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  text-align: center;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#toast.err {
  background: var(--warn);
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 720px) {
  header.top {
    min-height: 62px;
  }

  main {
    min-width: 0;
  }

  .view {
    width: 100%;
  }

  .sheet {
    border-radius: var(--r-lg);
    margin-bottom: 6vh;
    align-self: center;
  }

  .overlay {
    align-items: center;
  }
}

@media (max-width: 719px) {
  header.top {
    padding-left: 16px;
    padding-right: 16px;
  }

  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    flex: 1 1 auto;
    margin-right: 0;
  }

  .menu-toggle {
    display: grid;
    place-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 8px;
    border: 0;
    border-radius: var(--r-sm);
    background: var(--line-2);
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s, opacity .2s;
  }

  .menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Masaüstünde sekmeler header içinde satır halinde; burada üstten çıkan çekmeceye dönüşür */
  nav.tabs {
    position: fixed;
    z-index: 40;
    top: 0;
    right: 0;
    left: auto;
    width: min(80%, 300px);
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0 10px 24px;
    border: 0;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s ease;
    box-shadow: var(--shadow-lg);
  }

  .menu-open nav.tabs {
    transform: translateX(0);
    visibility: visible;
  }

  nav.tabs a {
    height: 48px;
    justify-content: flex-start;
    padding: 0 14px;
    font-size: 0.9375rem;
  }

  .tabs-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -10px 10px;
    padding: calc(env(safe-area-inset-top) + 18px) 16px 16px;
    border-bottom: 1px solid var(--line-2);
    font: 700 1rem/1.2 var(--head);
    color: var(--ink);
    letter-spacing: -.01em;
  }

  .tabs-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 8px;
    flex: none;
  }

  .nav-backdrop {
    visibility: hidden;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(13, 20, 16, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
  }

  .menu-open .nav-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .summary-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-metrics {
    gap: 6px;
  }

  .summary-metrics>div {
    padding: 10px;
    display: block;
  }

  .summary-metrics strong {
    display: block;
    margin-top: 5px;
  }

  .summary-metrics span {
    display: block;
    margin: 3px 0 0;
  }

  .card.stack {
    width: 100%;
    max-width: none;
  }

  .targets {
    width: 100%;
  }

  .radio,
  .chk {
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .nums {
    gap: 5px;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media print {

  header.top,
  nav.tabs,
  .noprint,
  form,
  .page-title,
  .crumb,
  #toast,
  .foot-actions {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main {
    padding: 0;
    max-width: none;
  }

  .card {
    border: 0;
    padding: 0;
  }

  .creds th,
  .creds td {
    border-bottom: 1px solid #999;
    padding: 10px 8px;
    font-size: 13pt;
  }
}

/* ---------- Mesajlaşma (Sohbet) UI ---------- */
.chat-container {
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: calc(100dvh - 58px);
  background: #efeae2;
  display: flex;
  flex-direction: column;
  z-index: 15;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex: none;
}

.chat-header h2 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 5%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: #efeae2;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  width: fit-content;
}

.msg-me {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-them {
  align-self: flex-start;
  align-items: flex-start;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
  box-shadow: var(--shadow-sm);
}

.msg-me .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-them .msg-bubble {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.msg-time {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.chat-input-row {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  flex: none;
  align-items: center;
}

.chat-input-row input[type="text"] {
  flex: 1 1 auto;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  font-size: 0.95rem;
  background: var(--surface-2);
  min-width: 0;
  outline: none;
  transition: all .3s;
}

.chat-input-row input[type="text"]:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.chat-input-row button {
  padding: 12px 24px;
  border-radius: 24px;
  flex: none;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------- Modern Materyaller UI ---------- */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.material-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.material-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.material-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--green, #22c55e));
}

.material-icon {
  font-size: 2.2rem;
  line-height: 1;
  background: var(--surface-2);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.material-content {
  flex: 1;
}

.material-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.material-meta {
  font-size: 0.9rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.material-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* Mobile Table Fix */
.card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  min-width: 600px;
}
.tabs-links { flex-wrap: wrap; justify-content: center; }


/* Mobile Nav Scroll */
.tabs-links {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start !important;
}
.tabs-links::-webkit-scrollbar { display: none; }
body, p, div, span, .card { word-break: break-word; overflow-wrap: break-word; }

/* Sonradan eklenen ekranların kullandığı adlar (ana paletin takma adları) */
:root {
  --danger: var(--warn);
  --red: var(--warn);
  --border: var(--line);
  --text: var(--ink);
  --text-muted: var(--ink-3);
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--ink-2);
}
.badge-green { background: var(--good-soft); color: var(--good); }
.badge-yellow { background: #fff1cc; color: #7a4d00; }
.p0 { padding: 0; }

/* ------------------------------------------------------------------ Alt menü (bir sekmenin alt sayfaları) */
.subnav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
}
.subnav a:hover { border-color: var(--primary); color: var(--primary); }
.subnav a.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.subnav a b {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warn);
  color: #fff;
  font-size: .6875rem;
  line-height: 20px;
  text-align: center;
}

/* ------------------------------------------------------------------ Durum etiketleri */
.item-badge.ok { background: var(--good-soft); color: var(--good); }
.item-badge.wait { background: #fff1cc; color: #7a4d00; }
.item-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* Düğmeleri olan satırlar dar ekranda düğmeleri alt satıra alır */
.item-row .item-side { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) {
  .item-row { flex-wrap: wrap; }
  .item-row .item-main { flex-basis: calc(100% - 48px); }
  .item-row .item-side:not(:empty) { width: 100%; }
}

/* ------------------------------------------------------------------ Fotoğraflı soru kartları */
.qa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.qa {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.qa-photo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--line);
}
img.zoom { cursor: zoom-in; }
.qa-body { display: grid; gap: 10px; align-content: start; min-width: 0; }
.qa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.qa-who { font-weight: 700; color: var(--ink); text-decoration: none; }
.qa-who:hover { color: var(--primary); text-decoration: underline; }
.qa-note, .qa-reply p { margin: 0; white-space: pre-wrap; }
.qa-note small, .qa-reply small {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-3);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.qa-reply {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--good-soft);
  border-left: 3px solid var(--good);
}
.qa-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qa-foot:has(> :only-child) { justify-content: flex-end; }
.qa textarea { background: var(--surface); }
@media (max-width: 480px) {
  .qa { grid-template-columns: 1fr; }
  .qa-photo { width: 100%; height: 180px; }
}

.zoom-box { display: grid; gap: 14px; justify-items: center; }
.zoom-box img { max-width: 100%; max-height: 75vh; border-radius: var(--r-sm); }

/* ------------------------------------------------------------------ Soru gönderme formu */
.field-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .875rem; color: var(--ink-2); }
.pick-btn { cursor: pointer; border: 1px dashed var(--line); background: var(--surface-2); }
.picked:empty { display: none; }
.picked { margin: 8px 0 0; font-weight: 600; }

/* ------------------------------------------------------------------ Öğrenci profili (öğretmen) */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .student-avatar { width: 56px; height: 56px; font-size: 1.125rem; }
.profile-head .page-title { margin: 0; }
.profile-head p { margin: 4px 0 0; }

/* ------------------------------------------------------------------ Ekran görüntüsüyle bulunan düzeltmeler */
.section-card > .section-head { margin-bottom: 12px; }
/* Arama ve sıralama kutularında simge yazının üstüne biniyordu */
.search-filters .icon-field input,
.search-filters .icon-field select { padding-left: 34px; }
/* Telefonda öğrenci satırı: ad tam görünsün, sayılar alt satıra insin */
@media (max-width: 560px) {
  .srow { grid-template-columns: minmax(0, 1fr); }
  .srow .s-nums { justify-content: space-between; }
  .srow .sn { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
}
/* Telefonda soru fotoğrafı kırpılmadan görünsün */
@media (max-width: 480px) {
  .qa-photo { height: 200px; object-fit: contain; }
}

/* ================================================================== Sayfa genişliği: her ekran aynı genişlikte */
/* Önceden sayfa içeriği kadar genişliyordu; ekranlar daralıyor ve sekme değişince alt menü kayıyordu */
main { width: 100%; }
.view { width: 100%; max-width: 1180px; margin-left: auto; margin-right: auto; }
.subnav { flex-wrap: wrap; overflow: visible; }

/* ================================================================== Telefonda alt sekme çubuğu (çekmece menü yerine) */
@media (max-width: 719px) {
  nav.tabs {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    transform: none;
    visibility: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 -6px 18px rgba(11, 28, 48, .07);
    z-index: 30;
  }
  .tabs-brand, .menu-toggle, .nav-backdrop { display: none !important; }
  .tabs-links {
    display: flex !important;
    width: 100%;
    overflow: visible !important;
    justify-content: space-between !important;
  }
  nav.tabs a {
    flex: 1 1 0;
    min-width: 0;
    height: 52px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0 2px;
    font-size: .6875rem;
    font-weight: 600;
  }
  nav.tabs a svg { width: 21px; height: 21px; }
  nav.tabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  nav.tabs a.on { box-shadow: none; }
  main { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .chat-container { bottom: calc(65px + env(safe-area-inset-bottom)); height: auto; }
  #toast { bottom: calc(env(safe-area-inset-bottom) + 80px); }
}

/* ================================================================== Bildirim hatırlatma şeridi ve penceresi */
.push-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 16px;
  background: #fff1cc;
  color: #5c3a00;
  font-size: .875rem;
  font-weight: 600;
  border-bottom: 1px solid #f0d58a;
}
.push-bar[hidden] { display: none; }
.push-bar .btn { background: #5c3a00; color: #fff; border: 0; }
.push-ask { display: grid; gap: 12px; text-align: center; justify-items: center; }
.push-ask-ico { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); font-size: 1.75rem; }
.push-ask .btn-row { justify-content: center; flex-wrap: wrap; }

/* ================================================================== Öğrenci ana sayfası */
.home-head p { margin: 4px 0 0; }
.home-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.home-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .home-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}
.hero-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.hero-card .eyebrow { color: rgba(255, 255, 255, .7); }
.hero-body { flex: 1; min-width: 0; display: grid; gap: 12px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hero-stats > div { padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .1); display: grid; gap: 2px; }
.hero-stats strong { font: 800 1.375rem/1.1 var(--head); }
.hero-stats small { color: rgba(255, 255, 255, .75); font-size: .75rem; }
.hero-diff { margin: 0; font-size: .8125rem; color: rgba(255, 255, 255, .8); }
.hero-diff.up { color: #9df0b6; }
.hero-btn { background: #fff; color: var(--primary); font-weight: 700; }
.hero-btn:hover { background: var(--primary-soft); }
.ring { position: relative; width: 148px; height: 148px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring-bg { stroke: rgba(255, 255, 255, .16); }
.ring-fg { stroke: #7dea9e; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-in strong { font: 800 2.125rem/1 var(--head); }
.ring-in small { color: rgba(255, 255, 255, .75); font-size: .75rem; margin-top: 2px; }
@media (max-width: 520px) {
  .hero-card { flex-direction: column; text-align: center; padding: 20px 16px; }
  .hero-body { width: 100%; }
}
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 10px; }
.medal {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 10px 6px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line);
  color: var(--ink-3);
  background: var(--surface-2);
  filter: grayscale(1);
  opacity: .7;
}
.medal b { font: 800 1rem/1.2 var(--head); }
.medal small { font-size: .6875rem; }
.medal.on { filter: none; opacity: 1; border: 1px solid #f0d58a; background: #fff7df; color: #7a4d00; }

/* Kutlama */
.celebrate { position: relative; display: grid; gap: 10px; justify-items: center; text-align: center; overflow: hidden; padding-top: 8px; }
.celebrate-ico { font-size: 3rem; line-height: 1; animation: pop .5s ease both; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: fall 1.8s ease-in forwards; }
.confetti i:nth-child(3n) { background: #7dea9e; }
.confetti i:nth-child(3n+1) { background: #ffcc4d; }
.confetti i:nth-child(3n+2) { background: var(--primary); }
.confetti i:nth-child(1) { left: 6%; animation-delay: .05s; }
.confetti i:nth-child(2) { left: 13%; animation-delay: .4s; }
.confetti i:nth-child(3) { left: 20%; animation-delay: .15s; }
.confetti i:nth-child(4) { left: 27%; animation-delay: .55s; }
.confetti i:nth-child(5) { left: 34%; animation-delay: .25s; }
.confetti i:nth-child(6) { left: 41%; animation-delay: .7s; }
.confetti i:nth-child(7) { left: 48%; animation-delay: .1s; }
.confetti i:nth-child(8) { left: 55%; animation-delay: .45s; }
.confetti i:nth-child(9) { left: 62%; animation-delay: .3s; }
.confetti i:nth-child(10) { left: 69%; animation-delay: .6s; }
.confetti i:nth-child(11) { left: 76%; animation-delay: .2s; }
.confetti i:nth-child(12) { left: 83%; animation-delay: .5s; }
.confetti i:nth-child(13) { left: 90%; animation-delay: .35s; }
.confetti i:nth-child(14) { left: 96%; animation-delay: .65s; }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(260px) rotate(540deg); } }
@keyframes pop { 0% { transform: scale(.3); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ================================================================== Öğretmen ana sayfası */
.todos { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: 600 .8125rem var(--sans);
  cursor: pointer;
}
.chip-btn b { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: .6875rem; line-height: 20px; text-align: center; }
.chip-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-btn.on b { background: rgba(255, 255, 255, .22); color: #fff; }
.srow.st-idle { border-left: 4px solid var(--warn); }
.srow.st-behind { border-left: 4px solid #e0a100; }
.srow.st-ok { border-left: 4px solid var(--good); }
.s-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.leaders { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.leader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid #f0d58a;
  background: linear-gradient(135deg, #fff7df, #fffdf5);
  color: var(--ink);
  text-decoration: none;
}
.leader:hover { box-shadow: var(--shadow-sm); }
.leader-ico { font-size: 1.5rem; }
.leader-body { flex: 1; min-width: 0; display: grid; }
.leader-body small { color: #7a4d00; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.leader > b { font: 800 1.125rem var(--head); color: #7a4d00; white-space: nowrap; }

/* ---- ekran denetiminde bulunanlar */
@media (max-width: 719px) {
  /* Bulanıklık filtresi alt sekme çubuğunu başlığa hapsediyordu; telefonda düz zemin kullanılır */
  header.top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
}
@media (max-width: 560px) {
  .item-row > .item-row-top { flex-wrap: wrap; width: 100%; }
  .item-row-top > .item-main { flex-basis: calc(100% - 48px); }
  .item-row-top > .item-side { width: 100%; justify-content: flex-end; }
  .item-row-stack > .item-main, .item-row-stack > .item-side { flex-basis: auto; }
}
.home-col .todos { grid-template-columns: minmax(0, 1fr); }
.push-ask .btn-row { width: 100%; }
.push-ask .btn-row .btn { flex: 1 1 auto; white-space: nowrap; }
.topic-search { margin-bottom: 6px; }

/* Öğrenci profili: hesap işlemleri düğmesi ve penceresi */
.gear-btn { margin-left: auto; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.gear-btn:hover { color: var(--primary); border-color: var(--primary); }
.acct-list { display: grid; gap: 8px; margin-top: 14px; }
.acct-item { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.acct-item:hover { border-color: var(--primary); }
.acct-item small { color: var(--ink-2); }
.acct-item.danger { background: var(--warn-soft); border-color: transparent; }
.acct-item.danger strong { color: var(--warn); }

/* ================================================================== Tanıtım turu */
.tour { position: fixed; inset: 0; z-index: 80; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(11, 20, 40, .62), 0 0 0 3px #fff; transition: all .25s ease; pointer-events: none; }
.tour-tip { position: fixed; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); display: grid; gap: 8px; transition: top .25s ease, left .25s ease; }
.tour-tip h3 { margin: 0; font: 700 1.0625rem/1.3 var(--head); color: var(--ink); }
.tour-tip p { margin: 0; color: var(--ink-2); font-size: .9375rem; line-height: 1.45; }
.tour-count { font-size: .6875rem; font-weight: 700; letter-spacing: .08em; color: var(--primary); }
.tour-btns { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tour-btns span { flex: 1; }

/* ================================================================== Kurulum rehberi */
.guide { display: grid; gap: 10px; margin-top: 14px; }
.guide .sec { margin-top: 6px; }
.guide p { margin: 0; }
.guide-seg { margin-top: 12px; flex-wrap: wrap; }
.guide-seg button { font-size: .8125rem; padding: 0 8px; }
.guide-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: g; display: grid; gap: 8px; }
.guide-steps li { counter-increment: g; position: relative; padding: 10px 12px 10px 46px; border-radius: var(--r-sm); background: var(--surface-2); }
.guide-steps li::before { content: counter(g); position: absolute; left: 12px; top: 9px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 .8125rem/24px var(--head); text-align: center; }
.guide-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-radius: var(--r-sm); background: #fff1cc; color: #5c3a00; }
.guide-ok { padding: 10px 12px; border-radius: var(--r-sm); background: var(--good-soft); color: var(--good); font-weight: 600; }
.login .login-switch { display: block; margin: 10px auto 0; }

/* Kurulum şeridi */
.install-bar { background: var(--primary-soft); color: var(--primary-dark); border-bottom-color: var(--line); }
.install-bar .btn { background: var(--primary); color: #fff; }
.install-bar .btn.ghost-light { background: transparent; color: var(--primary-dark); border: 1px solid var(--line); }

/* ================================================================== Veli ekranı: menüsüz tek sayfa */
body.role-parent nav.tabs,
body.role-parent .bell,
body.role-parent .menu-toggle,
body.role-parent .nav-backdrop { display: none !important; }
body.role-parent header.top .brand { margin-right: auto; }
@media (max-width: 719px) {
  body.role-parent main { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  body.role-parent #toast { bottom: calc(env(safe-area-inset-bottom) + 20px); }
}
.parent-hero .hero-body { width: 100%; }
.parent-note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.parent-weeks { width: 100%; border-collapse: collapse; margin: 14px 0 8px; font-size: .9375rem; }
.parent-weeks th { text-align: left; font-size: .75rem; font-weight: 600; color: var(--text-muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.parent-weeks td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.parent-weeks th:not(:first-child), .parent-weeks td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.parent-weeks tr:first-child td { font-weight: 700; }
.parent-foot { text-align: center; margin-top: 18px; }

.login-title { margin: 0 0 20px; font-size: 1.25rem; font-weight: 700; text-align: center; color: var(--ink); letter-spacing: -.01em; }

.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notif-head .page-title { margin-bottom: 0; }

/* ================================================================== Kaynak takibi (konu × kaynak) */
.mx-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.mx-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; min-width: 0; }
.mx-stat small { display: block; color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.mx-stat strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.mx-stat span { display: block; color: var(--text-muted); font-size: .75rem; overflow-wrap: anywhere; }
.mx-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.mx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; min-width: 0; }
.mx-card h3 { margin: 0 0 8px; font-size: .8125rem; font-weight: 700; }
.mx-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mx-card li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8125rem; }
.mx-card li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-card li b { flex: none; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.mx-tools { gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; font-size: .6875rem; font-weight: 600; }
.mx-legend span { padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); }
.mx-wrap { padding: 0; overflow: auto; max-height: 72vh; width: 100%; min-width: 0; }
table.mx { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .8125rem; white-space: nowrap; }
.mx th, .mx td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.mx thead th { position: sticky; top: 0; z-index: 2; background: var(--primary); color: #fff; font-weight: 600; white-space: normal; min-width: 84px; max-width: 130px; vertical-align: middle; }
.mx .mx-topic { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 600; background: var(--surface); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; box-shadow: 1px 0 0 var(--line); }
.mx thead .mx-topic { z-index: 3; background: var(--primary); }
.mx .mx-group th { position: sticky; left: 0; text-align: left; background: var(--surface-3, #eef1fb); color: var(--ink-2, #33415c); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; }
.mx .mx-total { font-weight: 700; background: var(--line-2); }
.mx thead .mx-total { background: #2c2a6b; }
.mx .mx-total small { display: block; font-weight: 500; color: var(--text-muted); }
.mx tfoot th, .mx tfoot td { background: var(--line-2); font-weight: 600; border-top: 1px solid var(--line); }
.mx tfoot .mx-topic { background: var(--line-2); }
.mx-g { background: #dff5e3; color: #14532d; }
.mx-y { background: #fff1cc; color: #7a4d00; }
.mx-r { background: #fde2e2; color: #8a1c1c; }
.mx-none { color: #9aa3b5; }
.mx td.mx-g, .mx td.mx-y, .mx td.mx-r { font-weight: 600; }
.mx-pct { display: inline-block; min-width: 42px; padding: 2px 6px; border-radius: 6px; font-weight: 700; font-size: .75rem; }
.mx tr.none .mx-topic { color: #8a93a6; font-weight: 500; }
.mx[data-f=done] tbody tr.none, .mx[data-f=none] tbody tr.done { display: none; }
@media (max-width: 899px) {
  .mx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .mx-summary { grid-template-columns: 1fr 1fr; }
  .mx-summary .mx-stat:last-child { grid-column: 1 / -1; }
  .mx-cards { grid-template-columns: 1fr; }
  .mx .mx-topic { max-width: 38vw; white-space: normal; }
}
