/* ═══════════════════════════════════════════════════════════════════════════
   BMA Trainer – Design System
   firefightervr.de | northdocks.com
   DIN 14675-1:2020-01 compliant simulation
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
    /* Brand */
    --brand-red: #e63946;
    --brand-orange: #f4a261;
    --brand-yellow: #ffd166;
    --brand-green: #06d6a0;
    --brand-blue: #118ab2;

    /* Surfaces */
    --bg-base: #0a0c0f;
    --bg-surface: #12161c;
    --bg-card: #1a1f28;
    --bg-panel: #1e2530;
    --bg-input: #252c38;
    --bg-hover: #2a3340;

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 255, 255, 0.2);

    /* Text */
    --text-primary: #f0f2f5;
    --text-secondary: #8b95a5;
    --text-muted: #4a5568;

    /* LED & alarm colors */
    --led-off: #1a1f28;
    --led-red: #ff2d2d;
    --led-red-glow: rgba(255, 45, 45, 0.6);
    --led-yellow: #ffca00;
    --led-yellow-glow: rgba(255, 202, 0, 0.5);
    --led-green: #00e676;
    --led-green-glow: rgba(0, 230, 118, 0.5);
    --led-blue: #2196f3;

    /* Timing */
    --trans: 0.2s ease;
    --trans-slow: 0.4s ease;

    /* Shadows – flat */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ── App-mode: full-screen no-scroll layout for training pages ───────────── */
body.app-mode {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* The content area that fills remaining screen under the header */
.app-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1rem 0;
    min-height: 0;
}

/* A scrollable column / panel inside app-content */
.scrollable {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.scrollable::-webkit-scrollbar {
    width: 4px;
}

.scrollable::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: border-color var(--trans);
}

.card:hover {
    border-color: var(--border-active);
}

.card-sm {
    padding: 0.85rem;
    border-radius: 8px;
}

/* ── Global Buttons ───────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--brand-red);
    color: #fff;
}

.btn-primary:hover {
    background: #c62828;
}

.btn-secondary {
    background: var(--bg-panel);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-green {
    background: var(--brand-green);
    color: #000;
}

.btn-green:hover {
    filter: brightness(1.08);
}

.btn-warn {
    background: var(--brand-yellow);
    color: #000;
}

.btn-warn:hover {
    filter: brightness(1.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    border-radius: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ── Form elements ────────────────────────────────────────────────────────── */
input,
select,
textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.6rem 0.9rem;
    width: 100%;
    transition: var(--trans);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(17, 138, 178, 0.2);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-group {
    margin-bottom: 1rem;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-red {
    background: rgba(230, 57, 70, 0.2);
    color: #ff6b6b;
}

.badge-yellow {
    background: rgba(255, 202, 0, 0.2);
    color: #ffd166;
}

.badge-green {
    background: rgba(6, 214, 160, 0.15);
    color: #06d6a0;
}

.badge-gray {
    background: var(--bg-panel);
    color: var(--text-secondary);
}

/* ── Header / Nav ─────────────────────────────────────────────────────────── */
.app-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.app-logo .logo-icon {
    width: 34px;
    height: 34px;
    background: var(--brand-red);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.app-logo .logo-text {
    font-size: 1rem;
    font-weight: 700;
}

.app-logo .logo-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

/* ── Status Bar ───────────────────────────────────────────────────────────── */
.status-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.online {
    background: var(--led-green);
    box-shadow: 0 0 8px var(--led-green-glow);
}

.status-dot.alarm {
    background: var(--led-red);
    box-shadow: 0 0 8px var(--led-red-glow);
    animation: pulse-red 1s infinite;
}

/* ── LED Component ────────────────────────────────────────────────────────── */
.led-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
}

.led {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--led-off);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: var(--trans);
    position: relative;
}

.led.on-red {
    background: var(--led-red);
    box-shadow: 0 0 6px var(--led-red-glow);
}

.led.on-yellow {
    background: var(--led-yellow);
    box-shadow: 0 0 6px var(--led-yellow-glow);
}

.led.on-green {
    background: var(--led-green);
    box-shadow: 0 0 6px var(--led-green-glow);
}

.led.blink {
    animation: blink 0.8s step-end infinite;
}

.led-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.led-label.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* ── FBF / FAT Panel Styling ─────────────────────────────────────────────── */
.device-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}

.device-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* FBF Button – flat */
.fbf-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--trans), border-color var(--trans);
    color: var(--text-primary);
    user-select: none;
}

.fbf-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
}

.fbf-btn:active {
    opacity: 0.8;
}

.fbf-btn.active {
    border-color: var(--brand-yellow);
    background: rgba(255, 202, 0, 0.06);
}

.fbf-btn .btn-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--led-off);
    transition: var(--trans);
}

.fbf-btn .btn-led.on {
    background: var(--led-yellow);
}

.fbf-btn .btn-led.red {
    background: var(--led-red);
}

.fbf-btn-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.fbf-btn:hover .fbf-btn-label {
    color: var(--text-primary);
}

/* FBF Grid layout */
.fbf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* ── FAT Display (7-segment style) ──────────────────────────────────────────  */
.fat-display {
    background: #0d1117;
    border: 2px solid #2d3748;
    border-radius: 10px;
    padding: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    min-height: 120px;
}

.fat-display .fat-header {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.fat-alarm-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fat-alarm-entry:last-child {
    border-bottom: none;
}

.fat-mg {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--led-red);
    min-width: 80px;
}

.fat-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.fat-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1.5rem 0;
}

.fat-standby {
    color: var(--led-green);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Log Panel ────────────────────────────────────────────────────────────── */
.log-panel {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    height: 260px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.log-entry {
    display: grid;
    grid-template-columns: 60px 80px 1fr;
    gap: 0.75rem;
    padding: 0.3rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    animation: fadeIn 0.3s ease;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-muted);
}

.log-actor {
    color: var(--brand-orange);
    font-weight: 600;
}

.log-text {
    color: var(--text-secondary);
}

.log-panel::-webkit-scrollbar {
    width: 4px;
}

.log-panel::-webkit-scrollbar-track {
    background: transparent;
}

.log-panel::-webkit-scrollbar-thumb {
    background: var(--border-active);
    border-radius: 4px;
}

/* ── Melder Trigger Grid (Leitung) ───────────────────────────────────────── */
.melder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.6rem;
}

.melder-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--trans);
}

.melder-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--brand-red);
    transform: scale(1.03);
}

.melder-btn:active {
    transform: scale(0.97);
}

.melder-btn.active {
    background: rgba(230, 57, 70, 0.2);
    border-color: var(--brand-red);
    color: #ff6b6b;
}

.melder-btn .mg-num {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ── Alarm Banner ─────────────────────────────────────────────────────────── */
.alarm-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.85rem 1.5rem;
    background: var(--led-red);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 999;
    animation: alarmSlide 0.4s ease;
    box-shadow: 0 4px 24px rgba(255, 45, 45, 0.5);
}

.alarm-banner.voralarm {
    background: var(--led-yellow);
    color: #000;
}

.alarm-banner .alarm-mg {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-family: 'JetBrains Mono', monospace;
}

/* ── Toast / Fehler ───────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2d1515;
    border: 1px solid var(--brand-red);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #ff6b6b;
    font-size: 0.9rem;
    max-width: 340px;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.success {
    background: #0d2416;
    border-color: var(--brand-green);
    color: var(--brand-green);
}

/* ── FSD Panel ────────────────────────────────────────────────────────────── */
.fsd-panel {
    background: linear-gradient(145deg, #1c1810, #1a1f28);
    border: 2px solid #3d3520;
    border-radius: 14px;
    padding: 1.25rem;
}

.fsd-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--led-off);
    border: 3px solid #3d3520;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0.75rem auto;
    transition: var(--trans-slow);
}

.fsd-indicator.open {
    background: rgba(255, 202, 0, 0.15);
    border-color: var(--led-yellow);
    box-shadow: 0 0 24px var(--led-yellow-glow);
}

/* ── Laufkarten Viewer ────────────────────────────────────────────────────── */
.laufkarte-list {
    display: grid;
    gap: 0.75rem;
}

.laufkarte-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--trans);
}

.laufkarte-item:hover {
    background: var(--bg-hover);
    border-color: var(--brand-blue);
}

.laufkarte-item .lk-mg {
    background: rgba(17, 138, 178, 0.2);
    color: var(--brand-blue);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 48px;
    text-align: center;
}

.laufkarte-viewer-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: fadeIn 0.2s ease;
}

.laufkarte-viewer-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 95vw;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.laufkarte-viewer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.laufkarte-viewer-body {
    flex: 1;
    overflow: auto;
}

.laufkarte-viewer-body iframe,
.laufkarte-viewer-body img {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 60vh;
    display: block;
}

/* ── Upload Zone ──────────────────────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--trans);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--brand-blue);
    background: rgba(17, 138, 178, 0.05);
}

.upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* ── Connection code ──────────────────────────────────────────────────────── */
.connect-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--brand-green);
    text-align: center;
    background: rgba(6, 214, 160, 0.1);
    border: 1px solid rgba(6, 214, 160, 0.3);
    border-radius: 12px;
    padding: 1rem 2rem;
}

/* ── Page layout helpers ──────────────────────────────────────────────────── */
.page-wrap {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

.section-title {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes pulse-red {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes alarmSlide {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    border-top-color: var(--brand-blue);
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ── Nav Links ─────────────────────────────────────────────────────────────── */
.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: var(--trans);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ── Site Footer ───────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
}

.site-footer .footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
}

.footer-brand .footer-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    text-decoration: none;
    color: inherit;
}

.footer-brand .fl-icon {
    width: 36px;
    height: 36px;
    background: var(--brand-red);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 0 14px rgba(230, 57, 70, 0.35);
    flex-shrink: 0;
}

.footer-brand .fl-text {
    font-size: 0.95rem;
    font-weight: 700;
}

.footer-brand .fl-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: block;
}

.footer-brand p {
    font-size: 0.79rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 220px;
    margin-top: 0.25rem;
}

.footer-col h5 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col ul li a {
    font-size: 0.81rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--trans);
}

.footer-col ul li a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    max-width: 1280px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-bottom p {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.footer-bottom .footer-badges {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.footer-badge {
    font-size: 0.67rem;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    color: var(--text-muted);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .fbf-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 540px) {
    .page-wrap {
        padding: 1rem;
    }

    .fbf-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fbf-btn-label {
        font-size: 0.65rem;
    }

    .site-footer .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}