/* Ark DeFAI — auth pages (login / register / reset) */

body.ark-auth-body {
  min-height: 100%;
  min-height: 100dvh;
  background-color: rgb(17 20 27);
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  -webkit-overflow-scrolling: touch;
}

.ark-auth-page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  background-color: rgb(17 20 27);
  color: #fff;
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.ark-auth-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgb(17 20 27) 70%, transparent);
}

@media (min-width: 1024px) {
  .ark-auth-topbar {
    display: flex;
  }

  .ark-auth-page.ark-shell-content {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.ark-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: rgb(160 160 163);
  font: inherit;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  padding: 0.25rem 0;
}

.ark-auth-back:hover {
  color: #fff;
}

.ark-auth-back svg {
  width: 1rem;
  height: 1rem;
}

.ark-auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1.5rem 1.25rem;
  text-align: center;
}

.ark-auth-header .ark-logo-wrap {
  animation: ark-logo-pulse 3s ease-in-out infinite;
}

.ark-auth-header .ark-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.ark-auth-tagline {
  margin-top: 1rem;
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  font-weight: 500;
  color: rgb(156 163 175);
}

.ark-auth-main {
  flex: 1;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

.ark-auth-card {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid rgba(241, 185, 10, 0.12);
  background: rgba(32, 35, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

.ark-auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  background: radial-gradient(80% 120% at 50% 120%, rgba(241, 185, 10, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.ark-auth-card > * {
  position: relative;
  z-index: 1;
}

.ark-auth-title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ark-auth-desc {
  margin: -0.75rem 0 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgb(160 160 163);
}

.ark-field {
  margin-bottom: 0.875rem;
}

.ark-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(160 160 163);
}

.ark-field-box {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 20, 27, 0.55);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ark-field-box:focus-within {
  border-color: rgba(241, 185, 10, 0.45);
  box-shadow: 0 0 0 3px rgba(241, 185, 10, 0.12);
}

.ark-field-box input {
  flex: 1;
  min-width: 0;
  height: 2.875rem;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
}

.ark-field-box input::placeholder {
  color: rgb(107 114 128);
}

.ark-captcha {
  height: 2.25rem;
  margin-left: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
}

.ark-get-code {
  flex-shrink: 0;
  margin-left: 0.5rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(241, 185, 10, 0.35);
  background: rgba(241, 185, 10, 0.12);
  color: rgb(241 185 10);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 2rem;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.ark-get-code:active {
  opacity: 0.85;
}

.ark-auth-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  height: 3rem;
  border: 0;
  border-radius: 9999px;
  background: rgb(241 185 10);
  color: rgb(17 20 27);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ark-auth-btn:hover {
  opacity: 0.92;
}

.ark-auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ark-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.125rem;
  font-size: 0.8125rem;
}

.ark-auth-links.is-center {
  justify-content: center;
}

.ark-auth-links a {
  color: rgb(241 185 10);
  font-weight: 500;
  text-decoration: none;
}

.ark-auth-links a:hover {
  text-decoration: underline;
}

.ark-auth-foot {
  flex-shrink: 0;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgb(107 114 128);
}

/* layer.mobile toast on dark pages */
.ark-auth-body .layui-m-layerchild {
  background: rgba(32, 35, 40, 0.95) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ark-auth-body .layui-m-layercont {
  color: #fff !important;
}

/* Vue page shell override for auth */
.page-shell--ark-auth {
  min-height: 100dvh;
  background: rgb(17 20 27);
}

.page-shell--ark-auth .ark-auth-page {
  min-height: 100dvh;
}

.ark-splash-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgb(17 20 27);
  color: #fff;
  gap: 1rem;
  padding: 2rem;
}

.ark-splash-page .ark-logo-wrap {
  animation: ark-logo-pulse 3s ease-in-out infinite;
}

.ark-splash-page .ark-logo {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
}

.ark-splash-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ark-splash-sub {
  font-size: 0.9375rem;
  color: rgb(156 163 175);
  text-align: center;
  max-width: 18rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .ark-auth-main {
    padding-top: 0.5rem;
  }

  .ark-auth-card {
    padding: 1.75rem 1.5rem 1.5rem;
  }
}
