/* ============================================================
   DESIGN TOKENS
============================================================ */
:root {
  --brand-name: "NxtOcean";
  --primary: #1B2559;
  --primary-hover: #141B45;
  --accent: #4F5FF0;
  --accent-soft: #EEF0FF;
  --bg: #F6F7FB;
  --card-bg: #FFFFFF;
  --text: #12142B;
  --muted: #6B7280;
  --muted-2: #9AA1B1;
  --border: #E4E7EC;
  --border-strong: #D3D7E0;
  --error: #DC2626;
  --error-soft: #FDECEC;
  --success: #16A34A;
  --success-soft: #E9F9EF;
  --warning: #D97706;
  --warning-soft: #FEF3E2;
  --focus-ring: rgba(79, 95, 240, 0.35);

  --radius-input: 10px;
  --radius-card: 20px;
  --radius-btn: 10px;
  --shadow-card: 0 20px 60px -25px rgba(27, 37, 89, 0.35), 0 2px 8px -2px rgba(27, 37, 89, 0.08);
  --shadow-soft: 0 1px 2px rgba(18, 20, 43, 0.06);

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  font-family: var(--font-body);
  cursor: pointer;
}
input,
select {
  font-family: var(--font-body);
}

::selection {
  background: var(--accent-soft);
  color: var(--primary);
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   SHELL / LAYOUT
============================================================ */
.shell {
  min-height: 100vh;
  display: flex;
}

/* ---- Left branding panel ---- */
.brand-panel {
  position: relative;
  flex: 0 0 44%;
  max-width: 580px;
  background: linear-gradient(160deg, #161B3D 0%, var(--primary) 55%, #232B63 100%);
  color: #fff;
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
}
.brand-top {
  position: relative;
  z-index: 1;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}
.brand-logo .mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #8B93FF);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px -4px rgba(79, 95, 240, 0.6);
}
.brand-tagline {
  margin-top: 6px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

.brand-mid {
  position: relative;
  z-index: 1;
  margin-top: 56px;
}
.brand-mid h2 {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  max-width: 380px;
}
.brand-mid .desc {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  max-width: 360px;
}

.feature-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.feature-list .tick {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(79, 95, 240, 0.25);
  border: 1px solid rgba(139, 147, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-list .tick svg {
  width: 11px;
  height: 11px;
}

.signature-graphic {
  position: relative;
  z-index: 1;
  margin-top: 36px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 18px 20px 14px;
}
.sig-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.sig-row .label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}
.sig-row .value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #8FF5B0;
  font-weight: 600;
}
.sig-graph {
  width: 100%;
  height: 64px;
  display: block;
}
.sig-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.sig-legend span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
}

.brand-bottom {
  position: relative;
  z-index: 1;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* ---- Right auth panel ---- */
.auth-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: 100vh;
}
.mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 28px;
}
.mobile-brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #8B93FF);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px 36px 32px;
  animation: card-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}
.auth-subtitle {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
}

.form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-row .field {
  flex: 1;
  min-width: 0;
}

label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.optional-tag {
  font-weight: 500;
  color: var(--muted-2);
  font-size: 12px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  font-size: 14.5px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}
input::placeholder {
  color: var(--muted-2);
}
input:hover,
select:hover {
  border-color: var(--border-strong);
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
.input-wrap input {
  padding-right: 44px;
}
.input-wrap.has-left-icon input {
  padding-left: 0;
}

.icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.icon-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.field-error input,
.field-error select {
  border-color: var(--error);
  background: var(--error-soft);
}
.field-success input {
  border-color: var(--success);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.error-msg {
  font-size: 12.5px;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.success-msg {
  font-size: 12.5px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.error-msg svg,
.success-msg svg {
  flex: 0 0 auto;
}

.phone-wrap {
  display: flex;
  gap: 8px;
}
.phone-wrap select {
  flex: 0 0 118px;
  padding-left: 10px;
  padding-right: 28px;
}
.phone-wrap input {
  flex: 1;
}

.strength-meter {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}
.strength-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  transition: background 0.2s ease;
}
.strength-label {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px;
}
.req-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
}
.req-list li {
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.req-list li .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: 0 0 auto;
}
.req-list li.met {
  color: var(--success);
}
.req-list li.met .dot {
  background: var(--success);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
  flex: 0 0 auto;
  border-radius: 5px;
}
.checkbox-row label {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}
.checkbox-row a {
  color: var(--primary);
  font-weight: 600;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}

.btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-btn);
  border: none;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(27, 37, 89, 0.55);
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-primary:disabled {
  background: #A9AEC4;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--bg);
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  height: auto;
  padding: 4px 0;
  width: auto;
}
.btn-social {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  font-weight: 600;
}
.btn-social:hover {
  background: var(--bg);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 4px;
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 500;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.foot-line {
  margin-top: 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.foot-line a {
  font-weight: 600;
  color: var(--primary);
}
.legal-line {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.6;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 2px;
  animation: alert-in 0.25s ease;
}
@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.alert svg {
  flex: 0 0 auto;
  margin-top: 1px;
}
.alert-error {
  background: var(--error-soft);
  color: #9B1C1C;
}
.alert-success {
  background: var(--success-soft);
  color: #0F6B33;
}
.alert-info {
  background: var(--accent-soft);
  color: var(--primary);
}

.avail-msg {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.avail-ok {
  color: var(--success);
}
.avail-taken {
  color: var(--error);
}
.avail-checking {
  color: var(--muted-2);
}

.status-card {
  text-align: center;
}
.status-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes pop-in {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.status-icon.success {
  background: var(--success-soft);
}
.status-icon.error {
  background: var(--error-soft);
}
.status-card h1 {
  font-size: 23px;
}
.status-card .desc {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.status-actions {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.otp-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.otp-box {
  width: 100%;
  aspect-ratio: 1;
  max-width: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 0;
}
.masked-email {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 13.5px;
  border: 1px solid var(--border);
}
.resend-row {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
}
.resend-row button {
  background: none;
  border: none;
  padding: 0;
  font-weight: 600;
  color: var(--accent);
  font-size: 13.5px;
}
.resend-row button:disabled {
  color: var(--muted-2);
  cursor: not-allowed;
}
.security-note {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--warning-soft);
  color: #8A5A00;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

.page-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
}
.page-footer .links {
  margin-top: 6px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.page-footer a {
  color: var(--muted);
  font-weight: 500;
}

.top-nav-hint {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

/* Responsive */
@media (max-width: 980px) {
  .brand-panel {
    display: none;
  }
  .mobile-brand {
    display: flex;
  }
  .auth-panel {
    padding: 28px 16px 40px;
  }
  .auth-card {
    padding: 30px 22px 26px;
    border-radius: 16px;
  }
}
@media (max-width: 400px) {
  .field-row {
    flex-direction: column;
    gap: 18px;
  }
  .otp-box {
    max-width: 44px;
    font-size: 18px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}