:root {
  color-scheme: dark;
  --color-bg: #101518;
  --color-surface: #181f24;
  --color-surface-raised: #1d272d;
  --color-border: #2d3a42;
  --color-border-subtle: #253139;
  --color-text: #f1f5f7;
  --color-muted: #a4b2ba;
  --color-faint: #84959f;
  --color-accent: #74d9d3;
  --color-accent-strong: #9ce9e3;
  --color-accent-ink: #102b2d;
  --color-danger: #ffb2ad;
  --radius-card: 20px;
  --radius-control: 10px;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  background: radial-gradient(ellipse at 88% 0%, #1a3035 0%, transparent 40%), var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

a {
  color: inherit;
  text-underline-offset: .22em;
}

button,
a,
input {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid var(--color-accent-strong);
  outline-offset: 4px;
}

::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

svg {
  display: block;
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 16px;
  padding: 10px 16px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 650;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100% - 64px));
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  color: var(--color-text);
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.brand-mark {
  display: flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 53px;
  height: 49px;
  border: 1px solid #46777b;
  border-radius: 11px;
  background: linear-gradient(145deg, #254449, #192b31);
  color: var(--color-accent-strong);
  font-size: 17px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}

.brand-domain {
  align-self: end;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.035em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-caption {
  align-self: start;
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.4;
  min-width: 0;
  max-width: 32ch;
  overflow-wrap: anywhere;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 260px;
  overflow-wrap: anywhere;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
}

.user-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.logout-form {
  margin: 0;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 21px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.nav-link:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.nav-link.is-active {
  border-color: #36545c;
  background: #1b3037;
  color: var(--color-accent-strong);
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 50px 0 64px;
}

.page-intro {
  max-width: 760px;
  margin-bottom: 32px;
}

.eyebrow,
.auth-kicker {
  display: block;
  margin: 0 0 13px;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.page-title {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.page-lead {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.personal-greeting {
  display: block;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease;
}

.action-button:hover {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-strong);
}

.action-button--secondary {
  border-color: var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.action-button--secondary:hover {
  border-color: #57707c;
  background: #233038;
}

.action-button--small {
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12px;
}

.action-button svg,
.text-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.text-link {
  color: var(--color-accent-strong);
  font-weight: 550;
  text-decoration-thickness: 1px;
}

.text-link:hover {
  color: #c0faf4;
}

.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid #365b5e;
  border-radius: 999px;
  background: #1d3538;
  color: var(--color-accent-strong);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.info-badge--pending {
  border-color: #5c5137;
  background: #302c23;
  color: #e5ce9d;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: linear-gradient(130deg, #1d2a30 0%, var(--color-surface) 80%);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color .16s ease, background-color .16s ease;
}

.service-card:hover {
  border-color: #57777e;
  background: linear-gradient(130deg, #22353d 0%, var(--color-surface) 80%);
}

.service-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #36565e;
  border-radius: 12px;
  background: #223c43;
  color: var(--color-accent-strong);
  flex-shrink: 0;
}

.service-icon svg {
  width: 25px;
  height: 25px;
}

.service-card__meta {
  margin: 0 0 8px;
  color: var(--color-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.service-card__title {
  margin-bottom: 10px;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.service-card__text {
  margin-bottom: 26px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.service-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.empty-state {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 36px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.empty-state__title {
  margin-bottom: 10px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.empty-state__text {
  max-width: 580px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.8;
}

.empty-state .action-button {
  margin-top: 24px;
}

.monitoring-panel {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: center;
  padding: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.monitoring-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 245px;
  padding: 18px;
  border: 1px solid #2f444c;
  border-radius: 15px;
  background: radial-gradient(ellipse at 50% 45%, #233f46, #18252c 75%);
  color: var(--color-accent);
}

.monitoring-illustration svg {
  width: 100%;
  max-width: 330px;
  height: auto;
}

.monitoring-content {
  min-width: 0;
}

.monitoring-content > .info-badge {
  margin-bottom: 16px;
}

.monitoring-content h2 {
  margin-bottom: 12px;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.monitoring-content > p {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.8;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin: 24px 0;
  padding: 22px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.detail-item {
  min-width: 0;
}

.detail-label {
  display: block;
  margin: 0 0 5px;
  color: var(--color-faint);
  font-size: 12px;
  line-height: 1.5;
}

.detail-value {
  display: block;
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.note {
  margin: 26px 0 0;
  padding: 17px 20px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 11px;
  background: #141c21;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.8;
}

.note p:last-child {
  margin-bottom: 0;
}

.note-label {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: auto;
  padding: 21px 0 24px;
  border-top: 1px solid var(--color-border-subtle);
  color: var(--color-faint);
  font-size: 11px;
  line-height: 1.7;
}

.site-footer p {
  margin: 0;
}

.site-footer > span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.page-login {
  background: radial-gradient(ellipse at 82% 28%, #1c3439 0%, transparent 43%), var(--color-bg);
}

.auth-main {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  padding: 64px 0 72px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
  width: 100%;
}

.auth-intro {
  max-width: 540px;
}

.auth-kicker {
  margin-bottom: 22px;
}

.auth-title {
  margin-bottom: 24px;
  font-size: clamp(38px, 4.8vw, 61px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.auth-description {
  max-width: 420px;
  margin-bottom: 32px;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.85;
}

.auth-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 25px 0 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
  counter-reset: auth-point;
}

.auth-point {
  min-width: 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.75;
  counter-increment: auth-point;
}

.auth-point::before {
  display: block;
  content: "0" counter(auth-point);
  margin-bottom: 9px;
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
}

.auth-point strong {
  display: block;
  margin-bottom: 3px;
  color: #dce5e9;
  font-size: 13px;
  font-weight: 550;
}

.auth-card {
  min-width: 0;
  padding: 32px;
  border: 1px solid #34464e;
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, #1e2b31, #182126 65%);
  box-shadow: 0 22px 70px rgb(0 0 0 / .13);
}

.auth-card-header {
  margin-bottom: 27px;
}

.auth-card-title {
  margin-bottom: 8px;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.035em;
}

.auth-card-description {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.75;
}

.auth-form {
  margin: 0;
}

.form-field {
  margin-bottom: 19px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #dbe4e8;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
}

.form-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid #40525c;
  border-radius: var(--radius-control);
  background: #111b20;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.4;
  caret-color: var(--color-accent);
  transition: border-color .16s ease, background-color .16s ease;
}

.form-field input::placeholder {
  color: #83949e;
  opacity: 1;
}

.form-field input:hover {
  border-color: #617882;
}

.form-field input:focus {
  border-color: var(--color-accent);
  background: #142329;
}

.form-field input:focus-visible {
  outline-width: 2px;
  outline-offset: 3px;
}

.form-field input[aria-invalid="true"] {
  border-color: #cb847e;
}

.form-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--color-text);
  caret-color: var(--color-accent);
  -webkit-box-shadow: 0 0 0 100px #142329 inset;
}

.field-hint {
  display: block;
  margin: 7px 0 0;
  color: var(--color-faint);
  font-size: 11px;
  line-height: 1.65;
}

.field-errors,
.form-errors {
  color: var(--color-danger);
  font-size: 12px;
  line-height: 1.65;
}

.field-errors {
  margin-top: 7px;
}

.field-errors ul,
.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.field-errors p:last-child,
.form-errors p:last-child {
  margin-bottom: 0;
}

.form-errors {
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid #694541;
  border-radius: 9px;
  background: #342623;
}

.auth-submit {
  width: 100%;
  margin-top: 5px;
}

.form-note {
  margin: 20px 0 0;
  padding-top: 19px;
  border-top: 1px solid var(--color-border);
  color: var(--color-faint);
  font-size: 11px;
  line-height: 1.75;
}

@media (min-width: 1280px) and (min-height: 800px) {
  .auth-main {
    padding-bottom: 100px;
  }
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
    gap: 38px;
  }

  .auth-title {
    font-size: 43px;
  }

  .auth-card {
    padding: 27px;
  }

  .monitoring-panel {
    gap: 27px;
    padding: 28px;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: calc(100% - 40px);
  }

  .app-header {
    gap: 16px;
    padding: 21px 0;
  }

  .header-actions {
    gap: 10px;
  }

  .user-pill {
    max-width: 140px;
    font-size: 11px;
  }

  .main-content {
    padding: 34px 0 44px;
  }

  .page-intro {
    margin-bottom: 26px;
  }

  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-card {
    padding: 25px;
  }

  .monitoring-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 27px;
    padding: 25px;
  }

  .monitoring-illustration {
    min-height: 200px;
  }

  .monitoring-illustration svg {
    max-width: 280px;
  }

  .auth-main {
    padding: 36px 0 42px;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    max-width: 520px;
    margin-inline: auto;
  }

  .auth-intro {
    max-width: none;
  }

  .auth-kicker {
    margin-bottom: 14px;
  }

  .auth-title {
    max-width: 460px;
    margin-bottom: 16px;
    font-size: clamp(36px, 6.7vw, 46px);
  }

  .auth-description {
    max-width: none;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.75;
  }

  .auth-points {
    gap: 20px;
    padding-top: 17px;
  }

  .auth-point::before {
    margin-bottom: 5px;
  }

  .auth-card {
    padding: 28px;
  }

  .site-footer {
    padding-block: 18px;
  }
}

@media (max-width: 460px) {
  .site-shell {
    width: calc(100% - 32px);
  }

  .app-header {
    align-items: flex-start;
    padding: 18px 0;
  }

  .brand {
    column-gap: 10px;
  }

  .brand-mark {
    width: 46px;
    height: 44px;
    font-size: 15px;
  }

  .brand-domain {
    font-size: 16px;
  }

  .brand-caption {
    font-size: 10px;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .user-pill {
    max-width: 108px;
    font-size: 10px;
    line-height: 1.4;
  }

  .user-pill::before {
    width: 5px;
    height: 5px;
  }

  .app-nav {
    padding-top: 16px;
  }

  .nav-link {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .page-title {
    font-size: 31px;
  }

  .page-lead {
    font-size: 14px;
    line-height: 1.75;
  }

  .service-card,
  .empty-state,
  .monitoring-panel {
    padding: 21px;
    border-radius: 16px;
  }

  .service-card__top {
    margin-bottom: 23px;
  }

  .service-card__footer .action-button {
    width: 100%;
  }

  .monitoring-content h2 {
    font-size: 24px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  .note {
    padding: 15px 17px;
    font-size: 12px;
  }

  .auth-main {
    padding: 28px 0 34px;
  }

  .auth-layout {
    gap: 24px;
  }

  .auth-title {
    font-size: 36px;
  }

  .auth-points {
    gap: 15px;
  }

  .auth-point {
    font-size: 11px;
    line-height: 1.65;
  }

  .auth-point strong {
    font-size: 12px;
  }

  .auth-card {
    padding: 23px;
    border-radius: 16px;
  }

  .auth-card-header {
    margin-bottom: 23px;
  }

  .auth-card-title {
    font-size: 23px;
  }

  .form-field {
    margin-bottom: 17px;
  }

  .site-footer {
    font-size: 10px;
  }
}

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