:root {
  --bg: #0a0c12;
  --panel: #12151f;
  --panel2: #1a1e2c;
  --border: #262c3d;
  --text: #e8eaf2;
  --muted: #8a93a8;
  --blue: #3b6eff;
  --lilac: #a78bfa;
  --grad: linear-gradient(90deg, #3b6eff, #a78bfa);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ---------- общее ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 18, 0.9); position: sticky; top: 0; z-index: 10;
}
.logo { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; box-shadow: 0 0 18px rgba(123, 110, 255, 0.45);
}
.admin-badge {
  font-size: 11px; background: var(--panel2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 20px; color: var(--lilac); font-weight: 600;
}
nav { display: flex; gap: 20px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-weight: 600; transition: color .15s; }
nav a:hover { color: var(--text); }
nav .tab.active { color: var(--lilac); }
.nav-dl {
  background: var(--grad); color: #fff !important; padding: 8px 18px; border-radius: 22px;
  box-shadow: 0 4px 18px rgba(96, 89, 255, 0.35); font-weight: 700;
}
.section { max-width: 1080px; margin: 0 auto; padding: 60px 24px; }
.section h2 { font-size: 30px; margin-bottom: 28px; }

.btn-big {
  background: var(--grad); border: none; color: #fff; cursor: pointer;
  padding: 14px 38px; border-radius: 26px; font-size: 16px; font-weight: 700;
  box-shadow: 0 6px 24px rgba(96, 89, 255, 0.4); transition: transform .12s, box-shadow .12s;
  text-decoration: none; display: inline-block;
}
.btn-big:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(96, 89, 255, 0.55); }

/* ---------- лендинг ---------- */

.hero { position: relative; overflow: hidden; text-align: center; padding: 110px 24px 90px; }
.hero-glow {
  position: absolute; inset: -40% -20% auto; height: 80%;
  background: radial-gradient(ellipse at 50% 30%, rgba(59, 110, 255, 0.28), rgba(167, 139, 250, 0.16) 45%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.grad-title {
  font-size: 64px; font-weight: 800; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -1px;
}
.hero-sub { max-width: 640px; margin: 18px auto 30px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.hero-sub b { color: var(--text); }
.server-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 30px;
  padding: 10px 22px; margin-bottom: 34px; color: var(--muted); font-size: 15px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 10px #35d07f; }
.hint { color: var(--muted); margin-top: 14px; font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(167, 139, 250, 0.5); }
.card h3 { margin: 12px 0 8px; font-size: 17px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.card-ico {
  width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
}
.card-ico.blue { background: rgba(59, 110, 255, 0.16); color: var(--blue); }
.card-ico.lilac { background: rgba(167, 139, 250, 0.16); color: var(--lilac); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.step { display: flex; gap: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.step-n {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.server-box {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(135deg, rgba(59, 110, 255, 0.12), rgba(167, 139, 250, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.35); border-radius: 20px; padding: 30px 36px;
}
.srv-name { font-size: 26px; font-weight: 800; }
.srv-addr { color: var(--lilac); font-weight: 600; margin-top: 6px; font-size: 16px; }
.srv-right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 15px; line-height: 1.5; text-align: right; }
.st-online, .st-offline { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.st-online { background: #35d07f; box-shadow: 0 0 12px #35d07f; }
.st-offline { background: #e5484d; box-shadow: 0 0 12px #e5484d; }

footer { border-top: 1px solid var(--border); padding: 34px 24px; text-align: center; color: var(--muted); font-size: 14px; }
footer .logo { justify-content: center; margin-bottom: 10px; }

/* ---------- админка ---------- */

.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 40px; width: 360px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.login-card h2 { font-size: 20px; margin-bottom: 6px; }
.login-card .logo { margin-bottom: 8px; }

input, textarea, select {
  background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; border-radius: 10px; font-size: 14px; outline: none; width: 100%;
  font-family: inherit; transition: border-color .15s;
}
input:focus { border-color: var(--lilac); }
input[type=file] { padding: 9px; }

.admin-panel main { max-width: 1200px; margin: 0 auto; padding: 34px 24px; }
.tab-page h2 { margin-bottom: 22px; }

table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 14px; overflow: hidden; }
th, td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; background: var(--panel2); }
td.mono { font-family: Consolas, monospace; font-size: 12px; color: var(--muted); }
.btn-sm {
  background: var(--panel2); border: 1px solid var(--border); color: var(--text); cursor: pointer;
  padding: 6px 14px; border-radius: 8px; font-size: 13px; margin: 2px; transition: border-color .15s;
}
.btn-sm:hover { border-color: var(--lilac); }
.btn-sm.danger:hover { border-color: #e5484d; color: #e5484d; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 14px; font-weight: 600; }
.badge.ok { background: rgba(53, 208, 127, 0.15); color: #35d07f; }
.badge.no { background: rgba(229, 72, 77, 0.15); color: #e5484d; }

.upload-box { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.upload-box input { width: 220px; }

.settings-form { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.settings-form label { color: var(--muted); font-size: 14px; margin-top: 8px; }
.settings-form .btn-big { margin-top: 18px; align-self: flex-start; }

.err { color: #e5484d; font-size: 14px; min-height: 18px; }
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--panel2); border: 1px solid var(--border);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100;
}
.toast.show { opacity: 1; }