:root {
  --xy-ink: #152f33;
  --xy-muted: #53666a;
  --xy-teal: #166b63;
  --xy-mint: #aff5d5;
  --xy-paper: #f8faf8;
  --xy-line: #dbe6e1;
  --xy-font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.xy-intro[hidden],
.xy-trial-link[hidden],
.xy-native-title {
  display: none !important;
}

html.xy-auth,
.xy-auth body {
  min-height: 100vh;
  margin: 0;
  background: var(--xy-paper) !important;
  color: var(--xy-ink);
  font-family: var(--xy-font);
}

.xy-auth body {
  display: grid;
  grid-template-columns: 56% minmax(0, 1fr);
}

.xy-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(66px, 12vh, 124px);
  min-height: 100svh;
  padding: clamp(30px, 5.4vw, 92px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 95% 89%, #183d42 0%, transparent 54%),
    linear-gradient(142deg, #071721 0%, #0d242b 72%, #122f35 100%);
  color: #f5fcfa;
}

.xy-intro::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: radial-gradient(circle, #a1f6d940 0.7px, transparent 1.1px) 0 0 / 25px 25px;
  mask-image: linear-gradient(150deg, transparent 22%, #000 88%);
  content: "";
  pointer-events: none;
}

.xy-wordmark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
}

.xy-wordmark strong,
.xy-wordmark small {
  display: block;
}

.xy-wordmark strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.xy-wordmark small {
  margin-top: 5px;
  color: #b8d1cf;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.28em;
}

.xy-mark {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid #b9ffe557;
  border-radius: 13px;
  background: #a9f2d519;
}

.xy-mark i {
  position: absolute;
  width: 21px;
  height: 11px;
  border: 1.5px solid var(--xy-mint);
  border-radius: 50%;
  transform: rotate(42deg);
}

.xy-mark i + i {
  transform: rotate(-42deg);
}

.xy-intro-copy {
  position: relative;
  margin-top: 2px;
}

.xy-intro-copy h1 {
  margin: 0;
  color: #f4fcfa;
  font-size: clamp(40px, 5.65vw, 84px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.xy-intro-copy em {
  color: var(--xy-mint);
  font-style: normal;
}

.xy-intro-copy p {
  max-width: 21em;
  margin: 23px 0 0;
  color: #c1d5d5;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.65;
}

.xy-trial-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 9px 13px;
  border: 1px solid #a9f2d553;
  border-radius: 9px;
  background: #a9f2d511;
  color: var(--xy-mint);
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
}

.xy-trial-link:hover,
.xy-trial-link:focus-visible {
  border-color: #a9f2d5b3;
  background: #a9f2d526;
}

.xy-globe {
  position: absolute;
  z-index: -1;
  right: -10%;
  bottom: -4%;
  width: 96%;
  height: 63%;
  pointer-events: none;
}

.xy-auth #app,
.xy-auth #app > .n-config-provider,
.xy-auth #app > .n-config-provider > .wh-full {
  min-width: 0;
  min-height: 100svh;
  height: auto;
  background: transparent !important;
}

.xy-auth #app > .n-config-provider > .wh-full {
  padding: 40px clamp(22px, 4.3vw, 76px);
}

.xy-auth #app .n-card {
  width: 100%;
  max-width: 390px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.xy-auth #app .n-card__content {
  padding: 0;
}

.xy-auth #app .xy-auth-form {
  padding: 0;
}

.xy-auth-heading {
  margin-bottom: 32px;
}

.xy-auth-heading h2 {
  margin: 0;
  color: var(--xy-ink);
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 740;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.xy-auth-heading p {
  margin: 11px 0 0;
  color: var(--xy-muted);
  font-size: 14px;
  line-height: 1.6;
}

.xy-auth #app .n-input {
  --n-height: 48px !important;
  --n-border: 1px solid var(--xy-line) !important;
  --n-border-radius: 11px !important;
  --n-border-hover: 1px solid #86b2a8 !important;
  --n-border-focus: 1px solid var(--xy-teal) !important;
  --n-box-shadow-focus: 0 0 0 3px #166b6319 !important;
  --n-color: #fff !important;
  --n-color-focus: #fff !important;
  --n-text-color: var(--xy-ink) !important;
  --n-placeholder-color: #596c70 !important;
  --n-padding-left: 15px !important;
  --n-padding-right: 15px !important;
}

.xy-auth #app .n-button--primary-type,
.xy-portal #app .n-button--primary-type {
  --n-color: var(--xy-teal) !important;
  --n-color-hover: #105a53 !important;
  --n-color-focus: #105a53 !important;
  --n-color-pressed: #0b4b46 !important;
  --n-border: 1px solid var(--xy-teal) !important;
  --n-border-hover: 1px solid #105a53 !important;
  --n-border-focus: 1px solid #105a53 !important;
  --n-border-pressed: 1px solid #0b4b46 !important;
  --n-ripple-color: var(--xy-teal) !important;
}

.xy-auth #app .n-button--primary-type.w-full {
  min-height: 48px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 650;
}

.xy-auth #app .n-card__content > div:last-child:not(.xy-auth-form) {
  align-items: center;
  gap: 12px;
  margin-top: 23px;
  padding: 16px 0 0;
  border-top: 1px solid var(--xy-line);
  background: transparent;
}

.xy-auth #app a {
  color: var(--xy-teal);
  font-weight: 600;
}

.xy-auth #app a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.xy-auth #app .n-button--default-type {
  --n-border: 1px solid var(--xy-line) !important;
  --n-text-color: var(--xy-muted) !important;
  border-radius: 9px;
}

.xy-portal #app {
  font-family: var(--xy-font);
}

.xy-portal #app .n-card {
  --n-border-radius: 15px !important;
}

.xy-portal #app .n-card--bordered {
  border-radius: 15px;
  box-shadow: 0 3px 18px #123b390b;
}

.xy-portal:not(.dark) #app .n-card--bordered {
  --n-border-color: #dce7e2 !important;
  --n-title-text-color: var(--xy-ink) !important;
}

.xy-portal #app .n-card-header__main {
  font-weight: 650;
}

.xy-portal #app .n-layout-sider {
  --n-color: #0c212b !important;
  --n-border-color: #173741 !important;
  background: linear-gradient(163deg, #091c25, #132f35);
}

.xy-portal #app .n-layout-sider h2 {
  display: grid;
  gap: 3px;
  margin: 0;
  color: #f0fffa;
  font-size: 18px;
  letter-spacing: 0.10em;
  line-height: 1.2;
}

.xy-portal #app .n-layout-sider h2::after {
  color: #99c9c2;
  font-size: 8px;
  letter-spacing: 0.26em;
  content: "ALOFT";
}

.xy-portal #app .side-menu {
  --n-border-radius: 9px !important;
  --n-divider-color: #35565e !important;
  --n-group-text-color: #a3bdc0 !important;
  --n-item-text-color: #dfefed !important;
  --n-item-text-color-hover: #fff !important;
  --n-item-text-color-active: #bcf8de !important;
  --n-item-text-color-active-hover: #d8ffed !important;
  --n-item-icon-color: #afc8ca !important;
  --n-item-icon-color-hover: #fff !important;
  --n-item-icon-color-active: #bcf8de !important;
  --n-item-icon-color-active-hover: #d8ffed !important;
  --n-item-icon-color-collapsed: #afc8ca !important;
  --n-item-color-hover: #ffffff10 !important;
  --n-item-color-active: #98f2cd24 !important;
  --n-item-color-active-hover: #98f2cd35 !important;
  padding: 6px 7px 16px;
}

.xy-portal:not(.dark) #app article > header {
  border-bottom: 1px solid var(--xy-line);
  background: #fff;
}

.xy-portal:not(.dark) #app article > section {
  background: #f0f5f3;
}

.xy-dashboard #app .n-card .n-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 20px 20px;
  background: transparent;
}

.xy-dashboard #app .n-list .n-list-item {
  min-height: 76px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--n-border-color);
  border-radius: 10px;
}

.xy-dashboard:not(.dark) #app .n-list .n-list-item {
  border-color: var(--xy-line);
  background: #f6faf8;
}

.xy-dashboard:not(.dark) #app .n-list .n-list-item:hover {
  border-color: #a9cbbf;
  background: #edf7f2;
}

.xy-portal #app .n-button {
  border-radius: 8px;
}

@media (max-width: 740px) {
  .xy-auth body {
    display: block;
  }

  .xy-intro {
    gap: 26px;
    min-height: 0;
    padding: 24px;
  }

  .xy-intro-copy h1 {
    font-size: clamp(28px, 6.5vw, 46px);
    letter-spacing: -0.025em;
  }

  .xy-intro-copy p {
    width: 70%;
    margin-top: 12px;
  }

  .xy-globe {
    right: -20%;
    bottom: -12%;
    width: 85%;
    height: 110%;
    opacity: 0.76;
  }

  .xy-auth #app,
  .xy-auth #app > .n-config-provider,
  .xy-auth #app > .n-config-provider > .wh-full {
    min-height: 0;
  }

  .xy-auth #app > .n-config-provider > .wh-full {
    padding: 30px 24px 36px;
  }

  .xy-auth-heading {
    margin-bottom: 23px;
  }

  .xy-dashboard #app .n-card .n-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 0 12px 12px;
  }
}

@media (max-width: 360px) {
  .xy-auth #app .n-card__content > div:last-child:not(.xy-auth-form) {
    flex-wrap: wrap;
  }
}
/* Client imports match the native subscription menu rows. */
.xy-shadowrocket-item { padding: 0 !important; }
.xy-client-item { padding: 0 !important; }
.xy-client-platform { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: #526783; }
.xy-native-client-item { display: none !important; }
.xy-import-help { padding: 0 14px 12px; max-width: 340px; font-size: 14px; line-height: 1.6; color: #526783; }
.xy-import-help p { margin: 8px 0; }
.xy-import-copy { color: #1d4ed8; background: #edf4ff; border: 1px solid #c4d7fc; border-radius: 8px; padding: 8px 12px; cursor: pointer; font: inherit; }
.xy-import-copy:disabled { opacity: .6; cursor: wait; }
.xy-import-help textarea { width: 100%; box-sizing: border-box; margin-top: 8px; font-size: 14px; }
.xy-subscription-dialog .n-card__content { max-height: calc(100dvh - 150px); overflow-y: auto; overscroll-behavior: contain; }
.n-list-item[hidden] { display: none !important; }
.xy-client-import-link { display: flex; align-items: center; padding: 10px; width: 100%; box-sizing: border-box; color: inherit; text-decoration: none; cursor: pointer; }
.xy-client-import-link:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.xy-client-import-link[aria-disabled="true"] { opacity: .65; cursor: wait; }
.xy-client-icon { display: flex; justify-content: center; width: 64px; flex: 0 0 64px; }
.xy-client-icon img { width: 32px; height: 32px; border-radius: 6px; }
.xy-import-status { margin: 8px 10px; max-width: 320px; color: #526783; font-size: 12px; line-height: 1.65; }
.xy-channel-register .xy-auth-form .xy-channel-code { display: none !important; }
