/*
 * A vezérlőpult stílusa.
 *
 * A `nem-innen-fut/mockup/discord-dashboard-mockup/` terve alapján, csak
 * olvasható formában (a mockup CSS-e egyetlen tömörített sor volt) és
 * kiegészítve azzal, ami az élő felülethez kell: belépő képernyő,
 * hőtérkép-rács, üzenetsávok.
 */

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --panel: #11151d;
  --panel2: #171c25;
  --line: #242b37;
  --text: #eef2f7;
  --muted: #8d98a8;
  --accent: #5865f2;
  --green: #35d07f;
  --yellow: #f5c451;
  --red: #ef6b73;
}

* { box-sizing: border-box; }

/* A `hidden` attribútumot a böngésző alap-stíluslapja `display: none`-ra
   fordítja, de azt bármelyik saját `display` szabály felülírja. Enélkül a
   belépő képernyő a belépés után is kirajzolódott, és eltakarta a pultot. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 70% -10%, #26306b33, transparent 35%), var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; }
h1 { font-size: 25px; margin: 0; }
.muted { color: var(--muted); font-size: 12px; }
.green { color: var(--green); }
.yellow { color: var(--yellow); }
.red { color: var(--red); }

/* ============================================================ belépés */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  background: linear-gradient(180deg, #151a23, #10141b);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 36px 40px; max-width: 480px; text-align: center;
  box-shadow: 0 20px 50px #0007;
}
.login-card .logo { margin: 0 auto 14px; width: 48px; height: 48px; font-size: 18px; }
.login-card h1 { font-size: 21px; margin-bottom: 6px; }
.cmd {
  font-family: ui-monospace, Consolas, monospace; font-size: 17px;
  background: #0d1118; border: 1px solid #2a3240; border-radius: 10px;
  padding: 13px; margin: 18px 0; user-select: all; color: #b9c3d0;
}
.notice { border-radius: 10px; padding: 12px 14px; margin-top: 14px; text-align: left; font-size: 12px; }
.notice.bad { background: #221318; border: 1px solid #573039; color: #ff9da4; }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin: 0; }

/* ============================================================== váz */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 270px; background: #0d1016; border-right: 1px solid var(--line);
  padding: 18px 14px; display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; }
.brand small, .server small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #5865f2, #8b5cf6);
  display: grid; place-items: center; font-weight: 800;
}
.server {
  background: var(--panel); border: 1px solid var(--line); padding: 10px;
  border-radius: 12px; display: flex; gap: 9px; align-items: center; margin-bottom: 16px;
}
.server-icon {
  width: 32px; height: 32px; border-radius: 10px; background: #2a3040;
  display: grid; place-items: center; font-weight: 700;
}
.server b { font-size: 13px; }

nav { display: flex; flex-direction: column; gap: 3px; overflow: auto; }
.nav-group {
  font-size: 10px; text-transform: uppercase; color: #647083;
  letter-spacing: .12em; padding: 13px 10px 5px;
}
.nav-btn {
  border: 0; background: transparent; color: #aeb7c5; text-align: left;
  padding: 10px 11px; border-radius: 9px; cursor: pointer;
  display: flex; gap: 10px; align-items: center;
}
.nav-btn:hover, .nav-btn.active { background: #1a2030; color: #fff; }
.nav-btn.active { box-shadow: inset 3px 0 var(--accent); }

.side-footer {
  margin-top: auto; color: var(--muted); font-size: 12px; padding: 12px 9px;
  display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.bad { background: var(--red); box-shadow: 0 0 10px var(--red); }
.dot.idle { background: var(--muted); box-shadow: none; }
.side-footer a {
  margin-left: auto; background: transparent; border: 1px solid var(--line);
  color: #aeb7c5; border-radius: 7px; padding: 4px 8px; text-decoration: none;
}

.main { margin-left: 270px; width: calc(100% - 270px); padding: 0 34px 40px; }
.topbar {
  height: 100px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.crumb { color: #657083; font-size: 12px; margin-bottom: 5px; }
.crumb span { color: #9aa5b5; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.ghost, .primary {
  border: 1px solid var(--line); background: var(--panel); color: #dbe2ec;
  border-radius: 9px; padding: 9px 13px; cursor: pointer;
}
.ghost.active { background: #1a2030; border-color: var(--accent); color: #fff; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #3b4252; font-size: 12px; font-weight: 700;
}

/* =========================================================== kártyák */
.grid { display: grid; gap: 15px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0; }
.two { grid-template-columns: 1.45fr 1fr; }
.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: linear-gradient(180deg, #151a23, #10141b);
  border: 1px solid var(--line); border-radius: 13px; padding: 17px;
  box-shadow: 0 8px 30px #0002;
}
.card h3 { font-size: 14px; margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.metric .label { font-size: 12px; color: var(--muted); }
.metric .value { font-size: 28px; font-weight: 750; margin-top: 7px; }
.metric .sub { font-size: 11px; color: #6e7a8b; margin-top: 5px; }

.hero {
  padding: 22px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(135deg, #171d2a, #11151d); margin-bottom: 15px;
}
.hero h2 { margin: 0 0 7px; font-size: 18px; }
.hero p { margin: 0; color: var(--muted); font-size: 12px; }
.section-title {
  font-size: 12px; color: #8b97a8; text-transform: uppercase;
  letter-spacing: .08em; margin: 22px 0 9px;
}

/* ====================================================== űrlapelemek */
.form-grid { grid-template-columns: repeat(2, 1fr); }
.field { display: grid; gap: 7px; }
.field label { font-size: 11px; color: #aab4c2; }
.field .key { font-family: ui-monospace, Consolas, monospace; color: #7f8b9c; font-size: 10px; }
.field input, .field select {
  width: 100%; background: #0d1118; border: 1px solid #2a3240;
  color: #e9eef5; border-radius: 8px; padding: 10px;
}
.field input:focus { outline: 1px solid var(--accent); }
.field .with-btn { display: flex; gap: 7px; }
.field .with-btn input { flex: 1; }

/* rangválasztó */
.role-picker { display: grid; gap: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 9px;
  background: #1a202b; border: 1px solid #2a3240; border-radius: 99px; font-size: 12px;
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip-x {
  border: 0; background: transparent; color: #8d98a8; cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px; line-height: 1;
}
.chip-x:hover { background: #2a3240; color: var(--red); }
.field > .primary { justify-self: start; }
.field.wide { grid-column: 1 / -1; }
.level-roles { display: grid; gap: 10px; }
.level-rows { display: grid; gap: 10px; }
.level-row {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: start;
  padding: 10px; background: #0d1118; border: 1px solid #242c38; border-radius: 8px;
}
.level-num { display: grid; gap: 4px; font-size: 11px; }
.level-actions { display: flex; gap: 7px; }
@media (max-width: 700px) { .level-row { grid-template-columns: 1fr; } }

.toggle {
  display: flex; align-items: center; justify-content: space-between;
  background: #0d1118; border: 1px solid #242c38; border-radius: 8px;
  padding: 10px; cursor: pointer;
}
.switch { width: 38px; height: 21px; border-radius: 99px; background: #313948; padding: 3px; flex: none; }
.switch i { display: block; width: 15px; height: 15px; border-radius: 50%; background: #8893a4; transition: .15s; }
.switch.on { background: var(--accent); }
.switch.on i { margin-left: 17px; background: #fff; }
.secret { color: var(--muted); font-style: italic; font-size: 12px; }

/* ========================================================= táblázat */
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td { padding: 11px 9px; text-align: left; border-bottom: 1px solid #222936; }
.table th { color: #697588; font-weight: 600; }
.table tbody tr:hover { background: #151a23; }
.tag { padding: 4px 7px; border-radius: 6px; background: #202735; color: #bdc7d5; font-size: 11px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #202632; font-size: 12px; }
.row:last-child { border: 0; }
.mini-list { display: grid; gap: 2px; }

/* ================================================ napló és hőtérkép */
.log, .heat {
  font-family: ui-monospace, Consolas, monospace; font-size: 11px;
  background: #0b0e13; border: 1px solid #222935; border-radius: 10px;
  padding: 13px; line-height: 1.75; color: #aeb8c7;
  overflow: auto; white-space: pre; margin: 0;
}
.log { max-height: 60vh; line-height: 1.8; }

/* naplók és élő terminál */
.log-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.log-bar select, .log-bar input {
  background: #0d1118; border: 1px solid #2a3240; color: #e9eef5; border-radius: 8px; padding: 8px 10px;
}
.log-bar input { flex: 1; min-width: 160px; }
.log-lines, .terminal { white-space: normal; line-height: 1.55; }
.terminal { height: 68vh; max-height: none; background: #07090d; }
.ll { white-space: pre-wrap; word-break: break-word; padding: 1px 0; }
.ll-err { color: var(--red); }
.ll-warn { color: var(--yellow); }
.ll-ok { color: var(--green); }
.ll-src {
  display: inline-block; min-width: 38px; margin-right: 8px; padding: 0 5px; border-radius: 4px;
  font-size: 10px; text-align: center; background: #202735; color: #bdc7d5;
}
.ll-src-bot { background: #1d2a4a; color: #9fb4ff; }
.ll-src-monitor { background: #2b2140; color: #c9a8ff; }
.ll-src-szolgaltatas { background: #1f3330; color: #8fe0cf; }
.ll-src-watcher { background: #3a2a18; color: #ffc98a; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #aab4c2; cursor: pointer; }
.heat { line-height: 1.35; font-size: 13px; }

.bar { height: 9px; border-radius: 99px; background: #252c37; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #7fe7a9); border-radius: 99px; }

/* ========================================================= üzenetek */
.toast {
  position: fixed; right: 25px; bottom: 25px; background: #202735;
  border: 1px solid #364052; color: #fff; padding: 11px 14px; border-radius: 9px;
  opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }
.toast.bad { border-color: #573039; background: #221318; color: #ff9da4; }

@media (max-width: 900px) {
  .sidebar { width: 220px; }
  .main { margin-left: 220px; width: calc(100% - 220px); padding: 0 18px; }
  .stats-grid, .two, .three, .form-grid { grid-template-columns: 1fr; }
}
