/* ===== Body & Page Layout ===== */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background-color: #f5f6fa;
}

.devise-content {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* ============================================================
   Portal Split Layout — shared base
   ============================================================ */
.portal-split {
  display: flex;
  min-height: 580px;
  flex: 1;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.portal-compact {
  min-height: 460px;
}

/* --- Brand Pane --- */
.portal-brand-pane {
  flex: 0 0 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
}

.portal-brand-inner {
  color: #fff;
  text-align: left;
}

.portal-brand-name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.portal-brand-tagline-lg {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  opacity: 0.97;
}

.portal-brand-tagline {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.portal-brand-desc {
  font-size: 0.82rem;
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Logo in the brand pane — white pill so it pops on any coloured gradient */
.portal-brand-img {
  height: 72px;
  width: auto;
  background-color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 1.25rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Logo pill (logo + brand name inline) ─── */
.portal-brand-logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.92);
  border-radius: 50px;
  padding: 6px 18px 6px 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.portal-brand-logo-sm {
  height: 32px;
  width: auto;
}

.portal-brand-name-pill {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1b2a4a;
  letter-spacing: -0.3px;
}

/* ─── Phone illustration ─── */
.portal-phone-illus {
  position: relative;
  width: 140px;
  margin: 1rem auto 1.4rem;
}

.portal-phone-frame {
  width: 100px;
  height: 168px;
  background: #fff;
  border-radius: 20px;
  border: 3px solid rgba(255,255,255,0.88);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.25);
  margin: 0 auto;
  padding: 10px 7px 7px;
}

.portal-phone-frame::before {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  margin: 0 auto 6px;
}

.portal-phone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: calc(100% - 9px);
}

.portal-phone-card-row {
  display: flex;
  gap: 4px;
  flex: 1;
}

.portal-phone-prod-card {
  flex: 1;
  background: linear-gradient(135deg, rgba(224,90,11,0.82) 0%, rgba(249,115,22,0.88) 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
}

/* Decorative floating elements around phone */
.portal-deco {
  position: absolute;
  color: rgba(255,255,255,0.78);
  line-height: 1;
}

.portal-deco-bag1 {
  left: 2px;
  bottom: -4px;
  font-size: 1.45rem;
  transform: rotate(-15deg);
}

.portal-deco-bag2 {
  right: 4px;
  bottom: 8px;
  font-size: 1.1rem;
  transform: rotate(12deg);
}

.portal-deco-plant {
  right: 12px;
  top: 40%;
  font-size: 0.95rem;
  transform: translateY(-50%) rotate(5deg);
}

/* Logo at the top of the form pane (natural colours on white) */
.portal-auth-logo-img {
  height: 60px;
  width: auto;
  margin: 0 auto 1.1rem;
  display: block;
  border-radius: 30px;
}

.bg-gradient-orange {
  background: linear-gradient(150deg, #e2a37d 0%, #f28c3a 55%, #f97316 100%);
}

.bg-gradient-green {
  background: linear-gradient(150deg, #1b4332 0%, #2d6a4f 55%, #3a8962 100%);
}

.portal-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.portal-feature-list li {
  font-size: 0.8rem;
  opacity: 0.9;
  padding: 0.35rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.4;
}

.portal-feature-list li i {
  width: 14px;
  text-align: center;
  opacity: 0.85;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Centered auth card --- */
.auth-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10), 0 1px 6px rgba(0,0,0,0.05);
  padding: 2.25rem 2rem;
}

@media (max-width: 575px) {
  .auth-card {
    border-radius: 1rem;
    padding: 1.75rem 1.25rem;
  }
  .auth-center {
    max-width: 100%;
  }
}

/* --- Form Pane --- */
.portal-form-pane {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 2.5rem 2rem;
}

.portal-form-inner {
  width: 100%;
  max-width: 340px;
}

/* Icon circle at top of form */
.portal-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
}

.buyer-icon-circle {
  background: #fff3ea;
  color: #e05a0b;
}

.seller-icon-circle {
  background: #e8f5e9;
  color: #2d6a4f;
}

/* Success circles */
.portal-success-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto;
}

.buyer-success-circle {
  background: #e05a0b;
  color: #fff;
}

.seller-success-circle {
  background: #2d6a4f;
  color: #fff;
}

.portal-form-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.3rem;
  letter-spacing: -0.3px;
}

.portal-form-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 1.6rem;
}

/* --- Inputs --- */
.portal-input-group {
  position: relative;
}

.portal-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.82rem;
  z-index: 10;
  pointer-events: none;
}

.portal-input {
  padding-left: 2.4rem !important;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.6rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.portal-input-pw {
  padding-right: 2.6rem !important;
}

.portal-select {
  padding-left: 2.4rem !important;
}

.portal-pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  color: #9ca3af;
  font-size: 0.82rem;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}

.portal-pw-toggle:hover {
  color: #6b7280;
}

/* --- Buttons --- */
.portal-btn-primary {
  width: 100%;
  border: none;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  color: #fff;
  text-decoration: none;
  display: block;
  text-align: center;
}

.portal-btn-google {
  width: 100%;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.65rem 1.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #374151;
  text-decoration: none;
}

.portal-btn-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.portal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #9ca3af;
  font-size: 0.8rem;
}

.portal-divider::before,
.portal-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #e5e7eb;
}

.portal-link {
  text-decoration: none;
  transition: opacity 0.15s;
}

.portal-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.portal-link-forgot {
  text-decoration: none;
  transition: opacity 0.15s;
  font-weight: 500;
}

.portal-link-forgot:hover {
  text-decoration: underline;
}

.portal-footer-text {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* --- Password requirements --- */
.portal-pw-requirements {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.portal-pw-req-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.portal-pw-req-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-pw-req-list li {
  font-size: 0.78rem;
  color: #374151;
  padding: 0.15rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-pw-req-list li i {
  color: #22c55e;
  font-size: 0.75rem;
}

/* ============================================================
   Buyer Portal — orange theme (#E05A0B / #F97316)
   ============================================================ */
.buyer-portal .portal-brand-pane {
  background: linear-gradient(150deg, #e05a0b 0%, #f28c3a 55%, #f97316 100%);
}

.buyer-portal .portal-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.buyer-portal .portal-btn-primary {
  background: linear-gradient(135deg, #e05a0b 0%, #f97316 100%);
  box-shadow: 0 4px 15px rgba(224, 90, 11, 0.35);
}

.buyer-portal .portal-btn-primary:hover {
  background: linear-gradient(135deg, #c94d09 0%, #e06010 100%);
  box-shadow: 0 6px 20px rgba(224, 90, 11, 0.45);
  transform: translateY(-1px);
  color: #fff;
}

.buyer-portal .portal-link {
  color: #e05a0b;
}

.buyer-portal .portal-link-forgot {
  color: #e05a0b;
}

/* ============================================================
   Seller Portal — green theme (#1B4332 / #2D6A4F)
   ============================================================ */
.seller-portal .portal-brand-pane {
  background: linear-gradient(150deg, #1b4332 0%, #2d6a4f 55%, #3a8962 100%);
}

.seller-portal .portal-input:focus {
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

.seller-portal .portal-btn-primary {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  box-shadow: 0 4px 15px rgba(27, 67, 50, 0.35);
}

.seller-portal .portal-btn-primary:hover {
  background: linear-gradient(135deg, #14332a 0%, #245a40 100%);
  box-shadow: 0 6px 20px rgba(27, 67, 50, 0.45);
  transform: translateY(-1px);
  color: #fff;
}

.seller-portal .portal-link {
  color: #2d6a4f;
}

.seller-portal .portal-link-forgot {
  color: #2d6a4f;
}

/* ============================================================
   Shopper Portal — green theme (mirrors seller)
   ============================================================ */
.shopper-portal .portal-input:focus {
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

.shopper-portal .portal-btn-primary {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  box-shadow: 0 4px 15px rgba(27, 67, 50, 0.35);
}

.shopper-portal .portal-btn-primary:hover {
  background: linear-gradient(135deg, #14332a 0%, #245a40 100%);
  box-shadow: 0 6px 20px rgba(27, 67, 50, 0.45);
  transform: translateY(-1px);
  color: #fff;
}

.shopper-portal .portal-link {
  color: #2d6a4f;
}

.shopper-portal .portal-link-forgot {
  color: #2d6a4f;
}

/* ============================================================
   Responsive — stack on small screens
   ============================================================ */
@media (max-width: 640px) {
  .portal-split {
    flex-direction: column;
    min-height: auto;
  }

  .portal-brand-pane {
    flex: none;
    padding: 2rem 1.5rem;
  }

  .portal-feature-list {
    display: none;
  }

  .portal-brand-desc {
    display: none;
  }

  .portal-phone-illus {
    display: none;
  }

  .portal-brand-tagline {
    margin-bottom: 0;
  }

  .portal-form-pane {
    padding: 1.75rem 1.25rem;
  }
}

/* ============================================================
   Devise layouts — shared nav & footer  (ss-dv-*)
   ============================================================ */

/* --- Nav --- */
.ss-dv-nav {
  background: #fff;
  border-bottom: 1px solid #eeebe5;
  box-shadow: 0 1px 8px rgba(27, 42, 74, .07);
}

.ss-dv-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ss-dv-nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.ss-dv-nav-logo {
  height: 80px;
  width: auto;
}

.ss-dv-nav-cta {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 0.6rem;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
  white-space: nowrap;
}

.buyer-nav-cta {
  color: #e05a0b;
  border: 1.5px solid #e05a0b;
  background: transparent;
}

.buyer-nav-cta:hover {
  background: #e05a0b;
  color: #fff;
}

.seller-nav-cta {
  color: #2d6a4f;
  border: 1.5px solid #2d6a4f;
  background: transparent;
}

.seller-nav-cta:hover {
  background: #2d6a4f;
  color: #fff;
}

/* ── Auth layout wrapper ─── */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ── Centered card container ── */
.auth-center {
  width: 100%;
  max-width: 420px;
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* ── Role badge variants ─────────────────────────────── */
.portal-role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.shopper-badge {
  background: #e8f5e9;
  color: #2d6a4f;
}

.buyer-badge {
  background: #fff3ea;
  color: #c94d09;
}

.seller-badge {
  background: #e8f5e9;
  color: #2d6a4f;
}

/* ── Minimal auth footer ─────────────────────────────── */
.auth-footer {
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

.auth-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.auth-footer-copy {
  font-size: 0.75rem;
  color: #9ca3af;
}

.auth-footer-links {
  display: flex;
  gap: 1.25rem;
}

.auth-footer-link {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-footer-link:hover {
  color: #6b7280;
}

.auth-footer-ssl {
  font-size: 0.75rem;
  font-weight: 600;
  color: #22c55e;
}

@media (max-width: 576px) {
  .auth-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ============================================================
   Auth tab switcher — segmented control style
   ============================================================ */
.portal-auth-tabs {
  display: flex;
  justify-self: anchor-center;
  background: #f3f4f6;
  border-radius: 0.75rem;
  padding: 0.25rem;
  gap: 0;
  list-style: none;
  margin-bottom: 1.4rem !important;
  border: none;
}

.portal-auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0.55rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  text-align: center;
  white-space: nowrap;
  line-height: 1.4;
}

.portal-auth-tab:hover {
  color: #6b7280;
}

.buyer-portal .portal-auth-tab.active {
  background: #fff;
  color: #e05a0b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(0,0,0,0.04);
}

/* 6-digit OTP input row */
.otp-digit-row {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
}

.otp-digit-input {
  width: 2.6rem !important;
  height: 2.8rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0 !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.buyer-portal .otp-digit-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
  outline: none;
}
