/* Auth Page — Login / Register / Forgot Password */

.bc-auth {
  font-family: var(--bc-font);
  color: var(--bc-text);
  min-height: 100vh;
}

.bc-auth *,
.bc-auth *::before,
.bc-auth *::after {
  box-sizing: border-box;
}

/* Layout: side-by-side panels */
.bc-auth__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Brand Panel (left) ── */
.bc-auth__brand-panel {
  background: var(--bc-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

.bc-auth__brand-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}

.bc-auth__brand-panel::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(220,38,38,0.06);
}

.bc-auth__brand-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.bc-auth__brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin-bottom: 40px;
}

.bc-auth__brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.bc-auth__brand-dot {
  color: var(--bc-accent);
}

.bc-auth__brand-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.bc-auth__brand-title em {
  font-family: var(--bc-font-serif);
  font-style: italic;
  color: var(--bc-accent);
}

/* Features list */
.bc-auth__features {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bc-auth__features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.bc-auth__feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.bc-auth__features li strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.bc-auth__features li span {
  display: block;
  font-size: 0.82rem;
  opacity: 0.6;
}

/* Stats */
.bc-auth__brand-stats {
  display: flex;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.bc-auth__brand-stats div strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
}

.bc-auth__brand-stats div span {
  font-size: 0.75rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Form Panel (right) ── */
.bc-auth__form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bc-bg);
}

.bc-auth__form-content {
  max-width: 420px;
  width: 100%;
}

/* Tabs */
.bc-auth__tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--bc-grey-100);
}

.bc-auth__tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bc-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.2s var(--bc-ease);
  font-family: var(--bc-font);
}

.bc-auth__tab:hover {
  color: var(--bc-text);
}

.bc-auth__tab--active {
  color: var(--bc-navy);
  border-bottom-color: var(--bc-navy);
}

/* Status */
.bc-auth__status {
  padding: 12px 16px;
  border-radius: var(--bc-radius);
  font-size: 0.85rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

.bc-auth__status.error {
  background: var(--bc-accent-soft);
  color: var(--bc-accent);
  border: 1px solid rgba(220,38,38,0.15);
}

.bc-auth__status.success {
  background: #ECFDF5;
  color: var(--bc-green);
  border: 1px solid rgba(5,150,105,0.15);
}

/* Form */
.bc-auth__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bc-auth__form-intro h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.bc-auth__form-intro p {
  font-size: 0.88rem;
  color: var(--bc-text-secondary);
  margin-bottom: 8px;
}

/* Field Row (side by side) */
.bc-auth__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Field */
.bc-auth__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bc-auth__field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bc-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bc-auth__field input[type="text"],
.bc-auth__field input[type="email"],
.bc-auth__field input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bc-grey-200);
  border-radius: var(--bc-radius);
  font-size: 0.9rem;
  background: var(--bc-bg);
  outline: none;
  transition: border-color 0.15s var(--bc-ease), box-shadow 0.15s var(--bc-ease);
  font-family: var(--bc-font);
}

.bc-auth__field input:focus {
  border-color: var(--bc-navy);
  box-shadow: 0 0 0 3px rgba(10,22,40,0.08);
}

.bc-auth__field input::placeholder {
  color: var(--bc-grey-400);
}

/* Password field with toggle */
.bc-auth__password-wrap {
  position: relative;
}

.bc-auth__password-wrap input {
  padding-right: 44px;
}

.bc-auth__toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--bc-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.bc-auth__toggle-pw:hover {
  color: var(--bc-text);
}

/* Field hint (username availability, etc.) */
.bc-auth__field-hint {
  font-size: 0.78rem;
  min-height: 1.2em;
}

.bc-auth__field-hint--available {
  color: var(--bc-green);
}

.bc-auth__field-hint--taken {
  color: var(--bc-accent);
}

.bc-auth__field-hint--checking {
  color: var(--bc-muted);
}

/* Password strength */
.bc-auth__pw-strength {
  height: 3px;
  border-radius: 2px;
  background: var(--bc-grey-100);
  margin-top: 4px;
  overflow: hidden;
}

.bc-auth__pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

/* Forgot link */
.bc-auth__forgot-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--bc-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--bc-font);
}

.bc-auth__forgot-link:hover {
  text-decoration: underline;
}

/* Checkbox */
.bc-auth__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--bc-text-secondary);
}

.bc-auth__checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--bc-navy);
  flex-shrink: 0;
}

.bc-auth__checkbox a {
  color: var(--bc-navy);
  text-decoration: underline;
}

/* Buttons */
.bc-auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--bc-radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s var(--bc-ease);
  font-family: var(--bc-font);
  text-decoration: none;
}

.bc-auth__btn--primary {
  background: var(--bc-navy);
  color: #fff;
}

.bc-auth__btn--primary:hover {
  background: #000;
}

.bc-auth__btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bc-auth__btn--outline {
  background: transparent;
  color: var(--bc-navy);
  border: 1px solid var(--bc-grey-200);
}

.bc-auth__btn--outline:hover {
  border-color: var(--bc-navy);
  background: var(--bc-cream);
}

.bc-auth__btn--full {
  width: 100%;
}

/* Back link */
.bc-auth__back-link {
  background: none;
  border: none;
  color: var(--bc-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 0;
  text-align: center;
  font-family: var(--bc-font);
}

.bc-auth__back-link:hover {
  color: var(--bc-text);
}

/* Divider */
.bc-auth__divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.bc-auth__divider::before,
.bc-auth__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bc-grey-200);
}

.bc-auth__divider span {
  font-size: 0.78rem;
  color: var(--bc-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Social */
.bc-auth__social-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--bc-muted);
}

/* Switch */
.bc-auth__switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--bc-text-secondary);
}

.bc-auth__switch button {
  background: none;
  border: none;
  color: var(--bc-navy);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  text-decoration: underline;
  font-family: var(--bc-font);
}

.bc-auth__switch button:hover {
  color: var(--bc-accent);
}

/* ── Loading spinner on button ── */
.bc-auth__btn--loading {
  pointer-events: none;
  opacity: 0.7;
}

.bc-auth__btn--loading svg {
  display: none;
}

.bc-auth__btn--loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bc-auth-spin 0.6s linear infinite;
}

@keyframes bc-auth-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .bc-auth__layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .bc-auth__brand-panel {
    padding: 40px 24px 32px;
  }

  .bc-auth__brand-content {
    max-width: 100%;
  }

  .bc-auth__brand-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }

  .bc-auth__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .bc-auth__features li {
    gap: 10px;
  }

  .bc-auth__brand-stats {
    gap: 24px;
  }

  .bc-auth__form-panel {
    padding: 32px 24px 48px;
  }
}

@media (max-width: 480px) {
  .bc-auth__features {
    grid-template-columns: 1fr;
  }

  .bc-auth__field-row {
    grid-template-columns: 1fr;
  }

  .bc-auth__brand-panel {
    padding: 32px 20px 24px;
  }

  .bc-auth__brand-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .bc-auth__form-panel {
    padding: 24px 20px 40px;
  }
}

/* ── Full-page override: hide header/footer when on auth page ── */
body.bc-auth-page .bc-navbar,
body.bc-auth-page .bc-announcement,
body.bc-auth-page .bc-footer,
body.bc-auth-page .bc-nav {
  display: none !important;
}

body.bc-auth-page .bc-main {
  padding: 0 !important;
  margin: 0 !important;
}

body.bc-auth-page .bc-page-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}
