:root {
  color-scheme: dark;
  --bg: #10140f;
  --side: #141a12;
  --paper: #1b2418;
  --field: #10160e;
  --ink: #f3f7ee;
  --muted: #a8b8a0;
  --line: #31402d;
  --lime: #d6f25c;
  --lime-ink: #17200a;
  --ok: #9dffc4;
  --danger: #ff9b8a;
  font-family: "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; color: inherit; }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

textarea { resize: vertical; min-height: 140px; line-height: 1.45; }

button {
  border: 0;
  background: var(--lime);
  color: var(--lime-ink);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

button:hover { background: #e4ff7a; }
button.ghost:hover { background: #24301f; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 650; }
h1 { margin: 0; font-size: 1.35rem; font-weight: 700; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(214, 242, 92, 0.12), transparent 60%),
    var(--bg);
}

.login-card {
  width: min(400px, 100%);
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede, .hint, .muted { color: var(--muted); font-weight: 400; }
.lede { margin: 0 0 4px; line-height: 1.45; }
.form-error { color: var(--danger); margin: 8px 0 0; font-weight: 650; }

.notice {
  margin: 8px 0 0;
  color: var(--lime);
  font-size: 0.92rem;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px 1fr;
}

.side {
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.side-brand strong { display: block; font-size: 1rem; }
.side-brand span { color: var(--muted); font-size: 0.78rem; }

.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 800;
  flex: none;
}

nav { display: flex; flex-direction: column; gap: 4px; }

nav button {
  text-align: left;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 650;
  padding: 10px 12px;
}

nav button:hover { background: #202a1c; color: var(--ink); }
nav button.active { background: #2a3824; color: var(--lime); }

.work { min-width: 0; }

.bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 28px;
  background: var(--side);
  border-bottom: 1px solid var(--line);
}

.bar-actions { display: flex; align-items: center; gap: 8px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6d7b68;
}

.status.on { color: var(--ok); border-color: #2f6a48; }
.status.on::before { background: var(--ok); }

main {
  padding: 24px 28px 40px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stats > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 6px;
  min-height: 112px;
}

.stats span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats strong { font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.stats small { color: var(--muted); }

.stack-form, .grid-form, .demo {
  display: grid;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.grid-form { grid-template-columns: 1fr 1fr; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.check { grid-template-columns: auto 1fr; align-items: center; font-weight: 500; }
.steps { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; }
.reply {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--field);
  border: 1px solid var(--line);
}

.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
.phase { font-size: 0.85rem; }
.phase.canli { color: var(--ok); font-weight: 700; }
.phase.hata { color: var(--danger); font-weight: 700; }
.id { color: var(--muted); font-size: 0.82rem; word-break: break-all; font-weight: 400; }

#log-view {
  margin: 0;
  min-height: 360px;
  max-height: 70vh;
  overflow: auto;
  padding: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  white-space: pre-wrap;
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  nav { flex-direction: row; overflow: auto; }
  .stats, .rates, .grid-form, .split { grid-template-columns: 1fr; }
  .bar { align-items: flex-start; flex-direction: column; }
}
