/* ==========================================================
   JPRO Auth — Create Account / Login / Password flows
   Brand: #091654 · #03318f · #1a56c4 · #3d5bbf
   Layout inspired by reference card (site colors only)
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Open+Sans:wght@400;600;700&family=Playfair+Display:wght@600;700&display=swap");

.sf-page.sf-auth {
  --auth-navy: #091654;
  --auth-deep: #03318f;
  --auth-blue: #1a56c4;
  --auth-accent: #3d5bbf;
  --auth-muted: #64748b;
  --auth-line: #dbe3f3;
  --auth-input: #eef2fb;
  --auth-soft: #f5f7fc;

  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(61, 91, 191, 0.12), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(3, 49, 143, 0.1), transparent 50%),
    var(--auth-soft);
}

.sf-auth__card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(9, 22, 84, 0.06);
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow:
    0 20px 50px rgba(9, 22, 84, 0.1),
    0 4px 14px rgba(9, 22, 84, 0.05);
  box-sizing: border-box;
}

.sf-auth__card--wide {
  max-width: 720px;
}

/* Tabs */
.sf-auth__tabs {
  display: flex;
  gap: 4px;
  background: #e8eefc;
  border-radius: 999px;
  padding: 5px;
  margin: 0 0 28px;
}

.sf-auth__tab {
  flex: 1;
  text-align: center;
  padding: 11px 14px;
  border-radius: 999px;
  font-family: "Montserrat", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--auth-navy);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sf-auth__tab.is-active {
  background: #fff;
  color: var(--auth-deep);
  box-shadow: 0 2px 10px rgba(9, 22, 84, 0.12);
}

.sf-auth__tab:not(.is-active):hover {
  color: var(--auth-blue);
}

/* Title */
.sf-auth__title {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--auth-navy);
  text-align: center;
}

.sf-auth__lede {
  margin: 0 0 26px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--auth-muted);
  text-align: center;
}

/* Alerts */
.sf-auth__alert {
  display: none;
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 12px;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.sf-auth__alert.is-visible,
.sf-auth__alert:not(:empty) {
  display: block;
}

.sf-auth__alert--error,
.sf-auth__alert.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.sf-auth__alert--success,
.sf-auth__alert.is-success {
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  color: #047857;
}

/* Form */
.sf-auth__form {
  display: grid;
  gap: 0;
}

.sf-auth__field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.sf-auth__field label {
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-navy);
}

.sf-auth__muted {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #94a3b8;
  font-size: 11px;
}

.sf-auth__field input,
.sf-auth__field select,
.sf-auth__field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 18px;
  border: 1.5px solid var(--auth-line);
  border-radius: 7px;
  background: var(--auth-input);
  color: var(--auth-navy);
  font-family: "Open Sans", sans-serif;
font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.sf-auth__field input::placeholder,
.sf-auth__field textarea::placeholder {
  color: #9aa8c2;
}

.sf-auth__field input:focus,
.sf-auth__field select:focus,
.sf-auth__field textarea:focus {
  border-color: var(--auth-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61, 91, 191, 0.15);
}

.sf-auth__field textarea {
  min-height: 96px;
  resize: vertical;
}

.sf-auth__row {
  display: grid;
  gap: 0;
}

@media (min-width: 640px) {
  .sf-auth__row--2 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Password field + toggle */
.sf-auth__password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sf-auth__password-wrap input {
  padding-right: 52px;
}

.sf-auth__password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--auth-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.sf-auth__password-toggle:hover,
.sf-auth__password-toggle:focus-visible {
  background: #fff;
  color: var(--auth-navy);
  outline: none;
  box-shadow: 0 0 0 2px rgba(61, 91, 191, 0.2);
}

.sf-auth__password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}

.sf-auth__password-toggle .sf-auth__eye-off {
  display: none;
}

.sf-auth__password-toggle.is-visible .sf-auth__eye-on {
  display: none;
}

.sf-auth__password-toggle.is-visible .sf-auth__eye-off {
  display: block;
}

/* Strength meter */
.sf-auth__strength {
  display: none;
  margin-top: 2px;
}

.sf-auth__strength.is-visible {
  display: block;
}

.sf-auth__strength-bar {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.sf-auth__strength-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #ef4444;
  transition: width 0.25s ease, background 0.25s ease;
}

.sf-auth__strength[data-level="weak"] .sf-auth__strength-bar > span,
.sf-auth__strength.is-weak .sf-auth__strength-bar > span {
  width: 25%;
  background: #ef4444;
}

.sf-auth__strength[data-level="fair"] .sf-auth__strength-bar > span,
.sf-auth__strength.is-fair .sf-auth__strength-bar > span {
  width: 50%;
  background: #f59e0b;
}

.sf-auth__strength[data-level="good"] .sf-auth__strength-bar > span,
.sf-auth__strength.is-good .sf-auth__strength-bar > span {
  width: 75%;
  background: #3d5bbf;
}

.sf-auth__strength[data-level="strong"] .sf-auth__strength-bar > span,
.sf-auth__strength.is-strong .sf-auth__strength-bar > span {
  width: 100%;
  background: #16a34a;
}

.sf-auth__strength-label {
  margin: 6px 0 0;
  font-family: "Open Sans", sans-serif;
  font-size: 12.5px;
  color: var(--auth-muted);
}

.sf-auth__strength[data-level="weak"] .sf-auth__strength-label { color: #dc2626; }
.sf-auth__strength[data-level="fair"] .sf-auth__strength-label { color: #d97706; }
.sf-auth__strength[data-level="good"] .sf-auth__strength-label { color: #1a56c4; }
.sf-auth__strength[data-level="strong"] .sf-auth__strength-label { color: #15803d; }

.sf-auth__hint,
.sf-auth__match {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 12.5px;
  color: var(--auth-muted);
}

.sf-auth__match.is-error {
  color: #dc2626;
}

.sf-auth__match.is-ok {
  color: #15803d;
}

.sf-auth__legal {
  margin: 8px 0 0;
  text-align: center;
  font-family: "Open Sans", sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--auth-muted);
}

.sf-auth__legal a {
  color: var(--auth-navy);
  font-weight: 700;
  text-decoration: none;
}

.sf-auth__legal a:hover {
  color: var(--auth-blue);
  text-decoration: underline;
}

/* Buttons */
.sf-auth__actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.sf-page.sf-auth .sf-btn,
.sf-auth__card .sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sf-page.sf-auth .sf-btn--primary,
.sf-auth__card .sf-btn--primary {
  background: linear-gradient(135deg, #03318f 0%, #3d5bbf 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(3, 49, 143, 0.32);
}

.sf-page.sf-auth .sf-btn--primary:hover,
.sf-auth__card .sf-btn--primary:hover {
  background: linear-gradient(135deg, #091654 0%, #03318f 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(9, 22, 84, 0.36);
}

.sf-page.sf-auth .sf-btn--primary:active,
.sf-auth__card .sf-btn--primary:active {
  transform: translateY(0);
}

.sf-page.sf-auth .sf-btn--ghost,
.sf-auth__card .sf-btn--ghost {
  background: transparent;
  color: var(--auth-blue);
  border: 1.5px solid #bfdbfe;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 13.5px;
}

.sf-page.sf-auth .sf-btn--ghost:hover,
.sf-auth__card .sf-btn--ghost:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--auth-deep);
}

.sf-btn__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.sf-btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Footer links */
.sf-auth__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  margin-top: 22px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: var(--auth-muted);
}

.sf-auth__links a {
  color: var(--auth-deep);
  font-weight: 700;
  text-decoration: none;
}

.sf-auth__links a:hover {
  color: var(--auth-blue);
  text-decoration: underline;
}

/* Account nav (change-password) */
.sf-auth__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
}

.sf-auth__nav a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--auth-line);
  background: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auth-muted);
  text-decoration: none;
}

.sf-auth__nav a.is-active {
  background: var(--auth-deep);
  border-color: var(--auth-deep);
  color: #fff;
}

.sf-auth__orders {
  display: grid;
  gap: 0.75rem;
}

.sf-auth__order {
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.sf-auth__order-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: 600;
}

.sf-auth__empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--auth-muted);
}

@media (max-width: 520px) {
  .sf-page.sf-auth {
    padding: 28px 14px 48px;
    align-items: flex-start;
  }

  .sf-auth__card {
    padding: 28px 18px 22px;
    border-radius: 18px;
  }

  .sf-auth__title {
    font-size: 24px;
  }

  .sf-auth__field input {
    min-height: 48px;
  }
}

/* Account pages (profile / orders layout) */
.t1-account-page {
  width: 100%;
  padding: 32px 24px 48px;
  background: #f5f7fb;
}

.t1-account-grid {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 20px;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
}

.t1-account-sidebar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 4px 20px rgba(9, 22, 84, 0.07);
  box-sizing: border-box;
}

.t1-account-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 30px;
  box-shadow: 0 4px 20px rgba(9, 22, 84, 0.07);
  min-width: 0;
  box-sizing: border-box;
}

.t1-account-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.t1-account-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #03318f, #1a56c4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(3, 49, 143, 0.28);
}

.t1-account-user-info { min-width: 0; }

.t1-account-name {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #091654;
  margin: 0 0 2px;
}

.t1-account-email {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t1-account-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.t1-account-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}

.t1-account-nav-link:hover { background: rgba(26, 86, 196, 0.08); color: #091654; }
.t1-account-nav-link.active { background: rgba(3, 49, 143, 0.09); color: #03318f; font-weight: 700; }

.t1-account-nav-form {
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.t1-account-logout {
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ef4444;
  padding: 10px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.t1-account-logout:hover { background: rgba(239, 68, 68, 0.08); color: #dc2626; }

.t1-profile-title,
.t1-orders-title {
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #091654;
  margin: 0 0 4px;
}

.t1-account-page .t1-auth-btn,
.t1-account-page button[type="submit"] {
  background: linear-gradient(135deg, #03318f, #1a56c4) !important;
  border-color: transparent !important;
  color: #fff !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 16px rgba(3, 49, 143, 0.28) !important;
}

@media (max-width: 720px) {
  .t1-account-grid { grid-template-columns: 1fr; }
}

.sf-auth__field-error {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
  color: #dc2626;
}

.sf-auth__field-error[hidden] {
  display: none !important;
}

.sf-auth__field.is-invalid input,
.sf-auth__field input.is-invalid,
.t1-profile__field.is-invalid input,
.t1-profile__field input.is-invalid {
  border-color: #f87171 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18) !important;
}