:root {
  color-scheme: dark;
  --bg: #0c0e13;
  --surface: #121620;
  --surface-hover: #171c28;
  --text: #f7f8fb;
  --muted: #9da6ba;
  --muted-strong: #bdc4d2;
  --border: #2a3040;
  --border-strong: #48516a;
  --accent: #6d74ff;
  --accent-bright: #858bff;
  --danger: #ff666d;
  --radius: 16px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 30%, rgba(75, 83, 145, 0.12), transparent 34rem),
    var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.networkBackdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.52;
}

.networkLine {
  position: absolute;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 2%,
    rgba(110, 121, 164, 0.3) 20%,
    rgba(110, 121, 164, 0.12) 80%,
    transparent 98%
  );
}

.networkLine::before,
.networkLine::after {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(109, 116, 255, 0.08);
  transform: translateX(-50%);
}

.networkLine::before {
  top: 14%;
}

.networkLine::after {
  top: 72%;
}

.networkLineOne {
  left: 19%;
}

.networkLineTwo {
  left: 50%;
}

.networkLineThree {
  left: 81%;
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: var(--text);
  font-size: 24px;
  font-weight: 720;
  letter-spacing: 0.17em;
  text-decoration: none;
}

.brandMark {
  position: relative;
  display: block;
  width: 28px;
  height: 24px;
}

.brandMark::before,
.brandMark::after {
  position: absolute;
  bottom: 0;
  width: 9px;
  height: 24px;
  content: "";
  background: linear-gradient(180deg, var(--accent-bright), #4d56e7);
  transform: skew(-25deg);
}

.brandMark::before {
  left: 5px;
}

.brandMark::after {
  right: 3px;
  height: 14px;
}

.loginHeader {
  position: absolute;
  z-index: 1;
  top: 38px;
  left: 44px;
}

.loginMain {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  padding: 118px 24px 72px;
  place-items: center;
}

.loginPanel {
  width: min(100%, 548px);
  padding: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(24, 29, 40, 0.96), rgba(16, 20, 29, 0.97));
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.36),
    inset 0 1px rgba(255, 255, 255, 0.025);
}

.loginPanel h1,
.hubIntro h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.loginPanel h1 {
  text-align: center;
}

.loginLead {
  margin: 14px 0 40px;
  color: var(--muted-strong);
  font-size: 18px;
  text-align: center;
}

.loginForm {
  display: grid;
  gap: 10px;
}

.loginForm label {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
}

.field {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(8, 10, 15, 0.42);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field:focus-within {
  border-color: var(--accent);
  background: rgba(11, 13, 20, 0.72);
  box-shadow: 0 0 0 3px rgba(109, 116, 255, 0.1);
}

.fieldError {
  border-color: var(--danger);
}

.field > svg,
.passwordToggle svg,
.primaryButton svg,
.securityNote svg,
.logoutButton svg,
.serviceLink svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.field > svg {
  color: #7f899e;
}

.field input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.field input::placeholder {
  color: #687186;
}

.passwordToggle {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #929bb0;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.passwordToggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.formError {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.primaryButton {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 18px;
  border: 1px solid #747bff;
  border-radius: 10px;
  color: white;
  background: linear-gradient(110deg, #535cf3, #6e6bf4);
  box-shadow: 0 12px 30px rgba(65, 73, 220, 0.18);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.primaryButton:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 15px 36px rgba(65, 73, 220, 0.25);
  transform: translateY(-1px);
}

.primaryButton:disabled {
  cursor: wait;
  opacity: 0.72;
}

.securityNote {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 24px 0 0;
  color: #8e97ab;
  font-size: 14px;
}

.securityNote svg {
  width: 18px;
  height: 18px;
}

.appHeader {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  padding: 0 clamp(24px, 4vw, 64px);
  border-bottom: 1px solid rgba(72, 81, 106, 0.46);
  background: rgba(12, 14, 19, 0.8);
  backdrop-filter: blur(16px);
}

.logoutButton,
.serviceLink {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(109, 116, 255, 0.74);
  border-radius: 10px;
  color: var(--text);
  background: rgba(13, 16, 24, 0.72);
  font-weight: 680;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.logoutButton {
  min-height: 48px;
  padding: 0 18px;
}

.logoutButton:hover,
.serviceLink:hover {
  border-color: var(--accent-bright);
  background: rgba(109, 116, 255, 0.12);
  transform: translateY(-1px);
}

.hubMain {
  position: relative;
  z-index: 1;
  width: min(100%, 1400px);
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 48px clamp(24px, 5vw, 80px) 36px;
}

.hubIntro {
  margin-bottom: 34px;
}

.hubIntro p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.serviceList {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 0 0 126px;
  list-style: none;
}

.serviceList::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 36px;
  width: 2px;
  content: "";
  background: linear-gradient(var(--accent), rgba(109, 116, 255, 0.22));
}

.serviceItem {
  position: relative;
}

.serviceItem::before {
  position: absolute;
  top: 50%;
  left: -88px;
  width: 88px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--accent), rgba(109, 116, 255, 0.28));
}

.serviceNumber {
  position: absolute;
  top: 50%;
  left: -126px;
  z-index: 1;
  display: grid;
  width: 74px;
  height: 74px;
  border: 2px solid rgba(109, 116, 255, 0.62);
  border-radius: 50%;
  color: var(--accent-bright);
  background: var(--bg);
  font-size: 20px;
  font-weight: 760;
  transform: translateY(-50%);
  place-items: center;
}

.serviceRow {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 22px 26px 22px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(18, 22, 32, 0.96), rgba(15, 18, 26, 0.94));
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.serviceRow:hover {
  border-color: rgba(109, 116, 255, 0.65);
  background: linear-gradient(110deg, rgba(24, 29, 43, 0.98), rgba(16, 20, 29, 0.96));
  transform: translateX(3px);
}

.serviceCopy h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.serviceCopy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.serviceLink {
  min-width: 148px;
  min-height: 50px;
  padding: 0 20px;
  color: var(--accent-bright);
}

.appFooter {
  position: relative;
  z-index: 1;
  min-height: 62px;
  padding: 19px 24px;
  border-top: 1px solid rgba(72, 81, 106, 0.38);
  color: #777f92;
  text-align: center;
}

@media (max-width: 720px) {
  .networkLineOne {
    left: 11%;
  }

  .networkLineThree {
    left: 89%;
  }

  .loginHeader {
    top: 26px;
    left: 24px;
  }

  .brand {
    font-size: 20px;
  }

  .loginMain {
    padding: 98px 16px 38px;
  }

  .loginPanel {
    padding: 34px 22px;
    border-radius: 16px;
  }

  .loginPanel h1 {
    font-size: 34px;
  }

  .loginLead {
    margin-bottom: 28px;
    font-size: 16px;
  }

  .appHeader {
    min-height: 74px;
    padding: 0 18px;
  }

  .logoutButton {
    width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 0;
  }

  .logoutButton svg {
    width: 20px;
    height: 20px;
  }

  .hubMain {
    padding: 36px 18px 30px;
  }

  .hubIntro h1 {
    font-size: 36px;
  }

  .hubIntro p {
    font-size: 16px;
  }

  .serviceList {
    gap: 14px;
    padding-left: 44px;
  }

  .serviceList::before {
    left: 15px;
  }

  .serviceItem::before {
    left: -29px;
    width: 29px;
  }

  .serviceNumber {
    left: -44px;
    width: 32px;
    height: 32px;
    border-width: 1px;
    font-size: 11px;
  }

  .serviceRow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 20px;
  }

  .serviceCopy h2 {
    font-size: 18px;
  }

  .serviceLink {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
