:root {
  --brand-primary: #0b109f;
  --brand-secondary: #df1f2a;
  --brand-accent: #fef200;
  --brand-bg: #b4eaf4;
  --ui-surface: #ffffff;
  --ui-text: #0f172a;
  --ui-muted: #475569;
  --ui-border: #cbd5e1;
  --ui-radius: 14px;
  --font-display: "Rubik", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ui-text);
  background-color: var(--brand-bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* Theme variants for Login & Reset pages */
body.theme-playful-brutalist {
  background-color: var(--brand-bg);
  background-image: radial-gradient(color-mix(in srgb, var(--brand-primary) 12%, transparent) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

body.theme-modern-clean {
  background: linear-gradient(145deg, var(--brand-bg) 0%, #ffffff 55%, color-mix(in srgb, var(--brand-primary) 8%, #ffffff) 100%);
}

body.theme-dark-luxury {
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--brand-primary) 30%, #090d16) 0%, #090d16 70%);
  color: #f8fafc;
}

.stripe-ribbon {
  height: 12px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--brand-primary) 0 18px,
    var(--brand-secondary) 18px 36px
  );
  border-bottom: 3px solid var(--brand-primary);
}

.stripe-ribbon-bottom {
  border-bottom: 0;
  border-top: 3px solid var(--brand-primary);
}

/* Login shell */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-grid {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 2.5rem;
  align-items: center;
}

.auth-grid.single-col {
  grid-template-columns: minmax(300px, 460px);
  justify-content: center;
}

.brand-showcase {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-logo-img {
  max-height: 46px;
  max-width: 210px;
  object-fit: contain;
}

.brand-title-fallback {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--brand-primary);
  margin: 0;
}

.theme-dark-luxury .brand-title-fallback {
  color: #ffffff;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--brand-accent);
  color: #0f172a;
}

.theme-playful-brutalist .brand-pill {
  border: 2px solid var(--brand-primary);
  box-shadow: 3px 3px 0 var(--brand-primary);
  color: var(--brand-primary);
}

.mascot-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  border-radius: 26px;
  background: radial-gradient(circle, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.28) 70%, transparent 100%);
}

.theme-dark-luxury .mascot-box {
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
}

.mascot-img {
  width: min(290px, 65vw);
  max-height: 310px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(10, 20, 107, 0.18));
  animation: float-soft 4.5s ease-in-out infinite;
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.brand-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  color: var(--brand-primary);
}

.theme-dark-luxury .brand-headline {
  color: #ffffff;
}

.brand-subtext {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ui-muted);
  max-width: 44ch;
}

.theme-dark-luxury .brand-subtext {
  color: #cbd5e1;
}

/* Auth Card */
.auth-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.theme-playful-brutalist .auth-card {
  border: 3px solid var(--brand-primary);
  box-shadow: 8px 8px 0 var(--brand-primary);
}

.theme-dark-luxury .auth-card {
  background: #111827;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.card-header {
  margin-bottom: 1.4rem;
}

.card-header h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 0.3rem;
  color: var(--brand-primary);
}

.theme-dark-luxury .card-header h2 {
  color: #ffffff;
}

.card-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ui-muted);
}

.theme-dark-luxury .card-header p {
  color: #94a3b8;
}

.mobile-brand-bar {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px dashed #e2e8f0;
}

.mobile-brand-bar img {
  height: 32px;
  width: auto;
}

/* Form controls */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #1e293b;
}

.theme-dark-luxury .form-label {
  color: #e2e8f0;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-playful-brutalist .form-input {
  border-color: var(--brand-primary);
}

.theme-dark-luxury .auth-card .form-input {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 16%, transparent);
}

.input-has-toggle {
  padding-right: 2.75rem;
}

.eye-btn {
  position: absolute;
  right: 0.55rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  border-radius: 6px;
}

.eye-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}

.input-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease, background-color 0.12s ease;
}

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

.btn-block {
  width: 100%;
}

.btn-brand {
  background: var(--brand-primary);
  color: #ffffff;
}

.theme-playful-brutalist .btn-brand {
  background: var(--brand-accent);
  color: var(--brand-primary);
  border: 3px solid var(--brand-primary);
  box-shadow: 4px 4px 0 var(--brand-primary);
}

.theme-playful-brutalist .btn-brand:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--brand-primary);
}

.btn-primary {
  background: #0b109f;
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: #141cb8;
}

.btn-accent {
  background: var(--brand-accent);
  color: #0f172a;
  border-color: var(--brand-primary);
}

.btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
}

.btn-sm {
  padding: 0.42rem 0.78rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
}

.theme-dark-luxury .link-btn {
  color: var(--brand-accent);
}

/* Alerts */
.alert {
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.alert-warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

/* Footer */
.auth-footer {
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--ui-muted);
  background: rgba(255, 255, 255, 0.72);
  border-top: 2px solid color-mix(in srgb, var(--brand-primary) 20%, transparent);
}

.theme-dark-luxury .auth-footer {
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  border-top-color: rgba(255, 255, 255, 0.1);
}

.auth-footer a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Modal generic */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-card {
  width: min(640px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  border: 2px solid #cbd5e1;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  padding: 1.5rem;
}

.modal-card.modal-lg {
  width: min(860px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.modal-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

.strength-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  margin-top: 0.4rem;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s ease, background-color 0.2s ease;
}

@media (max-width: 860px) {
  .auth-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
  }
  .brand-showcase {
    display: none;
  }
  .mobile-brand-bar {
    display: flex;
  }
}
