/* Manakamana Funnel — shared stylesheet for the Manakamana 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-teal: #0F766E;
    --hf-teal-dark: #0D5E54;
    --hf-teal-darker: #0C4A3E;
    --hf-teal-bright: #14B8A6;
    --hf-emerald: #34D399;
    --hf-ink: #0F172A;
    --hf-ink-soft: #334155;
    --hf-muted: #64748B;
    --hf-faint: #94A3B8;
    --hf-border: #E2E8F0;
    --hf-bg: #F0F4F3;
    --hf-panel: #0C4A3E;
    --hf-header-grad: linear-gradient(135deg, #0F766E 0%, #14B8A6 55%, #34D399 100%);
    --hf-btn-grad: linear-gradient(135deg, #0F766E, #0D5E54);
    --hf-btn-grad-hover: linear-gradient(135deg, #0D5E54, #0C4A3E);
}

@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: 4px; background: var(--hf-emerald); 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.04; 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; justify-content: center; background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 48px; }
.hf-brand-logo img { height: 64px; width: auto; max-height: 64px; max-width: 130px; object-fit: contain; display: block; }
.hf-brand-logo span { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 3px; }
.hf-brand-title-row { display: flex; gap: 20px; align-items: stretch; margin-bottom: 20px; }
.hf-brand-rule { width: 3px; background: var(--hf-emerald); border-radius: 2px; flex: none; }
.hf-brand-title { color: #fff; font-size: 32px; 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: 32px; margin-top: 48px; padding-left: 23px; }
.hf-stat-num { color: var(--hf-emerald); font-size: 22px; font-weight: 700; }
.hf-stat-label { color: rgba(255,255,255,0.4); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.hf-stat-div { width: 1px; background: rgba(255,255,255,0.1); }
.hf-brand-badge { padding: 20px 48px 24px; position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,0.08); }
.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.18); display: flex; align-items: center; justify-content: center; }
.hf-brand-badge-mark span { color: rgba(255,255,255,0.55); 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 #F1F5F9; 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: 10px; font-size: 14px; color: var(--hf-ink); transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; background: #F8FAFB; font-family: inherit; }
.hf-input:focus { border-color: var(--hf-teal); box-shadow: 0 0 0 3px rgba(15,118,110,0.1); background: #fff; }
.hf-input:disabled { background: #F1F5F9; 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); }
/* hide the browser's native password reveal control so only the custom toggle shows */
.hf-input::-ms-reveal, .hf-input::-ms-clear { display: none; }
.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-teal); cursor: pointer; }
.hf-check span { font-size: 13px; color: var(--hf-muted); }
.hf-link { font-size: 13px; color: var(--hf-teal); font-weight: 600; cursor: pointer; text-decoration: none; transition: color 0.15s; }
.hf-link:hover { color: var(--hf-teal-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-teal); }

/* ---------- Buttons ---------- */
.hf-btn { width: 100%; padding: 13px; background: var(--hf-btn-grad); color: #fff; border: none; border-radius: 10px; 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(15,118,110,0.3); }
.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: #F8FAFB; border-color: #CBD5E1; 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: 10px; 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: 10px; 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: #F0FDF9; }
.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: #F0FDF9; border-radius: 10px; padding: 16px; margin-bottom: 28px; }
.hf-infobox p { font-size: 13px; color: var(--hf-teal); }
.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: #F8FAFB; border: 1px solid var(--hf-border); border-radius: 10px; 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: 24px 48px; display: flex; align-items: center; justify-content: space-between; }
.hf-header-brand { display: flex; align-items: center; gap: 16px; }
.hf-header-logo { background: #fff; border: 1.5px solid rgba(255,255,255,0.3); border-radius: 8px; padding: 5px 8px; display: inline-flex; align-items: center; justify-content: center; }
.hf-header-logo img { height: 34px; width: auto; max-height: 34px; max-width: 120px; object-fit: contain; display: block; }
.hf-header-logo span { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; }
.hf-header-div { width: 1px; height: 28px; background: rgba(255,255,255,0.25); }
.hf-header-label { color: rgba(255,255,255,0.95); font-size: 14px; font-weight: 500; }
.hf-header-nav { display: flex; align-items: center; gap: 8px; }
.hf-header-email { color: rgba(255,255,255,0.85); font-size: 13px; }
.hf-header-signout { padding: 6px 16px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); border-radius: 8px; 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.22); }
.hf-content { flex: 1; display: flex; justify-content: center; padding: 48px 24px; }
.hf-content-wrap { width: 100%; max-width: 680px; animation: hf-fadeIn 0.4s ease-out; }
.hf-card { background: #fff; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px 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-teal-darker); 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.55); }

/* ---------- Profile ---------- */
.hf-profile-head { background: var(--hf-header-grad); padding: 32px; display: flex; align-items: center; gap: 20px; }
.hf-avatar { width: 72px; height: 72px; border-radius: 16px; background: rgba(255,255,255,0.2); border: 3px solid rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center; flex: none; color: #fff; font-size: 24px; font-weight: 700; }
.hf-profile-name { color: #fff; font-size: 20px; font-weight: 700; }
.hf-profile-email { color: rgba(255,255,255,0.85); font-size: 14px; margin-top: 4px; }
.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 #F1F5F9; }
.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: 12px; background: #F8FAFB; cursor: crosshair; transition: border-color 0.15s; display: block; touch-action: none; }
.hf-sig-pad:hover { border-color: var(--hf-teal); }
.hf-sig-existing { max-height: 120px; border: 1px solid #eee; padding: 6px; background: #fff; border-radius: 8px; }
.hf-upload-btn { padding: 10px 20px; background: #fff; color: var(--hf-ink-soft); border: 1.5px solid var(--hf-border); border-radius: 10px; 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: #F8FAFB; border-color: #CBD5E1; }
.hf-hint { font-size: 12px; color: var(--hf-faint); }
.hf-divider { border: none; border-top: 1px solid #F1F5F9; 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: 18px; flex-wrap: wrap; }
    .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); }
