.fu-workspace { display: grid; gap: 18px; min-width: 0; }
.fu-workspace [hidden], .fu-dialog-body [hidden] { display: none !important; }
.fu-heading, .fu-heading-actions, .fu-toolbar, .fu-readiness, .fu-section-heading, .fu-status-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fu-heading, .fu-section-heading { justify-content: space-between; }
.fu-heading h2 { margin: 0 0 8px; font-size: 26px; }
.fu-heading p { margin: 0; color: var(--muted); }
.fu-heading-actions label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.fu-heading select { max-width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: white; }
.fu-status-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf9; }
.fu-account-details { padding: 0; border: 0; }
.fu-account-details[open] { flex-basis: 100%; }
#fu-status p { margin: 8px 0 0; color: var(--amber); }
.fu-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.fu-status-dot.is-ready { background: var(--green); }
.fu-tag { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #f0f3f5; color: #52616d; font-size: 12px; font-weight: 500; }
.fu-account-details > summary { font-size: 12px; color: var(--muted); }
.fu-toolbar { margin: 16px 0; }
.fu-readiness { margin-bottom: 12px; font-size: 13px; }
.fu-assets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fu-asset-card { padding: 20px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; overflow-wrap: anywhere; background: #fff; }
.fu-asset-card:first-child { background: #f1f7f4; border-color: #dcebe3; }
.fu-asset-card > span { color: #52616d; font-size: 13px; }
.fu-asset-card strong { font-size: clamp(20px, 2.3vw, 28px); font-weight: 600; font-variant-numeric: tabular-nums; }
.fu-asset-card small { font-size: 12px; font-weight: 400; color: var(--muted); }
.fu-asset-card p { margin: 0; font-size: 12px; color: var(--muted); }
.fu-asset-details, .fu-assets > p { grid-column: 1 / -1; margin: 0; }
.fu-asset-details { color: var(--muted); font-size: 12px; padding: 0; border: 0; }
.fu-asset-details summary span { margin-left: 12px; }
.fu-asset-details[open] { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; }
.fu-period { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fafbfc; }
.fu-period summary span { margin-left: 12px; color: var(--muted); }
.fu-period p { color: var(--muted); line-height: 1.7; }
.fu-market { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; overflow-wrap: anywhere; }
.fu-market-main { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.fu-market-main > div { display: grid; gap: 7px; }
.fu-market-main > div:first-child { display: flex; align-items: center; }
.fu-market-symbol { font-weight: 650; font-size: 18px; }
.fu-market-main strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.fu-market-main small, .fu-market-main .muted { font-size: 12px; font-weight: 400; line-height: 1.7; }
.fu-market-main b { font-size: 14px; font-weight: 500; }
.fu-market-details { margin-top: 14px; padding: 12px 0 0; border-top: 1px solid var(--line); border-bottom: 0; font-size: 12px; color: var(--muted); }
.fu-layout { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.5fr); gap: 18px; align-items: start; }
.fu-panel { padding: 22px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; background: white; }
.fu-panel h3 { margin: 0 0 18px; font-size: 17px; }
.fu-section-heading { margin-bottom: 20px; }
.fu-section-heading h3, .fu-section-heading h4 { margin: 0; }
.fu-form-grid { display: grid; gap: 18px; }
.fu-form-grid .form-field { display: block; margin-bottom: 0; }
.fu-form-grid [hidden] { display: none !important; }
.fu-form-grid [data-config] { display: grid; gap: 16px; }
.fu-form-grid input:not([type=checkbox]), .fu-form-grid select { width: 100%; min-width: 0; margin-top: 7px; padding: 10px 12px; height: 42px; border: 1px solid #dce2e6; border-radius: 8px; background: #fff; color: #22292e; font: inherit; }
.fu-form-grid label { font-size: 13px; }
.fu-form-grid input::placeholder { color: #7d8991; }
.fu-direction { min-width: 0; margin: 0; padding: 0; border: 0; }
.fu-direction legend { padding: 0; margin-bottom: 8px; font-size: 13px; }
.fu-direction > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #f2f5f4; border-radius: 9px; }
.fu-direction button { padding: 10px 0; border: 0; border-radius: 6px; background: transparent; color: #52616d; font: inherit; cursor: pointer; }
.fu-direction button[aria-pressed=true] { background: var(--green); color: #fff; font-weight: 600; }
.fu-direction button[data-action$=SHORT][aria-pressed=true] { background: var(--red); }
.fu-direction p { margin: 9px 0 0; font-size: 12px; line-height: 1.6; }
.fu-advanced { border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; }
.fu-advanced > div { margin-top: 14px; }
.fu-advanced label + label { display: block; margin-top: 12px; }
.fu-checkbox { display: flex; align-items: center; gap: 6px; }
.fu-mode { background: #f6f8fa; border-radius: 6px; padding: 10px 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.fu-submit-help { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
#fu-preview { width: 100%; padding: 13px; border-radius: 8px; background: var(--green); border-color: var(--green); }
#fu-preview[data-direction=short] { background: var(--red); border-color: var(--red); }
#fu-error:empty, #fu-form-reason:empty { display: none; }
.fu-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.fu-tabs button { padding: 8px 10px; border: 0; border-radius: 6px; background: #f5f7f8; color: #52616d; cursor: pointer; font: inherit; font-size: 13px; }
.fu-tabs button[aria-selected=true] { background: #e6f2eb; color: var(--green); font-weight: 600; }
#fu-record-meta { font-size: 12px; margin: 14px 0; }
.fu-record { display: grid; gap: 10px; border-bottom: 1px solid var(--line); padding: 18px 0; overflow-wrap: anywhere; }
.fu-record > .btn { justify-self: start; }
.fu-record details { font-size: 12px; color: var(--muted); }
.fu-record-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin: 16px 0; }
.fu-record-fields > div { min-width: 0; }
.fu-record-fields dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.fu-record-fields dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: #22292e; }
.fu-position { padding: 18px; margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.fu-position .fu-section-heading { margin-bottom: 16px; }
.fu-position h4 { font-size: 16px; }
.fu-position-profit { display: grid; gap: 6px; }
.fu-position-profit > span { font-size: 12px; color: var(--muted); }
.fu-position-profit strong { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fu-position .toolbar { flex-wrap: wrap; }
.fu-positive { color: var(--green); }
.fu-negative { color: var(--red); }
.fu-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 58px 12px; color: var(--muted); }
.fu-empty > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #f0f4f2; color: #7e9e8e; font-size: 24px; }
.fu-empty strong { color: #394850; font-size: 15px; font-weight: 500; }
.fu-empty p { margin: 0; font-size: 13px; line-height: 1.7; }
.fu-evidence { max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: #f3f5f8; font-size: 12px; }
.fu-preview-summary { padding: 16px; margin: 18px 0; border-radius: 10px; background: #f6f8fa; }
.fu-dialog-body { padding: 20px 22px; overflow-wrap: anywhere; }
.fu-dialog-body > p:first-child { margin-top: 0; line-height: 1.7; }
.fu-dialog-body .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.fu-preview-summary h3 { margin: 0; font-size: 16px; }
.fu-preview-summary .fu-record-fields { margin-bottom: 0; }
.fu-workspace summary { cursor: pointer; }
.fu-workspace button:focus-visible, .fu-workspace input:focus-visible, .fu-workspace select:focus-visible, .fu-workspace summary:focus-visible { outline: 2px solid #2c67a4; outline-offset: 3px; }
.fu-workspace button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 1100px) {
  .fu-layout { grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.1fr); }
  .fu-panel { padding: 18px; }
}
@media (max-width: 760px) {
  .fu-layout { grid-template-columns: minmax(0, 1fr); }
  .fu-heading h2 { font-size: 23px; }
  .fu-heading-actions { width: 100%; justify-content: space-between; }
  .fu-heading-actions label { min-width: 0; flex: 1; }
  .fu-heading select { width: 100%; }
  .fu-assets { gap: 8px; }
  .fu-asset-card { padding: 12px; }
  .fu-asset-card strong { font-size: 20px; }
  .fu-asset-card small { display: block; margin-top: 4px; }
  .fu-asset-card p { display: none; }
  .fu-panel, .fu-market, .fu-status-bar { padding: 16px; }
  .fu-period summary span, .fu-asset-details summary span { display: block; margin: 6px 0 0; line-height: 1.6; }
  .fu-readiness { align-items: flex-start; flex-direction: column; }
  .fu-position { padding: 14px; }
  .fu-record-fields { gap: 14px; }
  .fu-empty { padding: 32px 8px; }
}
@media (max-width: 380px) {
  .fu-asset-card { padding: 10px 8px; }
  .fu-asset-card > span { font-size: 11px; }
  .fu-asset-card strong { font-size: 17px; }
  .fu-record-fields { grid-template-columns: minmax(0, 1fr); }
}
