:root {
    --ff-red: #e62e35;
    --ff-navy: #161b2e;
    --ff-ink: #1a2033;
    --ff-blue: #3d85e6;
    --ff-orange: #f58220;
    --ff-bg: #f4f6fb;
    --ff-surface: #ffffff;
    --ff-text: #1a2033;
    --ff-muted: #5c6478;
    --ff-border: #e3e7f0;
    --ff-sidebar: #161b2e;
    --ff-sidebar-text: #f7f8fc;
    --ff-hero: #161b2e;
    --ff-shadow: 0 16px 40px rgba(22, 27, 46, 0.08);
    --ff-radius: 18px;
}

* { box-sizing: border-box; }

html {
    height: 100%;
}
html, body {
    min-height: 100%;
}
body.ff-client {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body.ff-client > main {
    flex: 1 1 auto;
    width: 100%;
}

body {
    font-family: Outfit, "Segoe UI", sans-serif;
    background: var(--ff-bg);
    color: var(--ff-text);
}

a { color: var(--ff-red); text-decoration: none; }
a:hover { color: #c41f27; }

.ff-btn-primary,
.btn.ff-btn-primary {
    background: var(--ff-red);
    border-color: var(--ff-red);
    color: #fff;
    font-weight: 600;
}
.ff-btn-primary:hover,
.btn.ff-btn-primary:hover {
    background: #c41f27;
    border-color: #c41f27;
    color: #fff;
}

.ff-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.ff-sidebar {
    background: var(--ff-sidebar);
    color: var(--ff-sidebar-text);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.ff-brand img {
    display: block;
    width: 100%;
    max-width: 210px;
    max-height: 96px;
    object-fit: contain;
    height: auto;
}

.ff-nav { display: grid; gap: 6px; }
.ff-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.78);
    padding: 10px 12px;
    border-radius: 12px;
}
.ff-nav-link:hover,
.ff-nav-link.is-active {
    background: rgba(230, 46, 53, .18);
    color: #fff;
}

.ff-who {
    margin-top: auto;
    font-size: .92rem;
}
.ff-who span {
    display: block;
    opacity: .7;
    margin: 4px 0 12px;
}

.ff-main { padding: 28px 36px 48px; }
.ff-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}
.ff-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    color: var(--ff-muted);
}
.ff-topbar h1 { font-size: 1.7rem; margin: 0; }

.ff-card {
    background: var(--ff-surface);
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius);
    box-shadow: var(--ff-shadow);
    padding: 24px;
}
.ff-card h2 { font-size: 1.15rem; margin-bottom: 10px; }

.ff-stat {
    background: var(--ff-surface);
    border-radius: var(--ff-radius);
    padding: 22px;
    box-shadow: var(--ff-shadow);
    border: 1px solid var(--ff-border);
}
.ff-stat span { color: var(--ff-muted); display: block; }
.ff-stat strong { font-size: 1.35rem; }

.ff-help {
    background: color-mix(in srgb, var(--ff-red) 8%, var(--ff-surface));
    border: 1px solid color-mix(in srgb, var(--ff-red) 22%, var(--ff-border));
    border-radius: 14px;
    margin-bottom: 18px;
}
.ff-help summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-weight: 600;
}
.ff-help summary::-webkit-details-marker { display: none; }
.ff-help-chevron { margin-left: auto; transition: transform .2s ease; }
.ff-help[open] .ff-help-chevron { transform: rotate(180deg); }
.ff-help-body { padding: 0 16px 16px; }
.ff-help-body h3 { font-size: 1rem; margin-top: 12px; }
.ff-alert { border-radius: 12px; }

.ff-table { background: var(--ff-surface); }
.ff-table th { color: var(--ff-muted); font-weight: 600; }
.ff-preview { max-height: 88px; width: auto; }
.ff-preview-sm { max-height: 48px; }

.ff-theme-swatches { display: flex; gap: 8px; margin-bottom: 14px; }
.ff-theme-swatches span {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--ff-border);
}
.ff-theme-swatches span:nth-child(1) { background: var(--swatch-a); }
.ff-theme-swatches span:nth-child(2) { background: var(--swatch-b); }
.ff-theme-swatches span:nth-child(3) { background: var(--swatch-c); }

.ff-guest {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
        radial-gradient(circle at top left, rgba(230,46,53,.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(61,133,230,.16), transparent 26%),
        var(--ff-bg);
}
.ff-guest-card {
    width: min(440px, 100%);
    background: var(--ff-surface);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: var(--ff-shadow);
}
.ff-guest-logo { display: block; width: min(280px, 100%); margin: 0 auto 8px; }
.ff-guest-tagline { text-align: center; color: var(--ff-muted); font-size: .92rem; margin-bottom: 24px; }

.ff-client-nav {
    background: var(--ff-surface);
    border-bottom: 1px solid var(--ff-border);
}
.ff-client-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 76px;
}
.ff-client-brand img { height: 52px; width: auto; }
.ff-client-menu,
.ff-menu-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.ff-client-nav .ff-menu-item,
.ff-client-menu .ff-menu-item,
.ff-client-menu button.ff-menu-item {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    font: inherit;
    font-weight: 500;
    line-height: 1.2;
    color: var(--ff-text);
    text-decoration: none;
    cursor: pointer;
    padding: 0;
}
.ff-client-nav .ff-menu-item:hover { color: var(--ff-red); }
.ff-client-nav .ff-menu-item.is-logout { color: #c41f27; }
.ff-client-nav .ff-menu-item.is-logout:hover { color: #9a151c; }

.ff-menu-links .ff-client-menu { gap: 18px; }
.ff-menu-links .ff-menu-item.is-active { color: var(--ff-red); }
.ff-menu-links .ff-menu-item.is-admin { color: var(--ff-red); font-weight: 600; }

.ff-menu-pills .ff-menu-item {
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef1f7;
    color: var(--ff-text);
}
.ff-menu-pills .ff-menu-item:hover,
.ff-menu-pills .ff-menu-item.is-active {
    background: color-mix(in srgb, var(--ff-red) 12%, #fff);
    color: var(--ff-red);
}
.ff-menu-pills .ff-menu-item.is-logout {
    background: color-mix(in srgb, var(--ff-red) 16%, #fff);
    color: #c41f27;
}
.ff-menu-pills .ff-menu-item.is-admin {
    background: var(--ff-red);
    color: #fff;
}

.ff-menu-bar {
    background: var(--ff-navy);
    border-bottom: 0;
}
.ff-menu-bar .ff-client-menu {
    background: rgba(255,255,255,.06);
    padding: 6px;
    border-radius: 14px;
}
.ff-menu-bar .ff-menu-item {
    color: rgba(255,255,255,.86);
    padding: 8px 14px;
    border-radius: 10px;
}
.ff-menu-bar .ff-menu-item:hover,
.ff-menu-bar .ff-menu-item.is-active {
    background: rgba(255,255,255,.1);
    color: #fff;
}
.ff-menu-bar .ff-menu-item.is-logout {
    color: #ffb3b6;
}
.ff-menu-bar .ff-menu-item.is-logout:hover {
    background: rgba(230,46,53,.28);
    color: #fff;
}
.ff-menu-bar .ff-menu-item.is-admin {
    background: var(--ff-red);
    color: #fff;
}

.ff-hero {
    background: var(--ff-hero);
    color: #fff;
    text-align: center;
    padding: 88px 16px 72px;
}
.ff-hero-mark { width: 88px; margin-bottom: 16px; }
.ff-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; }
.ff-hero h1 span { color: var(--ff-red); }
.ff-hero-lead { color: rgba(255,255,255,.78); font-size: 1.15rem; margin-bottom: 24px; }
.ff-accent { color: var(--ff-red); }
.ff-footer {
    padding: 28px 0;
    color: var(--ff-muted);
    text-align: center;
}
.ff-site-footer {
    background: var(--ff-navy);
    color: rgba(255,255,255,.82);
    padding: 56px 0 0;
    margin-top: auto;
}
.ff-site-footer a { color: #fff; text-decoration: none; }
.ff-site-footer a:hover { color: #ffb3b6; }
.ff-site-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
    gap: 32px 24px;
    padding-bottom: 36px;
}
.ff-site-footer-brand img { height: 48px; width: auto; margin-bottom: 12px; }
.ff-site-footer-brand p { color: rgba(255,255,255,.68); margin-bottom: 16px; }
.ff-site-footer h2 {
    color: #fff;
    font-size: .92rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 14px;
}
.ff-site-footer ul { list-style: none; padding: 0; margin: 0; }
.ff-site-footer li { margin-bottom: 8px; }
.ff-site-footer-meta { font-size: .92rem; }
.ff-site-footer-meta a { color: #ffb3b6; }
.ff-site-footer-trust { margin-top: 16px; }
.ff-site-footer-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.78);
}
.ff-site-footer-trust i { color: #7ddea0; }
.ff-site-footer-trust li:nth-child(2) i { color: #6aa6ff; }
.ff-site-footer-trust li:nth-child(3) i { color: #f5c14a; }
.ff-site-footer-social {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #1877f2;
    margin-top: 14px;
}
.ff-site-footer-social:hover { color: #fff; opacity: .9; }
.ff-site-footer-bar {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 16px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: rgba(255,255,255,.62);
    font-size: .88rem;
}
.ff-site-footer-bar p { margin: 0; }
.ff-site-footer-bar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.ff-site-footer-bar li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.ff-site-footer-bar i { color: #7ddea0; }

@media (max-width: 1100px) {
    .ff-site-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .ff-shell { grid-template-columns: 1fr; }
    .ff-sidebar { min-height: auto; }
    .ff-main { padding: 20px 16px 40px; }
    .ff-client-nav-inner { flex-direction: column; gap: 10px; padding: 12px 0; }
    .ff-site-footer-grid { grid-template-columns: 1fr; }
    .ff-site-footer { padding-top: 36px; }
}

.ff-help-open { padding: 16px; }
.ff-install {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(230,46,53,.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(61,133,230,.14), transparent 28%),
        var(--ff-bg);
    padding: 32px 16px 64px;
}
.ff-install-wrap { width: min(860px, 100%); margin: 0 auto; }
.ff-install-brand { text-align: center; margin-bottom: 22px; }
.ff-install-brand img { width: min(280px, 80%); }
.ff-install-brand p { color: var(--ff-muted); margin: 8px 0 0; }
.ff-install-card {
    background: var(--ff-surface);
    border-radius: 24px;
    box-shadow: var(--ff-shadow);
    padding: 32px;
}
.ff-install-hero { text-align: center; margin-bottom: 24px; }
.ff-install-hero img { width: 72px; margin-bottom: 12px; }
.ff-install-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 28px;
}
.ff-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}
.ff-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ff-muted);
    font-size: .88rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
}
.ff-steps li span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #d9deea;
    color: #1a2033;
    font-weight: 700;
    font-size: .75rem;
}
.ff-steps li.is-done span { background: #c8f0d4; }
.ff-steps li.is-current { color: var(--ff-text); font-weight: 600; }
.ff-steps li.is-current span { background: var(--ff-red); color: #fff; }
.ff-checks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.ff-checks li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7f8fc;
}
.ff-checks li span { display: block; color: var(--ff-muted); font-size: .92rem; }
.ff-checks .is-ok i { color: #198754; }
.ff-checks .is-bad { background: #fff2f2; }
.ff-checks .is-bad i { color: var(--ff-red); }
.ff-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ff-choice {
    border: 2px solid var(--ff-border);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    display: grid;
    gap: 6px;
}
.ff-choice strong { font-size: 1.05rem; }
.ff-choice span { color: var(--ff-muted); }
.ff-choice:has(input:checked) { border-color: var(--ff-red); box-shadow: 0 0 0 4px rgba(230,46,53,.12); }
.ff-choice input { margin-bottom: 6px; }
.ff-summary { display: grid; gap: 10px; margin: 0; }
.ff-summary > div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ff-border);
}
.ff-summary dt { color: var(--ff-muted); font-weight: 500; }
.ff-summary dd { margin: 0; font-weight: 600; }
@media (max-width: 700px) {
    .ff-choice-grid { grid-template-columns: 1fr; }
    .ff-summary > div { grid-template-columns: 1fr; }
    .ff-install-card { padding: 22px 16px; }
}
