/* Numerator - ortak stiller. Koyu tema; TV ve oda ekranlarinda okunakli. */
:root {
  --bg: #0e1116;
  --panel: #171b22;
  --panel-2: #1f242d;
  --line: #2b323d;
  --text: #e8edf4;
  --muted: #93a0b3;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/*
 * hidden ozniteligi her zaman gizlesin.
 * Tarayicinin varsayilan [hidden] { display: none } kurali, asagidaki
 * .login / .current-active gibi display tanimlari tarafindan eziliyordu;
 * gizlenmesi gereken bloklar sayfada gorunur kaliyordu.
 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter .12s ease, transform .06s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--accent-strong); border-color: var(--accent); }
.btn-ok { background: #15803d; border-color: var(--ok); }
.btn-warn { background: #a16207; border-color: var(--warn); }
.btn-danger { background: #991b1b; border-color: var(--danger); }
.btn-lg { padding: 22px 28px; font-size: 1.35rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* Baglanti durumu rozeti */
.conn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--muted);
}
.conn::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.conn.online::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.conn.offline::before { background: var(--danger); }

/* Bildirim */
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 22px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
  max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--danger); background: #3b1414; }
#toast.ok { border-color: var(--ok); background: #10301b; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.tag-wait { color: #93c5fd; border-color: #1e3a8a; background: #12203c; }
.tag-service { color: #fcd34d; border-color: #78350f; background: #33240a; }
.tag-done { color: #86efac; border-color: #14532d; background: #0d2818; }
.tag-cancel { color: #fca5a5; border-color: #7f1d1d; background: #2e1010; }

/* Ekran anahtari giris formu */
#keygate {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; place-items: center; padding: 20px;
}
.keygate-box { display: grid; gap: 14px; width: min(440px, 100%); }
.keygate-box h1 { margin: 0; font-size: 1.35rem; }
.keygate-box p { margin: 0; font-size: .9rem; }
.keygate-box p.small { font-size: .8rem; line-height: 1.5; }
.keygate-box input {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px; font-size: 1rem; font-family: inherit;
}
.keygate-box input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
