/* Login popup styling — 3 variants */

/* ============ Shell — full viewport workspace ============ */
.workspace {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 800px 500px at 50% 30%, #d9eef8 0%, transparent 70%),
    linear-gradient(180deg, #f5f7fa 0%, #eceff3 100%);
  position: relative;
}

.workspace.desktop-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(9,119,155,0.88), rgba(9,165,217,0.75)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><rect width='60' height='60' fill='%23204050'/><path d='M0 30 L60 30 M30 0 L30 60' stroke='%23345670' stroke-width='0.5'/></svg>");
  z-index: 0;
}

/* ============ Mobile frame ============ */
.phone-frame {
  width: 390px;
  max-width: 100%;
  aspect-ratio: 390 / 844;
  background: #000;
  border-radius: 48px;
  padding: 10px;
  box-shadow:
    0 0 0 2px #2a2a2a,
    0 40px 100px rgba(0,0,0,0.35),
    0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 32px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--hp-bg-2);
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px 0;
  font-size: 15px;
  font-weight: 600;
  color: #000;
  z-index: 20;
  pointer-events: none;
}
.phone-statusbar .sb-right {
  display: flex; gap: 6px; align-items: center;
}

/* ============ Overlay backdrop (desktop mode) ============ */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  backdrop-filter: blur(6px);
}

/* ============ Fixed-size card — 380×560 ============ */
.hlp-card {
  position: relative;
  width: 380px;
  height: 560px;
  max-width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 16px 24px 24px;
  font-family: var(--hp-font);
  display: flex;
  flex-direction: column;
  direction: rtl;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  overflow: hidden;
}
/* Inside phone-screen — fill, no shadow */
.phone-screen .hlp-card {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  padding-top: 60px; /* clear status bar */
}

.hlp-topbar {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 4px;
}
.hlp-back {
  order: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 10px;
  color: var(--hp-fg-2);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.hlp-back:hover { background: var(--hp-bg-2); }
.hlp-close {
  order: 1;
  margin-inline-start: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 10px;
  color: var(--hp-fg-2);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.hlp-close:hover { background: var(--hp-bg-2); }

.hlp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hlp-logo-wrap {
  text-align: center;
  margin-bottom: 8px;
}
.hlp-logo { height: 32px; width: auto; }

.hlp-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--hp-fg-1);
  text-align: center;
  margin: 4px 0 6px;
  letter-spacing: -0.2px;
}
.hlp-subtitle {
  font-size: 14px;
  color: var(--hp-fg-3);
  text-align: center;
  margin: 0 0 18px;
  line-height: 1.5;
}

.hlp-field { margin-bottom: 10px; }
.hlp-input {
  display: block;
  width: 100%;
  height: 50px;
  border: 2px solid var(--hp-border-soft);
  border-radius: 10px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--hp-fg-1);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hlp-input::placeholder { color: var(--hp-fg-5); }
.hlp-input:focus { border-color: var(--hp-brand); box-shadow: 0 0 0 3px var(--hp-brand-tint-15); }
.hlp-input.errored { border-color: var(--hp-red); }
.hlp-input[dir="ltr"] { text-align: left; }

.hlp-error {
  color: var(--hp-red);
  font-size: 13px;
  min-height: 20px;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.4;
}

.hlp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.05s, border-color 0.15s;
}
.hlp-btn:disabled { opacity: 0.7; cursor: wait; }
.hlp-btn:active:not(:disabled) { transform: scale(0.98); }

.hlp-btn-primary { background: var(--hp-brand); color: #fff; }
.hlp-btn-primary:hover:not(:disabled) { background: var(--hp-brand-hover); }

.hlp-btn-secondary {
  background: #fff;
  color: var(--hp-fg-2);
  border: 2px solid var(--hp-border-soft);
  margin-top: 8px;
}
.hlp-btn-secondary:hover { background: #f8f8f8; border-color: var(--hp-border); }

.hlp-btn-icon {
  flex: 1;
  background: #fff;
  border: 2px solid var(--hp-border-soft);
  color: var(--hp-fg-2);
  height: 50px;
}
.hlp-btn-icon:hover { background: #f8f8f8; border-color: var(--hp-border); }
.hlp-oauth-row { display: flex; gap: 10px; margin-top: 4px; }

.hlp-divider {
  display: flex;
  align-items: center;
  margin: 14px 0;
  color: #aaa;
  font-size: 13px;
}
.hlp-divider::before, .hlp-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hp-border-soft);
}
.hlp-divider span { padding: 0 12px; }

/* ============ OTP boxes ============ */
.hlp-otp-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  direction: ltr;
  margin: 8px 0 12px;
}
.hlp-otp-box {
  width: 46px;
  height: 52px;
  border: 2px solid var(--hp-border-soft);
  border-radius: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--hp-fg-1);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s;
  font-family: inherit;
  padding: 0;
}
.hlp-otp-box.filled { border-color: var(--hp-brand); }
.hlp-otp-box.focused, .hlp-otp-box:focus {
  border-color: var(--hp-brand);
  box-shadow: 0 0 0 3px var(--hp-brand-tint-15);
}
.hlp-otp-box.errored { border-color: var(--hp-red); animation: shake 0.35s; }
.hlp-otp-box.success { border-color: var(--hp-green); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.hlp-resend {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--hp-fg-3);
}
.hlp-resend a {
  color: var(--hp-brand);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
}

/* ============ Spinner ============ */
.hlp-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Screen transitions ============ */
.hlp-screen-anim {
  animation: slideIn 0.28s ease-out;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ Done screen ============ */
.hlp-done {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding-bottom: 20px;
}
.hlp-done-check {
  margin-bottom: 12px;
  animation: pop 0.5s cubic-bezier(.2,1.3,.5,1);
}
@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.hlp-done .hlp-btn { margin-top: 20px; max-width: 240px; }

/* ============================================================
   Variant B — compact-oauth
   Minimal difference: OAuth buttons collapse to icon row
   (applied via conditional render in JSX)
   ============================================================ */

/* ============================================================
   Variant C — hero
   Top strip with brand imagery + white logo overlay
   ============================================================ */
.hlp-variant-hero .hlp-hero {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 140px;
  z-index: 0;
}
.hlp-variant-hero .hlp-hero-img {
  width: 100%; height: 100%;
  background:
    linear-gradient(135deg, rgba(9,119,155,0.55), rgba(9,165,217,0.35)),
    repeating-linear-gradient(45deg, #09779b 0 8px, #086586 8px 16px);
  display: flex;
  align-items: flex-end;
  padding: 0 16px 8px;
  color: rgba(255,255,255,0.7);
  font-size: 10px;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.5px;
}
.hlp-variant-hero {
  padding-top: 0;
}
.hlp-variant-hero .hlp-topbar {
  position: relative;
  z-index: 2;
  padding: 12px 0 0;
}
.hlp-variant-hero .hlp-topbar .hlp-close,
.hlp-variant-hero .hlp-topbar .hlp-back {
  color: #fff;
}
.hlp-variant-hero .hlp-topbar .hlp-close:hover,
.hlp-variant-hero .hlp-topbar .hlp-back:hover {
  background: rgba(255,255,255,0.15);
}
.hlp-variant-hero .hlp-body {
  position: relative;
  z-index: 2;
  padding-top: 60px; /* below the 140px hero, logo sits at edge */
}
.hlp-variant-hero .hlp-logo-wrap {
  margin-top: -40px;
  margin-bottom: 16px;
  position: relative;
}

/* Phone-in-frame + hero adjustments */
.phone-screen .hlp-variant-hero .hlp-hero { top: 0; height: 180px; }
.phone-screen .hlp-variant-hero .hlp-topbar { padding-top: 56px; }
.phone-screen .hlp-variant-hero .hlp-body { padding-top: 60px; }

/* ============================================================
   Toolbar (outside card)
   ============================================================ */
.doc-toolbar {
  position: fixed;
  top: 16px;
  inset-inline-start: 16px;
  background: #fff;
  border: 1px solid var(--hp-border-soft);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  z-index: 50;
  font-size: 13px;
}
.doc-toolbar .group {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--hp-bg-2);
  border-radius: 8px;
}
.doc-toolbar .chip {
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--hp-fg-2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
}
.doc-toolbar .chip.active {
  background: #fff;
  color: var(--hp-brand-dark);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.doc-toolbar .label {
  font-size: 11px;
  color: var(--hp-fg-3);
  padding: 0 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.doc-restart {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  background: #fff;
  border: 1px solid var(--hp-border-soft);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--hp-fg-2);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  z-index: 50;
}
.doc-restart:hover { border-color: var(--hp-border); }

.doc-hint {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  font-size: 12px;
  color: var(--hp-fg-3);
  background: rgba(255,255,255,0.85);
  padding: 6px 12px;
  border-radius: 6px;
  z-index: 40;
}
.doc-hint code {
  background: var(--hp-bg-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

/* ============================================================
   Tweaks panel (hidden when Tweaks is off)
   ============================================================ */
.tweaks-panel {
  position: fixed;
  inset-inline-end: 20px;
  top: 20px;
  width: 260px;
  background: #fff;
  border: 1px solid var(--hp-border-soft);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  z-index: 60;
  font-size: 13px;
  display: none;
}
.tweaks-panel.show { display: block; }
.tweaks-panel h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--hp-fg-1);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.tweaks-panel .field { margin-bottom: 12px; }
.tweaks-panel .field label {
  display: block;
  font-size: 11px;
  color: var(--hp-fg-3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.tweaks-panel .swatches { display: flex; gap: 8px; }
.tweaks-panel .swatch {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--hp-border-soft);
  cursor: pointer;
  padding: 0;
}
.tweaks-panel .swatch.active { box-shadow: 0 0 0 2px var(--hp-brand); }
.tweaks-panel .segment {
  display: flex;
  background: var(--hp-bg-2);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.tweaks-panel .segment button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--hp-fg-2);
  font-family: inherit;
}
.tweaks-panel .segment button.active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  font-weight: 600;
  color: var(--hp-fg-1);
}

/* ============================================================
   Success Popup — post-auth surface
   Wider + taller than the auth card; scrolls internally.
   ============================================================ */
.sp-popup {
  width: 420px;
  max-width: 100%;
  max-height: min(86vh, 780px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  font-family: var(--hp-font);
  direction: rtl;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.phone-screen .sp-popup {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  padding-top: 50px;
}
.sp-close {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  cursor: pointer;
  color: var(--hp-fg-2);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background 0.15s;
}
.sp-close:hover { background: var(--hp-bg-2); }
.phone-screen .sp-close { top: 60px; }

.sp-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sp-scroll::-webkit-scrollbar { width: 6px; }
.sp-scroll::-webkit-scrollbar-thumb { background: #d8dde2; border-radius: 4px; }

.sp-section { padding: 28px 26px 22px; }

/* ============ Part 1 — Contact ============ */
.sp-contact {
  background:
    radial-gradient(ellipse 360px 200px at 50% 0%, rgba(9,165,217,0.08), transparent 70%),
    #fff;
  text-align: center;
}
.sp-success-mark {
  width: 64px; height: 64px;
  margin: 4px auto 14px;
  color: #8B6B38;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(139, 107, 56, 0.08);
}
.sp-art { width: 48px; height: 48px; }
.sp-headline {
  font-size: 24px;
  font-weight: 700;
  color: var(--hp-fg-1);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.sp-subline {
  font-size: 14px;
  color: var(--hp-fg-3);
  margin: 0 0 6px;
  line-height: 1.5;
}
.sp-property { color: var(--hp-fg-2); font-weight: 500; }
.sp-phone-number {
  display: inline-block;
  font-size: 28px;
  font-weight: 700;
  color: var(--hp-brand);
  text-decoration: none;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-family: var(--hp-font);
}
@media (hover: none) and (pointer: coarse) {
  .sp-phone-number { text-decoration: underline; text-underline-offset: 4px; }
}
.sp-phone-number:hover { color: var(--hp-brand-dark); }

.sp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.sp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.05s;
}
.sp-btn:active:not(:disabled) { transform: scale(0.98); }
.sp-btn { white-space: nowrap; }
.sp-btn-primary {
  background: var(--hp-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(9,165,217,0.32);
}
.sp-btn-primary:hover:not(:disabled) { background: var(--hp-brand-hover); }
.sp-btn-primary:disabled { opacity: 0.85; cursor: wait; }

.sp-link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--hp-brass);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.sp-link-action:hover { background: rgba(197, 160, 89, 0.08); }
.sp-link-action.sent {
  color: var(--hp-fg-2);
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.10), rgba(9, 165, 217, 0.06));
  border: 1px solid var(--hp-brass-border);
  padding: 10px 14px;
  border-radius: 12px;
  animation: spSmsRise 0.5s cubic-bezier(.2, 1.2, .4, 1);
}
.sp-link-action.sent:hover { background: linear-gradient(135deg, rgba(197, 160, 89, 0.10), rgba(9, 165, 217, 0.06)); }
.sp-sms-success {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sp-sms-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--hp-brass);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  animation: spSmsCheckPop 0.55s cubic-bezier(.2, 1.5, .4, 1);
  box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.5);
  animation-fill-mode: both;
}
.sp-sms-check::after {
  content: '';
  position: absolute;
}
.sp-sms-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  line-height: 1.3;
}
.sp-sms-text b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hp-fg-1);
}
.sp-sms-sub {
  font-size: 11.5px;
  color: var(--hp-fg-3);
  font-weight: 400;
  margin-top: 1px;
}

@keyframes spSmsRise {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes spSmsCheckPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.18); box-shadow: 0 0 0 8px rgba(197, 160, 89, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

.sp-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ===== Host row ===== */
.sp-host {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  padding-inline: 14px;
  padding-bottom: 14px;
  background: var(--hp-bg-2);
  border-radius: 14px;
  border-top: 1px solid var(--hp-brass-border);
  text-align: right;
}
.sp-host-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--hp-border-soft);
  color: var(--hp-brass);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sp-host-fallback { width: 28px; height: 28px; }
.sp-host-meta { flex: 1; min-width: 0; }
.sp-host-label {
  font-size: 11px;
  color: var(--hp-fg-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.sp-host-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--hp-fg-1);
  margin-top: 2px;
}
.sp-host-message {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--hp-brand-dark);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--hp-border-soft);
  transition: background 0.15s;
}
.sp-host-message:hover { background: var(--hp-brand-tint-50); border-color: var(--hp-brand); }

/* ===== Tip ===== */
.sp-tip {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  background: #faf6ee;
  border-radius: 12px;
  border: 1px solid var(--hp-brass-border);
  text-align: right;
}
.sp-tip-bullet {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--hp-brass);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.sp-tip-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--hp-fg-2);
}
.sp-tip-text b { color: var(--hp-fg-1); }

/* ============ Divider ============ */
.sp-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hp-border-soft) 20%, var(--hp-border-soft) 80%, transparent);
  margin: 0 26px;
}

/* ============ Part 2 — Profile ============ */
.sp-profile { padding-top: 22px; padding-bottom: 28px; }
.sp-profile-header { text-align: center; margin-bottom: 18px; }
.sp-h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--hp-fg-1);
  margin: 0 0 4px;
  letter-spacing: -0.2px;
}
.sp-h2-sub {
  font-size: 12.5px;
  color: var(--hp-fg-3);
  margin: 0;
}

.sp-form { display: flex; flex-direction: column; gap: 12px; }
.sp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.sp-field { display: flex; flex-direction: column; gap: 5px; }
.sp-field-label {
  font-size: 11.5px;
  color: var(--hp-fg-3);
  font-weight: 600;
  letter-spacing: 0.3px;
  padding-inline-start: 4px;
}
.sp-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.sp-field-input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--hp-border-soft);
  border-radius: 10px;
  padding: 0 38px 0 14px;
  font-size: 15px;
  color: var(--hp-fg-1);
  background: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sp-field-input[dir="ltr"] { padding: 0 14px 0 38px; text-align: left; }
.sp-field-input::placeholder { color: var(--hp-fg-5); }
.sp-field-input:focus { border-color: var(--hp-brand); box-shadow: 0 0 0 3px var(--hp-brand-tint-15); }
.sp-field-saved .sp-field-input { border-color: rgba(9,217,92,0.5); }
.sp-field-error .sp-field-input { border-color: var(--hp-red); }

.sp-field-status {
  position: absolute;
  inset-inline-start: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
}
/* RTL inputs (default): status appears at LEFT (visual end of input) */
.sp-field-input:not([dir="ltr"]) ~ .sp-field-status {
  inset-inline-end: auto;
  inset-inline-start: 12px;
}
/* LTR inputs (email): status appears at RIGHT (visual end of input) */
.sp-field-input[dir="ltr"] ~ .sp-field-status {
  inset-inline-start: auto;
  inset-inline-end: 12px;
}

.sp-check-circle {
  display: inline-flex;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--hp-green);
  color: #fff;
  align-items: center;
  justify-content: center;
  animation: spCheckIn 0.4s cubic-bezier(.2,1.4,.5,1);
}
@keyframes spCheckIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.sp-mini-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(9,165,217,0.2);
  border-top-color: var(--hp-brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.sp-x {
  display: inline-flex;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--hp-red);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  align-items: center;
  justify-content: center;
}
.sp-field-err {
  font-size: 12px;
  color: var(--hp-red);
  padding-inline-start: 4px;
}

/* ===== Birthday card ===== */
.sp-birthday-card {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: rgba(9, 165, 217, 0.05);
  border-radius: 14px;
  border: 1px solid rgba(9, 165, 217, 0.12);
}
.sp-birthday-art {
  width: 72px; height: 72px;
  color: var(--hp-brass);
  display: flex; align-items: center; justify-content: center;
}
.sp-birthday-art .sp-art { width: 64px; height: 64px; }
.sp-birthday-body { min-width: 0; }
.sp-birthday-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--hp-fg-1);
}
.sp-birthday-sub {
  font-size: 12.5px;
  color: var(--hp-fg-2);
  margin-bottom: 8px;
}
.sp-bday {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1.5px solid rgba(9, 165, 217, 0.25);
  border-radius: 10px;
  padding: 4px 8px;
  height: 40px;
  width: max-content;
}
.sp-bday-input {
  width: 32px;
  height: 30px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--hp-fg-1);
  background: transparent;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0;
}
.sp-bday-input.sp-bday-year { width: 50px; }
.sp-bday-input::placeholder { color: var(--hp-fg-5); font-weight: 400; }
.sp-bday-sep { color: var(--hp-fg-4); font-weight: 500; }
.sp-field-birthday .sp-field-status { position: static; margin-inline-start: 6px; }
.sp-field-birthday .sp-field-wrap { gap: 0; }

/* ============ Mobile-responsive fallback ============ */
@media (max-width: 440px) {
  .phone-frame { display: none; }
  .workspace { padding: 0; align-items: stretch; }
  .hlp-card { border-radius: 0; box-shadow: none; height: 100vh; width: 100%; }
  .doc-toolbar { top: auto; bottom: 12px; inset-inline-start: 12px; inset-inline-end: 12px; }
  .doc-restart, .doc-hint { display: none; }
}
