/* 3DPartner · Real Finance Modules UI */
.fm-root {
  display: grid;
  gap: 16px;
  color: var(--ink, #1f2d3d);
}
.fm-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.fm-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}
.fm-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted, #59697a);
  max-width: 78ch;
  line-height: 1.5;
}
.fm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--line, #dce3ed);
  background: var(--soft, #f4f7fc);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.fm-badge.ok {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}
.fm-badge.warn, .fm-badge.attention {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.fm-badge.muted, .fm-badge.empty {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.fm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.fm-card {
  display: grid;
  gap: 8px;
  align-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line, #dce3ed);
  border-radius: 9px;
  background: var(--surface, #fff);
}
.fm-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.fm-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}
.fm-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted, #59697a);
  line-height: 1.45;
}
.fm-notice {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line, #dce3ed);
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.5;
}
.fm-notice.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.fm-notice.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.fm-notice.ok {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}
.fm-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fm-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fm-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fm-section-title {
  margin: 4px 0 8px;
  font-size: 15px;
  font-weight: 650;
}
.fm-meta {
  display: block;
  font-size: 11px;
  color: var(--muted, #64748b);
  margin-top: 2px;
}
.fm-table-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted, #64748b);
}
.fm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fm-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
}
.fm-badge.bad, .fm-badge.blocked, .fm-badge.exceeded {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.fm-meter {
  width: 110px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 4px;
}
.fm-meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2563eb;
}
.fm-meter > span.warn { background: #d97706; }
.fm-meter > span.bad { background: #dc2626; }
.fm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 24px;
  overflow: auto;
}
.fm-modal {
  width: 100%;
  max-width: 720px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #dce3ed);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 14px;
}
.fm-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.fm-modal-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}
.fm-form {
  display: grid;
  gap: 12px;
}
.fm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fm-field {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}
.fm-field input, .fm-field select, .fm-field textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--line, #dce3ed);
  background: var(--surface, #fff);
  color: var(--ink, #1f2d3d);
  font: inherit;
  font-weight: 400;
}
.fm-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .fm-head {
    flex-direction: column;
  }
  .fm-form-row {
    grid-template-columns: 1fr;
  }
}
