/* Mercek — kontrol odası konsolu. Space Grotesk + IBM Plex Sans/Mono. */
:root {
  --ink: #0d1521;
  --surface: #131f2e;
  --surface-2: #19293b;
  --line: #27394f;
  --line-soft: #1f2e42;
  --text: #e9f0f8;
  --muted: #8ca3bd;
  --faint: #5f748d;
  --amber: #eaa83c;      /* gosterge / marka accent */
  --amber-soft: rgba(234,168,60,.14);
  --ok: #3ad0a0;         /* cevrimici / saglik */
  --danger: #ef6a5a;     /* cevrimdisi / yikici */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.55);
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
:root[data-theme="light"] {
  --ink: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --line: #d9e2ec;
  --line-soft: #e6ecf3;
  --text: #16222f;
  --muted: #5a6b7e;
  --faint: #8395a6;
  --amber: #c77d16;
  --amber-soft: rgba(199,125,22,.12);
  --ok: #1aa578;
  --danger: #d6452f;
  --shadow: 0 12px 30px -16px rgba(16,34,51,.3);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 78% -10%, var(--amber-soft), transparent 60%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: .005em;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; }

/* Ust komut cubugu */
.bar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), transparent);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.mark { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; font-size: 19px; }
.mark .lens {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--amber);
  position: relative; flex: none;
  box-shadow: 0 0 0 3px var(--amber-soft);
}
.mark .lens::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--text), transparent 70%); opacity: .5; }
.mark b { color: var(--amber); font-weight: 600; }
.bar .crumb { color: var(--muted); font-family: var(--display); }
.bar .spacer { flex: 1; }
.bar .clock { font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.iconbtn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 16px;
  transition: border-color .15s, color .15s;
}
.iconbtn:hover { border-color: var(--amber); color: var(--amber); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 26px 22px 72px; }

/* Sayfa basligi + canli sayac */
.head { display: flex; align-items: baseline; gap: 16px; margin: 6px 2px 22px; flex-wrap: wrap; }
.head h1 { font-size: 26px; }
.head .stats { display: flex; gap: 18px; margin-left: auto; }
.head .stat { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.head .stat b { color: var(--text); font-weight: 600; }
.head .stat .live { color: var(--ok); }

/* Video duvari */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.screen {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .18s, transform .18s;
}
.screen:hover { border-color: var(--amber); transform: translateY(-3px); }
.glass {
  display: block;
  aspect-ratio: 16 / 10; background: #060b12; position: relative;
  background-size: cover; background-position: top center;
  border-bottom: 1px solid var(--line);
}
.screen { display: block; }
.glass.empty::after {
  content: "sinyal yok"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--faint); font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
}
.screen .bar2 { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.screen .name { font-family: var(--display); font-weight: 500; font-size: 15px; }
.screen .meta { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.led.on { background: var(--ok); box-shadow: 0 0 0 0 rgba(58,208,160,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(58,208,160,.5); } 70% { box-shadow: 0 0 0 7px rgba(58,208,160,0); } 100% { box-shadow: 0 0 0 0 rgba(58,208,160,0); } }

.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state b { color: var(--text); font-family: var(--display); display: block; margin-bottom: 6px; font-size: 17px; }

/* Detay: sahne + konsol */
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stage .screenbox { aspect-ratio: 16/9; max-height: 56vh; background: #060b12; display: grid; place-items: center; }
.stage img { width: 100%; height: 100%; object-fit: contain; }
.stage .toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }

.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--amber); }
.btn.primary { background: var(--amber); color: #1a1205; border-color: var(--amber); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }

.tabs { display: flex; gap: 2px; margin: 26px 0 0; border-bottom: 1px solid var(--line); }
.tab {
  padding: 11px 18px; cursor: pointer; color: var(--muted);
  font-family: var(--display); font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--amber); border-bottom-color: var(--amber); }
.pane { display: none; padding: 20px 2px; }
.pane.active { display: block; }

/* Tablolar */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
td { font-size: 14px; }
td.t, td.dur { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
tr:hover td { background: var(--surface-2); }

/* Uygulama sure cubuklari */
.usage { display: grid; gap: 10px; }
.usage .row { display: grid; grid-template-columns: 180px 1fr 70px; align-items: center; gap: 12px; }
.usage .app { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage .track { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.usage .fill { height: 100%; background: linear-gradient(90deg, var(--amber), #d98a2b); border-radius: 5px; }
.usage .val { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }

/* Terminal */
.warn {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--amber-soft); border: 1px solid var(--amber);
  color: var(--text); padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13.5px;
}
.term {
  background: #060b12; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; font-family: var(--mono); font-size: 13px; line-height: 1.6;
  min-height: 300px; max-height: 420px; overflow: auto; white-space: pre-wrap; color: #9fe9c6;
}
.term .cmd { color: var(--amber); }
.term .sys { color: var(--muted); }
.cmdline { display: flex; gap: 10px; margin-top: 12px; }
.cmdline .prompt { align-self: center; font-family: var(--mono); color: var(--amber); }
.cmdline input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-family: var(--mono); font-size: 13px;
}
.cmdline input:focus { outline: none; border-color: var(--amber); }

/* Giris + KVKK */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.card.kvkk { max-width: 540px; }
.card h1 { font-size: 22px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.card label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.card input[type=text], .card input[type=password] {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 13px; border-radius: var(--radius-sm); font-family: var(--sans); font-size: 15px;
}
.card input:focus { outline: none; border-color: var(--amber); }
.card .btn { width: 100%; margin-top: 22px; text-align: center; }
.card .mark { justify-content: center; margin-bottom: 20px; }
.consent { display: flex; gap: 11px; align-items: flex-start; margin: 20px 0 4px; font-size: 14px; color: var(--text); line-height: 1.5; }
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--amber); flex: none; }
.err { background: rgba(239,106,90,.12); border: 1px solid var(--danger); color: var(--text); padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13.5px; margin-top: 14px; }

/* Sol menu duzeni */
.app { display: flex; min-height: 100vh; }
.side {
  width: 234px; flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.side .mark { margin: 6px 8px 24px; font-size: 19px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; font-size: 14.5px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--amber-soft); color: var(--amber); }
.nav .ni { width: 18px; text-align: center; font-size: 13px; }
.nav .dot-on { color: var(--ok); }
.nav .dot-off { color: var(--faint); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 6px 2px; border-top: 1px solid var(--line-soft); }
.side-foot .clock { flex: 1; }
.side-actions { display: flex; gap: 8px; }
.main { flex: 1; min-width: 0; padding: 26px 32px 72px; }
.head.detail h1 { display: flex; align-items: center; gap: 10px; }
.head .crumb { color: var(--muted); font-family: var(--display); }
.head .stat.off b { color: var(--muted); }

.group { font-family: var(--display); font-weight: 500; font-size: 14px; color: var(--muted);
  display: flex; align-items: center; gap: 9px; margin: 28px 2px 14px; }
.col { display: flex; flex-direction: column; min-width: 0; }
.person { font-size: 12px; color: var(--muted); }

/* Ayarlar */
.note { background: var(--amber-soft); border: 1px solid var(--amber); color: var(--text);
  padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; }
.note.token code { display: inline-block; margin-top: 6px; font-family: var(--mono); color: var(--amber); word-break: break-all; }
.panelbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 20px; }
.panelbox h2 { font-size: 16px; margin-bottom: 14px; }
.panelbox.split { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.settings-tbl th { font-size: 12px; }
.settings-tbl td { vertical-align: middle; }
form.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
form.inline.add { margin-top: 16px; }
form.inline input, form.stack input {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 9px 11px; border-radius: var(--radius-sm); font-family: var(--sans); font-size: 14px;
}
form.inline input:focus, form.stack input:focus { outline: none; border-color: var(--amber); }
form.stack { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
form.stack label { font-size: 13px; color: var(--muted); }
.btn.sm { padding: 8px 13px; font-size: 13px; }
.btn.danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn.danger:hover { background: rgba(239,106,90,.1); }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; align-items: center;
    gap: 12px; padding: 10px 12px; overflow-x: auto; }
  .side .mark { margin: 0 6px 0 2px; }
  .nav { flex-direction: row; gap: 4px; }
  .side-foot { margin: 0 0 0 auto; border: none; padding: 0; }
  .side-foot .clock { display: none; }
  .main { padding: 18px 16px 56px; }
  .panelbox.split { grid-template-columns: 1fr; gap: 20px; }
  .usage .row { grid-template-columns: 110px 1fr 56px; }
  .head h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .led.on { animation: none; } .screen { transition: none; } }
