:root {
  --header: #ffffff;
  --page: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #eef5f8;
  --ink: #182233;
  --muted: #66768b;
  --line: #d7e2e9;
  --blue: #176ee8;
  --blue-dark: #0d4cb8;
  --green: #18a779;
  --focus: rgba(23, 110, 232, 0.22);
  --shadow: 0 18px 46px rgba(22, 55, 74, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
}

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

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 5px clamp(16px, 4vw, 48px);
  color: #103548;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20, 54, 72, 0.1);
}

.site-header__brand {
  display: inline-flex;
  height: 54px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
}

.site-header__brand img {
  display: block;
  width: 117px;
  height: 54px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(17%) sepia(23%) saturate(1168%) hue-rotate(154deg) brightness(92%) contrast(94%);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
  font-weight: 750;
}

.site-header__actions a:hover,
.site-header__actions a:focus-visible {
  border-color: #9eb3bf;
  background: #f3f7f9;
  outline: none;
}

.login-main {
  display: grid;
  width: min(1060px, calc(100% - 32px));
  min-height: calc(100vh - 64px);
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: clamp(36px, 8vw, 96px);
  align-items: center;
  margin: 0 auto;
  padding: 44px 0;
}

.login-intro {
  display: grid;
  gap: 22px;
  align-content: center;
}

.product-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.product-lockup__mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #1596c7;
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(21, 150, 199, 0.25);
}

.product-lockup div {
  display: grid;
  gap: 2px;
}

.product-lockup strong {
  font-size: 20px;
}

.product-lockup span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.login-intro h1,
.hub-heading h1 {
  margin: 0;
  letter-spacing: 0;
}

.login-intro h1 {
  max-width: 620px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.04;
}

.login-intro > p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.service-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}

.service-preview img {
  width: 46px;
  height: 46px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  object-fit: contain;
}

.login-card {
  display: grid;
  gap: 24px;
  padding: 28px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card__heading {
  display: grid;
  gap: 16px;
}

.login-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.login-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.sso-state {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-radius: 7px;
  color: #09674b;
  background: #dff7ee;
  font-size: 13px;
  font-weight: 800;
}

.sso-state span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 167, 121, 0.14);
}

.access-notice,
.workspace-alert {
  padding: 12px 14px;
  border-radius: 7px;
  color: #664b04 !important;
  background: #fff4ce;
  font-size: 14px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form label span {
  color: #34455c;
  font-size: 14px;
  font-weight: 750;
}

.login-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #c9d9e3;
  border-radius: 7px;
  color: var(--ink);
  background: #fbfdfe;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.login-form input:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--focus);
}

.login-form button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(23, 110, 232, 0.24);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.login-form button:hover,
.login-form button:focus-visible {
  background: var(--blue-dark);
  outline: none;
}

.login-form button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.login-form button svg {
  width: 20px;
  height: 20px;
}

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.login-form button.is-loading .button-loader {
  display: block;
}

.login-form button.is-loading svg {
  display: none;
}

.hub-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hub-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.hub-heading h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
}

.hub-heading p {
  margin: 10px 0 0;
  color: var(--muted);
}

.hub-heading p strong {
  color: var(--ink);
}

.workspace-alert {
  margin: -12px 0 24px;
}

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

.service-card {
  position: relative;
  display: grid;
  min-height: 154px;
  grid-template-rows: auto 1fr;
  gap: 20px;
  align-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 9px 24px rgba(24, 57, 76, 0.07);
  transition: transform 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}

.service-card:hover,
.service-card:focus-visible {
  z-index: 1;
  border-color: #8eb1c8;
  box-shadow: 0 16px 34px rgba(24, 57, 76, 0.13);
  outline: none;
  transform: translateY(-3px);
}

.service-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
}

.service-card__icon img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.service-card strong {
  align-self: end;
  padding-right: 28px;
  font-size: 18px;
  line-height: 1.25;
}

.service-card__arrow {
  position: absolute;
  right: 18px;
  bottom: 20px;
  width: 20px;
  height: 20px;
  color: #71869a;
}

.service-card--disabled {
  opacity: 0.52;
}

.service-card--disabled:hover {
  transform: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@media (max-width: 860px) {
  .login-main {
    grid-template-columns: 1fr;
    gap: 34px;
    align-content: center;
  }

  .login-intro {
    gap: 16px;
  }

  .login-intro h1 {
    font-size: 40px;
  }

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

@media (max-width: 560px) {
  .site-header {
    min-height: 58px;
    padding: 2px 10px;
  }

  .site-header__brand,
  .site-header__brand img {
    height: 50px;
  }

  .site-header__brand img {
    width: 108px;
  }

  .site-header__actions {
    gap: 5px;
  }

  .site-header__actions a {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .login-main {
    width: min(100% - 24px, 440px);
    min-height: calc(100vh - 58px);
    padding: 28px 0;
  }

  .login-intro h1 {
    font-size: 34px;
  }

  .login-intro > p {
    font-size: 16px;
  }

  .service-preview img:nth-child(n + 5) {
    display: none;
  }

  .login-card {
    padding: 22px;
  }

  .hub-main {
    width: calc(100% - 24px);
    padding: 32px 0 48px;
  }

  .hub-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hub-heading h1 {
    font-size: 34px;
  }

  .service-grid {
    gap: 10px;
  }

  .service-card {
    min-height: 132px;
    gap: 14px;
    padding: 16px;
  }

  .service-card__icon {
    width: 42px;
    height: 42px;
  }

  .service-card__icon img {
    width: 28px;
    height: 28px;
  }

  .service-card strong {
    padding-right: 20px;
    font-size: 15px;
  }

  .service-card__arrow {
    right: 13px;
    bottom: 16px;
    width: 17px;
    height: 17px;
  }
}
