@font-face {
  font-family: "FontAwesome";
  src: url("./assets/fontawesome-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --background-start: #2789cf;
  --background-middle: #63b4e4;
  --background-end: #b7e3f5;
  --text: #10182d;
  --muted: #77839c;
  --soft-muted: #8792a8;
  --blue: #2473ff;
  --line: #dce3ef;
}

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
}

.app-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.92);
  background-color: var(--background-start);
  background-image: linear-gradient(
    112deg,
    var(--background-start) 0%,
    var(--background-middle) 54%,
    var(--background-end) 100%
  );
  opacity: 1;
  visibility: visible;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loader__logo {
  width: 178px;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 26px rgba(25, 78, 130, 0.16));
}

.app-loader__spinner {
  width: 34px;
  height: 34px;
  margin-top: 3px;
  border: 3px solid rgba(255, 255, 255, 0.34);
  border-top-color: #fff;
  border-radius: 50%;
  animation: starkos-loader-spin 780ms linear infinite;
  box-shadow: 0 7px 20px rgba(27, 82, 134, 0.12);
}

.app-loader__text {
  font-size: 13px;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 10px rgba(24, 73, 119, 0.26);
}

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

body {
  margin: 0;
  color: var(--text);
  background: var(--background-start);
}

button,
input { font: inherit; }
button { cursor: pointer; }

.fontawesome {
  font-family: "FontAwesome";
  font-style: normal;
  font-weight: normal;
}

.desktop {
  min-height: 100vh;
  background-color: var(--background-start);
  background-image: linear-gradient(
    112deg,
    var(--background-start) 0%,
    var(--background-middle) 54%,
    var(--background-end) 100%
  );
}

.app-view[hidden] { display: none !important; }

.setup-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.setup-card {
  width: min(760px, calc(100vw - 40px));
  padding: 34px 54px 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 30px 90px rgba(48, 72, 113, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(26px) saturate(120%);
}

.steps-viewport {
  width: 100%;
  overflow: visible;
  transition: height 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.steps-track {
  width: 100%;
  display: block;
}

.setup-step {
  position: relative;
  left: 0;
  width: 100%;
}

.setup-step[aria-hidden="true"] {
  display: none;
}

.setup-step[aria-hidden="false"] {
  display: block;
  animation: step-in-forward 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.setup-card[data-direction="back"] .setup-step[aria-hidden="false"] {
  animation-name: step-in-back;
}

@keyframes step-in-forward {
  from {
    left: 34px;
    opacity: 0;
  }
  to {
    left: 0;
    opacity: 1;
  }
}

@keyframes step-in-back {
  from {
    left: -34px;
    opacity: 0;
  }
  to {
    left: 0;
    opacity: 1;
  }
}

.setup-header { text-align: center; }

.setup-logo {
  width: 154px;
  height: 60px;
  display: block;
  margin: 0 auto 8px;
  object-fit: contain;
}

.setup-header h1 {
  margin: 0;
  color: #0f172b;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.setup-header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.setup-progress {
  margin: 28px auto 22px;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #6f7c97;
  font-size: 12px;
}

.setup-progress strong {
  color: #52617e;
  font-size: 13px;
  font-weight: 400;
}

.progress-dots {
  width: 270px;
  display: flex;
  align-items: center;
  margin-bottom: 7px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  opacity: 1;
  background: #cfd9e7;
  box-shadow: 0 0 0 4px rgba(207, 217, 231, 0.32);
}

.progress-dot--active {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(36, 115, 255, 0.12);
}

.progress-line {
  height: 2px;
  flex: 1;
  margin: 0 8px;
  opacity: 1;
  background: #c8d3e3;
}

.setup-fields {
  display: grid;
  gap: 14px;
}

.language-select {
  position: relative;
  z-index: 2;
}

.language-select__trigger,
.auth-code-row,
.account-field {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 18px 12px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(40, 72, 122, 0.05);
}

.language-select__trigger,
.account-field:first-child {
  border-color: rgba(36, 115, 255, 0.26);
  text-align: left;
  box-shadow: 0 10px 30px rgba(36, 115, 255, 0.08);
}

.language-select__trigger:focus-visible,
.auth-code-row:focus-within,
.account-field:focus-within {
  outline: 3px solid rgba(36, 115, 255, 0.18);
  border-color: rgba(36, 115, 255, 0.56);
}

.setting-icon,
.auth-code-icon,
.account-field-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.setting-icon img {
  width: 32px;
  height: auto;
  display: block;
}

.setting-copy,
.auth-code-copy,
.account-field-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1;
}

.setting-copy small,
.auth-code-copy small,
.account-field-copy small {
  color: var(--soft-muted);
  font-size: 12px;
}

.setting-copy strong {
  color: #1c2740;
  font-size: 16px;
  font-weight: 400;
}

.setting-chevron {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #63708a;
  font-size: 17px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 180ms ease;
}

.language-select.is-open .setting-chevron { transform: rotate(180deg); }

.language-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 7px;
  border: 1px solid rgba(132, 151, 181, 0.24);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 45px rgba(39, 74, 126, 0.18);
  backdrop-filter: blur(20px);
}

.language-menu[hidden] { display: none; }

.language-option {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 38px 1fr 24px;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  color: #27334c;
  background: transparent;
  text-align: left;
}

.language-option:hover,
.language-option:focus-visible {
  outline: none;
  background: #edf4ff;
}

.language-option img {
  width: 28px;
  height: auto;
  justify-self: center;
}

.language-option__check {
  color: var(--blue);
  opacity: 0;
  text-align: center;
}

.language-option[aria-selected="true"] .language-option__check { opacity: 1; }

.auth-code-icon,
.account-field-icon {
  color: var(--blue);
  font-size: 22.5px;
}

.auth-code-copy input,
.account-field-copy input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #1c2740;
  background: transparent;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.auth-code-copy input::placeholder,
.account-field-copy input::placeholder {
  color: #a6afc0;
  opacity: 1;
}

.account-field {
  min-height: 70px;
  padding-block: 10px;
}

.password-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #7d8aa1;
  background: transparent;
  font-size: 16px;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  outline: none;
  color: var(--blue);
  background: rgba(36, 115, 255, 0.08);
}

.form-message {
  margin: 10px 2px 0;
  color: #6c7890;
  font-size: 12px;
  line-height: 1.4;
}

.form-message:empty { display: none; }

.setup-footer {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e2e7ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.privacy-hint,
.setup-consume-note {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8490a6;
  font-size: 12px;
}

.privacy-hint > span:first-child {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #35c99a;
}

.continue-button,
.back-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 15px;
  font-weight: 400;
}

.continue-button {
  min-width: 160px;
  gap: 11px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff, #1765ec);
  box-shadow: 0 12px 24px rgba(36, 115, 255, 0.25);
}

.continue-button:hover { background: linear-gradient(135deg, #3a84ff, #1e6cf2); }

.continue-button:focus-visible,
.back-button:focus-visible {
  outline: 3px solid rgba(36, 115, 255, 0.24);
  outline-offset: 3px;
}

.setup-footer--account { align-items: center; }

.setup-consume-note {
  max-width: 285px;
  gap: 9px;
  line-height: 1.4;
}

.setup-consume-note > span:first-child {
  flex: 0 0 auto;
  color: #35a77f;
  font-size: 15px;
}

.setup-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-button {
  min-width: 88px;
  border: 1px solid var(--line);
  color: #64718a;
  background: rgba(255, 255, 255, 0.58);
}

.back-button:hover { background: rgba(255, 255, 255, 0.9); }
.setup-actions .continue-button { min-width: 146px; }

.agreement-step .setup-progress { margin-bottom: 20px; }

.agreement-document {
  overflow: hidden;
  border: 1px solid rgba(133, 153, 184, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 10px 30px rgba(49, 82, 126, 0.06);
}

.agreement-document__body {
  max-height: 255px;
  overflow-y: auto;
  padding: 15px 20px 16px;
  color: #66738a;
  font-size: 13px;
  line-height: 1.58;
  scrollbar-width: thin;
  scrollbar-color: #bdcbe0 transparent;
}

.agreement-document__body:focus-visible {
  outline: 3px solid rgba(36, 115, 255, 0.18);
  outline-offset: -3px;
}

.agreement-document__body p { margin: 11px 0; }

.agreement-document__body p:first-child {
  margin-top: 0;
  color: #3d4d68;
  font-weight: 500;
}

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

.setup-footer--agreement { align-items: center; }
.agreement-note { max-width: 270px; }
.setup-actions .agreement-accept { min-width: 205px; }

.activation-step .setup-progress { margin-bottom: 20px; }

.activation-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 17px;
  color: #2b3a53;
}

.activation-success__icon {
  color: #2fba83;
  font-size: 38px;
  filter: drop-shadow(0 6px 12px rgba(47, 186, 131, 0.2));
}

.activation-success > div {
  display: grid;
  gap: 3px;
}

.activation-success strong {
  font-size: 16px;
  font-weight: 500;
}

.activation-success div span {
  color: #7e899e;
  font-size: 12px;
}

.server-overview {
  overflow: hidden;
  border: 1px solid rgba(133, 153, 184, 0.25);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 32px rgba(49, 82, 126, 0.07);
}

.server-overview__header {
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(220, 227, 239, 0.9);
  background: rgba(245, 249, 255, 0.78);
}

.server-overview__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.server-overview__server-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 20px;
}

.server-overview__identity > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.server-overview__identity strong {
  color: #283650;
  font-size: 16px;
  font-weight: 500;
}

.server-overview__identity div span {
  color: #8994a8;
  font-size: 12px;
}

.server-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 15px 10px 17px;
}

.server-fact {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-right: 1px solid rgba(220, 227, 239, 0.9);
  text-align: center;
}

.server-fact:last-child { border-right: 0; }

.server-fact__icon {
  margin-bottom: 2px;
  color: #4c83e8;
  font-size: 17px;
}

.server-fact > span:not(.server-fact__icon) {
  color: #8a95a9;
  font-size: 11px;
}

.server-fact strong {
  max-width: 100%;
  overflow: hidden;
  color: #33415a;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-footer--activation { margin-top: 22px; }
.activation-note { max-width: 270px; }
.open-starkos-button { min-width: 184px; }

.login-card { width: min(760px, calc(100vw - 40px)); }
.login-header { margin-bottom: 28px; }

.login-panel {
  display: grid;
  gap: 14px;
}

.login-server {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(133, 153, 184, 0.22);
  border-radius: 17px;
  background: rgba(245, 249, 255, 0.62);
}

.login-server__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 19px;
}

.login-server > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.login-server span:not(.login-server__icon) {
  color: #8994a8;
  font-size: 12px;
}

.login-server strong {
  overflow: hidden;
  color: #33415a;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-fields {
  display: grid;
  gap: 14px;
}

.login-fields .account-field {
  min-height: 76px;
  background: rgba(255, 255, 255, 0.72);
}

.floating-field {
  position: relative;
  height: 44px;
  display: block;
}

.floating-field small {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0;
  color: #a6afc0;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: left top;
  transition:
    top 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms ease,
    font-size 180ms ease;
}

.floating-field input {
  height: 44px;
  padding-top: 16px !important;
  color: #1c2740;
  line-height: 20px;
}

.floating-field input::placeholder { color: transparent !important; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  background-color: transparent !important;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: #1c2740;
  caret-color: #1c2740;
  box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-out 0s;
}

.account-field:focus-within .floating-field small,
.floating-field:has(input:not(:placeholder-shown)) small {
  top: 3px;
  color: #73819a;
  font-size: 11px;
  transform: translateY(0);
}

.account-field:focus-within .floating-field small { color: var(--blue); }

.login-security-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 3px 0;
  color: #8490a6;
  font-size: 12px;
  line-height: 1.4;
}

.login-security-note > span:first-child {
  flex: 0 0 auto;
  color: #35a77f;
  font-size: 15px;
}

.login-footer {
  margin-top: 22px;
  justify-content: flex-end;
}

.login-button { min-width: 150px; }

.starkos-desktop {
  position: relative;
  min-height: 100vh;
  padding: 30px;
}

.desktop-shortcut {
  width: 112px;
  min-height: 106px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  padding: 12px 8px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: transparent;
  text-align: center;
  text-shadow: 0 2px 8px rgba(20, 66, 110, 0.45);
}

.desktop-shortcut:hover,
.desktop-shortcut:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.desktop-shortcut__icon {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #2473ff;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(31, 88, 139, 0.2);
  font-size: 25px;
  text-shadow: none;
}

.desktop-shortcut span:last-child {
  font-size: 12px;
  line-height: 1.25;
}

.desktop-message {
  position: fixed;
  right: 24px;
  bottom: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

@media (max-width: 640px) {
  .setup-shell { padding: 16px 12px; }

  .setup-card {
    width: 100%;
    padding: 26px 20px 22px;
    border-radius: 24px;
  }

  .setup-logo {
    width: 142px;
    height: 56px;
  }

  .setup-header p { font-size: 14px; }
  .progress-dots { width: min(250px, 80vw); }

  .setup-footer,
  .setup-footer--account {
    align-items: stretch;
    flex-direction: column;
  }

  .continue-button { width: 100%; }
  .setup-consume-note { max-width: none; }

  .setup-actions {
    width: 100%;
  }

  .back-button { flex: 0 0 auto; }

  .setup-actions .continue-button {
    flex: 1;
    width: auto;
  }

  .agreement-document__body {
    max-height: 270px;
    padding: 15px 16px 16px;
  }

  .setup-footer--agreement {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-actions .agreement-accept {
    min-width: 0;
    flex: 1;
  }

  .activation-success { justify-content: flex-start; }

  .server-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  .server-fact { padding: 10px; }
  .server-fact:nth-child(2) { border-right: 0; }

  .server-fact:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(220, 227, 239, 0.9);
  }

  .setup-footer--activation {
    align-items: stretch;
    flex-direction: column;
  }

  .activation-note { max-width: none; }
  .open-starkos-button { width: 100%; }

  .login-card { width: 100%; }
  .login-header { margin-bottom: 24px; }
  .login-server { padding-inline: 12px; }
  .login-footer { align-items: stretch; }
  .login-button { width: 100%; }

  .starkos-desktop { padding: 18px; }
}

@media (max-height: 760px) and (min-width: 641px) {
  .setup-shell { padding-block: 16px; }
  .setup-card { padding-block: 24px; }
  .setup-progress { margin-block: 18px 16px; }

  .setup-footer {
    margin-top: 18px;
    padding-top: 16px;
  }
}

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

  .app-loader__spinner { animation-duration: 1.8s !important; }
}
