/* ERAH Ucus Planlama — dunya: VFR havacilik haritasi, ERAH altin/siyah (DESIGN.md) */
:root {
  --paper: #f6f3ea;
  --sheet: #fffdf8;
  --margin: #ece7da;
  --ink: #17181a;
  --ink-2: #55585e;
  --ink-3: #7b7e84;
  --grat: #dcd5c4;
  --grat-2: #e9e3d4;
  --gold: #c99a2e;
  --gold-ink: #7e5b0e;
  --gold-wash: #f4e8c8;
  --gold-line: #d9b45c;
  --restricted: #b3261e;
  --restricted-wash: #f8e1de;
  --caution: #b4540a;
  --caution-wash: #fbecd9;
  --water: #2c5c88;
  --water-wash: #dfe8f1;
  --ok: #2f6b3a;
  --ok-wash: #e2efdf;
  --hatch-red: repeating-linear-gradient(135deg, rgba(179, 38, 30, .16) 0 3px, transparent 3px 7px);
  --hatch-night: repeating-linear-gradient(135deg, rgba(23, 24, 26, .07) 0 2px, transparent 2px 6px);
  --field: #ffffff;
  --hover: #fbf6e8;
  --added: #fbf1d4;
  --restricted-ink: #7a1712;
  --caution-ink: #6b3505;
  --caution-line: #ecc999;
  color-scheme: light;
  --row-h: 28px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  accent-color: var(--gold);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-wash); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
a { color: var(--gold-ink); text-underline-offset: 3px; }
* { scrollbar-color: var(--grat) transparent; scrollbar-width: thin; }
.ico { width: 16px; height: 16px; flex: none; }
.num, .time { font-variant-numeric: tabular-nums; }

/* Giris */
.login { display: grid; place-items: center; height: 100%; background: var(--paper); background-image: linear-gradient(var(--grat-2) 1px, transparent 1px), linear-gradient(90deg, var(--grat-2) 1px, transparent 1px); background-size: 48px 48px; }
.login-card { background: var(--sheet); border: 1px solid var(--grat); padding: 28px 28px 22px; width: min(360px, 92vw); display: grid; gap: 14px; box-shadow: 0 18px 40px -18px rgba(23, 24, 26, .35); border-radius: 6px; }
.login-logo { width: 132px; justify-self: center; }
.login-card h1 { margin: 0 0 4px; font-size: 18px; font-weight: 600; text-align: center; }
.login-card label { display: grid; gap: 4px; color: var(--ink-2); font-size: 12px; }
.login-card input { padding: 8px 10px; border: 1px solid var(--grat); border-radius: var(--radius); background: var(--field); }
.err { color: var(--restricted); min-height: 1em; margin: 0; font-size: 12px; }

/* Ust cubuk: haritanin baslik bloku */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 0 14px; height: 52px; background: var(--sheet); border-bottom: 1px solid var(--grat); flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 600; font-size: 15px; }
.brand-logo { height: 36px; }
.brand span { padding-left: 10px; border-left: 1px solid var(--grat); }
.tabs { display: flex; gap: 2px; height: 100%; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink-2); padding: 0 12px; cursor: pointer; height: 100%; transition: color .16s var(--ease), border-color .16s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.datebox { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.datebox input { border: 1px solid var(--grat); border-radius: var(--radius); padding: 4px 8px; font-weight: 600; background: var(--field); font-variant-numeric: tabular-nums; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; background: none; border-radius: var(--radius); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--margin); color: var(--ink); }
.chip { background: none; border: 1px solid var(--grat); color: var(--ink-2); border-radius: 14px; padding: 2px 10px; cursor: pointer; }
.chip:hover { border-color: var(--gold-line); color: var(--ink); }
.status { display: flex; gap: 6px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; background: var(--margin); color: var(--ink-2); white-space: nowrap; }
.badge .ico { width: 13px; height: 13px; }
.badge.pub { background: var(--ok-wash); color: var(--ok); }
.badge.draft { background: var(--margin); color: var(--ink-2); }
.badge.err { background: var(--restricted-wash); color: var(--restricted); }
.badge.warn { background: var(--caution-wash); color: var(--caution); }
.badge.gold { background: var(--gold-wash); color: var(--gold-ink); }
.user { display: flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }

/* Arac cubugu: ikinci notr katman */
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: var(--margin); border-bottom: 1px solid var(--grat); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--sheet); border: 1px solid var(--grat); border-radius: var(--radius); padding: 4px 10px; height: 30px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; transition: background .16s var(--ease), border-color .16s var(--ease); }
.btn:hover:not(:disabled) { border-color: var(--gold-line); background: var(--field); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.icon-only { padding: 0; width: 30px; justify-content: center; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.btn.primary:hover:not(:disabled) { background: #2a2c30; border-color: #2a2c30; }
.btn.ai { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.btn.ai:hover:not(:disabled) { background: #d4a83f; border-color: #b98b22; }
.btn.danger { color: var(--restricted); }
.btn.dirty { background: var(--gold-wash); border-color: var(--gold); font-weight: 600; }
.sep { width: 1px; height: 20px; background: var(--grat); margin: 0 4px; }
.grow { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--grat); border-radius: var(--radius); overflow: hidden; background: var(--sheet); }
.seg button { border: 0; background: none; padding: 0 11px; height: 28px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--grat); }
.seg button.active { background: var(--gold-wash); color: var(--ink); font-weight: 600; }
.toggle { display: inline-flex; gap: 5px; align-items: center; color: var(--ink-2); cursor: pointer; }

/* Calisma alani */
.workspace { flex: 1; min-height: 0; display: flex; }
.board { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--sheet); }
.banner { display: flex; gap: 10px; align-items: center; padding: 7px 14px; background: var(--caution-wash); color: var(--caution-ink); border-bottom: 1px solid var(--caution-line); }
.banner.info { background: var(--water-wash); color: var(--water); border-color: #c3d3e3; }
.banner .btn { height: 26px; }
.gridwrap { flex: 1; min-height: 120px; overflow: auto; }
.board.dual .gridwrap { flex: 1 1 55%; }
.board.dual .gantt { flex: 1 1 45%; border-top: 1px solid var(--grat); }
.board.gantt-only .gridwrap { display: none; }
.board.gantt-only .gantt { flex: 1; }

/* AI onerisi: rota katmani araziyi duzenlemez */
.proposal { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 9px 14px; background: var(--gold-wash); border-bottom: 1px solid var(--gold-line); }
.proposal .what { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.proposal .sum { color: var(--ink-2); flex: 1 1 320px; min-width: 0; }
.proposal .stats { display: inline-flex; gap: 10px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.proposal .stats b { color: var(--ink); }

/* Tablo */
table.grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.grid th { position: sticky; top: 0; z-index: 2; background: var(--sheet); border-bottom: 1px solid var(--ink); padding: 6px 8px 5px; font-weight: 600; text-align: left; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.grid td { border-bottom: 1px solid var(--grat-2); padding: 0 8px; height: var(--row-h); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.grid td.gut { position: sticky; left: 0; z-index: 1; background: var(--sheet); width: 58px; text-align: right; color: var(--ink-3); font-size: 11px; padding: 0 8px 0 4px; font-variant-numeric: tabular-nums; border-right: 1px solid var(--grat-2); }
.grid td.gut .ico { width: 14px; height: 14px; vertical-align: -3px; margin-right: 3px; }
.grid tr.group td { background: var(--paper); height: 26px; border-bottom: 1px solid var(--grat); border-top: 1px solid var(--grat); font-size: 12px; color: var(--ink-2); }
.grid tr.group td.gut { background: var(--paper); }
.grid tr.group .reg { font-weight: 700; color: var(--ink); font-size: 13px; margin-right: 8px; }
.grid tr.row:hover td { background: var(--hover); }
.grid tr.row.selected td { background: var(--gold-wash); }
.grid tr.row.selected td.gut { box-shadow: inset 2px 0 0 var(--gold); }
.grid tr.row.canceled td { color: var(--ink-3); text-decoration: line-through; }
.grid tr.row.canceled td.gut, .grid tr.row.canceled td.acts { text-decoration: none; }
.grid tr.row.added td { background: var(--added); }
.grid tr.row.added td.gut { box-shadow: inset 2px 0 0 var(--gold); }
.grid tr.row.removed td { color: var(--ink-3); text-decoration: line-through; background: var(--paper); }
.grid td.changed { box-shadow: inset 0 -2px 0 var(--gold); font-weight: 600; }
.grid td.ed { cursor: text; }
.grid td.ed:hover { box-shadow: inset 0 0 0 1px var(--gold-line); }
.grid td.time, .grid td.block { font-variant-numeric: tabular-nums; }
.grid td.block { font-weight: 700; }
.grid td.reg { font-weight: 600; }
.grid td.lesson { font-weight: 700; }
.grid td.has-err { background-color: var(--restricted-wash) !important; background-image: var(--hatch-red); color: var(--restricted-ink); }
.grid td.has-warn { box-shadow: inset 0 -2px 0 var(--caution); }
.grid td.xc { background: var(--water-wash); color: var(--water); font-weight: 600; }
.grid td.reason { color: var(--gold-ink); font-size: 12px; max-width: 340px; }
.grid td.acts { text-align: center; padding: 0 2px; white-space: nowrap; }
.grid td.acts button { border: 0; background: none; cursor: pointer; padding: 3px; color: var(--ink-3); border-radius: 3px; display: inline-grid; place-items: center; }
.grid td.acts button:hover { color: var(--ink); background: var(--margin); }
.grid td.acts .ico { width: 15px; height: 15px; }
.grid input.cell, .grid select.cell { width: 100%; min-width: 64px; border: 1px solid var(--gold); border-radius: 3px; padding: 1px 5px; height: 23px; background: var(--field); color: var(--ink); }
.c-err { color: var(--restricted); }
.c-warn { color: var(--caution); }
.c-ok { color: var(--ok); }
.tag { display: inline-block; padding: 0 5px; border-radius: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; margin-right: 5px; vertical-align: 1px; }
.tag.fi { background: var(--ink); color: var(--sheet); }
.tag.sp { border: 1px solid var(--ink-2); color: var(--ink-2); padding: 0 4px; }
.tag.ob { border: 1px dashed var(--ink-2); color: var(--ink-2); padding: 0 4px; }
.tag.sim { background: var(--water); color: #fff; }
.tag.missing { background: var(--restricted-wash); color: var(--restricted); background-image: var(--hatch-red); }
.na { color: var(--ink-3); }
.empty { padding: 56px 24px; text-align: center; color: var(--ink-2); max-width: 520px; margin: 0 auto; white-space: normal; }
.empty h3 { color: var(--ink); margin: 0 0 8px; font-size: 15px; }
.empty .btn { margin-top: 12px; }

/* Alt sayfa sekmeleri */
.pagebar { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--grat); background: var(--margin); padding: 0 8px; min-height: 34px; }
.pages { display: flex; gap: 0; overflow-x: auto; align-self: stretch; }
.pages button { border: 0; background: none; padding: 0 14px; cursor: pointer; font-size: 12px; color: var(--ink-2); border-top: 2px solid transparent; white-space: nowrap; }
.pages button:hover { color: var(--ink); }
.pages button.active { border-top-color: var(--gold); color: var(--ink); background: var(--sheet); font-weight: 600; }
.pages .cnt { color: var(--ink-3); margin-left: 5px; font-variant-numeric: tabular-nums; font-weight: 400; }
.pages .e { color: var(--restricted); margin-left: 4px; font-weight: 700; }
.sums { margin-left: auto; color: var(--ink-2); display: flex; gap: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sums b { color: var(--ink); }

/* Zaman seridi: boylam = saat */
.gantt { overflow: auto; position: relative; background: var(--sheet); }
.gantt .g-head, .gantt .g-row { display: flex; }
.gantt .g-label { position: sticky; left: 0; z-index: 2; width: 112px; flex: none; background: var(--sheet); border-right: 1px solid var(--grat); border-bottom: 1px solid var(--grat-2); padding: 0 10px; display: flex; flex-direction: column; justify-content: center; font-weight: 700; font-size: 12px; }
.gantt .g-label small { font-weight: 400; color: var(--ink-3); font-size: 11px; }
.gantt .g-head { position: sticky; top: 0; z-index: 3; }
.gantt .g-head .g-label, .gantt .g-head .g-track { background: var(--sheet); border-bottom: 1px solid var(--ink); }
.gantt .g-track { position: relative; flex: none; border-bottom: 1px solid var(--grat-2); height: 44px; background-image: linear-gradient(90deg, var(--grat-2) 1px, transparent 1px); background-size: calc(60px * var(--px)) 100%; }
.gantt .g-head .g-track { height: 26px; background-image: none; }
.gantt .hour { position: absolute; bottom: 0; height: 26px; border-left: 1px solid var(--ink); font-size: 11px; color: var(--ink-2); padding: 3px 0 0 4px; font-variant-numeric: tabular-nums; }
.gantt .hour.q { height: 5px; border-left-color: var(--grat); }
.gantt .night { position: absolute; top: 0; bottom: 0; background: var(--hatch-night); }
.gantt .wxbad { position: absolute; top: 0; bottom: 0; background-image: var(--hatch-red); border-top: 2px solid var(--restricted); }
.gantt .wxmarg { position: absolute; top: 0; bottom: 0; border-top: 2px dashed var(--caution); background: rgba(180, 84, 10, .05); }
.gantt .blk { position: absolute; top: 6px; height: 32px; border-radius: 3px; background: var(--sheet); border: 1px solid var(--ink); font-size: 11px; line-height: 14px; padding: 1px 5px; overflow: hidden; cursor: pointer; white-space: nowrap; transition: opacity .16s var(--ease), box-shadow .16s var(--ease); }
.gantt .blk b { font-weight: 700; }
.gantt .blk.solo { border-style: dashed; }
.gantt .blk.sim { background: var(--water-wash); border-color: var(--water); color: var(--water); }
.gantt .blk.err { background-color: var(--restricted-wash); background-image: var(--hatch-red); border-color: var(--restricted); }
.gantt .blk.warn { box-shadow: inset 0 -3px 0 var(--caution); }
.gantt .blk.sel { box-shadow: 0 0 0 2px var(--gold); z-index: 1; }
.gantt .blk.dim { opacity: .28; }
.gantt .blk.canceled { opacity: .4; text-decoration: line-through; }
.gantt .nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--restricted); z-index: 2; pointer-events: none; }

/* Yan panel */
.sidebar { width: 384px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--grat); background: var(--paper); min-height: 0; }
.sidebar.closed { display: none; }
.sidetabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--grat); background: var(--margin); }
.sidetabs button { flex: 1; border: 0; background: none; padding: 9px 4px 7px; cursor: pointer; font-size: 12px; color: var(--ink-2); border-bottom: 2px solid transparent; }
.sidetabs button:hover { color: var(--ink); }
.sidetabs button.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; background: var(--paper); }
.sidebody { flex: 1; overflow: auto; padding: 14px; }
.sidebody h4 { margin: 18px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink); }
.sidebody h4:first-child { margin-top: 0; }
.sidebody textarea { width: 100%; min-height: 110px; border: 1px solid var(--grat); border-radius: var(--radius); padding: 8px 10px; resize: vertical; background: var(--sheet); line-height: 1.5; }
.sidebody textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-wash); }
.hint { color: var(--ink-2); font-size: 12px; margin: 5px 0; }
.row-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.note { background: var(--sheet); border: 1px solid var(--grat); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.note.ai { border-color: var(--gold-line); }
.note p { margin: 6px 0; }
.note ul { margin: 4px 0 6px; padding-left: 18px; }
.meta { color: var(--ink-3); font-size: 11px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 7px 4px; border-bottom: 1px solid var(--grat-2); }
.list li[data-fid] { cursor: pointer; }
.list li[data-fid]:hover { background: var(--gold-wash); }
.list li .ico { width: 14px; height: 14px; vertical-align: -3px; }
.job { border: 1px solid var(--gold-line); background: var(--sheet); border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; }
.job .track { height: 3px; background: var(--margin); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.job .track i { display: block; height: 100%; width: 35%; background: var(--gold); animation: slide 1.4s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .job .track i { animation: none; width: 100%; } * { transition: none !important; } }
.wxbase { margin-bottom: 16px; }
.wxbase header { display: flex; justify-content: space-between; align-items: baseline; }
.wxtable { border-collapse: collapse; width: 100%; font-size: 11.5px; margin: 6px 0; font-variant-numeric: tabular-nums; }
.wxtable th { text-align: left; color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--ink); padding: 3px 4px; }
.wxtable td { border-bottom: 1px solid var(--grat-2); padding: 3px 4px; }
.wxtable td.h { font-weight: 700; }
.wxtable tr.bad td.h { background-image: var(--hatch-red); color: var(--restricted); }
.wxtable tr.marg td.h { box-shadow: inset 0 -2px 0 var(--caution); color: var(--caution); }
.wxtable tr.night td { color: var(--ink-3); background-image: var(--hatch-night); }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 11px; white-space: pre-wrap; color: var(--ink-2); background: var(--sheet); border: 1px solid var(--grat-2); padding: 6px 8px; border-radius: 3px; }
.form-row { display: flex; gap: 6px; }
.form-row > * { flex: 1; min-width: 0; }

/* Tanimlar / ayarlar */
.page { padding: 16px 20px; overflow: auto; flex: 1; }
.subtabs { display: flex; gap: 2px; margin-bottom: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--grat); }
.subtabs button { border: 0; background: none; padding: 7px 12px; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs button.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.subtabs .cnt { color: var(--ink-3); font-variant-numeric: tabular-nums; }
table.defs { border-collapse: collapse; background: var(--sheet); width: 100%; border: 1px solid var(--grat); }
.defs th, .defs td { border-bottom: 1px solid var(--grat-2); padding: 3px 6px; text-align: left; font-size: 12px; }
.defs th { background: var(--sheet); position: sticky; top: 0; color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--ink); }
.defs tr:hover td { background: var(--hover); }
.defs td input, .defs td select { width: 100%; border: 1px solid transparent; background: transparent; padding: 3px 4px; border-radius: 3px; }
.defs td input:hover, .defs td select:hover { border-color: var(--grat); }
.defs td input:focus, .defs td select:focus { border-color: var(--gold); background: var(--field); outline: none; }
.defs td input[type=checkbox] { width: auto; }
.defs td.saved input, .defs td.saved select { background: var(--ok-wash); }
.search { padding: 5px 9px; border: 1px solid var(--grat); border-radius: var(--radius); background: var(--sheet); min-width: 220px; }
.form { display: grid; gap: 12px; max-width: 920px; }
.form h3 { margin: 10px 0 0; font-size: 15px; }
.form label { display: grid; gap: 4px; color: var(--ink-2); font-size: 12px; }
.form input, .form select, .form textarea { border: 1px solid var(--grat); border-radius: var(--radius); padding: 6px 8px; background: var(--sheet); color: var(--ink); }
.form textarea { min-height: 220px; line-height: 1.5; }
.form :is(input, select, textarea):focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-wash); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--sheet); padding: 9px 16px; border-radius: var(--radius); z-index: 50; max-width: 80vw; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.toast.err { background: var(--restricted); }
.modal { border: 1px solid var(--grat); border-radius: 6px; padding: 0; width: min(760px, 94vw); background: var(--sheet); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.modal::backdrop { background: rgba(23, 24, 26, .35); }
.modal-card { padding: 18px; max-height: 86vh; overflow: auto; }
.modal-card h3 { margin: 0 0 6px; }
.modal-card textarea { width: 100%; min-height: 220px; font-family: Consolas, monospace; font-size: 12px; border: 1px solid var(--grat); border-radius: var(--radius); padding: 8px; }

@media (max-width: 1180px) {
  .brand span { display: none; }
  .tabs button { padding: 0 8px; }
}
@media (max-width: 900px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 6px 10px; gap: 8px; }
  .sidebar { position: fixed; right: 0; top: 0; bottom: 0; z-index: 30; width: min(384px, 92vw); box-shadow: -10px 0 30px rgba(0, 0, 0, .2); }
  .datebox { margin-left: 0; }
}
.grid td:has(> .empty) { border: 0; }
button, .btn { touch-action: manipulation; }
.grid td.ed:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Kilit, bos satir, surukle-birak */
.grid tr.row.locked td.gut { color: var(--gold-ink); }
.lockmark { color: var(--gold-ink); }
.lockmark .ico { width: 13px !important; height: 13px !important; }
.grid td.acts button.on { color: var(--gold-ink); }
.grid tr.ghost td { background: var(--paper); border-bottom: 1px dashed var(--grat); color: var(--ink-3); }
.grid tr.ghost td.gut { color: var(--gold-ink); }
.grid tr.ghost .ph { color: var(--ink-3); font-style: italic; font-size: 12px; }
.grid tr.ghost:hover td { background: var(--gold-wash); }
.grid td[draggable="true"] { cursor: grab; }
body.dragging .grid td[data-drop] { box-shadow: inset 0 0 0 1px var(--grat); }
.grid td.drop-ok { box-shadow: inset 0 0 0 2px var(--gold) !important; background: var(--gold-wash) !important; }
.grid td.drop-no { box-shadow: inset 0 0 0 1px var(--grat) !important; opacity: .55; }
.sidebar.drop-remove { box-shadow: inset 0 0 0 3px var(--restricted); background-image: var(--hatch-red); }
.seg.pal { width: 100%; margin: 4px 0 8px; }
.seg.pal button { flex: 1; }
.pal-q { width: 100%; min-width: 0; margin-bottom: 8px; }
.chips { list-style: none; margin: 0 0 6px; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--grat-2); border-radius: var(--radius); background: var(--sheet); }
.chipitem { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 10px; border-bottom: 1px solid var(--grat-2); cursor: grab; user-select: none; }
.chipitem:hover { background: var(--gold-wash); }
.chipitem:active { cursor: grabbing; }
.chipitem .cname { font-weight: 600; }
.chipitem .csub { grid-column: 1; color: var(--ink-3); font-size: 11.5px; }
.chipitem .cload { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chipitem .cload.has { color: var(--gold-ink); font-weight: 600; }
.chipitem .cbusy { grid-column: 1; color: var(--restricted); font-size: 11px; }
.chipitem.busy .cname { text-decoration: line-through; color: var(--ink-3); }

/* Planlama skill'leri (Ayarlar) */
.skills { display: grid; gap: 6px; }
.skill { border: 1px solid var(--grat); border-radius: 4px; background: var(--field); padding: 0 10px; }
.skill[open] { padding-bottom: 10px; }
.skill summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; cursor: pointer; }
.skill .sw { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.skill textarea { width: 100%; min-height: 220px; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }

/* Kisi karti: izgaradaki FI/SP/OB rozeti dugme olarak */
button.tag.pc { border: 0; font: inherit; cursor: pointer; }
button.tag.pc:hover, button.tag.pc:focus-visible { outline: 1px solid currentColor; outline-offset: 1px; }
.modal table.kv { border-collapse: collapse; width: 100%; margin: 6px 0 10px; }
.modal table.kv th { text-align: left; font-weight: 600; padding: 3px 10px 3px 0; white-space: nowrap; vertical-align: top; width: 1%; }
.modal table.kv td { padding: 3px 0; }
.student .page { max-width: 760px; margin: 0 auto; }
.student .page { padding: 16px; overflow-wrap: anywhere; }
.student .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }
.student .grid2 input { width: 100%; box-sizing: border-box; }
.student .topbar .grow { flex: 1; }
.modal textarea#pcMsg { min-height: 0; height: 76px; }
.student .page { width: 100%; box-sizing: border-box; }
.form label.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.form label.toggle input { padding: 0; }

/* Kapasite */
table.cap tr[data-capm] { cursor: pointer; }
table.cap tr.sel { outline: 2px solid var(--gold, #b6985a); outline-offset: -2px; }
.capbase { margin: 10px 0 18px; }
.capdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; }
.capday { position: relative; border: 1px solid var(--grat); border-radius: var(--radius); padding: 4px 6px; font-size: 11px; line-height: 1.3; }
.capday .d { display: block; color: var(--ink-2); }
.capday b { font-size: 15px; }
.capday .pl { position: absolute; top: 3px; right: 5px; font-weight: 700; font-size: 10.5px; }
.capday .nt { position: absolute; bottom: 3px; right: 5px; font-size: 10px; font-weight: 700; color: #b42318; }
.capday.g { background: color-mix(in srgb, #2e7d32 14%, transparent); }
.capday.y { background: color-mix(in srgb, #c99700 18%, transparent); }
.capday.r { background: color-mix(in srgb, #b42318 16%, transparent); }
.capday.off { opacity: .45; }
.turnstile { min-height: 65px; display: flex; justify-content: center; }
