/* Swahili for Life — auth modal (mockup match) */
.sfl-auth-modal {
  --sfl-auth-navy: #0b2a7a;
  --sfl-auth-blue: #1e4fd6;
  --sfl-auth-ink: #14213d;
  --sfl-auth-muted: #7a869c;
  --sfl-auth-line: #e6ebf3;
  --sfl-auth-field: #f4f6fa;
  --sfl-auth-gold: #d4a017;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.sfl-auth-modal[hidden] {
  display: none !important;
}

.sfl-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 48, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sfl-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(11, 31, 77, 0.28);
  padding: 1.85rem 1.65rem 1.5rem;
  font-family: "Lexend Deca", system-ui, sans-serif;
  color: var(--sfl-auth-ink);
}

.sfl-auth-blob {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  background: var(--sfl-auth-blue);
  opacity: 0.92;
}

.sfl-auth-blob-tl {
  top: -28px;
  left: -36px;
  width: 140px;
  height: 110px;
  border-radius: 55% 45% 60% 40% / 50% 55% 45% 50%;
}

.sfl-auth-blob-br {
  display: none;
  right: -40px;
  bottom: -42px;
  width: 150px;
  height: 120px;
  border-radius: 48% 52% 45% 55% / 55% 40% 60% 45%;
}

.sfl-auth-modal[data-panel="register"] .sfl-auth-blob-br {
  display: block;
}

.sfl-auth-close {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--sfl-auth-muted);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.sfl-auth-close:hover {
  color: var(--sfl-auth-navy);
  background: rgba(11, 42, 122, 0.06);
}

.sfl-auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin: 0.35rem 0 1.15rem;
}

.sfl-auth-brand img {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.sfl-auth-gold-line {
  display: block;
  width: 42px;
  height: 2px;
  background: var(--sfl-auth-gold);
  border-radius: 2px;
}

.sfl-auth-panel {
  position: relative;
  z-index: 1;
}

.sfl-auth-panel[hidden] {
  display: none !important;
}

.sfl-auth-panel h2 {
  margin: 0 0 0.35rem;
  text-align: center;
  color: var(--sfl-auth-navy);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.sfl-auth-sub {
  margin: 0 0 1.25rem;
  text-align: center;
  color: var(--sfl-auth-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sfl-auth-notice {
  position: relative;
  z-index: 1;
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #ffe8e8;
  color: #9b1c1c;
  font-size: 0.88rem;
  text-align: center;
}

.sfl-auth-notice[hidden] {
  display: none !important;
}

.sfl-auth-form {
  display: grid;
  gap: 0.35rem;
}

.sfl-auth-label {
  display: block;
  margin: 0.55rem 0 0.35rem;
  color: var(--sfl-auth-navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.sfl-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.sfl-auth-label-row .sfl-auth-label {
  margin: 0;
}

.sfl-auth-forgot {
  color: var(--sfl-auth-blue);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sfl-auth-field {
  position: relative;
  display: flex;
  align-items: center;
}

.sfl-auth-field-icon {
  position: absolute;
  left: 0.85rem;
  color: #9aa6bc;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.sfl-auth-field input {
  width: 100%;
  border: 1px solid var(--sfl-auth-line);
  background: var(--sfl-auth-field);
  border-radius: 10px;
  padding: 0.82rem 2.6rem 0.82rem 2.45rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--sfl-auth-ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sfl-auth-field input::placeholder {
  color: #a0aabc;
}

.sfl-auth-field input:focus {
  border-color: #9bb4f0;
  box-shadow: 0 0 0 3px rgba(30, 79, 214, 0.12);
  background: #fff;
}

.sfl-auth-eye {
  position: absolute;
  right: 0.55rem;
  border: 0;
  background: transparent;
  color: #9aa6bc;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 8px;
}

.sfl-auth-eye:hover {
  color: var(--sfl-auth-navy);
}

.sfl-auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0.35rem;
  color: var(--sfl-auth-muted);
  font-size: 0.8rem;
}

.sfl-auth-secure i {
  color: var(--sfl-auth-gold);
  font-size: 0.78rem;
}

.sfl-auth-submit {
  margin-top: 0.85rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  background: var(--sfl-auth-navy);
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sfl-auth-submit:hover {
  background: #0a2468;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(11, 42, 122, 0.22);
}

.sfl-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0 0.85rem;
  color: var(--sfl-auth-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

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

.sfl-auth-social {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.sfl-auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--sfl-auth-line);
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.35rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sfl-auth-ink);
  cursor: not-allowed;
  opacity: 0.92;
}

.sfl-auth-social-btn .fa-google {
  color: #db4437;
}

.sfl-auth-social-btn .fa-facebook-f {
  color: #1877f2;
}

.sfl-auth-social-btn .fa-apple {
  color: #111;
}

.sfl-auth-switch {
  margin: 1.15rem 0 0.15rem;
  text-align: center;
  color: var(--sfl-auth-muted);
  font-size: 0.9rem;
}

.sfl-auth-switch-link {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--sfl-auth-blue);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.sfl-auth-purchase {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 0 0 1.05rem;
}

.sfl-auth-purchase-heading {
  margin: 0 0 0.35rem;
  color: #8a6a3b;
  font-family: "Caveat", cursive !important;
  font-size: clamp(1.7rem, 3.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
}

.sfl-auth-purchase-sub {
  margin: 0 0 0.95rem;
  color: #5b6b86;
  font-size: 0.9rem;
  line-height: 1.45;
}

.sfl-auth-plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem 1.1rem;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: #eef3fb;
  border: 1px solid #dce6f5;
  box-sizing: border-box;
}

.sfl-auth-plan-card-main {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-right: 1rem;
  border-right: 1px solid #cfd9ea;
}

.sfl-auth-plan-name {
  display: block;
  color: var(--sfl-auth-navy);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

.sfl-auth-plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sfl-auth-plan-features li {
  color: #6b7a94;
  font-size: 0.8rem;
  line-height: 1.35;
  margin: 0 0 0.18rem;
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sfl-auth-plan-features li:last-child {
  margin-bottom: 0;
}

.sfl-auth-plan-card-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  flex-shrink: 0;
  padding-left: 0.15rem;
}

.sfl-auth-plan-price {
  color: #1f9d62;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.sfl-auth-modal.is-purchase .sfl-auth-dialog {
  width: min(460px, 100%);
}

.sfl-auth-modal.is-purchase .sfl-auth-default-copy[hidden],
.sfl-auth-modal.is-purchase .sfl-auth-submit-default[hidden],
.sfl-auth-modal:not(.is-purchase) .sfl-auth-submit-purchase[hidden] {
  display: none !important;
}

.sfl-auth-modal.is-purchase .sfl-auth-blob-br {
  display: none;
}

.sfl-auth-modal.is-purchase .sfl-auth-backdrop {
  background: rgba(8, 18, 48, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sfl-auth-modal.is-purchase .sfl-auth-field input {
  background: #fff;
}

@media (max-width: 480px) {
  .sfl-auth-plan-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .sfl-auth-plan-card-main {
    padding-right: 0;
    border-right: 0;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #cfd9ea;
  }

  .sfl-auth-plan-card-price {
    align-items: flex-start;
    text-align: left;
  }

  .sfl-auth-plan-name,
  .sfl-auth-plan-features li {
    white-space: normal;
  }
}

body.sfl-auth-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .sfl-auth-dialog {
    padding: 1.55rem 1.15rem 1.25rem;
    border-radius: 18px;
  }

  .sfl-auth-social {
    grid-template-columns: 1fr;
  }

  .sfl-auth-panel h2 {
    font-size: 1.35rem;
  }
}
