/* Recon console.
   Dark, high-contrast, faction-flavoured. No framework, no build step. */

:root {
  --bg:        #0d0f11;
  --bg-1:      #14171a;
  --bg-2:      #1b1f23;
  --bg-3:      #23282e;
  --line:      #2b3138;
  --line-soft: #21262c;

  --tx:        #e8eaed;
  --tx-2:      #9aa3ad;
  --tx-3:      #626d78;

  --amber:     #f5a623;   /* lambda / resistance accent */
  --amber-dim: rgba(245, 166, 35, .13);
  --ok:        #3fb950;
  --warn:      #d29922;
  --bad:       #f85149;
  --blue:      #58a6ff;

  --radius:    10px;
  --mono:      ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--bg-3);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--amber);
}

/* ---------------------------------------------------------------- chrome */

.topbar {
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 56px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}

.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; letter-spacing: .13em; font-size: 14px;
  color: var(--tx); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.lambda { color: var(--amber); font-size: 19px; line-height: 1; }
.lambda.big { font-size: 52px; display: block; margin-bottom: 6px; }

.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  padding: 7px 13px; border-radius: 7px;
  color: var(--tx-2); font-size: 14px; font-weight: 500;
}
.topbar nav a:hover { background: var(--bg-2); color: var(--tx); text-decoration: none; }
.topbar nav a.on { background: var(--amber-dim); color: var(--amber); }

.me { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--tx-2); }

main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 60px; }
main.centered { display: flex; align-items: center; justify-content: center; min-height: 78vh; }

.foot {
  text-align: center; padding: 20px; color: var(--tx-3); font-size: 12px;
  border-top: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------- type */

h1 { font-size: 25px; margin: 0 0 20px; font-weight: 650; letter-spacing: -.2px; }
h2 { font-size: 17px; margin: 30px 0 12px; font-weight: 600; }
h3 { font-size: 14px; margin: 22px 0 9px; font-weight: 600;
     text-transform: uppercase; letter-spacing: .07em; color: var(--tx-2); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.head h1 { margin-bottom: 20px; }

.sub  { color: var(--tx-2); margin: 0 0 18px; }
.dim  { color: var(--tx-2); }
.tiny { font-size: 11px; }
.fine { color: var(--tx-3); font-size: 12px; margin-top: 10px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.right { text-align: right; }
.clip { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- blocks */

.card {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.card.narrow { max-width: 560px; }
.card h2:first-child { margin-top: 0; }

.alert {
  border-radius: 8px; padding: 12px 15px; margin-bottom: 16px;
  border: 1px solid; font-size: 14px;
}
.alert.ok   { background: rgba(63,185,80,.08);  border-color: rgba(63,185,80,.35);  color: #7ee787; }
.alert.warn { background: rgba(210,153,34,.08); border-color: rgba(210,153,34,.35); color: #e3b341; }
.alert.bad  { background: rgba(248,81,73,.08);  border-color: rgba(248,81,73,.35);  color: #ff7b72; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.stat {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 20px; min-width: 118px;
}
.stat b { display: block; font-size: 26px; font-weight: 650; line-height: 1.15; }
.stat span { color: var(--tx-2); font-size: 12px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: 7px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--tx); font: inherit; font-size: 14px; font-weight: 500;
  text-decoration: none;
}
.btn:hover { background: #2b3138; text-decoration: none; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #17130a; font-weight: 600; }
.btn.primary:hover { background: #ffb739; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: rgba(248,81,73,.45); color: var(--bad); }
.btn.danger:hover { background: rgba(248,81,73,.12); }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.wide { width: 100%; }

input, textarea, select {
  width: 100%; padding: 9px 11px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  color: var(--tx); font: inherit; font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim);
}
input[readonly] { color: var(--tx-2); background: var(--bg-2); }
textarea { resize: vertical; font-family: inherit; }

label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--tx-2); font-weight: 500; }
label > input, label > textarea, label > select { margin-top: 5px; }
label small { display: block; margin-top: 5px; color: var(--tx-3); font-weight: 400; font-size: 11.5px; }

label.check { display: flex; align-items: center; gap: 8px; color: var(--tx); }
label.check input { width: auto; margin: 0; }
label.check.tight { margin-bottom: 0; font-size: 13px; color: var(--tx-2); }

fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 0 0 16px;
}
legend { padding: 0 8px; font-size: 12px; text-transform: uppercase;
         letter-spacing: .07em; color: var(--tx-2); font-weight: 600; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.actions { display: flex; align-items: center; gap: 16px; }
.filters { display: flex; gap: 10px; margin-bottom: 18px; }
.filters input { max-width: 320px; }
.filters select { max-width: 180px; }

.colorwrap input[type=color] { height: 38px; padding: 3px; cursor: pointer; }

/* ---------------------------------------------------------------- tables */

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--tx-3);
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:hover { background: var(--bg-1); }
tbody tr.lifted { opacity: .5; }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg-3); color: var(--tx-2);
}
.pill.ok, .pill.unban, .pill.unmute, .pill.unblacklist { background: rgba(63,185,80,.15);  color: #7ee787; }
.pill.warn, .pill.warn-type { background: rgba(210,153,34,.15); color: #e3b341; }
.pill.mute { background: rgba(245,166,35,.15); color: var(--amber); }
.pill.kick { background: rgba(219,109,40,.18); color: #ff9f5a; }
.pill.ban, .pill.blacklist { background: rgba(248,81,73,.15); color: #ff7b72; }
.pill.note { background: var(--bg-3); color: var(--tx-2); }

.ladder { margin: 0; padding-left: 20px; }
.ladder li { margin-bottom: 7px; }
.live-list { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; }
.live-list li { display: flex; justify-content: space-between; padding: 6px 0;
                border-bottom: 1px solid var(--line-soft); }

.danger-head { color: var(--bad); }

/* ---------------------------------------------------------------- login */

.login { text-align: center; max-width: 380px; }
.login h1 { margin: 0 0 4px; letter-spacing: .12em; }
.login .sub { margin-bottom: 26px; }

/* ---------------------------------------------------------------- editor */

.editor { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 26px; align-items: start; }
.preview-pane { position: sticky; top: 88px; }

.field-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.5fr) auto auto;
  gap: 9px; align-items: start; margin-bottom: 9px;
}
.field-row input, .field-row textarea { margin: 0; }

/* Discord-accurate preview -------------------------------------------- */

.discord {
  background: #313338; border-radius: var(--radius);
  padding: 16px; font-size: 15px; line-height: 1.375;
  font-family: "gg sans", system-ui, sans-serif;
}
.msg { display: flex; gap: 15px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--amber); color: #17130a;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.bot-name { color: #f2f3f5; font-weight: 500; font-size: 15px; }
.bot-tag {
  background: #5865f2; color: #fff; font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 3px; text-transform: uppercase;
}
.msg-content { color: #dbdee1; white-space: pre-wrap; word-wrap: break-word; margin-bottom: 5px; }
.msg-content:empty { display: none; }

.embed {
  border-left: 4px solid var(--amber);
  background: #2b2d31; border-radius: 4px;
  padding: 13px 16px 15px; max-width: 520px;
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px;
}
.embed:empty { display: none; }
.embed-main { min-width: 0; }
.e-author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
            font-size: 14px; font-weight: 600; color: #f2f3f5; }
.e-author img { width: 24px; height: 24px; border-radius: 50%; }
.e-title { color: #00a8fc; font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.e-title.plain { color: #f2f3f5; }
.e-desc { color: #dbdee1; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.e-fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.e-field { grid-column: span 3; min-width: 0; }
.e-field.inline { grid-column: span 1; }
.e-field b { display: block; color: #f2f3f5; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.e-field span { color: #dbdee1; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.e-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.e-image { width: 100%; border-radius: 4px; margin-top: 12px; }
.e-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px;
            color: #949ba4; font-size: 12px; }
.e-footer img { width: 20px; height: 20px; border-radius: 50%; }

.embed b.md, .e-desc b { font-weight: 700; }
.e-desc code, .e-field span code { background: #1e1f22; color: #dbdee1;
                                   padding: 1px 4px; border-radius: 3px; font-size: 12.5px; }

@media (max-width: 980px) {
  .editor { grid-template-columns: 1fr; }
  .preview-pane { position: static; }
  .two { grid-template-columns: 1fr; }
  .topbar { gap: 14px; padding: 0 14px; }
  .topbar nav { overflow-x: auto; }
}
