.fm-page { max-width: 1240px; margin: 0 auto; padding: 32px 20px 56px; display: grid; gap: 24px; }
.fm-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fm-head h1 { margin: 0 0 4px; color: #fff; font-size: 1.75rem; font-weight: 800; }
.fm-head p { margin: 0; color: #c7ccd3; }
.fm-crumb { display: inline-block; margin-bottom: 6px; color: #5cc3ff; font-size: .85rem; text-decoration: none; }
.fm-crumb:hover { color: #fff; }
.fm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fm-section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: #fff; font-size: 1.05rem; font-weight: 700; }
.fm-count { min-width: 26px; padding: 1px 8px; background: #2a2f37; border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 700; text-align: center; }

.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.fm-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: #1a1a1a; border: 1px solid #333; border-radius: 12px; }
.fm-card.is-urgent { border-color: #ffb020; }
.fm-card.is-closed { background: #141414; }
.fm-card h2, .fm-card h3 { margin: 0; color: #fff; font-size: 1.08rem; font-weight: 700; }
.fm-card p { margin: 0; color: #c7ccd3; font-size: .9rem; line-height: 1.5; }
.fm-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fm-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.fm-meta { color: #c7ccd3; font-size: .82rem; }

.fm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fm-stat { padding: 8px 6px; background: #101215; border-radius: 8px; text-align: center; }
.fm-stat b { display: block; color: #fff; font-size: 1.25rem; line-height: 1.2; }
.fm-stat span { color: #c7ccd3; font-size: .75rem; }
.fm-stat.is-alert b { color: #ffc861; }

.fm-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; background: #101215; border: 1px solid #333; border-radius: 8px; }
.fm-code span { color: #c7ccd3; font-size: .78rem; }
.fm-code strong { display: block; color: #fff; font-size: 1.15rem; letter-spacing: 3px; }

.fm-progress { height: 7px; overflow: hidden; background: #2a2f37; border-radius: 4px; }
.fm-progress i { display: block; height: 100%; background: #00a8ff; border-radius: 4px; }
.fm-progress-label { display: flex; justify-content: space-between; margin-bottom: 5px; color: #c7ccd3; font-size: .8rem; }

.fm-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
.fm-pill.none { background: #2a2f37; color: #d7dbe0; }
.fm-pill.draft { background: #16324a; color: #9fd8ff; }
.fm-pill.submitted { background: #4a3408; color: #ffd17a; }
.fm-pill.corrected { background: #123d28; color: #7fe3ad; }
.fm-pill.closed { background: #4a1c1f; color: #ffb3b6; }
a.fm-pill:hover { filter: brightness(1.25); }

.fm-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #15181c; border: 1px solid #2a2f37; border-radius: 10px; }
.fm-tabs .nav-link { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 7px; background: none; color: #d7dbe0; font-weight: 600; }
.fm-tabs .nav-link:hover { background: #22262c; color: #fff; }
.fm-tabs .nav-link:focus { color: #fff; }
.fm-tabs .nav-link.active, .fm-tabs .nav-link.active:hover, .fm-tabs .nav-link.active:focus { background: #00a8ff; color: #06131c; }
.fm-tabs .nav-link.active .fm-count { background: #06131c; color: #fff; }

.fm-list { display: grid; gap: 8px; }
.fm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; background: #1a1a1a; border: 1px solid #333; border-radius: 10px; }
.fm-row b { display: block; color: #fff; }
.fm-row span.fm-meta { display: block; }

.fm-empty { padding: 40px 20px; background: #15181c; border: 1px dashed #3a4048; border-radius: 12px; text-align: center; }
.fm-empty i { margin-bottom: 10px; color: #5cc3ff; font-size: 1.8rem; }
.fm-empty h3 { margin: 0 0 4px; color: #fff; font-size: 1.05rem; font-weight: 700; }
.fm-empty p { margin: 0; color: #c7ccd3; }

.fm-matrix-wrap { overflow-x: auto; background: #1a1a1a; border: 1px solid #333; border-radius: 12px; }
.fm-matrix { width: 100%; border-collapse: collapse; }
.fm-matrix th, .fm-matrix td { padding: 11px 12px; border-bottom: 1px solid #2a2f37; color: #fff; text-align: center; white-space: nowrap; }
.fm-matrix thead th { max-width: 170px; overflow: hidden; color: #d7dbe0; font-size: .82rem; font-weight: 700; text-overflow: ellipsis; }
.fm-matrix tbody th { position: sticky; left: 0; background: #1a1a1a; font-weight: 600; text-align: left; }
.fm-matrix thead th:first-child { position: sticky; left: 0; background: #1a1a1a; text-align: left; }
.fm-matrix tr:last-child th, .fm-matrix tr:last-child td { border-bottom: 0; }
.fm-matrix small { display: block; color: #c7ccd3; font-weight: 400; }

.fm-side { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.fm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-chip { padding: 4px 10px; background: #22262c; border-radius: 999px; color: #fff; font-size: .82rem; }
.fm-notice { padding: 11px 14px; background: #123044; border: 1px solid #1f5b80; border-radius: 9px; color: #d6efff; }
.fm-notice.is-error { background: #41181b; border-color: #7f2f34; color: #ffd8da; }

@media (max-width: 900px) {
  .fm-side { grid-template-columns: minmax(0, 1fr); }
  .fm-grid { grid-template-columns: minmax(0, 1fr); }
}
