:root {
    --page: #0b1422;
    --surface: #111d2d;
    --surface-raised: #17263a;
    --surface-hover: #1d3048;
    --line: #2a3d55;
    --text: #eef4ff;
    --muted: #95a8bf;
    --accent: #7db5ff;
    --accent-soft: rgba(125,181,255,.13);
    --radius: 14px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.cfm-home {
    margin: 0;
    background:
        radial-gradient(900px 520px at 15% 0%, rgba(63, 114, 172, .16), transparent 62%),
        linear-gradient(180deg, #0b1422 0%, #0a1320 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

.container { width: min(100% - 36px, 1180px); margin-inline: auto; }

.skip-link {
    position: fixed; inset-inline-start: 12px; top: 10px; z-index: 1000;
    padding: 8px 12px; border-radius: 9px; background: #fff; color: #111;
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(11,20,34,.94);
    backdrop-filter: blur(12px);
}

.site-header-inner {
    min-height: 78px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 13px 0;
}

.identity { display: flex; align-items: center; gap: 13px; min-width: 0; }

.identity-icon {
    display: grid; place-items: center;
    width: 46px; height: 46px; flex: 0 0 auto;
    border: 1px solid #36547a;
    border-radius: 13px;
    background: #1b3351;
    color: var(--accent);
    font-size: 21px;
}

.identity h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 760;
    letter-spacing: -.025em;
}

.context { margin-top: 2px; color: var(--muted); font-size: 13px; }

.header-actions {
    display: flex; align-items: center; justify-content: flex-end;
    flex-wrap: wrap; gap: 9px;
}

.logout-form { margin: 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 41px; padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-raised);
    color: var(--text);
    font-size: 13px;
    font-weight: 680;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease;
}

.btn:hover { background: var(--surface-hover); border-color: #456381; color: var(--text); }
.btn.primary { background: #316da9; border-color: #528dd1; color: #fff; }
.btn.primary:hover { background: #3d80c0; }
.btn.large { min-height: 46px; padding-inline: 18px; }

.input {
    min-height: 41px;
    border: 1px solid #3b516b;
    border-radius: 10px;
    background: #14243a;
    color: var(--text);
    padding: 8px 34px 8px 11px;
    outline: 0;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input option { background: #14243a; color: #fff; }
.language-select { min-width: 132px; }

.home-content {
    display: grid;
    gap: 18px;
    padding: 34px 0 54px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.home-hero {
    min-height: 300px;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.home-hero-main {
    display: flex; align-items: center; gap: 20px; min-width: 0;
}

.brand-mark {
    display: grid; place-items: center;
    width: 76px; height: 76px; flex: 0 0 auto;
    border: 1px solid #36547a;
    border-radius: 20px;
    background: #1b3351;
    color: var(--accent);
    font-size: 34px;
}

.eyebrow {
    color: var(--muted);
    font-size: 12px;
    font-weight: 740;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-bottom: 6px;
}

.home-hero h2 {
    margin: 0;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.04;
    letter-spacing: -.045em;
    font-weight: 780;
}

.home-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.quick-card {
    min-height: 112px;
    display: flex; align-items: center; gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 720;
}
.quick-card:hover { background: var(--surface-hover); border-color: #456381; }
.quick-card i { color: var(--accent); font-size: 20px; }

.compact-panel { max-width: 760px; }
.panel-top {
    padding: 16px 19px;
    border-bottom: 1px solid var(--line);
}
.panel-top h2 { margin: 0; font-size: 15px; font-weight: 730; }
.panel-body { padding: 19px; }
.data-pair {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; font-size: 13px;
}
.data-pair span { color: var(--muted); }
.data-pair code { color: #d7e8ff; }

@media (max-width: 760px) {
    .container { width: min(100% - 28px, 1180px); }
    .site-header-inner { align-items: flex-start; }
    .home-hero { min-height: auto; padding: 24px; flex-direction: column; align-items: stretch; }
    .home-hero-main { align-items: flex-start; }
    .brand-mark { width: 60px; height: 60px; border-radius: 16px; font-size: 27px; }
    .quick-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .site-header-inner { flex-direction: column; }
    .header-actions { width: 100%; justify-content: flex-start; }
    .language-select { flex: 1 1 140px; }
    .home-hero-main { flex-direction: column; }
}


/* CFM shared footer */

body.cfm-home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.cfm-home > main.home-content {
    flex: 1 0 auto;
}

.site-footer {
    margin-top: auto;
    background: #0a1320;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-footer-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.site-footer-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
}

.site-footer-brand i {
    color: var(--accent);
    font-size: 17px;
}

.site-footer-copyright {
    font-size: 12px;
    color: var(--muted);
}

.site-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s ease;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
    color: var(--accent);
}

@media (max-width: 640px) {
    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .site-footer-meta {
        gap: 8px;
    }

    .site-footer-links {
        gap: 16px;
    }
}