/* ============================================================
   PG Finder — Owner Auth Pages  (owner-auth.css)
   Covers: owner-login.html · owner-register.html
   Location: /owner/
   Extends global design system (../styles.css). Never overrides
   global tokens — only adds page-specific layout & components.
   ============================================================ */


/* ── Page shell ──────────────────────────────────────────────────────────── */
.owner-auth-page {
  background-color: var(--color-surface);
  min-height: 100vh;
}


/* ════════════════════════════════════════════════════════════════════════════
   TOP BAR  (mirrors login.html pattern)
════════════════════════════════════════════════════════════════════════════ */

.owner-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
}

/* Back link — left slot */
.owner-topbar__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
  min-width: 90px;
}

.owner-topbar__back:hover {
  color: var(--color-text-primary);
}

/* Logo — centre slot */
.owner-topbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.owner-topbar__logo-icon {
  width: 34px;
  height: 34px;
  background-color: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.owner-topbar__brand {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.025em;
}

/* Owner Portal badge — right slot */
.owner-topbar__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 90px;
  justify-content: flex-end;
}


/* ════════════════════════════════════════════════════════════════════════════
   MAIN — full-height centering shell
════════════════════════════════════════════════════════════════════════════ */

.owner-auth-main {
  min-height: 100vh;
  padding-top: calc(var(--navbar-h) + var(--space-12));
  padding-bottom: var(--space-16);
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}


/* ════════════════════════════════════════════════════════════════════════════
   AUTH CARD
════════════════════════════════════════════════════════════════════════════ */

.owner-auth-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10) var(--space-8);
  width: 100%;
  max-width: 440px;
}

/* ── Card header: icon + title + subtitle ────────────────────────────────── */
.owner-auth-card__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.owner-auth-card__icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  flex-shrink: 0;
}

.owner-auth-card__icon--blue {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.owner-auth-card__icon--green {
  background: var(--color-success-light);
  color: var(--color-success);
}

.owner-auth-card__title {
  font-size: var(--font-size-2xl) !important;
  font-weight: 800 !important;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.owner-auth-card__subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.65;
}


/* ── Step containers inside the card ────────────────────────────────────── */
/* JS switches loginStep / verifyStep visibility via style.display directly.
   We only add smooth spacing. */
.owner-auth-step {
  display: flex;
  flex-direction: column;
  gap: 0; /* spacing comes from .form-group margin */
}


/* ── OTP section — revealed by JS (id="otpSection") ─────────────────────── */
/* JS sets:  document.getElementById('otpSection').style.display = 'block'
   We add a visual separator for the transition. */
#otpSection {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}


/* ── Feedback message paragraphs — set by JS ─────────────────────────────── */
/* JS writes .textContent and .style.color (red / green / blue) inline.
   We fix layout so the card doesn't jump when text appears. */
#checkMessage,
#registerMessage,
#loginMessage,
#verifyMessage {
  display: block;
  min-height: 20px;
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-align: center;
  line-height: 1.55;
}


/* ── sendOtpBtn disabled state ──────────────────────────────────────────── */
/* JS toggles .disabled — we make it visually clear */
#sendOtpBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Remove hover transform when disabled (applied via .btn--primary:hover) */
#sendOtpBtn:disabled:hover {
  transform: none;
  box-shadow: none;
}


/* ── Action button spacing ───────────────────────────────────────────────── */
.owner-auth-btn {
  margin-top: var(--space-2);
}


/* ── Card footer: switch-page link ──────────────────────────────────────── */
.owner-auth-card__footer {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.owner-auth-card__footer a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.owner-auth-card__footer a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ── Optional field hint ─────────────────────────────────────────────────── */
.form-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  line-height: 1.5;
}

/* "optional" label badge inside form-label */
.form-label__optional {
  font-size: var(--font-size-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: var(--space-1);
  letter-spacing: 0;
  text-transform: none;
}


/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 480px)
════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  .owner-topbar {
    padding: 0 var(--space-4);
  }

  .owner-topbar__back span {
    display: none; /* show only icon on very small screens */
  }

  .owner-auth-main {
    padding-top: calc(var(--navbar-h) + var(--space-6));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .owner-auth-card {
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-lg);
  }

  .owner-auth-card__title {
    font-size: var(--font-size-xl) !important;
  }
}
