/* ═══ F&M503 — Shared Subpage Styles ═══ *
 * Navigation + Footer + Back-to-Top
 * https://fm503.com
 * v1.0 — 2026-06-25
 */


    /* ── Portal Nav (dark) ── */
        /* ── Subpage Nav ── */
        .subpage-nav {
            position: fixed; top: 0; left: 0; right: 0; z-index: 100;
            display: flex; align-items: center; justify-content: space-between;
            height: 64px; padding: 0 48px;
            background: rgba(255,255,255,0.92);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid transparent;
            transition: border-color 0.3s ease, background 0.3s ease;
        }
        .subpage-nav.scrolled {
            border-bottom-color: var(--border);
            background: rgba(255,255,255,0.97);
        }
        .subpage-nav-brand {
            font-family: 'Hinge', var(--font-sans);
            font-size: 20px; font-weight: 400;
            letter-spacing: 2px; color: var(--ink);
            text-decoration: none;
        }
        .subpage-nav-links {
            display: flex; align-items: center; gap: 32px; list-style: none;
        }
        .subpage-nav-links a {
            font-size: 11px; font-weight: 400; letter-spacing: 1.5px;
            color: var(--ink-soft); text-decoration: none;
            text-transform: uppercase; position: relative;
            padding-bottom: 4px; transition: color 0.2s ease;
        }
        .subpage-nav-links a::after {
            content: ''; position: absolute; bottom: 0; left: 0;
            width: 0; height: 1px; background: var(--accent);
            transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .subpage-nav-links a:hover,
        .subpage-nav-links a.active {
            color: inherit;
        }
        .subpage-nav-links a:hover::after,
        .subpage-nav-links a.active::after {
            width: 100%;
        }
        .subpage-nav-cta {
            font-size: 10px !important; font-weight: 500 !important;
            letter-spacing: 2px !important; padding: 9px 20px !important;
            border: 1px solid var(--ink); color: var(--ink) !important;
            transition: all 0.25s ease !important; text-decoration: none;
            border-radius: 2px;
        }
        .subpage-nav-cta:hover {
            background: var(--ink) !important;
            color: var(--pure) !important;
        }
        .subpage-nav-cta::after { display: none !important; }

        /* ── Subpage Nav Mobile ── */
        @media (max-width: 768px) {
            .subpage-nav { padding: 0 24px; height: 56px; }
            .subpage-nav-brand { font-size: 17px; letter-spacing: 1.5px; }
            .subpage-nav-toggle { display: flex; }
            .subpage-nav-links {
                display: none; flex-direction: column; gap: 0;
                position: fixed; top: 56px; left: 0; right: 0;
                background: rgba(255,255,255,0.98);
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
                padding: 12px 24px 20px;
                border-bottom: 1px solid var(--border);
                z-index: 199;
            }
            .subpage-nav-links.open { display: flex; }
            .subpage-nav-links a {
                padding: 14px 0; font-size: 13px; letter-spacing: 2px;
                border-bottom: 1px solid var(--border-light);
            }
            .subpage-nav-links a::after { display: none; }
        }
        .subpage-nav-toggle {
            display: none; background: none; border: none;
            cursor: pointer; width: 20px; height: 14px;
            flex-direction: column; justify-content: space-between;
            z-index: 201; padding: 0;
        }
        .subpage-nav-toggle span {
            display: block; width: 100%; height: 1px;
            background: var(--ink); transition: all 0.3s ease;
        }


        /* ── Footer (unified) ── */
        .footer-links {
            max-width: 400px; margin: 0 auto 20px auto;
            display: flex; flex-direction: column; align-items: center;
            gap: 4px;
        }
        .footer-links a {
            font-size: 12px; color: rgba(255,255,255,0.5);
            text-decoration: none; padding: 2px 0;
            transition: color 0.2s;
        }
        .footer-links a:hover { color: rgba(255,255,255,0.85); }
        .footer-links .footer-text {
            font-size: 12px; color: rgba(255,255,255,0.4);
            padding: 2px 0;
        }
        .footer-divider {
            width: 20px; height: 1px;
            background: rgba(255,255,255,0.1);
            margin: 8px 0;
            align-self: center;
        }
        .footer-grid, .footer-col-title { display: none; }
        
.subpage-nav-toggle-subnav{display:none;background:none;border:none;cursor:pointer;width:20px;height:14px;flex-direction:column;justify-content:space-between;z-index:201;padding: 0}
.subpage-nav-toggle-subnav span{display:block;width:100%;height:1px;background:var(--ink)}
@media(max-width:768px){.subpage-nav-toggle-subnav{display:flex}}

    /* ── Password change modal ── */
    .pwd-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.65);
        z-index: 300; display: flex; align-items: center;
        justify-content: center; padding: 20px;
    }
    .pwd-overlay.hidden { display: none; }
    .pwd-modal {
        background: var(--pure); border-radius: var(--r); padding: 32px;
        width: 100%; max-width: 380px;
    }
    .pwd-modal h3 {
        font-family: var(--font-serif); font-size: 20px; font-weight: 400;
        margin-bottom: 8px;
    }
    .pwd-modal .sub {
        font-size: 12px; color: var(--ink-fine); margin-bottom: 20px;
    }
    .pwd-modal label {
        display: block; font-size: 10px; letter-spacing: 1px;
        color: var(--ink-fine); margin-bottom: 4px; font-weight: 400;
    }
    .pwd-modal input {
        width: 100%; padding: 12px 14px; border: 1px solid var(--border);
        border-radius: var(--r); font-size: 14px; font-family: var(--font-sans);
        margin-bottom: 14px; outline: none; background: var(--pure);
        transition: border-color 0.2s;
    }
    .pwd-modal input:focus { border-color: var(--ink); }
    .pwd-modal .btn {
        width: 100%; padding: 12px; border: none; border-radius: var(--r);
        font-size: 12px; letter-spacing: 0.5px; cursor: pointer;
        background: var(--ink); color: var(--pure);
        font-family: var(--font-sans);
    }
    .pwd-modal .btn:disabled { opacity: 0.5; cursor: default; }
    .pwd-modal .msg { font-size: 11px; margin-top: 10px; display: none; }
    .pwd-modal .msg.show { display: block; }
    .pwd-modal .msg.err { color: #ff3b30; }
    .pwd-modal .msg.ok { color: var(--ink); }
    @media (max-width: 480px) {
        .pwd-modal { padding: 28px 22px; max-width: calc(100vw - 32px); }
    }




/* ── Back to Top ── */
#backToTop {
    position: fixed; bottom: 24px; right: 24px;
    width: 40px; height: 40px;
    border-radius: 20px;
    background: var(--ink);
    color: var(--pure);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer; border: none;
    z-index: 50; font-size: 16px;
}
#backToTop.visible {
    opacity: 1; visibility: visible;
}
/* ═══ Top Navigation (admin pages — in-flow, not fixed) ═══ */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 48px;
}
.nav-brand {
    font-family: "Hinge", var(--font-sans);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 2px;
    color: inherit;
}
.nav-brand a {
    color: inherit;
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav-links a {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: var(--ink-soft);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}
.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav-links a:hover,
.nav-links a.active {
    color: inherit;
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 24px;
        height: 56px;
    }
    .nav-brand {
        font-size: 17px;
        letter-spacing: 1.5px;
    }
    .nav-links {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .top-nav {
        padding: 0 12px;
        height: 44px;
    }
    .nav-brand {
        font-size: 14px;
    }
    .nav-links {
        gap: 2px;
    }
    .nav-links a {
        font-size: 10px;
        padding: 4px 8px;
        letter-spacing: 0;
    }
}
