/**
 * Shared styles for /login and /signup.
 *
 * Palette matches ChatGPT's monochrome dark interface (#0d0d0d, #171717, #2f2f2f,
 * #ececec, #b4b4b4, #8e8e8e). Green (#10a37f) is reserved exclusively for the
 * primary submit button on login and signup.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-page: #0d0d0d;
  --bg-input: #171717;
  --bg-input-hover: #1d1d1d;
  --bg-input-focus: #171717;

  --text-primary: #ececec;
  --text-secondary: #b4b4b4;
  --text-tertiary: #8e8e8e;

  --border-default: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(255, 255, 255, 0.28);
  --border-focus: #ececec;
  --border-subtle: rgba(255, 255, 255, 0.08);

  --btn-green: #10a37f;
  --btn-green-hover: #0e8f6f;
  --btn-green-active: #0b7a5e;

  --radius-sm: 6px;
  --radius-md: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  background-color: var(--bg-page);
}

body.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── Full-Page Two-Column Layout ─────────────────────────────────────────── */
.auth-page-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

/* ── Left Visual Panel (Artwork + Quiet Editorial Caption) ───────────────── */
.auth-showcase {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 44px;
  border-right: 1px solid var(--border-subtle);
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.25) 0%, rgba(13, 13, 13, 0.45) 60%, rgba(13, 13, 13, 0.85) 100%),
    url('/static/auth_bg.png') center center / cover no-repeat;
}

.auth-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  width: fit-content;
}

.auth-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #0d0d0d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-showcase-caption {
  max-width: 420px;
}

.auth-showcase-quote {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 10px;
}

.auth-showcase-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(236, 236, 236, 0.72);
}

/* ── Right Form Page (Scrollable, Monochrome ChatGPT Surface) ────────────── */
.auth-main-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 40px;
  background-color: var(--bg-page);
  overflow-y: auto;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  flex-shrink: 0;
}

.auth-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.auth-topbar-brand-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-page);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-topbar-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.auth-topbar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
}

/* ── Centered Form Column ────────────────────────────────────────────────── */
.auth-container {
  width: 100%;
  max-width: 340px;
  margin: auto;
  padding: 36px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.auth-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.25;
}

.auth-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Seamless Form Container (No Card/Modal/Popup Box) */
.auth-card {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

/* ── Feedback / Alerts ───────────────────────────────────────────────────── */
.auth-feedback {
  display: none;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  line-height: 1.45;
  margin-bottom: 16px;
}

.auth-feedback.visible.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-feedback.visible.success {
  display: block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
}

.auth-feedback.visible.info {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-secondary);
}

/* ── Form Fields ─────────────────────────────────────────────────────────── */
.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-field-group:last-of-type {
  margin-bottom: 22px;
}

.auth-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.auth-label-optional {
  color: var(--text-tertiary);
  font-weight: 400;
}

.auth-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-input::placeholder {
  color: var(--text-tertiary);
}

.auth-input:hover {
  background: var(--bg-input-hover);
  border-color: var(--border-hover);
}

.auth-input:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
}

/* ── Password Eye Toggle ─────────────────────────────────────────────────── */
.auth-eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.auth-eye-btn:hover {
  color: var(--text-primary);
}

/* ── Primary Submit Button (ONLY Green Element on Page) ──────────────────── */
.auth-submit-btn {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--btn-green);
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.auth-submit-btn:hover {
  background: var(--btn-green-hover);
}

.auth-submit-btn:active {
  background: var(--btn-green-active);
}

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

/* ── Monochrome Switch Link ──────────────────────────────────────────────── */
.auth-alt {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-align: center;
}

.auth-alt a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 4px;
}

.auth-alt a:hover {
  color: #ffffff;
}

/* ── Bottom Footer Bar ───────────────────────────────────────────────────── */
.auth-page-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ── Responsive Breakpoints & Scrollability ──────────────────────────────── */
@media (max-width: 920px) {
  .auth-page-shell {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-main-pane {
    padding: 24px 20px;
    background:
      linear-gradient(180deg, rgba(13, 13, 13, 0.88) 0%, rgba(13, 13, 13, 0.96) 100%),
      url('/static/auth_bg.png') center center / cover no-repeat;
  }

  .auth-container {
    padding: 28px 0;
  }
}

@media (max-width: 420px) {
  .auth-main-pane {
    padding: 18px 16px;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-page-bottom {
    justify-content: center;
    text-align: center;
  }
}
