/* Jagdamba Funnel v2 — shared stylesheet for the Jagdamba Hire Purchase account/password funnel and portal pages.
   Self-hosted Roboto variable font (no CDN) for Content-Security-Policy compliance. */
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/font/Roboto/Roboto-Variable.woff2') format('woff2'); }

:root {
    --hf-blue: #2563EB;
    --hf-blue-dark: #1D4ED8;
    --hf-blue-darker: #1E40AF;
    --hf-amber: #F59E0B;
    --hf-amber-dark: #D97706;
    --hf-ink: #0F172A;
    --hf-ink-soft: #334155;
    --hf-muted: #64748B;
    --hf-faint: #94A3B8;
    --hf-border: #CBD5E1;
    --hf-border-soft: #E2E8F0;
    --hf-bg: #F8FAFC;
    --hf-panel: #0F172A;
    --hf-accent-stripe: linear-gradient(90deg, #F59E0B, #2563EB);
    --hf-header-grad: #0F172A;
    --hf-btn-grad: #2563EB;
    --hf-btn-grad-hover: #1D4ED8;
}

@keyframes hf-fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hf-slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes hf-checkmark { 0% { stroke-dashoffset: 50; } 100% { stroke-dashoffset: 0; } }
@keyframes hf-shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); } 20%, 40%, 60%, 80% { transform: translateX(4px); } }

* { margin: 0; padding: 0; box-sizing: border-box; }
.hf-body { font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; min-height: 100vh; background: var(--hf-bg); color: var(--hf-ink); }
.hf-body input:focus { outline: none; }
.hf-body ::placeholder { color: var(--hf-faint); }
@media (prefers-reduced-motion: reduce) { .hf-body * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- Split layout (auth / password funnel) ---------- */
.hf-split { display: flex; min-height: 100vh; }

.hf-brand { width: 44%; min-height: 100vh; background: var(--hf-panel); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.hf-brand-stripe { height: 3px; background: var(--hf-accent-stripe); flex: none; }
.hf-brand-watermark { position: absolute; right: -60px; top: 50%; transform: translateY(-50%); font-size: 420px; font-weight: 900; color: rgba(255,255,255,0.025); letter-spacing: -20px; line-height: 1; pointer-events: none; user-select: none; }
.hf-brand-grid { position: absolute; inset: 0; opacity: 0.03; background-image: linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px); background-size: 40px 40px; }
.hf-brand-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 60px 48px; position: relative; z-index: 1; animation: hf-slideInLeft 0.6s ease-out; }
.hf-brand-logo { display: inline-flex; align-self: flex-start; align-items: center; background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 40px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.hf-brand-logo img { height: 48px; width: auto; max-height: 48px; max-width: 240px; object-fit: contain; display: block; }
.hf-brand-logo span { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 0; }
.hf-brand-title-row { display: flex; gap: 20px; align-items: stretch; margin-bottom: 20px; }
.hf-brand-rule { width: 3px; background: var(--hf-amber); border-radius: 2px; flex: none; }
.hf-brand-title { color: #fff; font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.hf-brand-sub { color: rgba(255,255,255,0.5); font-size: 14px; line-height: 1.7; max-width: 320px; padding-left: 23px; }
.hf-brand-stats { display: flex; gap: 10px; margin-top: 40px; padding-left: 23px; flex-wrap: wrap; }
.hf-stat-num { display: none; }
.hf-stat-label { display: none; }
.hf-stat-div { display: none; }
.hf-pill { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.hf-pill.blue { background: rgba(37,99,235,0.15); border: 1px solid rgba(37,99,235,0.2); color: #93C5FD; }
.hf-pill.amber { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: #FCD34D; }
.hf-brand-badge { padding: 20px 48px 24px; position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,0.06); }
.hf-brand-badge-row { display: flex; align-items: center; gap: 10px; }
.hf-brand-badge-mark { width: 24px; height: 24px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.hf-brand-badge-mark span { color: rgba(255,255,255,0.5); font-size: 8px; font-weight: 700; }
.hf-brand-badge-text { color: rgba(255,255,255,0.4); font-size: 11px; font-weight: 500; letter-spacing: 0.03em; }

.hf-form-panel { flex: 1; display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
.hf-form-area { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px; }
.hf-form-wrap { width: 100%; max-width: 420px; animation: hf-fadeIn 0.4s ease-out; }
.hf-foot { padding: 16px 48px; border-top: 1px solid var(--hf-border-soft); display: flex; justify-content: space-between; align-items: center; }
.hf-foot span { font-size: 12px; color: var(--hf-faint); }

/* ---------- Headings ---------- */
.hf-h1 { font-size: 26px; font-weight: 700; color: var(--hf-ink); margin-bottom: 8px; letter-spacing: -0.02em; }
.hf-lead { margin-bottom: 36px; }
.hf-sub { font-size: 14px; color: var(--hf-muted); line-height: 1.5; }
.hf-center { text-align: center; }

/* ---------- Form controls ---------- */
.hf-field { margin-bottom: 20px; }
.hf-label { display: block; font-size: 13px; font-weight: 600; color: var(--hf-ink-soft); margin-bottom: 6px; }
.hf-input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--hf-border); border-radius: 8px; font-size: 14px; color: var(--hf-ink); transition: border-color 0.15s ease, box-shadow 0.15s ease; background: #fff; font-family: inherit; }
.hf-input:focus { border-color: var(--hf-blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.hf-input:disabled { background: var(--hf-bg); color: var(--hf-muted); }
.hf-pw-wrap { position: relative; }
.hf-pw-wrap .hf-input { padding-right: 44px; }
.hf-pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--hf-faint); padding: 4px; background: none; border: none; display: inline-flex; transition: color 0.15s; }
.hf-pw-toggle:hover { color: var(--hf-ink-soft); }
.hf-row-between { display: flex; justify-content: space-between; align-items: center; }
.hf-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.hf-check input { width: 16px; height: 16px; accent-color: var(--hf-blue); cursor: pointer; }
.hf-check span { font-size: 13px; color: var(--hf-muted); }
.hf-link { font-size: 13px; color: var(--hf-blue); font-weight: 500; cursor: pointer; text-decoration: none; transition: color 0.15s; }
.hf-link:hover { color: var(--hf-blue-dark); text-decoration: underline; }
.hf-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--hf-muted); cursor: pointer; margin-bottom: 28px; text-decoration: none; transition: color 0.15s; }
.hf-back:hover { color: var(--hf-blue); }

/* ---------- Buttons ---------- */
.hf-btn { width: 100%; padding: 13px; background: var(--hf-btn-grad); color: #fff; border: none; border-radius: 24px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; font-family: inherit; letter-spacing: 0.01em; text-align: center; display: inline-block; }
.hf-btn:hover { background: var(--hf-btn-grad-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.35); }
.hf-btn:active { transform: translateY(0); }
.hf-btn-auto { width: auto; padding: 12px 28px; font-size: 14px; }
.hf-btn-secondary { background: #fff; color: var(--hf-ink-soft); border: 1.5px solid var(--hf-border); }
.hf-btn-secondary:hover { background: var(--hf-bg); border-color: var(--hf-faint); box-shadow: none; transform: none; }
.hf-btn-sm { padding: 10px 20px; font-size: 13px; }
.hf-btn-row { display: flex; gap: 12px; justify-content: center; }
.hf-btn-row-end { display: flex; justify-content: flex-end; gap: 12px; }

/* ---------- Alerts / validation ---------- */
.hf-alert-error { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; animation: hf-shake 0.4s ease; }
.hf-alert-error span, .hf-alert-error li { font-size: 13px; color: #991B1B; line-height: 1.4; list-style: none; }
.hf-alert-error ul { margin: 0; padding: 0; }
.hf-alert-error:empty { display: none; }
.hf-alert-success { background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 13px; color: #065F46; line-height: 1.4; }
.hf-alert-success:empty { display: none; }
.hf-vsummary { color: #991B1B; font-size: 13px; }
.hf-vsummary ul { margin: 0 0 16px; padding-left: 18px; }
.hf-vsummary:empty { display: none; }
.hf-field-error { display: block; font-size: 12px; color: #DC2626; margin-top: 6px; }

/* ---------- Icon circles & info blocks ---------- */
.hf-icon-circle { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.hf-icon-circle.lg { width: 80px; height: 80px; }
.hf-icon-circle.brand { background: #EFF6FF; }
.hf-icon-circle.success { background: #ECFDF5; }
.hf-icon-circle.danger { background: #FEF2F2; }
.hf-icon-anim { stroke-dasharray: 50; stroke-dashoffset: 0; animation: hf-checkmark 0.6s ease-out; }
.hf-infobox { background: var(--hf-bg); border: 1px solid var(--hf-border-soft); border-radius: 8px; padding: 16px; margin-bottom: 28px; }
.hf-infobox p { font-size: 13px; color: var(--hf-muted); }
.hf-msg { font-size: 14px; color: var(--hf-muted); line-height: 1.6; max-width: 340px; margin: 0 auto 28px; }

/* ---------- Password requirements ---------- */
.hf-reqs { background: var(--hf-bg); border: 1px solid var(--hf-border-soft); border-radius: 8px; padding: 14px 16px; margin-bottom: 24px; }
.hf-reqs-title { font-size: 12px; font-weight: 600; color: var(--hf-ink-soft); margin-bottom: 8px; }
.hf-reqs-list { display: flex; flex-direction: column; gap: 4px; }
.hf-req { display: flex; align-items: center; gap: 8px; }
.hf-req span { font-size: 12px; color: var(--hf-muted); }

/* ---------- Full-width layout (portal pages) ---------- */
.hf-full { min-height: 100vh; background: var(--hf-bg); display: flex; flex-direction: column; }
.hf-header { background: var(--hf-header-grad); padding: 20px 48px; display: flex; align-items: center; justify-content: space-between; position: relative; }
.hf-header::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--hf-accent-stripe); }
.hf-header-brand { display: flex; align-items: center; gap: 14px; }
.hf-header-logo { background: #fff; border-radius: 8px; padding: 6px 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.hf-header-logo img { height: 28px; width: auto; max-height: 28px; max-width: 200px; object-fit: contain; display: block; }
.hf-header-logo span { color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0; }
.hf-header-div { width: 1px; height: 24px; background: rgba(255,255,255,0.1); }
.hf-header-label { color: rgba(255,255,255,0.5); font-size: 13px; font-weight: 500; }
.hf-header-wordmark { font-size: 14px; font-weight: 700; color: #fff; }
.hf-header-wordmark .hf-hp { color: #60A5FA; font-weight: 600; }
.hf-header-nav { display: flex; align-items: center; gap: 8px; }
.hf-header-email { color: rgba(255,255,255,0.6); font-size: 13px; }
.hf-header-signout { padding: 6px 16px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.hf-header-signout:hover { background: rgba(255,255,255,0.15); }
.hf-content { flex: 1; display: flex; justify-content: center; padding: 40px 24px; }
.hf-content-wrap { width: 100%; max-width: 680px; animation: hf-fadeIn 0.4s ease-out; }
.hf-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 48px; }
.hf-card.flush { padding: 0; overflow: hidden; }
.hf-h1-lg { font-size: 28px; font-weight: 700; color: var(--hf-ink); margin-bottom: 8px; letter-spacing: -0.02em; }
.hf-msg-lg { font-size: 15px; color: var(--hf-muted); line-height: 1.6; max-width: 400px; margin: 0 auto 32px; }
.hf-footer-dark { background: var(--hf-panel); padding: 16px 48px; display: flex; justify-content: space-between; align-items: center; }
.hf-footer-dark span { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ---------- Profile ---------- */
.hf-profile-head { background: var(--hf-panel); padding: 28px 32px; display: flex; align-items: center; gap: 20px; position: relative; }
.hf-profile-head::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--hf-accent-stripe); }
.hf-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--hf-blue), var(--hf-blue-dark)); border: 3px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; flex: none; color: #fff; font-size: 22px; font-weight: 700; }
.hf-profile-name { color: #fff; font-size: 18px; font-weight: 700; }
.hf-profile-email { color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 2px; }
.hf-profile-body { padding: 32px; }
.hf-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hf-col-span { grid-column: 1 / -1; }
.hf-label-up { display: block; font-size: 12px; font-weight: 600; color: var(--hf-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.hf-profile-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hf-border-soft); }
.hf-page-head { margin-bottom: 24px; }

/* ---------- Signature ---------- */
.hf-sig-label { display: block; font-size: 13px; font-weight: 600; color: var(--hf-ink-soft); margin-bottom: 10px; }
.hf-sig-pad { width: 100%; height: 200px; border: 2px dashed var(--hf-border); border-radius: 8px; background: #FAFBFC; cursor: crosshair; transition: border-color 0.15s; display: block; touch-action: none; }
.hf-sig-pad:hover { border-color: var(--hf-blue); }
.hf-sig-existing { max-height: 120px; border: 1px solid var(--hf-border-soft); padding: 6px; background: #fff; border-radius: 6px; }
.hf-upload-btn { padding: 10px 20px; background: #fff; color: var(--hf-ink-soft); border: 1.5px solid var(--hf-border); border-radius: 24px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; transition: all 0.15s; }
.hf-upload-btn:hover { background: var(--hf-bg); border-color: var(--hf-faint); }
.hf-hint { font-size: 12px; color: var(--hf-faint); }
.hf-divider { border: none; border-top: 1px solid var(--hf-border-soft); margin: 24px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hf-split { flex-direction: column; }
    .hf-brand { width: 100%; min-height: auto; }
    .hf-brand-inner { padding: 40px 28px; }
    .hf-brand-watermark { font-size: 240px; }
    .hf-form-panel { min-height: auto; }
    .hf-form-area { padding: 36px 24px; }
    .hf-header, .hf-foot, .hf-footer-dark { padding-left: 24px; padding-right: 24px; }
    .hf-card { padding: 32px 24px; }
    .hf-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hf-brand-stats { gap: 8px; }
    .hf-header { flex-direction: column; gap: 14px; align-items: flex-start; }
}

/* ---- module picker ---- */
.hf-modules-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.hf-modules-sub { font-size: 14px; color: var(--hf-faint); margin: 6px 0 0; }
.hf-modules-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hf-modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.hf-module-card { display: flex; align-items: center; gap: 16px; padding: 22px; background: #fff; border: 1px solid var(--hf-border); border-radius: 14px; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.hf-module-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10); }
.hf-module-icon { flex: none; width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--hf-btn-grad); color: #fff; }
.hf-module-icon svg { width: 24px; height: 24px; }
.hf-module-text { min-width: 0; }
.hf-module-title { display: block; font-size: 16px; font-weight: 700; color: var(--hf-ink); margin: 0 0 2px; }
.hf-module-desc { display: block; font-size: 13px; color: var(--hf-faint); margin: 0; line-height: 1.4; }
.hf-modules-empty { padding: 40px; text-align: center; color: var(--hf-faint); }
