/* --------------------------------------------------
   TOKENS / ROOT
-------------------------------------------------- */

:root {
  --color-green: #16a34a;
  --color-green-dark: #15803d;
  --color-green-light: #dcfce7;
  --color-ink: #111827;
  --color-border: #e5e7eb;
  --color-bg-soft: #f8fafc;

  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 18px 45px rgba(15, 23, 42, 0.16),
                   0 4px 10px rgba(15, 23, 42, 0.06);
}

/* --------------------------------------------------
   BASE
-------------------------------------------------- */

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(22, 163, 74, 0.13), transparent 30%),
    radial-gradient(circle at 88% 20%, rgba(22, 163, 74, 0.1), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg-soft) 100%);
}

/* --------------------------------------------------
   BACKGROUND ORBS
-------------------------------------------------- */

.bg-orb {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(55px);
}

.orb-a {
  width: 220px;
  height: 220px;
  left: -30px;
  top: -40px;
  background: rgba(74, 222, 128, 0.25);
}

.orb-b {
  width: 260px;
  height: 260px;
  right: -80px;
  bottom: -100px;
  background: rgba(22, 163, 74, 0.2);
}

/* --------------------------------------------------
   HEADER + LOGO
-------------------------------------------------- */

.header-blur {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--color-border);
}

.navbar-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 0;
}

/* --------------------------------------------------
   PILL BUTTONS (HOME / SIGN IN)
-------------------------------------------------- */

.btn-ec-primary,
.btn-ec-outline {
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-width: 2px;
  border-style: solid;
  transition: all 0.18s ease;
  text-decoration: none;
}

/* Filled green pill (Sign in, primary actions) */
.btn-ec-primary {
  background-color: var(--color-green);
  border-color: var(--color-green);
  color: #ffffff;
}

.btn-ec-primary:hover,
.btn-ec-primary:focus-visible {
  background-color: var(--color-green-dark);
  border-color: var(--color-green-dark);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}

.btn-ec-primary:disabled,
.btn-ec-primary[disabled] {
  background-color: #9ca3af;
  border-color: #9ca3af;
  color: #ffffff;
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* Outline pill (Home, secondary) */
.btn-ec-outline {
  background-color: #ffffff;
  border-color: var(--color-green);
  color: var(--color-green);
}

.btn-ec-outline:hover,
.btn-ec-outline:focus-visible {
  background-color: var(--color-green-light);
  border-color: var(--color-green);
  color: var(--color-green-dark);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.18);
}

/* --------------------------------------------------
   MAIN LAYOUT
-------------------------------------------------- */

.signup-main {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  padding: 2.5rem 1rem 3rem;
}

/* Card shell */
.shell-card {
  border: 1px solid var(--color-border);
  border-radius: 22px;
  box-shadow: var(--shadow-strong);
  background: #ffffff;
}

/* Tag at top of card */
.soft-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #86efac;
  background: var(--color-green-light);
  color: var(--color-green-dark);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------
   FORMS
-------------------------------------------------- */

.signup-main .form-control,
.signup-main .form-select {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  min-height: 48px;
  font-size: 0.95rem;
}

.signup-main .form-control:focus,
.signup-main .form-select:focus {
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Checkbox alignment */
.form-check-input {
  margin-top: 0.15rem;
}

/* Ensure the privacy consent checkbox is visible inside the custom box */
.privacy-consent-box .form-check {
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.privacy-consent-box .form-check-input {
  margin-left: 0;
  margin-top: 0;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--color-green);
  -webkit-appearance: checkbox;
  appearance: checkbox;
  float: none;
  position: static;
}

.form-check-label {
  line-height: 1.4;
}

/* Google connected icon */
.google-connected-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-green);
  flex-shrink: 0;
}

/* Unified Google consent card */
.google-consent-card {
  padding: 1.4rem 1.5rem;
  border-radius: 16px;
  border: 1.5px solid #86efac;
  background: linear-gradient(160deg, #f0fdf4 0%, #fafffe 100%);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.1);
  animation: consent-fadein 0.3s ease both;
}

@keyframes consent-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Privacy consent box */
.privacy-consent-box {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(22, 163, 74, 0.45);
  background: linear-gradient(135deg, #f0fdf4 0%, #f9fafb 100%);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.07);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.privacy-consent-box.consent-alert {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
  animation: consent-shake 0.45s ease;
}

.privacy-consent-box.consent-error {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

@keyframes consent-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  40%       { transform: translateX(7px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* Password strength */
.strength-bar-track {
  height: 5px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar.weak   { width: 33%; background: #ef4444; }
.strength-bar.fair   { width: 66%; background: #f59e0b; }
.strength-bar.strong { width: 100%; background: #16a34a; }

.password-hints {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hint-item {
  font-size: 0.8rem;
  color: #9ca3af;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hint-item.passed {
  color: #16a34a;
}

.hint-item .hint-unmet { font-size: 0.7rem; }
.hint-item .hint-met   { font-size: 0.7rem; }

/* --------------------------------------------------
   SIGNUP STEPPER
-------------------------------------------------- */

.signup-stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0 0.5rem;
}

.stepper-line {
  position: absolute;
  top: 1.1rem;
  left: 0.5rem;
  right: 0.5rem;
  border-top: 1px solid #e5e7eb;
  z-index: 0;
}

.stepper-item {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1 1 0;
}

.stepper-circle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
}

.stepper-label {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Active step */
.stepper-item.active .stepper-circle {
  border-color: var(--color-green);
  background: var(--color-green-light);
  color: var(--color-green-dark);
}

.stepper-item.active .stepper-label {
  color: var(--color-green-dark);
  font-weight: 600;
}

/* Step content */
.signup-step {
  display: none;
}

.signup-step.active {
  display: block;
}

/* --------------------------------------------------
   GOOGLE BUTTON CARD
-------------------------------------------------- */

.google-option-card {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: linear-gradient(135deg, #fafffe 0%, #f0fdf4 100%);
  box-shadow: var(--shadow-soft);
}

.btn-google-main {
  background: #ffffff;
  border: 1.5px solid #dadce0;
  border-radius: 9999px;
  min-height: 52px;
  padding: 0.65rem 1.25rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f1f1f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.18s ease;
}

.btn-google-main:hover {
  background: #f8f8f8;
  border-color: #bbb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  color: #1f1f1f;
}

.btn-google-main:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-google-main:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

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

.account-option {
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: #f9fafb;
  padding: 0.85rem 1rem;
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

/* Divider "or" text */
.divider-text {
  text-align: center;
  position: relative;
  color: #6b7280;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider-text span {
  background: #ffffff;
  padding: 0 0.75rem;
  position: relative;
  z-index: 1;
}

.divider-text::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #e5e7eb;
  z-index: 0;
}

/* --------------------------------------------------
   GOOGLE ICON
-------------------------------------------------- */

.google-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
}

.google-icon {
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("https://fonts.gstatic.com/s/i/productlogos/googleg/v6/24px.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* --------------------------------------------------
   PRIVACY NOTE + MODAL
-------------------------------------------------- */

.privacy-note-student {
  font-size: 0.85rem;
  line-height: 1.5;
}

.privacy-modal {
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  border: none;
  overflow: hidden;
}

.privacy-modal .modal-header {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-bottom: 1px solid #bbf7d0 !important;
  padding: 1.25rem 1.5rem 1rem;
}

.privacy-modal .modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  color: #14532d;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.privacy-modal .modal-title::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2316a34a'%3E%3Cpath d='M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

.privacy-modal .modal-body {
  max-height: 68vh;
  overflow-y: auto;
  padding: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #bbf7d0 transparent;
}

.privacy-modal .modal-body::-webkit-scrollbar {
  width: 5px;
}
.privacy-modal .modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.privacy-modal .modal-body::-webkit-scrollbar-thumb {
  background: #86efac;
  border-radius: 99px;
}

.privacy-modal .privacy-intro {
  background: #f8fafc;
  border-left: 3px solid #22c55e;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  text-align: justify;
  color: #475569;
}

.privacy-modal .privacy-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.privacy-modal .privacy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.privacy-modal h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #15803d;
  margin-bottom: 0.5rem !important;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.privacy-modal h6::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: #22c55e;
  border-radius: 2px;
  flex-shrink: 0;
}

.privacy-modal .modal-body p.small,
.privacy-modal .modal-body ul.small li {
  text-align: justify;
  color: #374151;
  line-height: 1.65;
}

.privacy-modal .modal-body ul.small {
  padding-left: 1.25rem;
}

.privacy-modal .modal-body ul.small li {
  margin-bottom: 0.3rem;
}

.privacy-modal .modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0 !important;
  padding: 0.875rem 1.5rem;
}

.privacy-modal .modal-footer .btn-outline-success {
  font-size: 0.875rem;
  font-weight: 600;
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */

footer {
  font-family: 'Inter', sans-serif;
}

/* --------------------------------------------------
   ACCESSIBILITY FOCUS
-------------------------------------------------- */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 767.98px) {
  .signup-main {
    align-items: flex-start;
    padding: 1.75rem 1rem 2.5rem;
  }

  .shell-card {
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18),
                0 3px 8px rgba(15, 23, 42, 0.08);
  }

  .signup-stepper {
    gap: 0.75rem;
  }

  .stepper-label {
    font-size: 0.75rem;
  }
}

/* PAGE LOAD ANIMATION ----------------------------------------- */

@keyframes ec-fadein {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.header-blur { animation: ec-fadein 0.45s ease-out both; }
.signup-main { animation: ec-fadein 0.45s ease-out 0.1s both; }