@import url('design_system.css');

/* ==========================================================================
   MMM Study — Authentication Page Styles
   ========================================================================== */

.wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

/* Left Brand & Inspiration Panel */
.side {
  background: var(--brand-navy-gradient);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.side::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-gold-glow), transparent 70%);
  top: -120px;
  right: -120px;
  pointer-events: none;
}

.side::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1.5px dashed var(--brand-gold-border);
  bottom: -100px;
  left: -80px;
  pointer-events: none;
}

.side .brand {
  position: relative;
  z-index: 1;
}

.quote-block {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.quote-mark {
  font-family: 'Poppins', sans-serif;
  font-size: 56px;
  font-weight: 800;
  color: var(--brand-gold);
  line-height: 1;
  opacity: 0.85;
}

.quote-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.45;
  margin-top: 4px;
  color: #FFFFFF;
}

.quote-author {
  margin-top: 18px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-author .ln {
  width: 26px;
  height: 2px;
  background: var(--brand-gold);
}

.side-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.side-stats div .n {
  font-weight: 800;
  font-size: 22px;
  color: var(--brand-gold-hover);
  font-family: 'Poppins', sans-serif;
}

.side-stats div .l {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.side-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* Right Form Panel */
.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--surface-bg);
}

.card {
  width: 100%;
  max-width: 420px;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  text-decoration: none;
}

.auth-mobile-brand h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-navy-900);
}

.card-head {
  margin-bottom: 24px;
}

.card-head h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-navy-900);
}

.card-head p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.tabs {
  display: flex;
  background: var(--surface-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}

.tab.active {
  background: var(--brand-navy-900);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(11, 30, 54, 0.25);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-navy-900);
  margin-bottom: 6px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap:focus-within {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 4px var(--brand-gold-glow);
}

.input-wrap svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.input-wrap input, .input-wrap select {
  border: none;
  outline: none;
  flex: 1;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: transparent;
}

.input-wrap .toggle-eye {
  cursor: pointer;
  color: var(--text-muted);
}

.input-wrap.invalid {
  border-color: var(--accent-crimson);
  box-shadow: 0 0 0 4px var(--accent-crimson-soft);
}

.field-error {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-crimson);
  line-height: 1.4;
}

.field-error.show {
  display: block;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aux-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  margin: 4px 0 20px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}

.remember input {
  accent-color: var(--brand-gold);
  width: 15px;
  height: 15px;
}

.link {
  color: var(--brand-navy-700);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.link:hover {
  color: var(--brand-gold);
  text-decoration: underline;
}

.btn-primary {
  width: 100%;
  background: var(--brand-gold-gradient);
  color: var(--brand-navy-950);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(197, 155, 39, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(197, 155, 39, 0.45);
  filter: brightness(1.04);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11.5px;
  margin: 22px 0;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.btn-google {
  width: 100%;
  background: var(--surface-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-google:hover {
  border-color: var(--brand-navy-700);
  background: var(--surface-subtle);
}

.btn-google:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.google-button-slot {
  display: none;
  justify-content: center;
  margin-top: 12px;
}

.google-button-slot.active {
  display: flex;
}

.auth-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: -6px 0 14px;
  line-height: 1.45;
}

.password-rules {
  list-style: none;
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
}

.password-rules li {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-rules li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
}

.password-rules li.met {
  color: var(--accent-green);
  font-weight: 600;
}

.password-rules li.met::before {
  background: var(--accent-green);
}

.switch-line {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 24px;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-gold-light);
  color: var(--brand-navy-900);
  border: 1px solid var(--brand-gold-border);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.form-panel {
  display: none;
}

.form-panel.active {
  display: block;
  animation: fade 0.3s ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 920px) {
  .wrap {
    grid-template-columns: 1fr;
  }
  .side {
    display: none;
  }
  .auth-mobile-brand {
    display: flex;
  }
  .panel {
    padding: 48px 20px;
  }
}

@media (max-width: 420px) {
  .row-2 {
    grid-template-columns: 1fr;
  }
  .card-head h1 {
    font-size: 22px;
  }
}
