/* ================================
   DESIGN TOKENS (AUTH PAGES)
   Retinted to match the finalized GoMart mockup exactly.
================================ */

:root {
  /* Brand */
  --accent: #3DA35D;
  --accent-soft: rgba(61, 163, 93, 0.12);

  /* Backgrounds */
  --bg-page: #F4F5F2;
  --bg-card: #ffffff;
  --bg-input: #F4F5F2;
  --surface-elevated: #ffffff;

  /* Text */
  --text-primary: #16181A;
  --text-secondary: #767B80;
  --text-muted: #9AA19C;

  /* Borders & Lines */
  --border-default: #E7E8E6;
  --border-focus: #3DA35D;

  /* Radius — matches the mockup's login-card exactly */
  --radius-card: 20px;
  --radius-input: 10px;
  --radius-btn: 999px;
  --radius-lg: 16px;

  --card: #ffffff;
  --cards: #ffffff;

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 20px;
  --space-5: 32px;

  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 40px;

  /* Shadow — matches the mockup's login-card exactly */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.06);

  /* Typography */
  --font-base: 'Manrope', Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ================================
   RESET
================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-base);
}

body {
  min-height: 100vh;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

/* ================================
   LAYOUT
================================ */

.page {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 48px 16px;
}

.card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 32px 26px 34px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

/* ================================
   HEADER — badge logo matching the mockup's login-logo
================================ */

.logo-img {
  height: 40px;
  width: auto;
  margin: 0 auto 18px;
  display: block;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

/* ================================
   FORM FIELDS
================================ */

.field {
  text-align: left;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.input-wrapper {
  position: relative;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 14px;
  font-size: 14px;
  border-radius: var(--radius-input);
  border: none;
  background: var(--bg-input);
  transition: box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ================================
   PASSWORD TOGGLE
================================ */

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.toggle-password img {
  width: 18px;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.toggle-password:hover img {
  opacity: 0.8;
}

/* ================================
   PRIMARY BUTTON — black pill, matches the mockup's .pill-btn
================================ */

.primary-btn {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border: none;
  border-radius: var(--radius-btn);
  background: #16181A;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.primary-btn:active {
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

/* ================================
   DIVIDER
================================ */

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

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

.divider span {
  margin: 0 12px;
}

/* ================================
   LINKS — muted, matching the mockup's "muted center" text
================================ */

.link {
  margin-top: 16px;
  font-size: 12.5px;
}

.link a,
.divider a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.link a:hover,
.divider a:hover {
  color: var(--text-primary);
}

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  width: 300px;
  text-align: center;
}

.modal-content h3 {
  font-size: 18px;
  margin: 0 0 var(--space-3);
  font-weight: 700;
}

.modal-content input {
  margin-bottom: var(--space-3);
}

.modal-content button {
  margin: var(--space-sm) 0;
  padding: var(--space-sm) var(--space-lg);
  border-radius: 999px;
  border: none;
  background: #16181A;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

/* ================================
   MOBILE OPTIMIZATION – AUTH PAGES
================================ */
@media (max-width: 600px) {

  body {
    align-items: flex-start;
  }

  .page {
    padding: 32px 16px;
  }

  .card {
    padding: 28px 22px 30px;
    border-radius: var(--radius-lg);
  }

  h2 {
    font-size: 19px;
    margin-bottom: 16px;
  }

  .field {
    margin-bottom: 18px;
  }

  .field label {
    font-size: 12.5px;
  }

  input {
    height: 52px;
    font-size: 15px;
    padding-left: 16px;
  }

  .toggle-password {
    right: 14px;
  }

  .toggle-password img {
    width: 20px;
  }

  .primary-btn {
    height: 52px;
    font-size: 16px;
    margin-top: 14px;
  }

  .divider {
    margin: 24px 0;
  }

  .link {
    font-size: 13px;
    margin-top: 18px;
  }

  .modal-content {
    width: calc(100% - 32px);
    padding: var(--space-4);
  }

  .modal-content button {
    width: 100%;
    margin: var(--space-2) 0;
  }
}
