/* Shared floating-editor theme. Model controls remain accessible behind it. */
:root { --fea-dialog-header-color: #1f2937; }
.dialog-box.fea-themed-dialog {
    box-sizing: border-box; position: fixed !important; left: 50%; top: 50%;
    width: min(500px, 95vw); max-width: 95vw; max-height: 90vh; padding: 0;
    overflow: auto; border: 1px solid #b8c8d6 !important;
    border-top: 1px solid #b8c8d6 !important; border-radius: 12px !important;
    background: #f5f8fb !important; color: #203348 !important;
    box-shadow: 0 18px 70px #10243a55 !important; font: 14px system-ui, sans-serif;
}
.fea-themed-dialog * { box-sizing: border-box; }
.dialog-box > .rk-dialog-titlebar,
#DiaphragmsDialog > header,
#SpectrumSetupDialog > header {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: sticky; top: 0; z-index: 2; margin: 0; padding: 6px 12px !important;
    background: var(--fea-dialog-header-color); color: #fff; border-radius: 11px 11px 0 0;
    cursor: move; user-select: none;
}
.dialog-box > .rk-dialog-titlebar > :first-child,
#DiaphragmsDialog > header > h2,
#SpectrumSetupDialog > header > h2 {
    margin: 0; color: #fff; font: 700 14px/20px system-ui, sans-serif !important;
}
/* Keep close controls from increasing the shared header height. */
.dialog-box > .rk-dialog-titlebar > button {
    position: static !important; flex: 0 0 24px;
    width: 24px !important; height: 24px !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important;
    font: 400 14px/22px system-ui, sans-serif !important;
}
#DiaphragmsDialog > header > button,
#SpectrumSetupDialog > header > button {
    height: 24px !important; margin: 0 !important; padding: 0 7px !important;
    font: 400 12px/22px system-ui, sans-serif !important;
}
#divideShellsDialog.dialog-box.fea-themed-dialog { padding: 0 14px 14px; }
#divideShellsDialog > #divideShellsTitle {
    margin: 0 -14px 12px; padding: 8px 12px;
    background: var(--fea-dialog-header-color); color: #fff;
    font: 700 14px/20px system-ui, sans-serif;
    border-radius: 11px 11px 0 0;
}
#divideShellsDialog > label { line-height: 1.4; }
#divideShellsDialog p { margin: 10px 0; line-height: 1.45; }
#divideShellsDialog #shellCutMessage:empty { display: none; }
.fea-themed-dialog button:not(.fea-template-card) {
    position: static; height: auto; width: auto; max-width: 100%;
    padding: 6px 10px; border: 1px solid #b6c8d8; border-radius: 5px;
    background: #fff; color: #203348; cursor: pointer; font: inherit;
}
.fea-themed-dialog button.fea-dialog-primary {
    background: #146a94; border-color: #146a94; color: #fff;
}
.fea-themed-dialog button:disabled { opacity: .45; cursor: default; }
.fea-themed-dialog button:not(:disabled):hover { filter: brightness(.96); }
.fea-themed-dialog .fea-dialog-body { padding: 14px 16px; min-width: 0; }
.fea-themed-dialog .fea-dialog-body > :last-child { margin-bottom: 0; }
.dialog-box.fea-themed-dialog input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.dialog-box.fea-themed-dialog select, .dialog-box.fea-themed-dialog textarea {
    min-width: 0; max-width: 100%; height: 32px; padding: 5px 7px;
    border: 1px solid #afc2d3; border-radius: 4px;
    background: #fff; color: #203348; font: inherit;
}
.fea-themed-dialog input[type=checkbox], .fea-themed-dialog input[type=radio] {
    width: auto; height: auto; accent-color: #146a94;
}
.fea-themed-dialog input:focus, .fea-themed-dialog select:focus {
    border-color: #146a94; box-shadow: 0 0 0 2px #146a9422; outline: none;
}
.fea-themed-dialog label { font-weight: 500; }
.dialog-box.fea-themed-dialog table { max-width: 100%; color: #203348; font: inherit; }
.fea-themed-dialog th, .fea-themed-dialog td { padding: 5px 4px; }
.fea-themed-dialog th { background: #edf2f7; color: #536a7e; font-size: 12px; }
.fea-themed-dialog fieldset {
    min-width: 0; padding: 10px; border: 1px solid #d7e1ea;
    border-radius: 8px; background: #fff;
}
.fea-themed-dialog legend, .fea-themed-dialog .load-combo-group legend {
    width: auto; float: none; margin: 0; padding: 0 6px; border: 0;
    color: #203348; font: 600 14px system-ui, sans-serif;
}
.fea-themed-dialog .load-combo-editor-body { padding: 0; }
.fea-themed-dialog .load-combo-form-row { grid-template-columns: 1fr; gap: 5px; }
.fea-themed-dialog .load-combo-component-entry {
    grid-template-columns: minmax(0, 1fr) minmax(0, .65fr) auto; gap: 8px;
}
.fea-themed-dialog .load-combo-form-row input,
.fea-themed-dialog .load-combo-form-row select { width: 100% !important; height: 32px; }
.fea-themed-dialog .rk-dialog-footer {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 12px;
}
.fea-themed-dialog hr { margin: 12px 0; border: 0; border-top: 1px solid #d7e1ea; }
#LoadCasesDialogBox .fea-dialog-body > table,
#LoadCaseTable, #Materials { width: 100% !important; }
#Materials { display: table !important; }
#SectionsDialogBox table, #SectionsDialogBoxShell table { border-color: #d7e1ea; }
#LoadCaseTable, #LoadComboEditorItemsTable { border: 0 !important; }
#LoadCaseTable td, #LoadComboEditorItemsTable td { border-bottom: 1px solid #d7e1ea; }
#LoadComboEditorItemsTable input, #LoadComboEditorItemsTable select { width: 100% !important; }
#LoadComboEditorDialog.fea-themed-dialog { width: min(576px, 95vw); }
#LoadCombosDialogBox.fea-themed-dialog { width: min(400px, 95vw); }
#LoadCombosDialogBox .load-combo-list { height: 190px; }
#SectionsDialogBox.fea-themed-dialog { width: min(576px, 95vw); }
#SectionsDialogBoxShell.fea-themed-dialog { width: min(440px, 95vw); }
#ModeShapesDialogBox.fea-themed-dialog {
    width: min(390px, 95vw) !important; max-height: 90vh;
}
#DiagramsDialogBox.fea-themed-dialog {
    width: min(360px, 95vw) !important; max-height: 90vh;
}
#ModeShapesDialogBox .fea-dialog-body,
#DiagramsDialogBox .fea-dialog-body { overflow: auto; }
#ModeShapesDialogBox .fea-dialog-body table,
#DiagramsDialogBox .fea-dialog-body table {
    width: auto !important; max-width: 100%; margin: 0 0 2px;
}
#ModeShapesDialogBox .fea-dialog-body br,
#DiagramsDialogBox .fea-dialog-body br { display: none; }
#DiagramsDialogBox .fea-dialog-body td { padding: 2px; }
#ModeShapesDialogBox .fea-dialog-body td { padding: 4px; }
#LoadingDialogBox.fea-themed-dialog {
    width: min(420px, 95vw) !important; max-height: 90vh;
}
#LoadingDialogBox .fea-dialog-body { overflow: auto; }
#LoadingDialogBox .fea-dialog-body > table {
    width: 100% !important; margin: 0;
}
#LoadingDialogBox .fea-dialog-body td { padding: 3px 2px; }
#LoadingDialogBox .fea-dialog-body input:not([type=radio]):not([type=checkbox]) {
    width: 75px; height: 30px;
}
#LoadingDialogBox .fea-dialog-body select { width: auto; min-width: 90px; }
#LoadingDialogBox #submitButton, #LoadingDialogBox #submitButton0 {
    width: 88px !important;
}
#ShellLoadingDialog.fea-themed-dialog {
    width: min(390px, 95vw) !important; max-height: 90vh;
}
#ShellLoadingDialog .fea-dialog-body > table {
    width: 100% !important; margin: 0;
}
#ShellLoadingDialog .fea-dialog-body td { padding: 4px 3px; }
#ShellLoadingDialog .fea-dialog-body input:not([type=radio]):not([type=checkbox]) {
    width: 75px; height: 30px;
}
#ShellLoadingDialog .fea-dialog-body select { width: auto; min-width: 90px; }
#ShellLoadingDialog #submitButtonShell, #ShellLoadingDialog #submitButton0Shell {
    width: 90px !important;
}
#GeometryTransformDialog.fea-themed-dialog {
    width: min(560px, 95vw) !important; max-height: 90vh;
}
#GeometryTransformDialog > .rk-dialog-titlebar {
    background: var(--fea-dialog-header-color, #1f2937) !important;
}
#GeometryTransformDialog .geometry-transform-fields {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
#GeometryTransformDialog.geometry-transform-move,
#GeometryTransformDialog.geometry-transform-rotate { width: min(500px, 95vw) !important; }
#GeometryTransformDialog.geometry-transform-move .geometry-transform-fields,
#GeometryTransformDialog.geometry-transform-rotate .geometry-transform-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
#GeometryTransformDialog .geometry-transform-fields label {
    display: flex; flex-direction: column; gap: 4px; font-weight: 500;
}
#GeometryTransformDialog .geometry-transform-fields input { width: 100%; }
#GeometryTransformDialog .rk-dialog-footer { margin-top: 12px; }
#GeometryTransformDialog [hidden] { display: none !important; }
#GeometryTransformDialog .replication-mode { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
#GeometryTransformDialog.geometry-transform-polar .geometry-transform-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#GeometryTransformDialog .rotation-point-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#RotationPointPick {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 10000001; max-width: calc(100vw - 32px); box-sizing: border-box;
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border: 1px solid #a8bfd3; border-radius: 8px; background: #f4f8fb; color: #203348;
    box-shadow: 0 4px 18px #0003; font: 14px Arial, sans-serif;
}
#RotationPointPick button { flex-shrink: 0; }
.rotation-point-marker {
    position: fixed; z-index: 10000002; pointer-events: none;
    width: 14px; height: 14px; box-sizing: border-box;
    border: 2px solid #126e95; background: #ffffff80; transform: translate(-50%, -50%);
}
.rotation-point-marker.snapped { border-color: #15803d; background: #22c55e50; }
#analysisPlaneDialog.fea-themed-dialog { width: min(400px, 95vw) !important; }
#analysisPlaneDialog .fea-dialog-body > label { padding: 8px 0; }
#ModelTemplatesDialog.fea-themed-dialog { width: min(700px, 95vw); }
#ModelTemplatesDialog .fea-template-subtitle { padding: 0 0 8px; color: #536a7e; }
#ModelTemplatesDialog .fea-template-grid { padding: 0; gap: 8px; }
#ModelTemplatesDialog .fea-template-card {
    background: #fff; color: #203348; border: 1px solid #d7e1ea;
    border-radius: 8px; font: inherit;
}
.output-tables-dialog .ot-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.output-tables-dialog fieldset { margin: 0 0 10px; }
.output-tables-dialog .ot-choices label { display: block; margin: 5px 0; font-size: 13px; }
.output-tables-dialog label:has(input:disabled) { color: #7d8893; }
.output-tables-dialog .ot-case-choices label { display: inline-block; margin-right: 14px; }
.output-tables-dialog small { color: #536a7e; font-weight: 400; }
.output-tables-dialog .ot-note { color: #536a7e; font-size: 12px; margin: 8px 0; }
.output-tables-dialog .ot-error { color: #a52c23; }
.output-tables-dialog .ot-toolbar { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.output-tables-dialog .ot-toolbar label { display: flex; flex-direction: column; gap: 4px; }
.output-tables-dialog .ot-table-wrap { overflow: auto; max-height: 54vh; border: 1px solid #d7e1ea; background: white; }
.output-tables-dialog .ot-table-wrap table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.output-tables-dialog .ot-table-wrap th { position: sticky; top: 0; z-index: 1; }
.output-tables-dialog .ot-table-wrap th, .output-tables-dialog .ot-table-wrap td {
    padding: 5px 8px; white-space: nowrap; border-right: 1px solid #d7e1ea; border-bottom: 1px solid #d7e1ea; text-align: right; font-variant-numeric: tabular-nums;
}
.output-tables-dialog .ot-table-wrap th button { padding: 0; border: 0; background: transparent; font-weight: 600; }
.output-tables-dialog .ot-table-wrap th small { display: block; }
.output-tables-dialog .ot-table-wrap tbody tr:nth-child(even) { background: #f5f8fb; }
.output-tables-dialog .ot-pagination { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 10px; font-size: 12px; }
.spandrel-design-memo {
    font-family: "Lucida Sans", Arial, sans-serif; font-size: 12px; line-height: 1.5;
}
.spandrel-design-memo p { margin: 8px 0; }
.dialog-box.fea-themed-dialog .spandrel-design-memo .steel-memo-table,
.spandrel-design-memo .steel-memo-table {
    font-family: "Segoe UI", Arial, sans-serif; font-size: 12px; color: #1f2933;
}
.spandrel-design-memo .steel-memo-table th,
.spandrel-design-memo .steel-memo-table td { padding: 5px 7px; }
.spandrel-design-memo .steel-memo-table th { background: #e7edf5; color: #1f2933; }
.spandrel-node-card {
    display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, 1fr);
    gap: 16px; padding: 12px 0; border-bottom: 1px solid #d8dee8;
    break-inside: avoid; page-break-inside: avoid;
}
/* Compact wall-design editors. Memo typography and chart sizes stay independent. */
#PierDesignDialog.dialog-box.fea-themed-dialog,
#SpandrelDesignDialog.dialog-box.fea-themed-dialog {
    width: min(896px, 94vw) !important;
    max-height: 80vh !important;
    font-size: 12px;
    line-height: 1.3;
    border-radius: 9px !important;
}
#SpandrelDesignDialog.dialog-box.fea-themed-dialog { width: min(880px, 94vw) !important; }
:is(#PierDesignDialog, #SpandrelDesignDialog) > .rk-dialog-titlebar {
    border-radius: 8px 8px 0 0;
}
:is(#PierDesignDialog, #SpandrelDesignDialog) .fea-dialog-body { padding: 10px 12px !important; }
:is(#PierDesignDialog, #SpandrelDesignDialog) p { margin: 6px 0; }
:is(#PierDesignDialog, #SpandrelDesignDialog) fieldset {
    padding: 7px 9px;
    margin: 7px 0;
    border-radius: 6px;
}
:is(#PierDesignDialog, #SpandrelDesignDialog) legend { font-size: 12px; }
:is(#PierDesignDialog, #SpandrelDesignDialog) label { font-size: 11px; line-height: 1.3; }
:is(#PierDesignDialog, #SpandrelDesignDialog) input:not([type=checkbox]):not([type=radio]),
:is(#PierDesignDialog, #SpandrelDesignDialog) select {
    height: 25px;
    padding: 3px 5px;
    font-size: 12px;
}
:is(#PierDesignDialog, #SpandrelDesignDialog) input[data-global],
:is(#PierDesignDialog, #SpandrelDesignDialog) input[data-field] { width: 88px !important; }
:is(#PierDesignDialog, #SpandrelDesignDialog) button {
    padding: 4px 7px;
    font-size: 11px;
    line-height: 1.3;
}
:is(#PierDesignDialog, #SpandrelDesignDialog) [data-combos] {
    gap: 5px 9px !important;
    max-height: 90px !important;
    margin-bottom: 5px;
}
#PierDesignDialog [data-global-settings] > div:first-of-type {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 8px !important;
    margin: 5px 0 8px !important;
}
#PierDesignDialog [data-global-settings] > div:nth-of-type(2) {
    gap: 8px 12px !important;
    margin: 6px 0 !important;
    align-items: end;
}
#PierDesignDialog [data-global-settings] [data-phi] { max-width: 220px; font-size: 11px; }
#PierDesignDialog [data-global-settings] > p { font-size: 11px; color: #536a7e; }
#SpandrelDesignDialog fieldset > div:has(> label > input[data-global]) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 8px !important;
    margin: 6px 0 !important;
}
:is(#PierDesignDialog, #SpandrelDesignDialog) th,
:is(#PierDesignDialog, #SpandrelDesignDialog) td { padding: 4px 5px; font-size: 11px; }
:is(#PierDesignDialog, #SpandrelDesignDialog) .fea-dialog-body div:has(> table > tbody[data-properties]) {
    max-height: 190px !important;
}
:is(#PierDesignDialog, #SpandrelDesignDialog) [data-results] { margin-top: 6px; }
@media (max-width: 680px) {
    #PierDesignDialog [data-global-settings] > div:first-of-type,
    #SpandrelDesignDialog fieldset > div:has(> label > input[data-global]) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 650px) {
    .spandrel-node-card { grid-template-columns: 1fr; }
}
@media print {
    .spandrel-node-card { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .output-tables-dialog .ot-choices { grid-template-columns: 1fr; }
    .fea-themed-dialog .fea-dialog-body { padding: 12px; }
    .fea-themed-dialog .load-combo-component-entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .fea-themed-dialog .load-combo-component-entry > button { grid-column: 1 / -1; }
    .fea-themed-dialog table { width: 100% !important; }
    #ModelTemplatesDialog .fea-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.memo-report-status.memo-partial { background: #fff3cd; color: #7a4e00; }
