:root {
  --bg: #070b14;
  --bg-soft: #0b1220;
  --panel: #101a2c;
  --panel-2: #0d1524;
  --border: #1e2a41;
  --border-soft: #182336;
  --text: #e8eefc;
  --muted: #8b9ab5;
  --muted-2: #64748b;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 16px;
  --sidebar: 248px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(760px 420px at 92% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.mono {
  font-family: var(--mono);
}
.nowrap {
  white-space: nowrap;
}
.center {
  text-align: center;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.wrap {
  flex-wrap: wrap;
}
.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 40px;
}
.grow {
  flex: 1;
}

/* ------------------------------- buttons ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: #2b3b5c;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 10px 30px -12px rgba(99, 102, 241, 0.9);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #7c7ff5, #9d6ffb);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.btn-danger:hover {
  background: rgba(248, 113, 113, 0.16);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 9px;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  padding: 7px 9px;
}

/* -------------------------------- badges ---------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill-active,
.pill-paid {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}
.pill-stopped,
.pill-unpaid {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.28);
}
.pill-provisioning {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}
.pill-expired,
.pill-error,
.pill-suspended {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
}
.pill-cancelled {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
}

/* -------------------------------- landing --------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid rgba(30, 42, 65, 0.7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 17px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px -10px rgba(99, 102, 241, 0.9);
}
.brand-mark svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--text);
}

.container {
  width: min(1180px, 100% - 48px);
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: 84px 0 60px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.1);
  color: #c7d2fe;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 800;
  margin: 22px 0 20px;
  letter-spacing: -0.04em;
}
.hero h1 .grad {
  background: linear-gradient(120deg, #a5b4fc, #67e8f9 55%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.trust {
  display: flex;
  gap: 32px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.trust div strong {
  display: block;
  font-size: 20px;
}
.trust div span {
  color: var(--muted-2);
  font-size: 12.5px;
}

.terminal-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.95), rgba(10, 16, 28, 0.95));
  border-radius: 18px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red {
  background: #f87171;
}
.dot.amber {
  background: #fbbf24;
}
.dot.green {
  background: #34d399;
}
.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.85;
  color: #cbd5e1;
  min-height: 300px;
}
.terminal-body .prompt {
  color: #6ee7b7;
}
.terminal-body .cmd {
  color: #e2e8f0;
}
.terminal-body .out {
  color: #94a3b8;
}
.terminal-body .accent {
  color: #a5b4fc;
}

.section {
  padding: 66px 0;
  border-top: 1px solid rgba(30, 42, 65, 0.55);
}
.section-head {
  max-width: 660px;
  margin-bottom: 38px;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-head p {
  color: var(--muted);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.85), rgba(10, 16, 28, 0.7));
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.plan-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.5);
}
.plan-card.featured {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 24px 60px -30px rgba(99, 102, 241, 0.9);
}
.plan-card .flag {
  position: absolute;
  top: -11px;
  left: 22px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}
.plan-name {
  font-size: 15px;
  font-weight: 700;
  color: #c7d2fe;
}
.plan-price {
  margin: 10px 0 2px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.plan-price span {
  font-size: 13px;
  color: var(--muted-2);
  font-weight: 500;
}
.plan-desc {
  color: var(--muted);
  font-size: 13px;
  min-height: 40px;
  margin-top: 6px;
}
.plan-specs {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  display: grid;
  gap: 9px;
  font-size: 13.5px;
  color: #cbd5e1;
}
.plan-specs li {
  display: flex;
  align-items: center;
  gap: 9px;
}
.plan-specs svg {
  width: 15px;
  height: 15px;
  color: var(--cyan);
  flex: none;
}
.plan-card .btn {
  margin-top: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(16, 26, 44, 0.5);
}
.feature .ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.13);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  margin-bottom: 16px;
}
.feature h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.feature p {
  color: var(--muted);
  font-size: 13.5px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(11, 18, 32, 0.6);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.1em;
}
.step h3 {
  margin: 10px 0 8px;
  font-size: 16px;
}
.step p {
  color: var(--muted);
  font-size: 13.5px;
}

.site-footer {
  padding: 34px 0 50px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted-2);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* --------------------------------- auth ----------------------------------- */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(620px 420px at 20% 10%, rgba(99, 102, 241, 0.25), transparent 60%),
    linear-gradient(180deg, #0b1220, #070b14);
  border-right: 1px solid var(--border-soft);
}
.auth-side h2 {
  font-size: clamp(26px, 3vw, 38px);
  max-width: 420px;
  font-weight: 800;
}
.auth-side p {
  color: var(--muted);
  max-width: 420px;
  margin-top: 14px;
}
.auth-quote {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 400px;
}
.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-card h1 {
  font-size: 28px;
  margin-bottom: 8px;
}
.auth-card .sub {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 14px;
}

.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.7);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9ab5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}
textarea {
  min-height: 88px;
  resize: vertical;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: #cbd5e1;
  cursor: pointer;
}
.check input {
  width: auto;
  accent-color: var(--accent);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-error {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
  font-size: 13px;
  margin-bottom: 16px;
}
.form-note {
  color: var(--muted-2);
  font-size: 12.5px;
  margin-top: 14px;
}
.auth-switch {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13.5px;
}
.auth-switch a {
  color: #a5b4fc;
  font-weight: 600;
}

/* ------------------------------ app shell --------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--border-soft);
  background: rgba(9, 14, 25, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar .brand {
  padding: 4px 10px 20px;
}
.side-label {
  padding: 14px 12px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-link svg {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}
.side-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.side-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
  color: #e0e7ff;
  box-shadow: inset 2px 0 0 var(--accent);
}
.side-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #e0e7ff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(139, 92, 246, 0.35));
  border: 1px solid rgba(99, 102, 241, 0.4);
  flex: none;
}
.side-user .who {
  min-width: 0;
}
.side-user .who strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-user .who span {
  font-size: 11.5px;
  color: var(--muted-2);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main {
  padding: 28px 34px 60px;
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.page-head h1 {
  font-size: 25px;
  font-weight: 800;
}
.page-head p {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.7), rgba(11, 18, 32, 0.5));
}
.stat .label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.stat .value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 6px;
}
.stat .hint {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 4px;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.72), rgba(10, 16, 28, 0.6));
  padding: 22px;
}
.card.pad-0 {
  padding: 0;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.card-head h2,
.card-head h3 {
  font-size: 16px;
  font-weight: 700;
}
.card-head .sub {
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ----------------------------- instance cards ----------------------------- */

.inst-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.inst {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.75), rgba(10, 16, 28, 0.65));
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.inst-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.inst-name {
  font-weight: 700;
  font-size: 15.5px;
}
.inst-sub {
  color: var(--muted-2);
  font-size: 12.5px;
  margin-top: 2px;
}
.spec-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.spec {
  font-size: 12px;
  color: #cbd5e1;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
}
.ssh-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(7, 11, 20, 0.8);
  border: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 12px;
  color: #cbd5e1;
  overflow: hidden;
}
.ssh-box .cmd-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-btn {
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}
.inst-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.empty {
  padding: 46px 22px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(11, 18, 32, 0.4);
}
.empty h3 {
  color: var(--text);
  margin-bottom: 8px;
  font-size: 17px;
}

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

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(24, 35, 54, 0.65);
  vertical-align: middle;
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}
tbody tr:last-child td {
  border-bottom: none;
}
.cell-strong {
  font-weight: 600;
}
.cell-sub {
  color: var(--muted-2);
  font-size: 12px;
}

/* -------------------------------- modal ----------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 18px 40px;
  overflow-y: auto;
  animation: fade 0.15s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.modal-card {
  width: min(560px, 100%);
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #101a2c, #0b1220);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.95);
  animation: pop 0.18s ease;
}
.modal-card.wide {
  width: min(940px, 100%);
}
@keyframes pop {
  from {
    transform: translateY(10px) scale(0.99);
    opacity: 0;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h2 {
  font-size: 17px;
}
.modal-body {
  padding: 22px;
}
.modal-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.close-x {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.close-x:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 14px;
  font-size: 13.5px;
}
.kv dt {
  color: var(--muted-2);
}
.kv dd {
  margin: 0;
  word-break: break-word;
}

.secret {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(7, 11, 20, 0.8);
  border: 1px solid var(--border-soft);
  padding: 5px 9px;
  border-radius: 7px;
}

.meter {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 7px;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width 0.3s ease;
}

.notice {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}
.notice.info {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  color: #bae6fd;
}
.notice.danger {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

/* ------------------------------- terminal --------------------------------- */

#terminal {
  height: 460px;
  background: #05080f;
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
#terminal .xterm {
  height: 100%;
}
.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

/* -------------------------------- toast ----------------------------------- */

#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}
.toast {
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #111c2f;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  font-size: 13.5px;
  animation: slide 0.2s ease;
}
.toast.ok {
  border-color: rgba(52, 211, 153, 0.4);
}
.toast.err {
  border-color: rgba(248, 113, 113, 0.45);
}
@keyframes slide {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* ------------------------------ responsive -------------------------------- */

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }
  .auth-side {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .site-nav {
    padding: 14px 20px;
  }
  .container {
    width: min(100% - 32px, 1180px);
  }
  .hero {
    padding: 54px 0 40px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    gap: 4px;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .sidebar .brand,
  .side-label,
  .side-foot {
    display: none;
  }
  .side-link {
    white-space: nowrap;
    padding: 8px 11px;
    font-size: 13px;
  }
  .main {
    padding: 20px 16px 50px;
  }
  .inst-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .plan-grid,
  .feature-grid,
  .stat-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  .kv {
    grid-template-columns: 1fr;
    gap: 3px 0;
  }
  .kv dd {
    margin-bottom: 8px;
  }
  .trust {
    gap: 20px;
  }
  .mobile-user-meta {
    display: none;
  }
}
