@font-face {
  font-family: "Manrope";
  src: url("/assets/Manrope-Variable.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #8438e8;
  --purple-dark: #6824c9;
  --deep: #140e22;
  --deep-soft: #21172f;
  --lilac: #c7a4ff;
  --snow: #f5f2fa;
  --white: #ffffff;
  --text: #30263d;
  --muted: #71677e;
  --line: #e8e0ef;
  --success: #16845b;
  --danger: #bd3448;
  --shadow: 0 22px 60px rgba(20, 14, 34, .10);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--snow); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(132, 56, 232, .08) 0 16%, transparent 16% 100%),
    var(--snow);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

body::after {
  content: "";
  position: fixed;
  right: -130px;
  bottom: -180px;
  z-index: -1;
  width: 420px;
  height: 420px;
  background: var(--purple);
  opacity: .06;
  transform: rotate(-18deg);
}

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 64px; }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: 205px; height: auto; }

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 104px;
  margin-bottom: 28px;
  padding: 22px 28px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--deep);
  box-shadow: 0 22px 48px rgba(20, 14, 34, .16);
}

.topbar::after {
  content: "";
  position: absolute;
  right: -85px;
  top: -120px;
  width: 290px;
  height: 300px;
  background: var(--purple);
  opacity: .28;
  transform: rotate(26deg);
}

.topbar .brand, .topbar nav { position: relative; z-index: 1; }
.topbar .brand img { width: 185px; }
.topbar nav { display: flex; align-items: center; gap: 7px; }
.topbar nav a {
  padding: 10px 14px;
  border-radius: 11px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: .18s ease;
}
.topbar nav a:hover { color: var(--white); background: rgba(255,255,255,.10); }

.card {
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.section-card { padding: 30px; }
.section-heading { margin-bottom: 26px; }
.section-heading h1, .section-heading h2 { margin: 4px 0 7px; }
.section-heading p { max-width: 620px; margin: 0; }

.eyebrow {
  display: block;
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1, h2, h3 { color: var(--deep); letter-spacing: -.025em; line-height: 1.18; }
h1 { font-size: clamp(25px, 3vw, 32px); font-weight: 800; }
h2 { font-size: 23px; font-weight: 800; }
h3 { margin: 28px 0 12px; font-size: 17px; font-weight: 800; }
p { color: var(--muted); }

.login {
  width: min(460px, 100%);
  margin: clamp(34px, 9vh, 96px) auto 0;
  padding: 38px 40px 28px;
}
.login > .brand { margin-bottom: 44px; }
.login > .brand img { width: 220px; }
.login-heading { margin-bottom: 28px; }
.login-heading h1 { margin: 5px 0 0; }
.login-form { display: grid; gap: 19px; }
.login-form label { margin: 0; }
.login-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 24px; margin-bottom: 24px; }
.narrow { max-width: 650px; }

form { margin: 0; }
label { display: block; margin-top: 18px; color: var(--deep); font-size: 13px; font-weight: 700; }
input, select {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fbf9fd;
  color: var(--text);
  font: inherit;
  transition: .18s ease;
}
input:hover, select:hover { border-color: #d4c7df; }
input:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(132,56,232,.11); background: var(--white); }
label small, form > small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 500; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); }

.actions, .row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
button, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 15px;
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: .18s ease;
}
.primary-action, button:not(.secondary):not(.danger) { color: var(--white); background: var(--purple); }
.primary-action:hover, button:not(.secondary):not(.danger):hover { background: var(--purple-dark); transform: translateY(-1px); }
.secondary { color: var(--purple); background: rgba(132,56,232,.09); }
.secondary:hover { background: rgba(132,56,232,.15); }
.danger { color: var(--danger); background: #fff0f3; }

.alert, .success { margin: 0 0 22px; padding: 13px 16px; border-radius: 12px; font-weight: 650; }
.alert { color: #92263a; background: #fff0f3; }
.success { color: #087346; background: #eaf9f1; }

.dns { display: grid; grid-template-columns: 118px minmax(0,1fr); margin: 20px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.dns > * { padding: 11px 13px; border-bottom: 1px solid var(--line); }
.dns > *:nth-last-child(-n+2) { border-bottom: 0; }
.dns b { color: var(--deep); background: var(--snow); font-size: 12px; }
.dns span { overflow-wrap: anywhere; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.title h2 { margin: 4px 0; }
.title p { margin: 0; }
.list article { display: grid; grid-template-columns: minmax(230px,1fr) auto auto; gap: 16px; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); }
.list article:first-of-type { margin-top: 14px; }
.list article > div:first-child strong, .list article > div:first-child span, .list article > div:first-child small { display: block; }
.list article > div:first-child strong { color: var(--deep); font-size: 16px; }
.list article > div:first-child span { margin: 3px 0 6px; color: var(--purple); font-size: 13px; font-weight: 750; }
.list article > div:first-child small { color: var(--muted); line-height: 1.55; }
.list form { margin: 0; }

.pill { width: max-content; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.pill.on { color: var(--success); background: #eaf9f1; }
.pill.off { color: #765361; background: #f3edf1; }
.empty { padding: 44px 0; color: var(--muted); text-align: center; }

.clientcfg { grid-column: 1 / -1; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: #fbf9fd; }
.clientcfg summary { color: var(--purple); font-weight: 800; cursor: pointer; }
.clientcfg[open] summary { margin-bottom: 20px; }
.copyrow { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(240px,1.5fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.copyrow b { color: var(--deep); font-size: 12px; }
.copyrow code { overflow-wrap: anywhere; color: var(--text); font-family: "Manrope", Arial, sans-serif; font-size: 12px; }
.copyrow button { min-height: 32px; padding: 6px 10px; font-size: 11px; }

.okicon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 22px; border-radius: 50%; color: var(--success); background: #eaf9f1; font-size: 28px; font-weight: 900; }
.login .okicon ~ h1, .login .okicon ~ p { text-align: center; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .list article { grid-template-columns: 1fr auto; }
  .list .row { grid-column: 1 / -1; margin-top: 0; }
  .copyrow { grid-template-columns: 1fr auto; }
  .copyrow b { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); padding-top: 12px; }
  .topbar { align-items: flex-start; flex-direction: column; min-height: 0; padding: 20px; }
  .topbar .brand img { width: 160px; }
  .topbar nav { width: 100%; overflow-x: auto; }
  .topbar nav a { white-space: nowrap; }
  .section-card { padding: 22px 18px; }
  .login { margin-top: 24px; padding: 30px 24px 24px; }
  .login > .brand { margin-bottom: 36px; }
  .login > .brand img { width: 190px; }
  .cols { grid-template-columns: 1fr; gap: 0; }
  .list article { grid-template-columns: 1fr; }
  .pill { margin-top: -6px; }
  .copyrow { grid-template-columns: 1fr; }
  .copyrow b { grid-column: auto; }
  .copyrow button { width: max-content; }
  .dns { grid-template-columns: 105px minmax(0,1fr); }
}
