/* TESTPLUS Yönetim Sistemi — stil dosyası
   Renkler tek yerden (:root) yönetilir. */
:root {
  --navy: #14304d;
  --navy-2: #1d4268;
  --ink: #1b2836;
  --muted: #5f6f80;
  --line: #dde4ec;
  --bg: #f3f6f9;
  --card: #ffffff;
  --accent: #1f6fb2;
  --accent-soft: #e6f0f9;
  --ok: #1f8a58;   --ok-soft: #e3f4ec;
  --warn: #b7791f; --warn-soft: #fbf1df;
  --bad: #c0392b;  --bad-soft: #fbe7e5;
  --radius: 8px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 16px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.num, td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--navy) 232px, var(--bg) 232px); }
.page-head h1 .mono { font-size: inherit; color: var(--muted); }
.avs { white-space: nowrap; }
.side { background: var(--navy); color: #cfdbe8; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; color: #fff; font-weight: 700; letter-spacing: .08em; }
.brand small { display: block; font-weight: 400; letter-spacing: .02em; font-size: 11px; color: #9fb4ca; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; letter-spacing: 0; }
#nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; }
#nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #7f98b3; padding: 14px 10px 4px; }
#nav a { color: #d6e1ec; padding: 8px 10px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; }
#nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
#nav a.on { background: #fff; color: var(--navy); font-weight: 600; }
#nav .cnt { font-size: 11px; background: var(--bad); color: #fff; border-radius: 10px; padding: 0 7px; }
.rates { margin: auto 12px 14px; background: rgba(255,255,255,.06); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }
.rates div { display: flex; justify-content: space-between; padding: 2px 0; font-variant-numeric: tabular-nums; }
.rates .t { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #7f98b3; margin-bottom: 4px; }
.rates b { color: #8fe0b5; font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 24px; }
.top-title { font-weight: 600; font-size: 15px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.me { color: var(--muted); font-size: 13px; }
.menu { display: none; }
.view { padding: 22px 24px 60px; display: flex; flex-direction: column; gap: 18px; max-width: 1480px; width: 100%; }

/* ---------- Sayfa başlığı ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Kartlar ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card > .bd { padding: 14px 16px; }
.card > .bd.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi.ok .v { color: var(--ok); } .kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); } .kpi.acc .v { color: var(--accent); }

/* ---------- Butonlar & formlar ---------- */
.btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 6px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #b8c6d4; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--ink); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
label.chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
label.chk input { width: auto; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { flex-direction: row; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; color: var(--ink); font-weight: 500; cursor: pointer; }
.chips input { width: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { width: 240px; }
.filters select { width: auto; }
.err { color: var(--bad); margin: 0; }

/* ---------- Tablolar ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #f8fafc; white-space: nowrap; user-select: none; }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--ink); }
th .arr { opacity: .6; font-size: 10px; }
tbody tr:hover { background: #f8fbfe; }
tr.click { cursor: pointer; }
tfoot td { font-weight: 700; background: #f8fafc; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.tbl-foot { padding: 8px 16px; color: var(--muted); font-size: 12.5px; }

/* ---------- Rozetler ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.mute { background: #eef1f4; color: var(--muted); }
.type { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--navy); background: #e9eef4; border-radius: 4px; padding: 2px 6px; }
.av { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 5px; border-radius: 12px; background: #e9eef4; color: var(--navy); font-size: 11px; font-weight: 700; margin-right: 3px; }
.prog { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.prog .bar { flex: 1; height: 6px; background: #e7ecf1; border-radius: 3px; overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: var(--accent); }
.prog.done .bar i { background: var(--ok); }
.prog span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); width: 34px; text-align: right; }

/* ---------- Proje süreç adımları ---------- */
.steps { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; }
.step { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.step .n { font-size: 11px; color: var(--muted); font-weight: 600; }
.step .t { font-weight: 600; }
.step.on { border-color: #a8d8bf; background: var(--ok-soft); }
.step:disabled { cursor: default; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { font: inherit; background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--navy); border-color: var(--navy); font-weight: 600; }

.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; }
.dl div { display: flex; flex-direction: column; gap: 2px; }
.dl dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dl dd { margin: 0; font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .sub { color: var(--muted); font-size: 12.5px; }

.note { border-left: 3px solid var(--accent); background: #f8fbfe; padding: 8px 12px; border-radius: 0 6px 6px 0; }
.note .meta { font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* ---------- Grafikler ---------- */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.hbar { display: grid; grid-template-columns: 110px 1fr 90px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.hbar .track { height: 10px; background: #edf1f5; border-radius: 5px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--navy-2); border-radius: 5px; }

/* ---------- Takvim ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dh { padding: 6px 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: #f8fafc; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .d { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .d.out { background: #fafbfc; color: #a9b5c1; }
.cal .d.today { background: #f2f8fd; }
.cal .d .dn { font-size: 12px; font-weight: 600; }
.ev { font-size: 11.5px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ev.task { background: var(--accent-soft); color: var(--accent); }
.ev.task.done { text-decoration: line-through; opacity: .6; }
.ev.project { background: #e9eef4; color: var(--navy); }
.ev.cert { background: var(--warn-soft); color: var(--warn); }
.ev.device { background: var(--bad-soft); color: var(--bad); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; align-items: start; }
.col { background: #eef2f6; border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.col h3 { padding: 2px 4px 4px; display: flex; justify-content: space-between; }
.tcard { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.tcard .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tcard.hi { border-left: 3px solid var(--bad); }

/* ---------- Modal & bildirim ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,30,48,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 10px; width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal .hd { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal .bd { padding: 16px 18px; overflow-y: auto; }
.modal .ft { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.modal .ft .r { display: flex; gap: 8px; margin-left: auto; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy) 0%, #0d2136 100%); padding: 16px; }
.login-card { background: #fff; border-radius: 12px; padding: 28px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.brand-lg { color: var(--navy); padding: 0 0 8px; }
.brand-lg .brand-mark { background: var(--navy); color: #fff; }
.brand-lg small { color: var(--muted); }

/* ---------- Mobil ---------- */
@media (max-width: 980px) {
  .g2, .g3, .g-main { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: fixed; z-index: 40; width: 240px; left: -260px; transition: left .2s; }
  .side.open { left: 0; }
  .menu { display: block; }
  .top { padding: 10px 16px; }
  .view { padding: 16px 16px 60px; }
  .form { grid-template-columns: 1fr; }
  .filters input[type=search] { width: 100%; }
  .cal .d { min-height: 70px; }
  .me { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
