/* Uzak erişim paneli — taslaktaki görünüm (açık tema, IBM Plex) */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --line: #e1e6ed; --line-2: #edf0f4; --field: #ccd4df;
  --txt: #172131; --txt-2: #3a4658; --muted: #566377; --faint: #7a8698;
  --nav: #0f1a2b; --nav-2: #1d2c44; --nav-txt: #c6d1df; --nav-muted: #9aa9bd;
  --accent: #1d5fd1; --accent-h: #16479e;
  --ok: #0f7a43; --ok-bg: #e6f6ed; --ok-dot: #16a35a;
  --warn: #8a5300; --warn-bg: #fdf2dc; --warn-dot: #d98a00;
  --bad: #b02f1a; --bad-bg: #fdebe8; --bad-dot: #c0341d;
  --mute-bg: #eef1f5;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--txt); font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.45; }
a { color: var(--accent); } a:hover { color: var(--accent-h); }
button, input, select { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; color: #2b3747; }
.muted { color: var(--muted); }

/* yerleşim */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.nav { flex: 1 1 220px; max-width: 100%; background: var(--nav); color: #dbe3ee; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: #2f7cf6; display: flex; align-items: center; justify-content: center; }
.brand b { display: block; font-size: 16px; color: #fff; }
.brand span { font-size: 12px; color: var(--nav-muted); }
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-links a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--nav-txt); text-decoration: none; }
.nav-links a:hover { background: #18263b; color: #fff; }
.nav-links a.on { background: var(--nav-2); color: #fff; font-weight: 600; }
.nav-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid #24344d; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #2a3b55; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.nav-user .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nav-user .who a { color: #fff; text-decoration: none; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.nav-user .who span { font-size: 12px; color: var(--nav-muted); text-transform: capitalize; }
.nav-user button { background: none; border: 0; color: var(--nav-muted); cursor: pointer; min-height: 36px; padding: 0 6px; }
.nav-user button:hover { color: #fff; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 600px) { .main { padding: 20px 16px 40px; } }

.head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.head .title { flex: 1 1 260px; display: flex; flex-direction: column; }
h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 18px; font-weight: 600; }
.sub { color: var(--muted); font-size: 14px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 14px; min-height: 32px; }

/* kontroller */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface); color: var(--txt); text-decoration: none; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #aab5c4; color: var(--txt); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.pill { height: 32px; border-radius: 16px; padding: 0 12px; font-size: 13px; color: var(--accent); }
input[type=text], input[type=password], input[type=search], select {
  height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; background: #fff; color: var(--txt); min-width: 0; width: 100%; }
input:focus-visible, select:focus-visible, .btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #9cc0ff; outline-offset: 1px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.check input { width: 18px; height: 18px; margin: 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* kartlar */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.card > h2 { margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat b { font-size: 30px; font-weight: 700; }
.stat b small { font-size: 18px; color: var(--muted); font-weight: 500; }
.stat b.ok { color: var(--ok); } .stat b.bad { color: var(--bad-dot); } .stat b.acc { color: var(--accent); }

.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.hubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.hub { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; text-align: left; cursor: pointer; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--txt); }
.hub.has-offline { border-color: #f0c4bc; }
.hub[aria-pressed=true] { border: 2px solid var(--hub); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hub) 14%, transparent); padding: 15px 17px; }
.hubs.filtering .hub[aria-pressed=false] { opacity: .55; }
.hub-top { display: flex; align-items: center; gap: 12px; }
.badge { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--hub); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.hub-name { display: flex; flex-direction: column; min-width: 0; }
.hub-name b { font-size: 16px; font-weight: 600; }
.hub-name span { font-size: 13px; color: var(--muted); }
.hub-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--txt-2); flex-wrap: wrap; }
.hub-meta .eng { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok-dot); }
.dot.bad { border: 2px solid var(--bad-dot); }
.dot.warn { background: var(--warn-dot); }
.dot.none { border: 2px solid #9aa6b5; }
.i { display: inline-flex; align-items: center; gap: 6px; }
.i.bad { color: var(--bad-dot); font-weight: 600; }

/* tablo */
.table-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-box table { min-width: 720px; }
th { padding: 12px 18px; text-align: left; background: #f7f9fb; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.is-off td { background: #fffafa; }
td.nowrap { white-space: nowrap; }
td.end { text-align: right; white-space: nowrap; }
.rname { display: flex; flex-direction: column; }
.rname b { font-weight: 600; }
.rname span { color: var(--muted); font-size: 13px; }
.hubtag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--txt); }
.hubtag i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--hub); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status.online { color: var(--ok); background: var(--ok-bg); }
.status.offline { color: var(--bad); background: var(--bad-bg); }
.status.never, .status.unknown { color: var(--muted); background: var(--mute-bg); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--warn-bg); color: var(--warn); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
[data-col].col-off { display: none; }
tr.filtered-out { display: none; }

/* sütun menüsü */
.cols { margin-left: auto; position: relative; }
.cols-menu { position: absolute; right: 0; top: 46px; z-index: 5; width: 260px; background: #fff; border: 1px solid #d6dce4; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,26,43,.16); padding: 10px 6px; display: flex; flex-direction: column; }
.cols-menu[hidden] { display: none; }
.cols-menu .cap { padding: 4px 12px 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cols-menu label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.cols-menu label:hover { background: #f3f5f8; }
.cols-menu label.locked { color: var(--faint); cursor: default; }
.cols-menu label.locked:hover { background: none; }
.cols-menu label small { margin-left: auto; font-size: 12px; color: var(--faint); }
.cols-menu input { width: 18px; height: 18px; margin: 0; }

/* bildirimler */
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #b9e3c9; color: #0b5c33; }
.flash.error { background: var(--bad-bg); border-color: #f2c2b9; color: #8c2414; }
.flash.warn { background: var(--warn-bg); border-color: #f0d9a8; color: #6b4100; }
.secret { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 12px; background: #0f1a2b; color: #dbe3ee; }
.secret code { font-family: var(--mono); font-size: 18px; color: #fff; background: #1d2c44; padding: 6px 12px; border-radius: 8px; letter-spacing: .04em; }

/* giriş */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 20px; }
.login .card { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.login .brand { padding: 0; }
.login .brand b { color: var(--txt); }
.login .brand span { color: var(--muted); }

.two { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.two > .wide { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.two > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 44px; }
.swatches label { position: relative; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; cursor: pointer; }
.swatches span { display: block; width: 28px; height: 28px; border-radius: 8px; background: var(--hub); }
.swatches input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hub); }
.swatches input:focus-visible + span { outline: 3px solid #9cc0ff; outline-offset: 3px; }
