/* ============================================================
   KubekBio — Auth Pages (Login / Register)
   Split two-column layout: branded left + form right
   ============================================================ */

/* ── Body reset for auth pages ── */
.auth-body {
  display: block;
  min-height: 100svh;
  overflow-x: hidden;
}

/* ── Two-column wrapper ── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}

/* ================================================================
   LEFT PANEL — branding
   ================================================================ */
.auth-panel-left {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  padding: 2.5rem;
}

/* Dot-grid background */
.auth-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Top-right spotlight */
.auth-panel-left::before {
  content: '';
  position: absolute;
  top: -160px;
  right: -160px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* Logo / brand link */
.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Body content */
.auth-panel-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0 2rem;
}

/* Headline */
.auth-panel-h2 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.auth-panel-h2 em {
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
}

/* Sub */
.auth-panel-sub {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2.5rem;
  max-width: 320px;
}

/* ── Mini profile cards ── */
.auth-profiles {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ap-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.ap-card:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.04);
}

.ap-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ap-info {
  flex: 1;
  min-width: 0;
}

.ap-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.ap-url {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-badges {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.ap-b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Bottom stats bar ── */
.auth-panel-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.auth-stat {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.auth-stat span {
  color: var(--text);
  font-weight: 700;
}

.auth-stat-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
}

/* ================================================================
   RIGHT PANEL — form
   ================================================================ */
.auth-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2.5rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

/* Form header */
.auth-form-head {
  margin-bottom: 2.25rem;
}

.auth-form-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.auth-form-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Error box */
.error-box {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #f87171;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.error-box:not(:empty) {
  display: block;
}

/* ── Auth form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Input wrapper with icon */
.inp-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.inp-ico {
  position: absolute;
  left: 1rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 1;
}

.inp-wrap input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.inp-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.inp-wrap input:focus {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

/* Forgot password row */
.form-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.25rem;
}

.form-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.form-link:hover {
  color: var(--text);
}

/* Submit button */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  margin-top: 0.5rem;
  background: #ffffff;
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.submit-btn:hover {
  background: #e8e8e8;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* "No account" switch */
.auth-switch {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-switch a:hover {
  opacity: 0.7;
}

/* ================================================================
   2FA Section
   ================================================================ */
.tfa-ico {
  text-align: center;
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.tfa-desc {
  text-align: center;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Back button */
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.7rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.back-btn:hover {
  border-color: var(--border-bright);
  color: var(--text);
  background: var(--surface-2);
}

/* ================================================================
   Cookie banner (auth pages)
   ================================================================ */
#cookieBanner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.cookie-text a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-btns {
  display: flex;
  gap: 0.5rem;
}

.cookie-accept {
  padding: 0.4rem 0.9rem;
  background: #ffffff;
  color: #0a0a0a;
  border: none;
  border-radius: 7px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.cookie-accept:hover {
  background: #e8e8e8;
}

/* ================================================================
   Responsive — tablet / mobile
   ================================================================ */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-panel-left {
    display: none;
  }

  .auth-panel-right {
    min-height: 100svh;
    padding: 2rem 1.5rem;
  }

  .auth-form-wrap {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-panel-right {
    padding: 1.5rem 1.25rem;
    align-items: flex-start;
    padding-top: 3rem;
  }

  .auth-form-title {
    font-size: 1.7rem;
  }
}
