/* Auth sign-in/sign-up UI — restyled to match IPOO Material palette
   (orange primary #FF4D00, warm cream surfaces, DM Sans). The --ia-*
   tokens are remapped to the app's md tokens so inline styles that
   reference them (terms link, "I'll do this later" button) stay warm. */
:root{
  --ia-navy: var(--md-on-surface);
  --ia-red: var(--md-primary);
  --ia-red-dark: var(--md-primary-dark);
  --ia-border: var(--md-outline-var);
  --ia-off: var(--md-surface-1);
  --ia-text: var(--md-on-surface);
  --ia-muted: var(--md-on-surface-var);
  --ia-accent: var(--md-primary);
  --ia-radius: 16px;
  --ia-rad-sm: 12px;
}

.ipoo-auth-overlay.open{ opacity:1; pointer-events:all }

.ipoo-auth-popup{
  position:absolute; left:50%; bottom:0;
  transform:translateX(-50%) translateY(105%);
  width:100%; background:var(--md-surface);
  border-radius:28px 28px 0 0;
  z-index:1001;
  transition:transform .32s cubic-bezier(.32,1,.28,1);
  max-height:92%; overflow-y:auto;
  font-family:var(--font-body), -apple-system, 'Segoe UI', sans-serif;
  pointer-events:auto;
}
.ipoo-auth-popup.open{ transform:translateX(-50%) translateY(0) }

.ipoo-handle{ width:40px;height:4px;background:var(--md-outline-var);border-radius:2px;margin:14px auto 0 }
.ipoo-auth-body{ padding:22px 24px 28px }
.ipoo-tabs{ display:flex;background:var(--md-surface-2);border-radius:var(--ia-rad-sm);padding:4px;gap:4px;margin-bottom:22px }
.ipoo-tab{ flex:1;height:38px;border-radius:9px;font-size:14px;font-weight:600;border:none;cursor:pointer;background:transparent;color:var(--md-on-surface-var);font-family:inherit;transition:all .18s var(--md-easing) }
.ipoo-tab.active{ background:var(--md-surface);color:var(--md-primary);font-weight:700;box-shadow:0 1px 6px rgba(28,14,6,.1) }
.ipoo-state{ display:none }
.ipoo-state.active{ display:block }
.ipoo-title{ font-size:22px;font-weight:700;color:var(--md-on-surface);margin-bottom:5px;font-family:var(--font-display), sans-serif }
.ipoo-sub{ font-size:14px;color:var(--md-on-surface-var);margin-bottom:20px;line-height:1.5 }

.ipoo-phone-group{ display:flex;border:1.5px solid var(--md-outline-var);border-radius:var(--ia-rad-sm);overflow:hidden;background:var(--md-surface-1);transition:border-color .15s, box-shadow .15s }
.ipoo-phone-group:focus-within{ border-color:var(--md-primary); box-shadow:0 0 0 3px rgba(255, 77, 0, 0.12) }
.ipoo-phone-input{ flex:1;height:52px;padding:0 14px;font-size:18px;border:none;outline:none;font-family:inherit;background:transparent;color:var(--md-on-surface) }
.ipoo-phone-input::placeholder{ color:var(--md-on-surface-var) }

.ipoo-field{ margin-bottom:14px }
.ipoo-field-label{ font-size:11px;font-weight:700;color:var(--md-on-surface-var);margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px }
.ipoo-field-hint{ font-size:11px;color:var(--md-on-surface-var);margin-top:5px;line-height:1.4;font-weight:400;text-transform:none;letter-spacing:0 }
.ipoo-field-input{ width:100%;height:52px;border:1.5px solid var(--md-outline-var);border-radius:var(--ia-rad-sm);padding:0 14px;font-size:15px;font-family:inherit;background:var(--md-surface-1);color:var(--md-on-surface);transition:border-color .15s, box-shadow .15s }
.ipoo-field-input::placeholder{ color:var(--md-on-surface-var) }
.ipoo-field-input:focus{ border-color:var(--md-primary);outline:none;box-shadow:0 0 0 3px rgba(255, 77, 0, 0.12) }
.ipoo-field-textarea{ width:100%;min-height:76px;border:1.5px solid var(--md-outline-var);border-radius:var(--ia-rad-sm);padding:12px 14px;font-size:15px;font-family:inherit;resize:vertical;background:var(--md-surface-1);color:var(--md-on-surface);transition:border-color .15s, box-shadow .15s }
.ipoo-field-textarea::placeholder{ color:var(--md-on-surface-var) }
.ipoo-field-textarea:focus{ border-color:var(--md-primary);outline:none;box-shadow:0 0 0 3px rgba(255, 77, 0, 0.12) }

.ipoo-gps-btn{
  width:100%;height:48px;border-radius:var(--ia-rad-sm);
  border:1.5px dashed var(--md-outline);
  background:var(--md-surface-1);
  color:var(--md-primary);font-family:inherit;font-size:14px;font-weight:700;
  display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;
  transition:all .15s;
}
.ipoo-gps-btn:hover{ background:var(--md-primary-container);border-color:var(--md-primary) }
.ipoo-gps-btn:disabled{ opacity:.6;cursor:default }
.ipoo-gps-status{ font-size:12px;color:var(--md-on-surface-var);margin-top:7px;display:none;line-height:1.4 }
.ipoo-gps-status.success{ color:var(--md-success) }
.ipoo-gps-status.error{ color:var(--md-error) }

.ipoo-err{ background:var(--md-error-container);border:1px solid rgba(179, 38, 30, 0.3);border-radius:var(--ia-rad-sm);padding:10px 14px;font-size:13px;color:var(--md-on-error-container);margin-bottom:14px;display:none }
.ipoo-err.show{ display:block }
.ipoo-err a{ color:var(--md-on-error-container);font-weight:700;text-decoration:underline;cursor:pointer }

.ipoo-primary-btn{ width:100%;min-height:54px;background:linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 100%);color:#fff;border:none;border-radius:18px;font-size:15px;font-weight:700;font-family:inherit;cursor:pointer;margin-bottom:14px;box-shadow:0 12px 26px rgba(255, 77, 0, 0.24);transition:all .2s var(--md-easing);letter-spacing:.25px; }
.ipoo-primary-btn:hover{ transform:translateY(-1px);box-shadow:0 12px 26px rgba(255, 77, 0, 0.28) }
.ipoo-primary-btn:active{ transform:scale(.98);box-shadow:0 2px 10px rgba(255, 77, 0, 0.2) }
.ipoo-primary-btn:disabled{ opacity:.5;pointer-events:none;box-shadow:none }
.ipoo-close-x{ position:absolute;top:14px;right:16px;width:32px;height:32px;border:none;background:var(--md-surface-2);border-radius:50%;cursor:pointer;color:var(--md-on-surface-var);display:flex;align-items:center;justify-content:center;transition:background .15s }
.ipoo-close-x:hover{ background:var(--md-surface-3) }
#ipoo-auth-root .ipoo-close-x svg{ display:none !important; }

.ipoo-google-wrap{ margin-bottom:14px; min-height:44px; position:relative; }
.ipoo-google-gate{
  position:absolute; inset:0; z-index:2; cursor:pointer;
  background:transparent;
}
.ipoo-google-fallback{
  width:100%;height:52px;
  border:1.5px solid var(--md-outline-var);
  border-radius:var(--ia-rad-sm);
  background:var(--md-surface);
  display:flex;align-items:center;justify-content:center;gap:10px;
  font-family:inherit;font-size:15px;font-weight:600;color:var(--md-on-surface);
  cursor:pointer;
  transition:background .15s, border-color .15s, transform .12s;
}
.ipoo-google-fallback:hover{ background:var(--md-surface-1); }
.ipoo-google-fallback:active{ transform:scale(.98); }
.ipoo-google-fallback:disabled{ opacity:.5; cursor:not-allowed; }
.ipoo-google-fallback svg{ width:20px;height:20px;flex-shrink:0; }
.ipoo-divider{ display:flex;align-items:center;gap:12px;margin-bottom:14px; }
.ipoo-divider::before,.ipoo-divider::after{ content:'';flex:1;height:1px;background:var(--md-outline-var); }
.ipoo-divider span{ font-size:12px;color:var(--md-on-surface-var);font-weight:500;white-space:nowrap; }

.ipoo-section-gap{ height:6px }

/* Premium auth surface while preserving the fixed-width App-Mode frame. */
#ipoo-auth-root{
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(430px, 100vw) !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 1000 !important;
  background:transparent;
}
#ipoo-auth-root .ipoo-auth-popup.open,
#ipoo-auth-root .ipoo-auth-overlay.open { pointer-events: auto; }
#ipoo-auth-root .ipoo-auth-popup:not(.open),
#ipoo-auth-root .ipoo-auth-overlay:not(.open) {
  display: none !important;
}
#ipoo-auth-root .ipoo-auth-popup:not(.open),
#ipoo-auth-root .ipoo-auth-overlay:not(.open) { pointer-events: none !important; }
.ipoo-auth-overlay{
  position:absolute;
  inset:0;
  background:rgba(28,14,6,.38);
  opacity:0;
  pointer-events:none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:opacity .28s ease;
}
.ipoo-auth-popup{
  background:linear-gradient(180deg,#fffaf7 0%,#fff4ee 100%);
  border:1px solid rgba(255,255,255,.72);
  border-bottom:none;
  border-radius:30px 30px 0 0;
  box-shadow:0 -18px 60px rgba(28,14,6,.18);
  max-height:94%;
  overscroll-behavior:contain;
}
#ipoo-auth-root .ipoo-auth-popup{
  isolation:isolate;
  overflow-x:hidden;
}
#ipoo-auth-root .ipoo-auth-body{
  width:100%;
  max-width:430px;
  margin:0 auto;
}
.ipoo-auth-popup::before{
  content:'';
  position:absolute;
  top:0;
  left:22px;
  right:22px;
  height:3px;
  border-radius:0 0 999px 999px;
  background:linear-gradient(90deg,#ff5d16 0%,#ff9a62 50%,#e8500a 100%);
}
.ipoo-handle{
  width:44px;
  height:4px;
  margin-top:12px;
  background:#d7c0b8;
}
.ipoo-auth-body{
  padding:28px 22px 30px;
}
.ipoo-auth-brand{
  display:flex;
  align-items:center;
  gap:11px;
  margin:0 38px 14px 2px;
}
.ipoo-auth-brand-mark{
  width:42px;
  height:42px;
  flex:0 0 42px;
  color:#ff4d00;
  filter:drop-shadow(0 8px 12px rgba(255,77,0,.18));
}
.ipoo-auth-brand-mark svg{display:block;width:100%;height:100%}
.ipoo-auth-brand-name{
  color:#1c0e06;
  font-family:var(--font-display),sans-serif;
  font-size:24px;
  font-weight:800;
  line-height:1;
  letter-spacing:-.8px;
}
.ipoo-auth-brand-name span{color:#ff4d00}
.ipoo-auth-brand-kicker{
  margin-top:5px;
  color:#a47b6b;
  font-size:9px;
  font-weight:800;
  letter-spacing:1.2px;
}
.ipoo-auth-welcome{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0 0 16px 2px;
  padding:7px 10px;
  border:1px solid rgba(255,125,67,.18);
  border-radius:999px;
  background:rgba(255,255,255,.58);
  color:#8f6555;
  font-size:11px;
  font-weight:700;
}
.ipoo-auth-welcome-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#39a66b;
  box-shadow:0 0 0 4px rgba(57,166,107,.12);
}
.ipoo-tabs{
  padding:4px;
  gap:4px;
  margin-bottom:24px;
  border:1px solid rgba(212,181,167,.42);
  border-radius:15px;
  background:#f7e8e1;
}
.ipoo-tab{
  height:42px;
  border-radius:11px;
  color:#98776b;
  font-size:14px;
  font-weight:700;
}
.ipoo-tab.active{
  color:#fff;
  background:linear-gradient(135deg,#ff5d16 0%,#e8500a 100%);
  box-shadow:0 7px 16px rgba(232,80,10,.22);
}
.ipoo-title{
  font-size:25px;
  line-height:1.12;
  letter-spacing:-.5px;
  color:#1c0e06;
  margin-bottom:7px;
}
.ipoo-sub{
  color:#8f7167;
  font-size:13px;
  margin-bottom:22px;
}
.ipoo-field{margin-bottom:15px}
.ipoo-field-label{
  color:#6f4c40;
  font-size:10px;
  letter-spacing:.8px;
  margin-bottom:7px;
}
.ipoo-field-input,
.ipoo-phone-group,
.ipoo-field-textarea{
  background:rgba(255,255,255,.78);
  border-color:#ead5cb;
  border-radius:14px;
}
.ipoo-field-input,
.ipoo-phone-input{height:54px}
.ipoo-field-input:focus,
.ipoo-phone-group:focus-within,
.ipoo-field-textarea:focus{
  border-color:#ff6a2a;
  box-shadow:0 0 0 4px rgba(255,106,42,.12);
}
.ipoo-primary-btn{
  min-height:56px;
  border-radius:16px;
  background:linear-gradient(135deg,#ff5d16 0%,#e8500a 100%);
  box-shadow:0 12px 24px rgba(232,80,10,.22);
  font-size:15px;
}
.ipoo-primary-btn:hover{box-shadow:0 15px 28px rgba(232,80,10,.28)}
.ipoo-gps-btn{
  border-color:#e5b9a5;
  border-radius:14px;
  background:rgba(255,255,255,.55);
}
.ipoo-terms{color:#806257}
.ipoo-terms a{color:#e8500a;font-weight:800}
.ipoo-close-x{
  top:16px;
  right:18px;
  background:#f5e5df;
  color:#805e51;
}
@media (max-height:700px){
  .ipoo-auth-brand{margin-bottom:9px}
  .ipoo-auth-welcome{margin-bottom:10px}
  .ipoo-tabs{margin-bottom:16px}
  .ipoo-title{font-size:22px}
}

/* Luxury account direction: restrained espresso, cream, and citrus contrast. */
.ipoo-auth-popup{
  color:#fff8f3;
  background:linear-gradient(180deg,#21140f 0%,#170e0a 100%);
  border:1px solid rgba(255,214,188,.18);
  border-bottom:none;
  border-radius:30px 30px 0 0;
  box-shadow:0 -24px 70px rgba(20,10,5,.38);
}
.ipoo-auth-popup::before{
  left:0;
  right:0;
  height:4px;
  background:linear-gradient(90deg,#e8500a 0%,#ffb07b 48%,#e8500a 100%);
}
.ipoo-handle{background:#b9917d}
.ipoo-auth-body{padding:28px 22px 34px}
.ipoo-auth-body,
.ipoo-auth-body *{box-sizing:border-box}
.ipoo-tabs{
  margin-bottom:28px;
  border-color:rgba(255,206,177,.2);
  background:rgba(255,255,255,.08);
}
.ipoo-tab{color:#c9aa9b}
.ipoo-tab.active{
  color:#fff;
  background:#e8500a;
  box-shadow:0 8px 20px rgba(232,80,10,.28);
}
.ipoo-title{
  color:#fff8f3;
  font-family:Georgia,'Times New Roman',serif;
  font-size:30px;
  font-weight:500;
  letter-spacing:-.7px;
}
.ipoo-sub{color:#d2b8aa;margin-bottom:24px}
.ipoo-field-label{color:#e0b5a0}
.ipoo-field-input,
.ipoo-phone-group,
.ipoo-field-textarea{
  color:#fff8f3;
  background:#291b15;
  border-color:#634638;
}
.ipoo-phone-input{color:#fff8f3;background:transparent}
.ipoo-field-input::placeholder,
.ipoo-phone-input::placeholder,
.ipoo-field-textarea::placeholder{color:#a98779}
.ipoo-field-input:focus,
.ipoo-phone-group:focus-within,
.ipoo-field-textarea:focus{
  border-color:#ff8a50;
  box-shadow:0 0 0 4px rgba(255,138,80,.14);
}
.ipoo-field-hint{color:#9e7d6e}
.ipoo-gps-btn{
  color:#e8500a;
  background:#fff8f3;
  border:1px solid #e5b9a5;
  box-shadow:0 5px 14px rgba(0,0,0,.12);
}
.ipoo-gps-btn:hover{background:#fff;border-color:#ff8a50;box-shadow:0 7px 18px rgba(232,80,10,.18)}
.ipoo-gps-status{color:#e0b5a0;font-weight:600}
.ipoo-gps-status.success{color:#8ed2a5}
.ipoo-gps-status.error{color:#ffb09a}
.ipoo-primary-btn{
  min-height:58px;
  margin-top:6px;
  border-radius:14px;
  color:#fff;
  background:linear-gradient(135deg,#ff641c 0%,#df4805 100%);
  box-shadow:0 14px 30px rgba(223,72,5,.3);
}
.ipoo-err{
  color:#fff8f3;
  background:#7f2d16;
  border:1px solid #ff8a50;
  border-left:4px solid #ffb07b;
  border-radius:12px;
  padding:11px 13px;
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  box-shadow:0 8px 18px rgba(0,0,0,.18);
}
.ipoo-err.show{display:block}
.ipoo-terms{color:#8b6b5d}
.ipoo-terms a{
  color:#ff6a2a !important;
  font-weight:800 !important;
  text-decoration:underline !important;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
.ipoo-terms a:hover,
.ipoo-terms a:focus-visible{
  color:#ffb07b !important;
  outline:2px solid #ff6a2a;
  outline-offset:3px;
  border-radius:3px;
}
#ipoo-auth-root #ipooStateSignup label.ipoo-terms{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:9px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:44px !important;
  color:#c9aa9b !important;
  font-size:13px !important;
  line-height:1.4 !important;
}
#ipoo-auth-root #ipooSuTerms{
  flex:0 0 20px !important;
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  min-height:20px !important;
  margin:2px 0 0 !important;
  padding:0 !important;
  transform:none !important;
  accent-color:#ff6a2a !important;
}
#ipoo-auth-root #ipooStateSignup label.ipoo-terms > span{
  flex:1 1 auto !important;
  min-width:0 !important;
  width:auto !important;
  display:block !important;
  color:#c9aa9b !important;
  line-height:1.4 !important;
}
.ipoo-close-x{background:rgba(255,255,255,.1);color:#f4d4c3}
.ipoo-close-x:hover{background:rgba(255,255,255,.18)}

/* Compact form rhythm: more fields visible without reducing touch usability. */
.ipoo-field{margin-bottom:10px}
.ipoo-field-label{margin-bottom:5px}
.ipoo-field-input,
.ipoo-phone-input{
  height:46px !important;
  min-height:46px !important;
  padding-block:0 !important;
  padding-inline:14px !important;
}
.ipoo-phone-group{min-height:46px}
.ipoo-field-textarea{
  min-height:64px !important;
  padding:10px 14px !important;
}
#ipoo-auth-root input.ipoo-field-input[type="text"],
#ipoo-auth-root input.ipoo-field-input[type="email"],
#ipoo-auth-root input.ipoo-field-input[type="password"],
#ipoo-auth-root input.ipoo-phone-input[type="tel"]{
  padding:0 14px !important;
}
.ipoo-field-hint{margin-top:3px;font-size:10px}
.ipoo-sub{margin-bottom:17px}
.ipoo-primary-btn{min-height:52px}
#ipoo-auth-root .ipoo-field,
#ipoo-auth-root .ipoo-phone-group,
#ipoo-auth-root .ipoo-field-input,
#ipoo-auth-root .ipoo-phone-input,
#ipoo-auth-root .ipoo-field-textarea,
#ipoo-auth-root .ipoo-gps-btn,
#ipoo-auth-root .ipoo-primary-btn{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
#ipoo-auth-root .ipoo-phone-input{min-width:0}
#ipoo-auth-root #ipooStateSignup .ipoo-primary-btn{
  position:static;
  margin-bottom:0;
}

/* Keep auth actions aligned with the floating Sign In button. */
.ipoo-tab.active,
.ipoo-primary-btn{
  background:linear-gradient(135deg,#FF8E3E 0%,#D14500 100%);
}
.ipoo-primary-btn:hover{
  background:linear-gradient(135deg,#FF8E3E 0%,#D14500 100%);
}
.ipoo-gps-btn,
.ipoo-terms a{
  color:var(--md-primary-dark);
}
.ipoo-auth-popup::before{
  background:linear-gradient(90deg,var(--md-primary-dark) 0%,#ffb07b 48%,var(--md-primary-dark) 100%);
}
#ipoo-auth-root .ipoo-state .ipoo-primary-btn{
  background:linear-gradient(135deg,#FF8E3E 0%,#D14500 100%) !important;
}

