:root {
  --bg: #f4f6f8; --surface: #ffffff; --ink: #0f1b2d; --muted: #66758a; --line: #e5e9ef;
  --brand: #0b6e8a; --brand-soft: rgba(11,110,138,.12); --brand-ink: #ffffff;
  --good: #1f9d6b; --mid: #d99a1b; --bad: #d64545;
  --side: #0f1b2d; --side-ink: #c9d3e0; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 Inter, system-ui, sans-serif; }
h1, h2 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 15px; }
.muted { color: var(--muted); } small { font-size: 12px; }
a { color: inherit; text-decoration: none; }

.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; color: #fff; }
.side-brand small { display: block; color: var(--side-ink); font-size: 11px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { padding: 9px 12px; border-radius: 8px; color: var(--side-ink); }
.sidebar nav a:hover { background: rgba(255,255,255,.06); }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar nav a.soon { opacity: .45; cursor: default; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; padding: 16px 12px 6px; }
.side-foot { padding: 10px 12px; color: var(--side-ink); border-top: 1px solid rgba(255,255,255,.08); }

.main { padding: 24px 28px 48px; max-width: 1280px; width: 100%; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar > div:nth-child(2) { flex: 1; min-width: 180px; }
.menu-btn { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; width: 40px; height: 40px; font-size: 18px; color: var(--ink); }
.month-nav { display: flex; gap: 6px; align-items: center; }
.month-nav a { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; display: grid; place-items: center; font-size: 18px; }
.month-nav input { height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 0 10px; font: inherit; }

.banner { background: var(--brand-soft); border: 1px solid var(--brand); color: var(--ink); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.banner.ok { background: rgba(31,157,107,.12); border-color: var(--good); }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.kpi-value small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.kpi-value.good { color: var(--good); } .kpi-value.mid { color: var(--mid); } .kpi-value.low { color: var(--bad); }
.kpi-sub { color: var(--muted); font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.grid-2 .card { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .muted { font-size: 12px; }
.chart-box { position: relative; height: 280px; } .chart-box.short { height: 220px; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; margin: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { white-space: nowrap; }
td.num, td .pill, td .btn { white-space: nowrap; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.pill.good { background: rgba(31,157,107,.14); color: var(--good); }
.pill.mid { background: rgba(217,154,27,.16); color: var(--mid); }
.pill.low { background: rgba(214,69,69,.14); color: var(--bad); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li > span:first-child { flex: 1; }
.health b { font-variant-numeric: tabular-nums; }
.more { margin: 10px 0 0; font-size: 12px; }

/* giriş */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 20px; } .login-card p { margin: -10px 0 4px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 13px; }
.login-card input { height: 42px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 0 12px; font: inherit; }
.btn-primary { height: 44px; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; }
.alert { background: rgba(214,69,69,.12); color: var(--bad); padding: 10px 12px; border-radius: 8px; font-size: 13px; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 20; width: 240px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: block; }
  .main { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi-value { font-size: 24px; } }

/* ---- sidebar ikonları ---- */
.sidebar nav a { display: flex; align-items: center; gap: 10px; }
.sidebar nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar nav em { margin-left: auto; font-style: normal; font-size: 10px; opacity: .7; }
.scrim { display: none; }

/* ---- giriş sayfası ---- */
.date-nav { display: flex; gap: 6px; align-items: center; }
.date-nav a { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; display: grid; place-items: center; font-size: 18px; }
.date-nav a.today { font-size: 13px; font-weight: 600; color: var(--brand); }
.date-nav a.disabled { opacity: .35; pointer-events: none; }
.date-nav input { height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 0 10px; font: inherit; }

.modes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a { padding: 7px 12px; border-radius: 7px; font-weight: 500; font-size: 13px; color: var(--muted); }
.seg a.on { background: var(--brand); color: var(--brand-ink); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.team-chip { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); align-items: center; }
.team-chip span { font-weight: 600; font-size: 13px; line-height: 1.3; }
.team-chip small { color: var(--muted); grid-column: 1; }
.team-chip b { grid-row: 1 / span 2; grid-column: 2; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.team-chip.part { border-color: var(--mid); } .team-chip.part b { color: var(--mid); }
.team-chip.done { border-color: var(--good); } .team-chip.done b { color: var(--good); }
.team-chip.sel { outline: 2px solid var(--brand); outline-offset: 1px; }

.entry-meta { display: flex; gap: 12px; align-items: center; }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.help { margin-bottom: 8px; color: var(--muted); font-size: 13px; } .help summary { cursor: pointer; } .help ul { margin: 8px 0 0; padding-left: 18px; } .help b { color: var(--ink); }

.roster { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 8px 16px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); transition: background .4s; }
.row:last-child { border-bottom: 0; }
.row.saved { background: rgba(31,157,107,.12); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.idx { color: var(--muted); font-size: 12px; width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.tag { font-style: normal; font-size: 11px; background: var(--line); padding: 1px 7px; border-radius: 999px; color: var(--muted); }
.opts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.opt { min-width: 44px; height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; font: inherit; font-size: 13px; cursor: pointer; }
.opt:hover { border-color: var(--muted); }
.opt.clear { color: var(--muted); min-width: 36px; padding: 0; }
.opt.on { color: #fff; font-weight: 600; border-color: transparent; }
.opt.ok.on, .opt.p3.on { background: var(--good); } .opt.info.on { background: #3b82f6; } .opt.bad.on, .opt.p0.on { background: var(--bad); }
.opt.comp.on { background: #8b5cf6; } .opt.mute.on { background: #7b8798; } .opt.warn.on, .opt.p1.on { background: var(--mid); }
.opt.p2.on { background: #4aa3c7; } .opt.p4.on { background: #138a5b; }
.note { grid-column: 1 / -1; height: 36px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; }

@media (max-width: 860px) {
  .scrim.show, .sidebar.open + .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 15; }
  .row { grid-template-columns: 1fr; }
  .opts { justify-content: flex-start; }
  .opt { flex: 1 1 30%; height: 44px; }
  .opt.clear { flex: 0 0 44px; }
  .date-nav input { width: 140px; }
}

/* ---- raporlar ---- */
.filters { display: flex; flex-direction: column; gap: 16px; }
.seg label { padding: 7px 14px; border-radius: 7px; font-weight: 500; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg label.on { background: var(--brand); color: var(--brand-ink); }
.filters .seg { align-self: flex-start; }
.f-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.f-row > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.f-row input[type=date] { height: 38px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 0 10px; font: inherit; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.f-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; font-size: 13px; }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.export { display: flex; gap: 8px; flex-wrap: wrap; }
.export .btn { display: inline-grid; place-items: center; }
.note-line { font-size: 12px; margin: -4px 0 12px; }
.group { font-size: 14px; margin: 18px 0 8px; } .group .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
table.rep td:nth-child(2) { font-weight: 500; }
table.rep td:nth-child(3) { color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

/* ---- Faz 3: liste, profil, dekont, ısı haritası ---- */
.list-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.list-tools input[type=search], .list-tools select, form.inline select { height: 38px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 0 12px; font: inherit; }
.list-tools input[type=search] { flex: 1; min-width: 200px; }
.seg b { margin-left: 4px; font-weight: 600; opacity: .7; }
.seg a { cursor: pointer; }
.rowlink { font-weight: 500; } .rowlink:hover { color: var(--brand); }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.btn.sm { height: 30px; font-size: 12px; padding: 0 10px; display: inline-grid; place-items: center; }
.bad-t { color: var(--bad); }
.yr { min-width: 60px; text-align: center; font-weight: 600; }
.month-nav a.disabled { opacity: .35; pointer-events: none; }
.note-cell { white-space: normal; min-width: 180px; max-width: 320px; color: var(--muted); font-size: 13px; }

.profile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar { width: 64px; height: 64px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.profile dl { display: flex; gap: 28px; flex-wrap: wrap; margin: 0; flex: 1; }
.profile dt { font-size: 12px; color: var(--muted); } .profile dd { margin: 2px 0 0; font-weight: 500; }

.heat { border-collapse: separate; border-spacing: 2px; }
.heat th, .heat td { padding: 0; border: 0; font-size: 10px; text-align: center; color: var(--muted); }
.heat th.mname { text-align: left; padding-right: 8px; font-size: 12px; font-weight: 500; }
.heat td { width: 18px; min-width: 18px; }
.h { display: block; height: 8px; margin-bottom: 1px; border-radius: 2px; }
.c-none { background: var(--line); }
.c-ok { background: var(--good); } .c-info { background: #3b82f6; } .c-bad { background: var(--bad); }
.c-comp { background: #8b5cf6; } .c-mute { background: #9aa6b6; } .c-warn { background: var(--mid); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }

@media (max-width: 860px) { .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- formlar ---- */
.topbar .btn { display: inline-grid; place-items: center; }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.form h2 { font-size: 15px; margin-top: 6px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fgrid .wide { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.form input, .form select { height: 42px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 0 12px; font: inherit; }
.form input:focus, .form select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.form small { font-weight: 400; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.form-actions .btn, .inline-actions .btn { height: 42px; display: inline-grid; place-items: center; padding: 0 20px; }
.btn.danger { background: var(--bad); }
.danger-zone { margin-top: 16px; }
.inline-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .inline-actions p { flex: 1; min-width: 220px; margin: 0; }
.alert div + div { margin-top: 4px; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }

/* ---- düzeltmeler (denetim 1-5) ---- */
/* 1) tablolar kartın içine sığsın: metin sütunları satır kırar, sayılar kırmaz */
table.rep td:nth-child(3) { max-width: 200px; overflow: visible; text-overflow: clip; }
td .sm { padding: 0 8px; }
.table-wrap { max-width: 100%; }
/* 2) yoklama takvimi: tablo içeriği kadar geniş */
table.heat { width: auto; }
.heat th.mname { width: 42px; white-space: nowrap; }
/* 4) filtre çubuğu taşmasın */
.list-tools > * { max-width: 100%; min-width: 0; }
.list-tools select { flex: 0 1 260px; }

/* 5) giriş modu: iki kademeli seçici */
.modes { align-items: center; }
.seg-sub { background: transparent; border-color: transparent; padding: 0; gap: 6px; }
.seg-sub a { border: 1px solid var(--line); background: var(--surface); }
.seg-sub a.on { border-color: var(--brand); }
.divider { width: 1px; height: 24px; background: var(--line); }

/* 3) takım seçici: seçilince daralır */
.team-pick > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-pick > summary::-webkit-details-marker { display: none; }
.team-pick .chg { margin-left: auto; color: var(--brand); font-weight: 600; font-size: 13px; }
.team-pick[open] .chg { display: none; }
.team-pick .team-grid { margin-top: 12px; }

@media (max-width: 860px) {
  /* 3) mobil yoklama: 3 sütun düğme, temizle sağ üstte */
  .row { position: relative; }
  .who { padding-right: 44px; min-height: 40px; }
  .opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .opt { min-width: 0; padding: 0 2px; font-size: 12.5px; flex: none; }
  .opt.clear { position: absolute; top: 8px; right: 2px; width: 36px; height: 36px; }
  .row .opts:has(.p0) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* 4) */
  .list-tools select, .list-tools .btn { flex: 1 1 100%; width: 100%; }
  .list-tools .btn { display: grid; place-items: center; }
  .list-tools form.inline { flex: 1 1 100%; display: block; }
  .list-tools form.inline select { width: 100%; }
}

/* ---- karşılama ---- */
.hero { margin-bottom: 16px; }
.hero h2 { margin: 0; } .hero p { margin: 2px 0 0; }
.hero-actions .btn { display: inline-grid; place-items: center; }
.export-box { padding: 0; } .export-box summary { cursor: pointer; padding: 14px 18px; font-weight: 600; } .export-form { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.sidebar nav { overflow-y: auto; min-height: 0; }

/* ---- diyalog ---- */
dialog.dlg { border: 0; border-radius: 22px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(10,37,64,.35); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(10,37,64,.5); backdrop-filter: blur(2px); }
dialog.dlg form { display: flex; flex-direction: column; gap: 14px; }
dialog.dlg label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
dialog.dlg input { height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; background: var(--bg); }
dialog.dlg input[type=file] { padding: 9px 10px; height: auto; }
td.act { white-space: nowrap; } td.act > * + * { margin-left: 6px; }

/* ---- çalışma planı formu ---- */
.wide-form { max-width: 980px; }
code { background: var(--brand-soft); padding: 1px 6px; border-radius: 6px; }
.pdays { display: grid; gap: 10px; }
.pday { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; background: var(--bg); border-radius: 16px; padding: 12px 14px; }
.pday-name { padding-top: 8px; font-size: 14px; }
.pday-body { display: grid; gap: 8px; min-width: 0; }
.pslots { display: grid; gap: 6px; }
.pslots:empty { display: none; }
.pslot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.form .pslot select { flex: 0 1 160px; min-width: 120px; height: 38px; background: var(--surface); }
.form .pslot input[type=time] { width: 112px; height: 38px; padding: 0 8px; background: var(--surface); }
.pslot.is-pool .pdash, .pslot.is-pool input[name$="[to]"] { visibility: hidden; }
.pdash { color: var(--muted); }
.pday-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pday-tools .mini { height: 30px; }
.form .pday-tools select, .form .pday-tools input { height: 32px; font-size: 13px; padding: 0 10px; background: var(--surface); }
.form .pday-tools input { flex: 1 1 160px; min-width: 0; }
.pprev { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.pprev small { color: var(--muted); margin-right: 4px; flex-basis: 100%; }
.pblk { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-basis: 100%; }
.pblk em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 92px; }
.pprev i { color: var(--muted); font-style: normal; }
.pc { display: inline-block; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
.pc b { font-weight: 700; font-variant-numeric: tabular-nums; }
.pc.pool { background: #e9ecf1; color: #475467; }
.pc.water { background: #dbf0f7; color: #086e8c; }
.pc.dry { background: #fde8dc; color: #b24818; }
.pc.gym { background: #ebe2fd; color: #6d28d9; }
.pc.note { background: #fdebd0; color: #b25e00; font-weight: 600; }
@media (max-width: 760px) {
  .pday { grid-template-columns: 1fr; gap: 6px; }
  .pday-name { padding-top: 0; }
  .form .pslot select { flex: 1 1 100%; }
}
.topbar .btn + .btn { margin-left: 8px; }
dialog.dlg textarea { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--bg); resize: vertical; }
dialog.dlg .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
dialog.dlg { max-height: 92vh; overflow: auto; }
dialog.dlg select { height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; font: inherit; background: var(--bg); color: var(--ink); }

/* ---- aylık çizelge ---- */
table.mgrid { border-collapse: separate; border-spacing: 2px; width: auto; }
table.mgrid th, table.mgrid td { padding: 0; border: 0; text-align: center; font-size: 11px; min-width: 20px; height: 22px; border-radius: 4px; }
table.mgrid thead th { color: var(--muted); height: auto; }
table.mgrid th.nm { text-align: left; white-space: nowrap; padding-right: 10px; font-size: 12px; font-weight: 600; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 160px; }
table.mgrid td.c-ok { background: rgba(14,163,113,.2); color: #0a7a55; font-weight: 700; }
table.mgrid td.c-info { background: rgba(59,130,246,.22); color: #1d4ed8; font-weight: 700; }
table.mgrid td.c-bad { background: rgba(229,72,77,.22); color: #b42318; font-weight: 700; }
table.mgrid td.c-comp { background: rgba(139,92,246,.22); color: #6d28d9; font-weight: 700; }
table.mgrid td.c-mute { background: rgba(122,135,152,.2); color: #475467; font-weight: 700; }
table.mgrid td.c-warn { background: rgba(240,140,0,.22); color: #b25e00; font-weight: 700; }
li.doc { align-items: flex-start; } li.doc .act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
td.nw { white-space: nowrap; }

/* ---- mesajlar ---- */
.chat { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat .card { margin: 0; }
.chat-list { padding: 8px; max-height: calc(100vh - 170px); overflow-y: auto; }
.topic { width: 100%; text-align: left; display: block; position: relative; border: 0; background: transparent; border-radius: 14px; padding: 12px 40px 12px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.topic:hover { background: var(--bg); } .topic.on { background: var(--brand-soft); }
.topic.closed { opacity: .65; }
.t-title { display: block; font-weight: 700; font-size: 14px; line-height: 1.3; }
.t-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.t-last { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { position: absolute; right: 10px; top: 12px; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 2px 8px; }
.topic .tag { position: absolute; right: 10px; top: 12px; }
.chat-pane { display: flex; flex-direction: column; gap: 12px; min-height: 420px; max-height: calc(100vh - 170px); }
.chat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .chat-head > div { flex: 1; min-width: 160px; }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; min-height: 240px; }
.bub { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; word-break: break-word; }
.bub small { display: block; opacity: .65; font-size: 11px; margin-top: 4px; }
.bub.them { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 6px; }
.bub.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.chat-send { display: flex; gap: 10px; align-items: flex-end; }
.chat-send textarea { flex: 1; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font: inherit; background: var(--bg); resize: none; }
.chat-empty { display: grid; place-items: center; }
@media (max-width: 860px) {
  .chat { grid-template-columns: 1fr; }
  .chat .chat-pane, .chat .chat-empty { display: none; }
  .chat.open .chat-list { display: none; }
  .chat.open .chat-pane:not([hidden]) { display: flex; }
  .chat-back { display: inline-grid; }
}

/* Çoklu veli */
.extra-list { display: grid; gap: 10px; margin-bottom: 10px; }
.extra-list:empty { display: none; }
.extra-row { display: flex; gap: 10px; align-items: center; }
.extra-row select { flex: 1; min-width: 0; }
.pv-act { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.pv-act .inl { display: inline; margin: 0; }
.mini { border: 1px solid var(--line); background: transparent; border-radius: 8px; font: inherit; font-size: 11.5px; padding: 2px 8px; cursor: pointer; color: var(--muted); }
.mini:hover { background: var(--bg, #f3f8fb); color: var(--ink, inherit); }
.mini.bad:hover { color: #b42318; border-color: #f0b4ae; }
.ap-tabs { margin-bottom: 14px; }
.profile { position: relative; }

/* Öğrenci adının yanında doğum tarihi notu */
.bd { display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: rgba(100,130,160,.14); color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.5; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; letter-spacing: 0; }
th.nm .bd, .rep .bd { font-weight: 500; }
