/* ============================================================
   MaThStudio.ai — Auth Pages Stylesheet
   Extends global style.css — requires style.css to be loaded first
   ============================================================ */

/* ── Auth Layout ── */
.auth-page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}

/* ── Auth Sidebar (brand panel) ── */
.auth-sidebar {
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(79, 122, 255,0.1) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(79, 122, 255,0.06) 0%, transparent 60%),
    #060d1f;
  border-right: 1px solid var(--gold-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
}
.auth-sidebar-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 122, 255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 122, 255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.auth-sidebar-brand {
  position: relative;
}
.auth-sidebar-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 40px;
}
.auth-sidebar-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}
.auth-sidebar-sub {
  color: var(--cream-dim);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 360px;
}
.auth-sidebar-features {
  position: relative;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .9rem;
  color: var(--cream-dim);
}
.auth-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(79, 122, 255,0.5);
}
.auth-sidebar-footer {
  position: relative;
  font-size: .78rem;
  color: var(--cream-dim);
}
.auth-sidebar-footer a {
  color: var(--gold);
}

/* ── Auth Form Panel ── */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 64px;
  overflow-y: auto;
}
.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}
.auth-form-header {
  margin-bottom: 40px;
}
.auth-form-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 8px;
}
.auth-form-header p {
  color: var(--cream-dim);
  font-size: .95rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: 4px;
}
.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--gold-border);
}
.auth-divider span {
  font-size: .78rem;
  color: var(--cream-dim);
  white-space: nowrap;
}

/* OAuth buttons */
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--gold-border);
  background: var(--bg-card-2);
  color: var(--cream);
  font-size: .9rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}
.btn-oauth:hover {
  border-color: rgba(79, 122, 255,.45);
  background: var(--bg-card);
}
.btn-oauth svg { width: 18px; height: 18px; }

/* Submit button full-width */
.btn-auth-submit {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
}

/* Form extras */
.auth-form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cream-dim);
  cursor: pointer;
}
.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--gold);
}
.auth-link {
  color: var(--gold);
  font-size: .85rem;
  transition: color var(--transition);
}
.auth-link:hover { color: var(--gold-light); text-decoration: underline; }

.auth-footer-link {
  text-align: center;
  margin-top: 28px;
  font-size: .88rem;
  color: var(--cream-dim);
}
.auth-footer-link a { color: var(--gold); font-weight: 600; }
.auth-footer-link a:hover { color: var(--gold-light); }

/* Password toggle */
.input-wrap {
  position: relative;
}
.input-wrap .form-input {
  padding-right: 44px;
}
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cream-dim);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  transition: color var(--transition);
  display: flex; align-items: center;
}
.pw-toggle:hover { color: var(--gold); }

/* Password strength bar */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: -8px;
}
.pw-strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--charcoal);
  transition: background .3s;
}
.pw-strength-label {
  font-size: .75rem;
  color: var(--cream-dim);
  text-align: right;
  margin-top: 4px;
}

/* Dashboard-specific */
.dash-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--gold-border);
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.dash-main {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100svh - 68px);
}
.dash-sidebar {
  background: var(--bg-alt);
  border-right: 1px solid var(--gold-border);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--cream-dim);
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}
.dash-nav-item:hover, .dash-nav-item.active {
  background: var(--gold-dim);
  color: var(--cream);
}
.dash-nav-item.active { color: var(--gold); }
.dash-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.dash-content {
  padding: 40px 48px;
  overflow-y: auto;
}
.dash-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.dash-welcome { color: var(--cream-dim); font-size: .95rem; margin-bottom: 32px; }
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.dash-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.app-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gold-border);
}
.app-item:last-child { border-bottom: none; }
.app-item-info { display: flex; flex-direction: column; gap: 4px; }
.app-item-name { font-weight: 600; font-size: .95rem; }
.app-item-meta { font-size: .8rem; color: var(--cream-dim); }
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge-gold { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-border); }
.badge-dim  { background: var(--charcoal); color: var(--cream-dim); }

/* ── Responsive (auth) ── */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-sidebar { display: none; }
  .auth-panel { padding: 48px 32px; min-height: 100svh; }
  .dash-main { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .dash-content { padding: 28px 24px; }
  .dash-header { padding: 0 24px; }
}
@media (max-width: 480px) {
  .auth-panel { padding: 36px 20px; }
}
