/* ══════════════════════════════════════════
   AccrueMe Application Page — Styles
   ══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --navy: #1B2A4A;
  --navy-deep: #0F1D35;
  --navy-light: #243656;
  --green: #4CAF50;
  --green-hover: #43A047;
  --green-light: #E8F5E9;
  --green-pale: rgba(76, 175, 80, 0.08);
  --text-primary: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-dark: #1a1a1a;
  --text-dark-muted: #666;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-dark: rgba(0, 0, 0, 0.08);
  --surface: #FFFFFF;
  --surface-hover: #F8FAF8;
  --error: #E53935;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ── RESET ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}


/* ══════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  min-height: 100vh;
}


/* ══════════════════════════════════════════
   LEFT PANEL
   ══════════════════════════════════════════ */
.left-panel {
  background: var(--navy);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(76, 175, 80, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.left-panel::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -30%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(76, 175, 80, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Logo ── */
.logo-area {
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.logo-area img {
  height: 72px;
  width: auto;
}

.logo-text {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span { color: var(--green); }


/* ══════════════════════════════════════════
   TESTIMONIALS
   ══════════════════════════════════════════ */
.testimonials {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.testimonial-card {
  position: absolute;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  width: 100%;
}

.testimonial-card.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  color: var(--green);
  opacity: 0.4;
  margin-bottom: -12px;
}

.testimonial-text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.testimonial-author {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.testimonial-role {
  font-size: 13px;
  color: var(--text-muted);
}

.testimonial-dots {
  display: flex;
  gap: 8px;
  margin-top: 2rem;
}

.testimonial-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.testimonial-dots button.active {
  background: var(--green);
  width: 24px;
  border-radius: 4px;
}


/* ══════════════════════════════════════════
   PARTNER LOGOS
   ══════════════════════════════════════════ */
.partners {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  position: relative;
  z-index: 1;
}

.partners-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  opacity: 1;
}

.partners-logos img {
  height: 30px;
  width: auto;
  filter: brightness(1.15) saturate(1.1);
}


/* ══════════════════════════════════════════
   RIGHT PANEL
   ══════════════════════════════════════════ */
.right-panel {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.right-header {
  padding: 1.25rem 2.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.login-link {
  font-size: 14px;
  color: var(--text-dark-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.login-link:hover { color: var(--text-dark); }
.login-link span { color: var(--green); font-weight: 500; }

.form-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2.5rem 1.75rem;
}

.form-container {
  width: 100%;
  max-width: 640px;
}


/* ══════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════ */
.progress-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.progress-segment {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--border-dark);
  transition: background 0.4s ease;
}

.progress-segment.done { background: var(--green); }
.progress-segment.current {
  background: linear-gradient(90deg, var(--green) 60%, var(--border-dark) 100%);
}


/* ══════════════════════════════════════════
   STEP TRANSITIONS
   ══════════════════════════════════════════ */
.step {
  display: none;
  animation: stepIn 0.35s ease forwards;
}

.step.active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ══════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════ */
.step-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 8px;
}

.step-subtitle {
  font-size: 15px;
  color: var(--text-dark-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}


/* ══════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════ */
.field-group {
  margin-bottom: 0.75rem;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dark-muted);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.field-input::placeholder { color: rgba(0, 0, 0, 0.3); }

.field-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

.field-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.field-error {
  font-size: 13px;
  color: var(--error);
  margin-top: 4px;
  display: none;
}

.field-error.show { display: block; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

textarea.field-input {
  resize: vertical;
  min-height: 64px;
}


/* ══════════════════════════════════════════
   CARD SELECTORS
   ══════════════════════════════════════════ */
.card-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 0.75rem;
}

.select-card {
  padding: 12px 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: #fff;
  text-align: center;
}

.select-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: var(--surface-hover);
}

.select-card.selected {
  border-color: var(--green);
  background: var(--green-pale);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.select-card .card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--green-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.select-card .card-icon svg {
  width: 18px;
  height: 18px;
  stroke: #2E7D32;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-card .card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  display: block;
}

.select-card .card-desc {
  font-size: 12px;
  color: var(--text-dark-muted);
  margin-top: 2px;
}

.select-card.selected .card-label { color: #2E7D32; }

.card-selector-full {
  grid-template-columns: repeat(4, 1fr);
}


/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.btn-primary:hover svg { transform: translateX(3px); }

.btn-back {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark-muted);
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.btn-back:hover { color: var(--text-dark); }
.btn-back svg { width: 16px; height: 16px; }


/* ══════════════════════════════════════════
   OPTIONAL FIELD (referral)
   ══════════════════════════════════════════ */
.optional-field {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-dark);
}

.optional-toggle {
  font-size: 13px;
  color: var(--text-dark-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}

.optional-toggle:hover { color: var(--text-dark); }

.optional-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.optional-content.open {
  max-height: 120px;
  margin-top: 10px;
}


/* ══════════════════════════════════════════
   SECTION LABELS
   ══════════════════════════════════════════ */
.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dark-muted);
  margin: 1.25rem 0 8px;
}


/* ══════════════════════════════════════════
   MOBILE-ONLY ELEMENTS
   ══════════════════════════════════════════ */
.mobile-logo {
  display: none;
  background: var(--navy);
  padding: 1.25rem 2rem;
  justify-content: center;
  align-items: center;
}

.mobile-logo img { height: 44px; width: auto; }


/* ══════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════ */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .mobile-logo { display: flex; }
  .right-panel { min-height: 100dvh; }
  .form-area { padding: 1.5rem 1.5rem 2rem; }
}

@media (max-width: 500px) {
  .field-row { grid-template-columns: 1fr; }
  .card-selector { grid-template-columns: 1fr 1fr; }
  .card-selector-full { grid-template-columns: 1fr 1fr; }
}


/* ══════════════════════════════════════════
   MODAL OVERLAY (continue application)
   ══════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.modal-icon svg {
  width: 24px;
  height: 24px;
  stroke: #2E7D32;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal-text {
  font-size: 15px;
  color: var(--text-dark-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-modal {
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
}

.btn-modal-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.btn-modal-primary:hover {
  background: var(--green-hover);
}

.btn-modal-secondary {
  background: #fff;
  color: var(--text-dark);
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-modal-secondary:hover {
  background: #f5f5f5;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ══════════════════════════════════════════
   EXISTING USER SCREEN
   ══════════════════════════════════════════ */
.existing-user-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: stepIn 0.35s ease forwards;
}

.existing-user-screen.active {
  display: flex;
}

.existing-user-screen > .btn-back {
  align-self: flex-start;
  margin-bottom: 1.5rem;
}

.existing-user-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.existing-user-icon svg {
  width: 32px;
  height: 32px;
  stroke: #2E7D32;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.existing-user-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.existing-user-text {
  font-size: 15px;
  color: var(--text-dark-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.btn-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-signin:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}

.btn-signin svg {
  width: 20px;
  height: 20px;
}

