/* GrowXer web panel - shared theme */
:root {
  --bg: #070b09;
  --bg2: #0a0f0d;
  --surface: #101a14;
  --surface2: #0d1510;
  --border: #22352a;
  --border-soft: #1a2a20;
  --text: #e8f2ea;
  --muted: #93a89b;
  --dim: #6f8878;
  --accent: #6fe07d;
  --accent2: #39b85c;
  --accent-soft: rgba(111, 224, 125, .11);
  --warn: #f5c451;
  --danger: #ff7a7a;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 50% -12%, #1c3b29 0%, rgba(10, 15, 13, 0) 62%),
    radial-gradient(700px 400px at 100% 0%, rgba(57, 184, 92, .07) 0%, rgba(10, 15, 13, 0) 60%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px;
  background: rgba(7, 11, 9, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; letter-spacing: -.03em; color: var(--text);
  text-decoration: none;
}
.nav .brand:hover { text-decoration: none; }
.nav .logo {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent2));
  color: #06130c; font-weight: 900; font-size: 16px;
  box-shadow: 0 4px 16px rgba(57, 184, 92, .35);
}
.nav .links { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.nav .links a {
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 9px; text-decoration: none;
}
.nav .links a:hover { color: var(--text); background: rgba(255, 255, 255, .04); text-decoration: none; }
.nav .links a.active { color: var(--accent); background: var(--accent-soft); }
.nav .spacer { flex: 1; }
.nav .live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 11px; background: var(--surface2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.dot.off { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }

/* ---------------------------------------------------------------- layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.section { padding: 54px 0 8px; }
.section-head { margin-bottom: 22px; }
.section-head h1 { font-size: clamp(26px, 4vw, 38px); }
.section-head p { color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- card */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 15px; margin-bottom: 14px; }
.card .hint { color: var(--dim); font-size: 12.5px; margin-top: 12px; }

.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat .value.green { color: var(--accent); }
.stat .sub { color: var(--dim); font-size: 12px; margin-top: 4px; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 78px 0 34px; text-align: center; }
.hero h1 {
  font-size: clamp(44px, 8vw, 82px); letter-spacing: -.06em; margin: 6px 0 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent) 105%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tagline { color: var(--muted); font-size: clamp(15px, 2vw, 18px); max-width: 620px; margin: 16px auto 0; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.addr {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 30px;
  border: 1px solid var(--border); background: var(--surface2);
  border-radius: 12px; padding: 10px 12px 10px 16px;
  font-family: var(--mono); font-size: 14px;
}
.addr .k { color: var(--dim); font-family: inherit; }
.addr .v { color: var(--accent); font-weight: 700; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 650; font-size: 14px;
  padding: 11px 18px; border-radius: 11px; cursor: pointer;
  text-decoration: none; transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: #33523f; }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #06130c; border-color: transparent;
  box-shadow: 0 8px 24px rgba(57, 184, 92, .25);
}
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn.danger { color: var(--danger); border-color: rgba(255, 122, 122, .3); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- steps / features */
.steps { counter-reset: s; display: grid; gap: 14px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .n {
  counter-increment: s; flex: 0 0 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(111, 224, 125, .25);
}
.step .n::before { content: counter(s); }
.step b { font-size: 14px; }
.step span { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }
.step code { background: #080d0a; border: 1px solid var(--border-soft); border-radius: 5px; padding: 1px 5px; color: #bfe8c8; }

.feature .ic {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 18px; margin-bottom: 12px;
  border: 1px solid rgba(111, 224, 125, .2);
}
.feature b { font-size: 14.5px; }
.feature p { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------------------------------------------------------------- forms */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; color: var(--text); background: #080d0a;
  border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(57, 184, 92, .13); }
input::placeholder { color: var(--dim); }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > * { flex: 1 1 140px; }
.inline-form .btn { flex: 0 0 auto; }

/* ---------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; background: rgba(255, 255, 255, .015); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.num { font-variant-numeric: tabular-nums; font-family: var(--mono); }
.empty { color: var(--dim); text-align: center; padding: 30px 14px; font-size: 13px; }

/* ---------------------------------------------------------------- badges / misc */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid var(--border); color: var(--muted); background: var(--surface2); }
.badge.dev { color: #c9a6ff; border-color: rgba(201, 166, 255, .3); background: rgba(201, 166, 255, .08); }
.badge.mod { color: #7ec5ff; border-color: rgba(126, 197, 255, .3); background: rgba(126, 197, 255, .08); }
.badge.player { color: var(--muted); }
.badge.on { color: var(--accent); border-color: rgba(111, 224, 125, .3); background: var(--accent-soft); }
.badge.warn { color: var(--warn); border-color: rgba(245, 196, 81, .3); background: rgba(245, 196, 81, .08); }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv .k { color: var(--dim); }
.kv .v { font-family: var(--mono); word-break: break-all; }

pre.log {
  background: #050806; border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 14px; overflow: auto; max-height: 320px; margin: 0;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.65; color: #a9c4b2;
  white-space: pre-wrap; word-break: break-word;
}

.note {
  border-left: 3px solid var(--warn); background: rgba(245, 196, 81, .06);
  padding: 10px 14px; border-radius: 0 9px 9px 0; color: #e7d6a8; font-size: 12.5px;
}
.note.ok { border-color: var(--accent); background: var(--accent-soft); color: #b9e6c2; }

.divider { height: 1px; background: var(--border-soft); margin: 18px 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.hidden { display: none !important; }

/* login gate */
.gate { max-width: 400px; margin: 80px auto; }
.gate .card { padding: 28px; }
.gate h1 { font-size: 22px; text-align: center; }
.gate p { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0 22px; }

/* toast */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 10px; max-width: 340px; }
.toast {
  padding: 12px 15px; border-radius: 11px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  animation: slidein .2s ease;
}
.toast.ok { border-color: rgba(111, 224, 125, .4); color: #c7f0cf; }
.toast.err { border-color: rgba(255, 122, 122, .4); color: #ffc2c2; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* footer */
footer { border-top: 1px solid var(--border-soft); margin-top: 64px; padding: 26px 0 40px; color: var(--dim); font-size: 12.5px; }
footer .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  background: none; border: none; color: var(--muted); font-weight: 650; font-size: 13.5px;
  padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .nav .links { order: 3; width: 100%; margin-left: 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .wrap { padding: 0 15px; }
  .hero { padding: 48px 0 24px; }
  .kv { grid-template-columns: 100px 1fr; }
}
