/* =====================================================================
   E2MP - Founder One-Pager / Subscription application form
   Modern multi-section layout. Scoped under .pf-app so it does not
   leak into the rest of the WorkWise template.
   Palette: navy #0d2447, teal #0d7c86, gold #f1b12b, light bg #f4f6f9
   ===================================================================== */

.pf-app {
    --pf-navy: #0d2447;
    --pf-teal: #0d7c86;
    --pf-teal-dark: #0a626a;
    --pf-gold: #f1b12b;
    --pf-bg: #f4f6f9;
    --pf-card: #ffffff;
    --pf-border: #dfe4ea;
    --pf-border-strong: #c7ced8;
    --pf-text: #24303f;
    --pf-muted: #6b7688;
    --pf-radius: 18px;
    --pf-radius-sm: 10px;
    --pf-shadow: 0 8px 30px rgba(13, 36, 71, 0.07);

    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    color: var(--pf-text);
    background: var(--pf-bg);
    padding: 0 0 120px;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.pf-app *,
.pf-app *::before,
.pf-app *::after {
    box-sizing: border-box;
}

/* ---------- Page header ---------- */
.pf-pagehead {
    background: transparent !important;
    color: var(--pf-navy);
    padding: 16px 0 10px !important;   /* compact: was 34/40 with an invisible title */
}
.pf-pagehead__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.pf-pagehead__titles { max-width: 720px; }
.pf-pagehead h1 {
    font-size: 27px !important;
    line-height: 1.25;
    font-weight: 800 !important;
    margin: 0 0 4px !important;
    color: var(--pf-navy) !important;   /* legacy sheets force #fff here — must win */
    text-align: left !important;
}
.pf-pagehead p {
    margin: 0 !important;
    color: var(--pf-muted) !important;
    font-size: 14.5px;
}
.pf-help-card {
    background: #fff;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-sm);
    padding: 10px 16px;
    font-size: 13px;
    color: var(--pf-muted);
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(28,42,74,.06);
}
.pf-help-card strong { display: block; color: var(--pf-navy); font-weight: 700; margin-bottom: 2px; }
.pf-help-card a { color: var(--pf-teal) !important; text-decoration: none; font-weight: 600; }

/* ---------- Two-column shell ---------- */
.pf-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ---------- Left sidebar / stepper ---------- */
.pf-sidebar {
    align-self: start;
}
/* stick the inner card: some legacy ancestors constrain the column itself */
.pf-sidebar__card {
    position: -webkit-sticky;
    position: sticky;
    top: 88px;   /* clears the app topbar */
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-shadow);
    padding: 22px 20px;
}
.pf-stepper { list-style: none; margin: 0 0 6px; padding: 0; position: relative; }
.pf-stepper::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--pf-border);
}
.pf-step { position: relative; }
.pf-step a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 6px;
    text-decoration: none;
    color: var(--pf-muted);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.pf-step__num {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--pf-border-strong);
    color: var(--pf-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    z-index: 1;
    transition: all .15s;
}
.pf-step a:hover { color: var(--pf-navy); background: #f0f4f9; }
.pf-step.is-active a { color: var(--pf-navy); font-weight: 600; }
.pf-step.is-active .pf-step__num {
    background: var(--pf-teal);
    border-color: var(--pf-teal);
    color: #fff;
}
.pf-step.is-done .pf-step__num {
    background: var(--pf-teal-dark);
    border-color: var(--pf-teal-dark);
    color: #fff;
}

.pf-progress { margin: 18px 4px 6px; }
.pf-progress__label {
    font-size: 12px;
    color: var(--pf-muted);
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-weight: 600;
}
.pf-progress__bar {
    height: 8px;
    border-radius: 6px;
    background: #e7ebf1;
    overflow: hidden;
}
.pf-progress__fill {
    height: 100%;
    width: 12%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--pf-teal), var(--pf-gold));
    transition: width .3s ease;
}
.pf-note {
    margin-top: 16px;
    background: #f0f7f8;
    border: 1px solid #cfe6e8;
    border-left: 3px solid var(--pf-teal);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12.5px;
    color: #35606a;
    line-height: 1.45;
}

/* ---------- Right main column ---------- */
.pf-main { min-width: 0; }

.pf-section {
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-shadow);
    padding: 26px 28px;
    margin-bottom: 24px;
    scroll-margin-top: 20px;
}
.pf-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 6px;
}
.pf-section__num {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--pf-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.pf-section__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pf-navy);
    margin: 0;
}
.pf-section__desc {
    margin: 0 0 18px 42px;
    color: var(--pf-muted);
    font-size: 13px;
}
.pf-section > .pf-grid { margin-top: 14px; }

/* ---------- Two-column field grid ---------- */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
}
.pf-field { display: flex; flex-direction: column; min-width: 0; }
.pf-field--full { grid-column: 1 / -1; }
.pf-field > label,
.pf-field > .pf-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--pf-navy);
    margin: 0 0 6px;
    line-height: 1.35;
}
.pf-hint {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--pf-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* ---------- Inputs ---------- */
.pf-app input[type="text"],
.pf-app input[type="email"],
.pf-app input[type="date"],
.pf-app input[type="number"],
.pf-app input[type="tel"],
.pf-app select,
.pf-app textarea {
    width: 100% !important;
    min-height: 46px;
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    color: var(--pf-text);
    background: #fff;
    border: 1px solid var(--pf-border-strong);
    border-radius: var(--pf-radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.pf-app textarea {
    min-height: 110px !important;
    height: auto !important;
    resize: vertical;
    line-height: 1.5;
}
.pf-app input[type="file"] {
    width: 100%;
    padding: 11px 12px;
    font-size: 13px;
    background: #f8fafc;
    border: 1.5px dashed var(--pf-border-strong);
    border-radius: var(--pf-radius-sm);
    cursor: pointer;
}
.pf-app input:focus,
.pf-app select:focus,
.pf-app textarea:focus {
    border-color: var(--pf-teal);
    box-shadow: 0 0 0 3px rgba(13, 124, 134, 0.15);
}
.pf-app select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7688' d='M1 1l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}
.pf-app .validate { min-height: 0; }

/* ---------- Checkboxes ---------- */
.pf-checks label,
.pf-app .pf-check-line label {
    font-weight: 500;
    color: var(--pf-text);
    font-size: 14px;
}
.pf-app .pf-checks input[type="checkbox"],
.pf-app .pf-check-line input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--pf-teal);
    vertical-align: middle;
    margin-right: 6px;
    cursor: pointer;
}
.pf-checks { display: flex; flex-direction: column; gap: 8px; }
.pf-check-line { padding: 6px 0; }

/* ---------- Founder sub-panel ---------- */
.pf-subpanel {
    background: #f6f8fb;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-sm);
    padding: 20px;
    margin-top: 8px;
}
.pf-subpanel .pf-grid { gap: 14px 20px; }
.pf-btnrow { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.pf-app input#addexist,
.pf-app input#clear {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 11px 26px;
    border-radius: var(--pf-radius-sm);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .3px;
    width: auto;
    min-height: 0;
}
.pf-app input#addexist { background: var(--pf-teal); color: #fff; }
.pf-app input#addexist:hover { background: var(--pf-teal-dark); }
.pf-app input#clear { background: #fff; color: var(--pf-navy); border: 1px solid var(--pf-border-strong); }
.pf-app input#clear:hover { background: #eef1f6; }

/* ---------- Founder table ---------- */
.pf-tablewrap { margin-top: 24px; overflow-x: auto; }
.pf-tablewrap h4 {
    text-align: center;
    color: var(--pf-navy);
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px;
}
.pf-app table.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
}
.pf-app table.table th {
    background: var(--pf-navy);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #1c3a63;
    white-space: nowrap;
}
.pf-app table.table td {
    padding: 10px 12px;
    border: 1px solid var(--pf-border);
    color: var(--pf-text);
}
.pf-app table.table tbody tr:nth-child(even) { background: #f7f9fc; }

/* ---------- Sticky bottom action bar ---------- */
.pf-actionbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--pf-border);
    box-shadow: 0 -6px 24px rgba(13, 36, 71, 0.08);
}
.pf-actionbar__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pf-actionbar__help { font-size: 13px; color: var(--pf-muted); }
.pf-actionbar__help a { color: var(--pf-teal); text-decoration: none; font-weight: 600; }
.pf-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.pf-app .pf-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 26px;
    border-radius: 12px;
    text-decoration: none;
    line-height: 1.1;
    transition: background .15s, box-shadow .15s, transform .05s;
    width: auto;
    min-height: 0;
}
.pf-app .pf-btn:active { transform: translateY(1px); }
.pf-app .pf-btn--primary { background: var(--pf-teal); color: #fff; box-shadow: 0 6px 16px rgba(13, 124, 134, 0.28); }
.pf-app .pf-btn--primary:hover { background: var(--pf-teal-dark); }
.pf-app .pf-btn--ghost { background: #fff; color: var(--pf-navy); border: 1.5px solid var(--pf-border-strong); }
.pf-app .pf-btn--ghost:hover { background: #eef1f6; }
.pf-app .pf-btn--outline { background: #fff; border: 1.5px solid var(--pf-teal); color: var(--pf-teal); }
.pf-app .pf-btn--outline:hover { background: #f0f7f8; }

/* Toast */
.pf-toast {
    position: fixed;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--pf-navy);
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 1000;
}
.pf-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.pf-toast::before { content: "\2713"; color: var(--pf-gold); margin-right: 8px; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .pf-shell { grid-template-columns: 1fr; gap: 20px; }
    .pf-sidebar { position: static; }
    .pf-grid { grid-template-columns: 1fr; }
    .pf-pagehead__inner { flex-direction: column; }
    .pf-help-card { white-space: normal; }
}
@media (max-width: 560px) {
    .pf-section { padding: 20px 16px; }
    .pf-actionbar__inner { justify-content: center; }
    .pf-actionbar__help { width: 100%; text-align: center; }
    .pf-actions { width: 100%; justify-content: center; }
}

/* =====================================================================
   ADDITIVE — KYC form (kyc_form.php)

   kyc_form.php reuses this sheet but its controls still carry the legacy
   WorkWise `.floating-input` / `.floating-select` classes from
   assets/css/style-starter.css (30px tall, borderless, bottom-rule only)
   and three of them use the bogus `type="type"`, which the
   `input[type="text"]` rules above cannot match. The block below restyles
   those classes to match the .pf-* look.

   Founders_portfilo.php contains no `.floating-*` markup, so nothing here
   can affect it. Everything stays scoped under `.pf-app`.
   ===================================================================== */

.pf-app input.floating-input,
.pf-app select.floating-select,
.pf-app textarea.floating-input {
    display: block;
    width: 100% !important;
    height: auto;
    min-height: 46px;
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    color: var(--pf-text);
    background-color: #fff;
    border: 1px solid var(--pf-border-strong);
    border-radius: var(--pf-radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.pf-app textarea.floating-input,
.pf-app textarea.floating-textarea {
    min-height: 110px;
    max-height: none;
    overflow: auto;
    resize: vertical;
    line-height: 1.5;
}

.pf-app input.floating-input:focus,
.pf-app select.floating-select:focus,
.pf-app textarea.floating-input:focus {
    border: 1px solid var(--pf-teal);
    box-shadow: 0 0 0 3px rgba(13, 124, 134, 0.15);
}

.pf-app select.floating-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7688' d='M1 1l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}

.pf-app input[type="file"].floating-input {
    padding: 11px 12px;
    font-size: 13px;
    background-color: #f8fafc;
    border: 1.5px dashed var(--pf-border-strong);
    cursor: pointer;
}

/* leftovers of the floating widget that must not take up space */
.pf-app .highlight { display: none; }
.pf-app label22 { display: none; }

/* ---------- Repeated sub-groups (Founder 1 / 2 / 3) ---------- */
.pf-subpanel + .pf-subpanel { margin-top: 18px; }
.pf-subpanel__title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pf-navy);
}
.pf-subpanel__title::before {
    content: "";
    flex: 0 0 auto;
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--pf-teal);
}
