:root {
  --bg: #070c1a;
  --bg-2: #0b1224;
  --surface: rgba(17, 27, 46, .82);
  --surface-2: rgba(21, 33, 55, .92);
  --surface-3: #101827;
  --border: rgba(116, 137, 176, .18);
  --border-strong: rgba(111, 130, 255, .34);
  --text: #f4f7fb;
  --text-2: #b8c3d6;
  --muted: #7f8da5;
  --accent: #4f63ff;
  --accent-2: #6e7dff;
  --blue: #3f8cff;
  --green: #47d18c;
  --orange: #f5a524;
  --red: #ff6675;
  --shadow: 0 22px 70px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 16% 18%, rgba(67, 91, 255, .16), transparent 28%),
    radial-gradient(circle at 78% 20%, rgba(73, 142, 255, .11), transparent 30%),
    linear-gradient(180deg, #081023 0%, #050915 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}

a { color: inherit; }
button, input { font: inherit; }

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 84px;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 12, 25, .72);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(85,102,255,.22), rgba(64,132,255,.08));
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(54, 94, 255, .14);
}

.brand-icon img {
  width: 30px;
  height: 30px;
}

.brand-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-name {
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -.02em;
}

.domain-pill {
  color: var(--text-2);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .72);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.lock-dot {
  color: #91a0ff;
  font-size: 10px;
  margin-right: 6px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topnav a, .nav-link-button {
  color: #aeb9cd;
  text-decoration: none;
  font-size: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px 0;
}

.topnav a:hover, .nav-link-button:hover {
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, #6372ff, #285cff);
  color: #fff !important;
  box-shadow: 0 14px 34px rgba(54, 91, 255, .32);
}

.btn-secondary {
  color: #cbd5e7;
  background: rgba(20, 31, 50, .9);
  border-color: var(--border);
}

.btn-wide {
  width: 100%;
  margin-top: 10px;
}

.portal-main {
  width: min(1360px, 86vw);
  margin: 46px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 520px;
  gap: 76px;
  align-items: center;
  flex: 1;
}

.hero {
  padding: 40px 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #9ba7ff;
  background: rgba(71, 84, 255, .10);
  border: 1px solid rgba(105, 116, 255, .20);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.mini-lock {
  font-size: 11px;
  color: #9ba7ff;
}

.hero h1 {
  margin: 28px 0 18px;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.03;
  letter-spacing: -.045em;
  max-width: 760px;
}

.hero-copy {
  color: var(--text-2);
  font-size: 19px;
  max-width: 640px;
  margin: 0;
}

.hero-features {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 770px;
  border-top: 1px solid transparent;
}

.feature-inline {
  display: flex;
  gap: 16px;
  padding-right: 24px;
  margin-right: 24px;
  border-right: 1px solid var(--border);
}

.feature-inline:last-child {
  border-right: 0;
  margin-right: 0;
}

.feature-inline strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.feature-inline p {
  color: var(--text-2);
  font-size: 13px;
  margin: 0;
}

.feature-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #8d82ff;
  border: 1px solid rgba(116, 130, 255, .32);
  background: rgba(88, 96, 255, .09);
  font-weight: 800;
}

.login-card {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 34, 56, .90), rgba(13, 21, 36, .88));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}

.card-glow {
  position: absolute;
  inset: -80px -60px auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(90, 103, 255, .22), transparent 70%);
  pointer-events: none;
}

.card-content {
  position: relative;
  padding: 34px;
}

.login-card h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.02em;
}

.card-subtitle {
  color: var(--text-2);
  margin: 4px 0 26px;
}

label {
  color: #e3e8f2;
  display: block;
  font-size: 13px;
  font-weight: 680;
  margin: 16px 0 8px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 44px;
  color: #f6f8fb;
  background: rgba(6, 12, 25, .70);
  border: 1px solid rgba(130, 145, 174, .22);
  border-radius: 8px;
  outline: none;
  padding: 0 44px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.input-wrap input::placeholder {
  color: rgba(178, 189, 208, .58);
}

.input-wrap input:focus {
  border-color: rgba(104, 121, 255, .76);
  box-shadow: 0 0 0 4px rgba(77, 95, 255, .12);
  background: rgba(7, 13, 28, .92);
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8da5;
  font-size: 13px;
}

.icon-button {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
  color: #8795ad;
  cursor: pointer;
}

.remember-row {
  margin: 13px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.check-label {
  margin: 0;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}

.remember-row a, .request-note a {
  color: #91a0ff;
  text-decoration: none;
}

.alert {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(245, 165, 36, .25);
  background: linear-gradient(180deg, rgba(111, 61, 21, .50), rgba(83, 38, 24, .40));
  color: #ffc46a;
  border-radius: 8px;
  padding: 12px 13px;
  font-size: 13px;
}

.alert.error {
  border-color: rgba(255, 102, 117, .34);
  background: linear-gradient(180deg, rgba(92, 28, 42, .58), rgba(57, 19, 32, .46));
  color: #ffb3bd;
}

.hidden { display: none !important; }

.request-note {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin: 15px 0 0;
}

.info-grid {
  width: min(1360px, 86vw);
  margin: 38px auto 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.info-card {
  min-height: 170px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(19, 30, 50, .82), rgba(12, 20, 35, .78));
  border-radius: 14px;
  padding: 26px 26px 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.20);
}

.info-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 14px;
  font-weight: 800;
}

.info-icon.green {
  color: #75efa9;
  border: 1px solid rgba(90, 226, 148, .40);
  background: rgba(43, 177, 103, .10);
}

.info-icon.blue {
  color: #64a7ff;
  border: 1px solid rgba(80, 149, 255, .42);
  background: rgba(47, 112, 224, .10);
}

.info-icon.violet {
  color: #cb8cff;
  border: 1px solid rgba(192, 126, 255, .42);
  background: rgba(138, 75, 220, .10);
}

.info-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.info-card p {
  color: var(--text-2);
  font-size: 13px;
  margin: 0 0 18px;
}

.info-card a {
  color: #7eb7ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 680;
}

.footer {
  margin-top: auto;
  min-height: 88px;
  border-top: 1px solid var(--border);
  background: rgba(5, 10, 21, .70);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px 7vw;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-icon {
  width: 28px;
  height: 28px;
  color: #9aa8bd;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.footer-brand strong {
  color: #c9d3e4;
  font-size: 13px;
}

.footer-brand p, .footer-status p {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 0;
}

.footer-links {
  display: flex;
  gap: 34px;
}

.footer-links a {
  color: #a5b1c6;
  text-decoration: none;
  font-size: 13px;
}

.footer-status {
  justify-self: end;
  text-align: right;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(71,209,140,.12);
  margin-right: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(1, 5, 13, .72);
  backdrop-filter: blur(12px);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-panel {
  width: min(420px, 92vw);
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(22, 34, 56, .98), rgba(12, 20, 35, .98));
  box-shadow: var(--shadow);
  padding: 28px;
  position: relative;
}

.modal-panel h3 {
  margin: 0 0 8px;
}

.modal-panel p {
  color: var(--text-2);
  margin: 0 0 20px;
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  color: #b8c3d6;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}

.doc-layout {
  width: min(1120px, 86vw);
  margin: 42px auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
}

.side-panel, .content-panel {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(19, 30, 50, .82), rgba(12, 20, 35, .78));
  border-radius: 16px;
  padding: 24px;
}

.side-panel a {
  display: block;
  color: var(--text-2);
  text-decoration: none;
  padding: 9px 0;
  font-size: 14px;
}

.content-panel h1 {
  margin-top: 0;
}

.content-panel p, .content-panel li {
  color: var(--text-2);
}

.code {
  background: rgba(6, 12, 25, .72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  color: #d8e2f2;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  overflow: auto;
}

.status-list {
  display: grid;
  gap: 12px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(7, 13, 28, .44);
}

.badge-ok {
  color: #75efa9;
  background: rgba(43, 177, 103, .12);
  border: 1px solid rgba(43, 177, 103, .24);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .portal-main { grid-template-columns: 1fr; gap: 32px; }
  .hero-features, .info-grid { grid-template-columns: 1fr 1fr; }
  .login-card { max-width: 560px; }
}

@media (max-width: 760px) {
  .topbar { height: auto; padding: 18px 22px; align-items: flex-start; gap: 14px; flex-direction: column; position: static; }
  .brand-copy { align-items: flex-start; flex-direction: column; gap: 6px; }
  .topnav { gap: 14px; flex-wrap: wrap; }
  .portal-main, .info-grid, .doc-layout { width: calc(100% - 36px); }
  .hero h1 { font-size: 38px; }
  .hero-features, .info-grid, .doc-layout { grid-template-columns: 1fr; }
  .feature-inline { border-right: 0; margin-right: 0; padding-right: 0; }
  .footer { grid-template-columns: 1fr; text-align: left; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
  .footer-status { justify-self: start; text-align: left; }
}
