:root {
  --navy: #14284b;
  --navy-2: #1d3766;
  --accent: #1f5fbf;
  --bg: #e9edf3;
  --line: #d5dbe5;
  --text: #1b2433;
  --muted: #667085;
  --ok: #1a7f4b;
  --warn: #b26a00;
  --bad: #b3261e;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.45 "Segoe UI", Tahoma, Arial, sans-serif; color: var(--text); background: var(--bg); overflow: hidden; }
button, input, select { font: inherit; color: inherit; }

/* Masaüstü */
#desktop { position: absolute; inset: 0 0 44px 0; }
#icons { position: absolute; left: 14px; top: 14px; bottom: 10px; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 4px 6px; }
.icon { background: none; border: 0; padding: 8px 4px; width: 96px; text-align: center; cursor: pointer; border-radius: 4px; position: relative; }
.term { flex: 1; margin: 0; padding: 10px 12px; background: #0f1b2e; color: #d6e2f5; font: 12px/1.5 Consolas, "Courier New", monospace; overflow: auto; white-space: pre-wrap; }
.termline { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #0f1b2e; color: #d6e2f5; font: 12px Consolas, "Courier New", monospace; border-top: 1px solid #24364f; flex: none; }
.termline input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font: inherit; }
.meter { display: inline-block; width: 70px; height: 7px; background: #e3e8f0; vertical-align: middle; margin-right: 6px; }
.meter i { display: block; height: 100%; background: var(--ok); }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }
.icon:hover { background: rgba(20, 40, 75, .08); }
#icons.free { display: block; right: 0; pointer-events: none; }
#icons.free .icon { position: absolute; pointer-events: auto; }
.icon.dragging { background: rgba(31, 95, 191, .14); outline: 1px dashed var(--accent); }
.deskmon-h { cursor: move; }
.icon .glyph { display: block; width: 40px; height: 40px; margin: 0 auto 5px; border-radius: 6px; background: var(--navy); color: #fff; font-weight: 600; font-size: 13px; line-height: 40px; letter-spacing: .5px; }
.icon .badge { position: absolute; top: 3px; right: 18px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; }

#desktop[hidden], #floor[hidden] { display: none; }

/* Ofis haritası */
#floor { position: absolute; inset: 0 0 44px 0; display: flex; flex-direction: column; align-items: center; padding: 12px 16px; gap: 10px; background: var(--bg); }
#floorHud { display: flex; justify-content: space-between; gap: 20px; width: min(100%, calc((100vh - 130px) * 1040 / 572)); }
#floorCanvas { width: min(100%, calc((100vh - 130px) * 1040 / 572)); aspect-ratio: 1040 / 572; cursor: pointer; border: 1px solid #b9c2d0; background: #fff; }

/* Masaüstündeki canlı ağ izleme panosu */
#deskmon { position: absolute; right: 14px; top: 14px; width: min(720px, calc(100% - 250px)); background: #fff; border: 1px solid #b9c2d0; z-index: 1; }
.deskmon-h { padding: 7px 12px; background: var(--navy); color: #fff; font-weight: 600; }
.deskmon-h { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 0; }
.deskmon-h a { padding: 7px 12px; cursor: pointer; color: #b9c7de; border-bottom: 2px solid transparent; }
.deskmon-h a.on { color: #fff; border-bottom-color: #7fb2ee; }
.deskmon-h .muted { color: #b9c7de; font-weight: 400; margin-left: auto; font-size: 12px; }
.srvmap { max-height: 560px; overflow: auto; }
.srvmap[hidden], .netmap[hidden] { display: none; }
table.tight td, table.tight th { padding: 4px 8px; font-size: 12px; }
table.tight { margin-bottom: 6px; }
.bays { display: inline-flex; gap: 2px; flex-wrap: wrap; max-width: 110px; }
.bays i { width: 10px; height: 14px; display: block; border-radius: 1px; }
.blink { animation: blink 1s steps(2, start) infinite; }
.blink.fast { animation-duration: .25s; }
@keyframes blink { to { opacity: .25; } }
.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; vertical-align: middle; }
.sig i { width: 4px; background: #d5dbe5; display: block; }
.sig i.ok { background: var(--ok); } .sig i.warn { background: var(--warn); } .sig i.bad { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }
.netmap { padding: 8px; }
.netmap .flow { stroke-dasharray: 7 5; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .netmap .flow { animation: none; } }
#wins { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
#wins .win { pointer-events: auto; }

#floor3d { width: min(100%, calc((100vh - 130px) * 1040 / 572)); aspect-ratio: 1040 / 572; cursor: pointer; border: 1px solid #b9c2d0; background: #dfe5ee; display: block; }
#floor3d[hidden], #floorCanvas[hidden] { display: none; }
.form textarea, textarea { font: inherit; padding: 5px 7px; border: 1px solid #b9c2d0; border-radius: 3px; width: 100%; resize: vertical; }

/* Sertifika */
.cert { padding: 18px; }
.cert-in { max-width: 640px; margin: 0 auto; padding: 34px 40px; border: 2px solid var(--navy); outline: 1px solid var(--navy); outline-offset: 5px; text-align: center; background: #fff; }
.cert-k { letter-spacing: 3px; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.cert h2 { margin: 0 0 18px; color: var(--navy); font-size: 26px; font-weight: 600; }
.cert-n { font-size: 24px; font-weight: 600; color: var(--navy); border-bottom: 1px solid var(--line); display: inline-block; padding: 0 30px 6px; margin: 4px 0 10px; }
.cert table { margin: 16px auto; border-collapse: collapse; }
.cert td { padding: 4px 14px; text-align: left; }
.cert-f { font-size: 11px; color: var(--muted); margin: 18px 0 0; }
@media print {
  body.printing > *:not(#desktop) { display: none !important; }
  body.printing #desktop > *:not(#wins) { display: none !important; }
  body.printing .win:not([data-win="res"]) { display: none !important; }
  body.printing .win[data-win="res"] { position: static !important; width: auto !important; height: auto !important; border: 0; box-shadow: none; }
  body.printing .win-h, body.printing .tabs, body.printing .cert ~ *, body.printing .pad { display: none !important; }
  body.printing #desktop, body.printing #wins { position: static; }
  body.printing .win-b, body.printing .main { overflow: visible; }
}

/* Pencereler */
.win { position: absolute; display: flex; flex-direction: column; background: #fff; border: 1px solid #b9c2d0; box-shadow: 0 8px 28px rgba(20, 40, 75, .18); min-width: 420px; min-height: 240px; resize: both; overflow: hidden; }
.win-h { display: flex; align-items: center; height: 34px; padding: 0 4px 0 12px; background: var(--navy); color: #fff; cursor: move; user-select: none; flex: none; }
.win-h span { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-h button { width: 30px; height: 26px; border: 0; background: none; color: #fff; font-size: 16px; cursor: pointer; }
.win-h button:hover { background: var(--bad); }
.win-b { flex: 1; overflow: auto; display: flex; flex-direction: column; min-height: 0; }

.split { display: flex; flex: 1; min-height: 0; }
.side { width: 200px; flex: none; border-right: 1px solid var(--line); overflow: auto; background: #f7f9fc; padding: 6px 0; }
.side h4 { margin: 8px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; }
.side a { display: block; padding: 5px 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side a:hover { background: #e8eef7; }
.side a.on { background: #dbe6f6; font-weight: 600; }
.main { flex: 1; overflow: auto; min-width: 0; }
.pad { padding: 12px 14px; }

.tools { display: flex; gap: 6px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); background: #f7f9fc; flex: none; }
.tools .sp { flex: 1; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #f7f9fc; flex: none; }
.tabs a { padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs a.on { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }

.btn { border: 1px solid #b9c2d0; background: #fff; padding: 4px 10px; border-radius: 3px; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: #184c9a; color: #fff; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: 2px 7px; font-size: 12px; }
.btn.on { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }

table.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; white-space: nowrap; }
.grid td { padding: 6px 10px; border-bottom: 1px solid #edf0f5; vertical-align: top; }
.grid tr.sel td { background: #eef4fc; }
.grid tr.click { cursor: pointer; }
.grid tr.click:hover td { background: #f3f7fd; }
.grid td.act { white-space: nowrap; text-align: right; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.muted { color: var(--muted); }
.pri { display: inline-block; min-width: 24px; font-size: 11px; color: var(--muted); }
.pri.P1 { color: var(--bad); } .pri.P2 { color: var(--warn); }
.st { white-space: nowrap; }
.st::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.st.ok { color: var(--ok); } .st.ok::before { background: var(--ok); }
.st.warn { color: var(--warn); } .st.warn::before { background: var(--warn); }
.st.bad { color: var(--bad); } .st.bad::before { background: var(--bad); }

/* Posta */
.mlist { width: 290px; flex: none; border-right: 1px solid var(--line); overflow: auto; }
.mitem { padding: 8px 12px; border-bottom: 1px solid #edf0f5; cursor: pointer; }
.mitem:hover { background: #f3f7fd; }
.mitem.on { background: #dbe6f6; }
.mitem.unread .ms { font-weight: 700; }
.mitem .mf { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.mitem .mf span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem .ms { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbody h3 { margin: 0 0 4px; font-size: 16px; }
.mbody .meta { color: var(--muted); padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.mbody .txt { white-space: pre-line; max-width: 62ch; }

/* Form ve diyalog */
.form { display: grid; grid-template-columns: 170px 1fr; gap: 8px 12px; align-items: center; max-width: 560px; }
.form input[type=text], .form input[type=password], .form input[type=number], .form select { width: 100%; padding: 5px 7px; border: 1px solid #b9c2d0; border-radius: 3px; background: #fff; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; max-height: 190px; overflow: auto; }
.checks label, .form label.c { display: flex; gap: 6px; align-items: center; }
#overlay { position: fixed; inset: 0; background: rgba(20, 40, 75, .35); display: flex; align-items: center; justify-content: center; z-index: 9000; }
#overlay[hidden] { display: none; }
.dlg { background: #fff; width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 60px); overflow: auto; border: 1px solid #b9c2d0; box-shadow: 0 12px 40px rgba(20, 40, 75, .3); }
.dlg h3 { margin: 0; padding: 10px 14px; background: var(--navy); color: #fff; font-size: 14px; }
.dlg-b { padding: 14px; }
.dlg-b p { margin: 0 0 10px; }
.dlg .err { color: var(--bad); margin: 0; padding: 0 14px; min-height: 0; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; }
.intro .dlg { width: 600px; }
.intro li { margin-bottom: 5px; }
.lvl { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.lvl input { margin-top: 3px; }
.warnline { padding: 8px 14px; background: #fff6e5; border-bottom: 1px solid #f0d9a8; color: #7a4a00; }

/* Görev çubuğu */
#bar { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 14px; white-space: nowrap; }
#bar .co { font-weight: 600; }
#bar .sp { flex: 1; }
#bar .kv { opacity: .95; }
#bar .kv b { font-weight: 600; margin-left: 4px; }
#bar .btn { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
#bar .btn:hover { border-color: #fff; color: #fff; }
#bar .btn.on { background: #fff; color: var(--navy); border-color: #fff; }
#bar .grp { display: flex; gap: 4px; }

#toasts { position: fixed; right: 14px; bottom: 56px; display: flex; flex-direction: column; gap: 8px; z-index: 9500; }
.toast { background: #fff; border-left: 3px solid var(--accent); box-shadow: 0 6px 20px rgba(20, 40, 75, .25); padding: 9px 14px; max-width: 340px; }
.toast.bad { border-left-color: var(--bad); }
.toast b { display: block; }

/* ---------- Yönetici araçları ve hizmet yönetimi ---------- */
.term.ps, .termline.ps { background: #012456; color: #eef3ff; }
.term.lx, .termline.lx { background: #1d1f21; color: #c5c8c6; }
.termline.lx span { color: #8fd18f; }
.grid.pk td { padding: 3px 8px; white-space: nowrap; }
.grid.pk td:last-child { white-space: normal; }
.grid tr.bad td { color: var(--bad); }
.note { background: #f3f6fb; border-left: 3px solid var(--accent); margin: 10px 12px; }
.split.v { flex-direction: column; }
.split.v > .main { flex: 1 1 55%; }
.split .detail { flex: 1 1 45%; overflow: auto; border-top: 1px solid var(--line); }
.grid.sel tr[data-act] { cursor: pointer; }
.grid.sel tr.on td { background: #eaf1fc; }
.chips { line-height: 2; }
.chip { display: inline-block; padding: 1px 8px; margin: 0 4px 0 0; border: 1px solid var(--line); border-radius: 3px; font: 11px Consolas, monospace; cursor: pointer; color: var(--text); }
.chip.ok { border-color: #b7dbc8; background: #f1f8f4; }
.chip.warn { border-color: #e8cf9e; background: #fdf6e9; color: var(--warn); }
.chip.bad { border-color: #e6b3ae; background: #fbefee; color: var(--bad); }
.chip.on { outline: 2px solid var(--accent); }
.bar { height: 8px; background: #edf1f6; min-width: 120px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 46px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.hist i { flex: 1; background: #8fb0e0; min-height: 1px; }
.chat { display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 75%; padding: 7px 10px; background: #f1f4f9; border: 1px solid var(--line); align-self: flex-start; }
.bub.me { align-self: flex-end; background: #e8f0fc; border-color: #c9daf3; }
.bub span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
/* ---------- Oyun yapısı: profil, uygulama menüsü, göstergeler ---------- */
.icon.all .glyph { background: #fff; color: var(--navy); border: 1px solid #b9c2d0; font-size: 18px; }
.wide .dlg { width: 860px; }
.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 18px; }
.launch h4 { margin: 8px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.launch .li { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eef1f5; }
.launch .li a { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; flex: 1; }
.launch .li a:hover { color: var(--accent); }
.launch .li.off a { cursor: default; color: var(--muted); }
.launch .glyph { width: 30px; height: 26px; line-height: 26px; text-align: center; background: var(--navy); color: #fff; font-size: 10px; font-weight: 600; border-radius: 4px; }
.launch .li.off .glyph { background: #9aa6b8; }
.launch .pin { background: none; border: 0; color: #c3cad6; font-size: 15px; cursor: pointer; padding: 2px 6px; }
.launch .pin.on { color: #d79b00; }
#bar .kv.mini b { margin-right: 6px; }
#bar .kv b.ok { color: #8fe3b5; } #bar .kv b.warn { color: #ffd27a; } #bar .kv b.bad { color: #ff9c94; }
.kpis { display: flex; gap: 12px; margin-top: 8px; }
.kpis div { flex: 1; border: 1px solid var(--line); padding: 10px 12px; }
.kpis b { display: block; font-size: 22px; color: var(--navy); }
.kpis span { color: var(--muted); font-size: 12px; }
.cols { display: flex; gap: 8px; flex-wrap: wrap; }
.cols > div { flex: 1 1 380px; }
.chk { list-style: none; padding: 0; margin: 0; }
.chk li { padding: 5px 0 5px 22px; border-bottom: 1px solid #eef1f5; position: relative; }
.chk li::before { position: absolute; left: 2px; font-weight: 700; }
.chk li.ok::before { content: '✓'; color: var(--ok); } .chk li.bad::before { content: '✗'; color: var(--bad); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.badges div { border: 1px dashed #c9d1dd; padding: 8px 10px; color: var(--muted); }
.badges div.on { border: 1px solid #b7dbc8; background: #f1f8f4; color: var(--text); }
.badges b { display: block; } .badges span { font-size: 12px; } .badges i { display: block; font-style: normal; font-size: 11px; color: var(--ok); margin-top: 3px; }
/* ---------- Eğitim katmanı ve erişilebilirlik ---------- */
.hint { border-left: 3px solid #d79b00; background: #fff8e8; padding: 6px 10px; margin: 8px 0; }
.hint b { display: block; font-size: 12px; color: var(--warn); }
ol.howto { margin: 4px 0 8px 18px; padding: 0; } ol.howto li { margin-bottom: 4px; }
.terms { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 12.5px; }
.terms dl, dl.glos { margin: 6px 0 0; }
.terms dt, dl.glos dt { font-weight: 600; color: var(--navy); margin-top: 6px; }
.terms dd, dl.glos dd { margin: 2px 0 0 0; color: #3a4558; }
dl.glos { padding: 6px 14px 14px; }
/* yüksek karşıtlık */
html.hc { --text: #000; --muted: #333; --line: #6b7280; --bg: #fff; }
html.hc .win, html.hc .dlg { border-color: #000; }
html.hc .grid td, html.hc .grid th { border-color: #6b7280; }
html.hc .btn { border-color: #000; color: #000; }
html.hc .btn.pri { background: #0b2a66; color: #fff; }
/* renk körlüğüne uygun durum renkleri: mavi / turuncu, durum ayrıca işaretle gösterilir */
html.cb { --ok: #1f5fbf; --bad: #c45a00; --warn: #8a6d00; }
html.cb .st.ok::before { content: '✓ '; } html.cb .st.bad::before { content: '✗ '; } html.cb .st.warn::before { content: '! '; }
/* hareketi azalt */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Kurum profili (açılış penceresi) */
details.prof { margin: 0 0 12px; border: 1px solid var(--line); padding: 6px 10px; }
details.prof summary { cursor: pointer; font-weight: 600; }
.pgrid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 4px 8px; align-items: center; margin-top: 6px; }
.pgrid input { width: 100%; box-sizing: border-box; }
.pgrid b { font-size: 12px; color: var(--muted); margin-top: 6px; }