@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  color: #f7fcff;
  background: #001321;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --marine-900: #001321;
  --marine-800: #031f35;
  --marine-700: #062d49;
  --cyan: #00dfff;
  --cyan-soft: #63efff;
  --white: #f7fcff;
  --muted: #afc8d9;
  --font-display: "Manrope", "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--marine-900); }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #001321;
}
button, input { font: inherit; }
button { color: inherit; }
.auth-page {
  position: relative;
  isolation: isolate;
  width: min(100%, 472px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 0 max(20px, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 19, 33, 0) 0%, #001321 100%) bottom / 100% 142px no-repeat,
    url("/pages/assets/narke-water-reference.png") center bottom / 100% 114px no-repeat,
    radial-gradient(ellipse at 50% 57%, rgba(0, 164, 209, .14), transparent 50%),
    #001321;
}
.hero-art {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 498 / 316;
  overflow: hidden;
  background: #031f35;
}
.hero-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-art::after {
  position: absolute;
  inset: -20%;
  content: "";
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(99, 239, 255, .09), transparent 65%);
  animation: marine-light 18s ease-in-out infinite alternate;
}
@keyframes marine-light {
  from { transform: translateX(-10%); opacity: .35; }
  to { transform: translateX(10%); opacity: .75; }
}
@layer narke-focus {
  html body .auth-page input:focus-visible {
    background-color: rgba(3, 31, 53, .75) !important;
  }
}
.auth-card {
  position: relative;
  z-index: 1;
  width: calc(100% - 32px);
  min-height: 480px;
  margin: -1px 16px 0;
  padding: 17px 17px 27px;
  overflow: hidden;
  border: 1px solid rgba(137, 213, 242, .69);
  border-bottom-color: transparent;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(31, 83, 112, .73), rgba(3, 31, 53, .88) 49%, rgba(1, 30, 49, .94)),
    rgba(3, 31, 53, .9);
  box-shadow:
    inset 0 1px 0 rgba(229, 249, 255, .18),
    inset 0 -16px 34px rgba(0, 205, 234, .05),
    0 15px 40px rgba(0, 9, 20, .24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.auth-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 12%;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 32' preserveAspectRatio='none'%3E%3Cpath d='M0 23 C80 22 150 22 218 23 C268 23 294 29 326 30 C353 31 369 28 381 15 C389 6 394 3 400 2' fill='none' stroke='%2300dfff' stroke-width='2' stroke-linecap='round' opacity='.94'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 5px rgba(0, 223, 255, .85));
  content: "";
  pointer-events: none;
}
.auth-card h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.55px;
  line-height: 1.35;
  text-align: center;
}
.auth-subtitle {
  margin: 2px 0 12px;
  color: #d0e3ed;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}
.auth-card form { display: grid; gap: 13px; }
.field {
  position: relative;
  display: flex;
  width: 100%;
  height: 45px;
  min-height: 45px;
  align-items: center;
  border: 1px solid rgba(174, 219, 240, .73);
  border-radius: 14px;
  padding: 0 14px;
  background: linear-gradient(110deg, rgba(31, 75, 100, .76), rgba(7, 39, 62, .75));
  color: var(--white);
  box-shadow: inset 0 1px 5px rgba(203, 241, 255, .07), 0 3px 10px rgba(0, 10, 20, .12);
  text-align: left;
  transition: border-color .18s ease, background-color .18s ease;
}
.field-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: flex-start;
  color: #f0fbff;
}
.field-icon svg, .dropdown-icon, .password-toggle svg, .submit-arrow svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.country-trigger {
  justify-content: flex-start;
  gap: 9px;
  cursor: pointer;
}
.field-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #f4faff;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-icon { width: 19px; height: 19px; flex: 0 0 19px; margin-left: auto; }
.phone-field { gap: 0; padding: 0 12px 0 14px; border: 0; }
.phone-field .field-icon { width: 42px; flex-basis: 42px; border-right: 1px solid rgba(169, 210, 230, .48); }
.phone-field::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px solid rgba(174, 219, 240, .73);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.phone-field:focus-within::before,
.password-field:focus-within {
  border-color: rgba(0, 223, 255, .95);
  box-shadow: inset 0 0 0 1px rgba(0, 223, 255, .36), 0 0 0 2px rgba(0, 223, 255, .16);
}
.phone-field:focus-within::before { border-color: var(--cyan); }
.phone-prefix {
  display: none;
  height: 23px;
  align-items: center;
  margin: 0 10px;
  color: var(--white);
  font-size: 16px;
}
.phone-prefix:not(:empty) { display: inline-flex; }
.phone-input, .password-field input {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
  color: var(--white);
  font-size: 16px;
  font-weight: 400;
  text-align: left;
}
.phone-input::placeholder, .password-field input::placeholder {
  color: #d1e0e9;
  opacity: 1;
}
.password-field { gap: 0; padding-right: 9px; }
.password-field::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 57px;
  width: 1px;
  background: rgba(169, 210, 230, .42);
  content: "";
}
.password-field input { padding: 0 0 0 12px; }
.password-toggle {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 33px;
  height: 36px;
  flex: 0 0 33px;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: #e8f8ff;
  cursor: pointer;
}
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle:focus-visible, .country-trigger:focus-visible, .primary-button:focus-visible, .sheet-back:focus-visible, .country-option:focus-visible {
  outline: 2px solid var(--cyan-soft);
  outline-offset: 3px;
}
.remember-row {
  display: flex;
  width: max-content;
  max-width: 100%;
  min-height: 20px;
  align-items: center;
  gap: 10px;
  margin: 9px 0 7px 6px;
  color: #edf7fb;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.remember-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  appearance: none;
  border: 1.5px solid rgba(229, 246, 255, .88);
  border-radius: 5px;
  background: rgba(1, 23, 39, .55);
  cursor: pointer;
}
.remember-row input:checked {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: inset 0 0 0 4px #07344a;
}
.remember-row input:focus-visible { outline: 2px solid var(--cyan-soft); outline-offset: 3px; }
.primary-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(130, 248, 255, .72);
  border-radius: 999px;
  padding: 0 54px;
  background: linear-gradient(105deg, #00d7eb 0%, #09e7f1 54%, #00cde8 100%);
  color: #00263a;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.35px;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), 0 4px 17px rgba(0, 218, 240, .29);
  transition: filter .18s ease, transform .14s ease, box-shadow .18s ease;
}
.primary-button:hover { filter: brightness(1.07); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 5px 20px rgba(0, 218, 240, .38); }
.primary-button:active { transform: scale(.985); }
.submit-arrow {
  position: absolute;
  top: 5px;
  right: 6px;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(175, 245, 255, .38);
  border-radius: 50%;
  background: linear-gradient(145deg, #073c56, #00283f);
  color: #f5fdff;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .14);
}
.submit-arrow svg { width: 22px; height: 22px; stroke-width: 2; }
.form-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  height: 16px;
  margin: 0 0 14px;
  color: #f0f8fb;
  font-size: 14px;
}
.form-divider span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(227, 245, 252, .9)); }
.form-divider span:last-child { background: linear-gradient(90deg, rgba(227, 245, 252, .9), transparent); }
.form-divider b { font-weight: 500; }
.switch-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 14px;
  margin: 1px 0 0;
  color: #edf7fb;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.switch-copy a { color: var(--cyan); font-weight: 700; text-decoration: none; text-decoration-line: underline; text-decoration-color: rgba(0, 223, 255, .65); text-underline-offset: 4px; }
.switch-copy a:hover { color: var(--cyan-soft); }
.demo-notice { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.demo-notice:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Country picker keeps the original script contract and full-screen sheet flow. */
.country-overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; background: rgba(0, 10, 20, .78); }
.country-overlay[hidden], .country-sheet [hidden] { display: none !important; }
.country-sheet { position: relative; display: flex; flex-direction: column; width: min(100%, 472px); height: 50vh; height: 50dvh; min-height: 0; max-height: none; margin: 0 auto; overflow: hidden; padding-bottom: max(0px, env(safe-area-inset-bottom)); border: 1px solid rgba(91, 205, 235, .58); border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #082d47, #031b2d); box-shadow: 0 -8px 32px rgba(0, 12, 24, .45); }
.country-overlay[data-stage="dots"] .country-sheet, .country-overlay[data-stage="ready"] .country-sheet, .country-overlay[data-stage="error"] .country-sheet { background: linear-gradient(180deg, #082d47, #031b2d); }
.sheet-header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; flex: 0 0 54px; height: 54px; padding: 0 8px; border-bottom: 1px solid rgba(130, 202, 226, .2); background: rgba(1, 19, 33, .52); }
.sheet-header h2 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; text-align: center; }
.sheet-back { border: 0; padding: 4px 8px; background: transparent; color: var(--white); font-size: 30px; cursor: pointer; }
.country-loading { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 20px; pointer-events: none; }
.country-spinner { position: relative; display: block; flex: 0 0 38px; width: 38px; height: 38px; border: 0; border-radius: 0; background: none; }
.country-spinner span { position: absolute; top: 50%; left: 50%; width: 5px; height: 12px; margin: -6px 0 0 -2.5px; border: 0; border-radius: 0; background: var(--cyan); transform: rotate(var(--ray-angle)) translateY(-13px); transform-origin: center; animation: country-spoke .8s linear infinite; }
.country-spinner span:nth-child(1) { --ray-angle: 0deg; animation-delay: -.8s; }
.country-spinner span:nth-child(2) { --ray-angle: 45deg; animation-delay: -.7s; }
.country-spinner span:nth-child(3) { --ray-angle: 90deg; animation-delay: -.6s; }
.country-spinner span:nth-child(4) { --ray-angle: 135deg; animation-delay: -.5s; }
.country-spinner span:nth-child(5) { --ray-angle: 180deg; animation-delay: -.4s; }
.country-spinner span:nth-child(6) { --ray-angle: 225deg; animation-delay: -.3s; }
.country-spinner span:nth-child(7) { --ray-angle: 270deg; animation-delay: -.2s; }
.country-spinner span:nth-child(8) { --ray-angle: 315deg; animation-delay: -.1s; }
.country-dots { display: flex; align-items: center; justify-content: center; gap: 7px; }
.country-dots span { width: 13px; height: 13px; border-radius: 50%; background: #4be8f4; animation: country-dot 1s ease-in-out infinite alternate; }
.country-dots span:nth-child(2) { width: 19px; height: 19px; background: #00dfff; animation-delay: .16s; }
.country-dots span:nth-child(3) { background: #63efff; animation-delay: .32s; }
.country-overlay:not([data-stage="spinner"]) .country-spinner, .country-overlay:not([data-stage="dots"]) .country-dots { display: none; }
.country-overlay[data-stage="spinner"] .sheet-header, .country-overlay[data-stage="spinner"] .country-options, .country-overlay[data-stage="spinner"] .country-error { display: none; }
.country-overlay:not([data-stage="ready"]) .country-options { display: none; }
.country-overlay:not([data-stage="error"]) .country-error { display: none; }
.country-overlay[data-stage="ready"] .country-loading, .country-overlay[data-stage="error"] .country-loading { display: none; }
.country-options { display: grid; gap: 11px; align-content: start; overflow-y: auto; padding: 24px 14px 18px; }
.country-option { display: flex; min-height: 50px; justify-content: space-between; align-items: center; border: 1px solid rgba(152, 213, 235, .24); border-radius: 12px; padding: 0 18px; background: rgba(21, 60, 82, .84); color: var(--white); font-size: 15px; cursor: pointer; }
.country-option:hover, .country-option:focus-visible { outline: 2px solid rgba(0, 223, 255, .58); }
.country-error { position: absolute; inset: 54px 14px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.country-error p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.country-error button { min-height: 42px; border: 0; border-radius: 22px; padding: 0 22px; background: var(--cyan); color: var(--marine-900); font-size: 14px; font-weight: 700; cursor: pointer; }

/* Full-viewport authentication progress overlay remains owned by auth-progress.js. */
.auth-submit-loading { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0, 19, 33, .76); backdrop-filter: blur(8px); pointer-events: auto; }
.auth-submit-loading[hidden] { display: none !important; }
.auth-submit-dots { display: flex; width: 54px; align-items: center; justify-content: space-between; }
.auth-submit-dots i { display: block; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: #63efff; animation: auth-submit-dot 850ms ease-in-out infinite alternate; }
.auth-submit-dots i:nth-child(2) { width: 21px; height: 21px; flex-basis: 21px; background: #00dfff; animation-delay: 140ms; }
.auth-submit-dots i:nth-child(3) { background: #a5f8ff; animation-delay: 280ms; }
.auth-loading-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes country-spoke { 0%, 100% { opacity: 1; } 75% { opacity: .4; } }
@keyframes country-dot { from { transform: translateY(0); opacity: .55; } to { transform: translateY(-5px); opacity: 1; } }
@keyframes auth-submit-dot { from { transform: translateY(0); opacity: .62; } to { transform: translateY(-4px); opacity: 1; } }
@media (max-width: 380px) {
  .auth-card { width: calc(100% - 28px); margin-right: 14px; margin-left: 14px; padding-right: 14px; padding-left: 14px; }
  .auth-card form { gap: 12px; }
  .auth-card h1 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
