:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #111;
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; background: #fff; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: #164f9a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.legacy-primary { border: 0; border-right: 3px solid #8b8b8b; border-bottom: 3px solid #777; border-radius: 3px; color: #fff; background: #2196f3; font-weight: 700; }

.splash-screen,
.login-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #fff;
}

.splash-screen { display: grid; place-items: center; }
.splash-content { display: flex; width: min(800px, 78vw); flex-direction: column; align-items: center; gap: 24px; }
.tes-logo { width: min(800px, 68vw); max-height: 24vh; object-fit: contain; }
.smarttool-logo { width: min(800px, 72vw); max-height: 18vh; object-fit: contain; }
.splash-progress { width: min(400px, 65vw); height: 4px; overflow: hidden; background: #d7e9f8; }
.splash-progress span { display: block; width: 32%; height: 100%; background: #2196f3; animation: splash-progress 900ms ease-in-out infinite; }
.splash-content small { color: #777; font-size: 14px; }
@keyframes splash-progress { from { transform: translateX(-100%); } to { transform: translateX(320%); } }

.login-screen { display: grid; grid-template-rows: minmax(200px, 1fr) auto minmax(150px, 2fr); align-items: start; padding: 7vh 24px 0; }
.login-branding { display: flex; flex-direction: column; align-items: center; justify-content: end; gap: clamp(16px, 3vh, 34px); }
.login-branding .tes-logo { width: min(800px, 58vw); max-height: 17vh; }
.login-branding .smarttool-logo { width: min(800px, 62vw); max-height: 14vh; }
.login-form { display: grid; width: 460px; max-width: calc(100vw - 32px); margin: 30px auto 0; grid-template-columns: 400px 60px; grid-template-rows: 50px 50px 60px; padding: 5px; }
.login-form label { grid-column: 1; }
.login-form label:nth-child(1) { grid-row: 1; }
.login-form label:nth-child(2) { grid-row: 2; }
.login-form input { width: 100%; height: 40px; padding: 8px 12px; border: 1px solid #777; font-size: 15px; }
.login-form > button { grid-row: 3; grid-column: 1; width: 100%; height: 50px; align-self: center; font-size: 15px; }
.login-message { grid-row: 4; grid-column: 1 / 3; margin: 6px 0; color: #9d1c1c; font-size: 13px; line-height: 1.35; }
.local-preview { position: absolute; top: 16px; right: 18px; display: flex; max-width: 330px; align-items: flex-end; flex-direction: column; gap: 3px; color: #666; font-size: 11px; text-align: right; }
.local-preview strong { color: #333; text-transform: uppercase; letter-spacing: .05em; }
.local-preview button { margin-top: 5px; border: 1px solid #a8a8a8; padding: 6px 10px; background: #f5f5f5; color: #333; }
.login-footer { position: absolute; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; padding: 10px; color: rgba(0,0,0,.52); }
.login-footer > div:first-child { font-size: 14px; line-height: 1.6; }
.login-version { justify-self: center; margin-bottom: 50px; font-size: 24px; }
.login-version strong { margin-left: 15px; }
.reset-link { justify-self: end; border: 0; padding: 10px; color: #666; background: transparent; font-size: 18px; font-weight: 700; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.25); }
.legacy-dialog { display: grid; width: min(800px, calc(100vw - 40px)); min-height: 330px; place-content: center; gap: 25px; border: 3px solid #111; padding: 20px; background: #fff; }
.legacy-dialog h2 { margin: 0; text-align: center; font-size: 18px; font-weight: 400; }
.legacy-dialog label { display: grid; gap: 8px; text-align: center; font-size: 15px; font-weight: 700; }
.legacy-dialog input { width: 350px; max-width: 100%; height: 38px; }
.legacy-dialog > div { display: flex; justify-content: center; gap: 20px; }
.legacy-dialog button { min-width: 100px; height: 35px; border: 1px solid #777; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; background: #add8e6; font-weight: 700; }

.legacy-page { display: flex; height: 100vh; min-height: 620px; flex-direction: column; overflow: hidden; color: #111; background: #fff; font-size: 12px; }
.legacy-titlebar { display: grid; min-height: 31px; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; padding: 3px 9px; border-bottom: 1px solid #b8b8b8; color: #fff; background: #195fa7; }
.legacy-titlebar img { width: 23px; height: 23px; object-fit: contain; }
.legacy-titlebar strong { font-size: 13px; }
.legacy-titlebar > span { justify-self: center; font-size: 15px; font-weight: 700; }
.legacy-titlebar a { color: #fff; text-decoration: none; }
.projects-page > .legacy-titlebar, .mount-page > .legacy-titlebar, .open-analysis-page > .legacy-titlebar { display: none; }
.projects-heading { position: relative; height: 42px; flex: 0 0 auto; }
.projects-heading h1 { margin: 3px 0 0; text-align: center; font-size: 28px; }
.parity-badge { position: absolute; top: 9px; right: 12px; border: 1px solid #b98623; padding: 4px 7px; color: #77500c; background: #fff6d9; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.api-data-badge { position: absolute; top: 9px; right: 12px; border: 1px solid #39804f; padding: 4px 7px; color: #205f35; background: #e8f6ec; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.api-data-badge.error { border-color: #9f3b3b; color: #7a2020; background: #fff0f0; }
.api-load-status, .api-load-error { display: flex; min-height: 39px; flex: 0 0 auto; align-items: center; gap: 11px; border-bottom: 1px solid #9ab9d5; padding: 7px 13px; color: #174f7a; background: #e9f4fc; }
.api-load-status > span:last-child { margin-left: auto; color: #4c6476; }
.api-spinner { width: 17px; height: 17px; flex: 0 0 auto; border: 2px solid #aacce5; border-top-color: #1671b6; border-radius: 50%; animation: api-spin 700ms linear infinite; }
@keyframes api-spin { to { transform: rotate(360deg); } }
.api-load-error { border-color: #d49b9b; color: #7a2020; background: #fff0f0; }
.api-load-error button { margin-left: auto; border: 1px solid #8c3a3a; padding: 5px 13px; color: #6e2020; background: #fff; }
.pane-empty { display: block; padding: 14px; color: #777; font-size: 11px; }

.legacy-commandbar { display: flex; min-height: 58px; flex: 0 0 auto; align-items: stretch; gap: 1px; overflow-x: auto; border-top: 1px solid #dadada; border-bottom: 1px solid #a9a9a9; padding: 2px 7px; background: #f4f4f4; }
.legacy-commandbar button { display: grid; min-width: 70px; grid-template-rows: 29px auto; place-items: center; border: 1px solid transparent; padding: 2px 7px; color: #222; background: transparent; font-size: 10px; white-space: nowrap; }
.legacy-commandbar button:hover { border-color: #9fbfe0; background: #e4f1ff; }
.legacy-commandbar button > span { color: #195fa7; font-family: "Segoe UI Symbol", sans-serif; font-size: 22px; line-height: 1; }
.command-notice { display: flex; min-height: 31px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 5px 10px; border-bottom: 1px solid #e0bd6e; color: #5c440e; background: #fff7d8; font-size: 12px; }
.command-notice button { border: 0; color: #6a5218; background: transparent; font-size: 18px; }

.projects-workspace { display: grid; min-height: 0; flex: 1; grid-template-columns: 250px 250px minmax(760px, 1fr); overflow: auto; }
.projects-workspace.views-closed { grid-template-columns: 250px minmax(760px, 1fr); }
.projects-workspace.filters-closed { grid-template-columns: 250px minmax(760px, 1fr); }
.projects-workspace.sidebars-closed { grid-template-columns: minmax(760px, 1fr); }
.views-pane, .filters-pane { min-height: 0; border-right: 1px solid #aaa; background: #fff; }
.views-pane h2, .filters-pane h2, .mount-nav h2 { height: 28px; margin: 0; border-top: 2px solid #111; border-bottom: 2px solid #111; padding: 5px; text-align: center; font-size: 12px; }
.pane-close { display: block; margin: 20px auto; border: 1px solid #777; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; padding: 7px 22px; color: #fff; background: #2f4f4f; }
.views-pane nav { display: flex; flex-direction: column; }
.views-pane nav button { border: 0; border-bottom: 1px solid #eee; padding: 12px 15px; background: #fff; text-align: left; }
.views-pane nav button.selected { color: #075c8c; background: #dbeffc; font-weight: 700; }
.filters-pane { display: flex; min-height: 0; flex-direction: column; padding-bottom: 0; overflow: hidden; background: #f8f8f8; }
.filters-pane h2 { flex: 0 0 auto; margin-bottom: 0; background: #fff; }
.filters-pane label { display: grid; gap: 4px; padding: 7px 12px; font-weight: 700; }
.filters-pane input, .filters-pane select { width: 100%; height: 30px; border: 1px solid #aaa; padding: 3px 6px; background: #fff; font-weight: 400; }
.filters-pane > button { margin: 10px 12px; border: 1px solid #777; padding: 7px 15px; background: #fff; }
.project-filter-actions { display: grid; flex: 0 0 auto; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 9px 10px; border-bottom: 1px solid #ccc; background: #fff; }
.project-filter-actions button { min-height: 31px; border: 1px solid #888; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; color: #111; background: #add8e6; font-size: 11px; font-weight: 700; }
.project-filter-actions button.apply { color: #fff; background: #00008b; }
.project-filter-scroll { min-height: 0; overflow-y: auto; padding-bottom: 12px; }
.project-filter-label > span { display: block; }
.project-filter-checkbox { display: flex !important; align-items: center; gap: 7px !important; }
.project-filter-checkbox input { width: 16px !important; height: 16px !important; flex: 0 0 auto; }
.project-multi-filter { position: relative; font-weight: 400; }
.project-multi-filter summary { overflow: hidden; height: 30px; border: 1px solid #aaa; padding: 6px 24px 4px 7px; background: #fff; cursor: pointer; list-style-position: outside; text-overflow: ellipsis; white-space: nowrap; }
.project-multi-filter-menu { display: grid; max-height: 245px; gap: 1px; overflow-y: auto; border: 1px solid #777; border-top: 0; padding: 4px; background: #fff; box-shadow: 2px 4px 10px #0004; }
.project-multi-filter-menu > label { display: flex; align-items: center; gap: 6px; padding: 4px; font-weight: 400; }
.project-multi-filter-menu > label:hover { background: #dff2ff; }
.project-multi-filter-menu > label input { width: 15px; height: 15px; flex: 0 0 auto; }
.project-multi-filter-menu > small { padding: 6px; color: #666; line-height: 1.35; }
.project-filter-custom-value { display: grid; grid-template-columns: 1fr auto; gap: 4px; margin-top: 3px; padding-top: 5px; border-top: 1px solid #ddd; }
.project-filter-custom-value button { border: 1px solid #777; padding: 0 9px; background: #e7f3f8; }
.project-grid-pane { display: grid; min-width: 760px; min-height: 0; grid-template-rows: 48px minmax(180px, 1fr) 150px; }
.project-grid-pane { grid-template-rows: 48px minmax(0, 1fr); }
.grid-summary { display: flex; align-items: center; gap: 18px; padding: 5px 10px; border-bottom: 1px solid #bbb; }
.grid-summary button { height: 35px; border: 1px solid #777; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; padding: 0 18px; color: #fff; background: #00008b; }
.grid-summary strong { color: #00008b; font-size: 17px; }
.grid-summary span { margin-left: auto; font-size: 14px; }
.grid-summary span + span { margin-left: 0; }
.grid-summary .filter-toggle { width: 44px; margin-left: 4px; padding: 0; color: #111; background: #3cb371; font-family: "Segoe MDL2 Assets", "Segoe UI Symbol", sans-serif; font-size: 19px; }
.grid-summary .columns-toggle { margin-left: 0; padding: 0 12px; color: #222; background: #f4f4f4; }
.project-table-region { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.project-table-wrap, .legacy-table-wrap { min-height: 0; overflow: auto; }
.project-table-region > .project-table-wrap { width: 100%; height: 100%; }
.project-table, .legacy-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.project-table th { position: sticky; z-index: 2; top: 0; height: 60px; border: 1px solid #bbb; padding: 5px; color: #000; background: #ffd58d; font-size: 11px; font-weight: 700; text-align: center; cursor: pointer; user-select: none; }
.project-table th.customer-source, .detail-table th.customer-source { color: #0958c7; }
.project-table .sort-mark { float: right; color: #195fa7; font-size: 9px; }
.project-table td { height: 22px; border: 1px solid #d2d2d2; padding: 2px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.project-table tbody tr { cursor: default; }
.project-table tbody tr:nth-child(even) { background: #e0ffff; }
.project-table tbody tr:hover { background: #eaf5fc; }
.project-table tbody tr.selected { color: #007c83; background: #fff; outline: 2px solid #2196f3; outline-offset: -2px; }
.project-surface { position: absolute; z-index: 20; top: 3px; right: 3px; display: flex; width: min(600px, calc(100% - 12px)); max-height: calc(100% - 6px); flex-direction: column; border: 2px solid #111; background: #fff; box-shadow: 0 5px 18px #0005; }
.project-surface.wide { inset: 3px; width: auto; max-height: none; }
.project-surface.columns { width: min(470px, calc(100% - 12px)); }
.project-surface > header { display: flex; min-height: 31px; flex: 0 0 auto; align-items: center; justify-content: center; border-bottom: 2px solid #111; padding: 4px 8px; background: #fff; font-size: 11px; }
.project-surface > header button { margin-left: auto; border: 0; background: transparent; font-size: 19px; line-height: 1; }
.project-surface > footer { display: flex; justify-content: center; gap: 18px; border-top: 1px solid #aaa; padding: 8px; background: #eee; }
.project-surface > footer button { min-width: 110px; border: 1px solid #777; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; padding: 6px 10px; }
.surface-loading { display: flex; min-height: 100px; align-items: center; justify-content: center; gap: 10px; }
.surface-empty { padding: 22px; color: #666; text-align: center; }
.surface-empty.error { color: #7a2020; background: #fff0f0; }
.detail-table-wrap { min-height: 0; overflow: auto; }
.detail-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.detail-table th { height: 34px; border: 1px solid #bbb; padding: 4px; background: #ffd58d; text-align: center; }
.detail-table td { height: 23px; border: 1px solid #d2d2d2; padding: 3px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-table tbody tr:nth-child(even) { background: #e0ffff; }
.detail-table .contact-symbol { width: 28px; color: #195fa7; text-align: center; }
.site-history-title { flex: 0 0 auto; padding: 7px; text-align: center; font-size: 26px; }
.site-history-table { width: 1790px; }
.cost-estimate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 18px; }
.cost-estimate-grid label { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(120px, 1fr); align-items: center; gap: 8px; font-weight: 700; }
.cost-estimate-grid input { min-width: 0; height: 29px; border: 1px solid #aaa; padding: 4px 6px; background: #f8f8f8; }
.column-chooser { display: flex; min-height: 0; flex-direction: column; overflow: auto; padding: 5px; }
.column-chooser button { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; border: 0; border-bottom: 1px solid #ddd; padding: 7px; background: #fff; text-align: left; }
.column-chooser button:hover { background: #eaf5fc; }
.column-chooser button.visible > span { color: #087f42; font-weight: 800; }
.column-chooser small { color: #777; }
.project-context-menu { position: fixed; z-index: 1000; display: flex; width: 190px; flex-direction: column; margin: 0; border: 1px solid #777; padding: 4px 0; background: #fff; box-shadow: 2px 4px 12px #0005; }
.project-context-menu button { border: 0; padding: 7px 14px; background: #fff; text-align: left; font-size: 12px; }
.project-context-menu button:hover { background: #dbeffc; }
.project-context-menu hr { width: 100%; margin: 3px 0; border: 0; border-top: 1px solid #ddd; }
.legacy-statusbar { display: flex; min-height: 25px; flex: 0 0 auto; align-items: center; justify-content: space-between; border-top: 1px solid #aaa; padding: 3px 10px; color: #444; background: #eee; }

.open-analysis-heading { position: relative; min-height: 70px; flex: 0 0 auto; padding: 5px 10px; }
.open-analysis-heading h1 { margin: 0; text-align: center; font-size: 30px; }
.open-analysis-count { position: absolute; top: 5px; left: 10px; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.open-analysis-count em { margin-left: 18px; color: #168241; font-size: 13px; font-weight: 700; animation: loading-pulse 1.2s ease-in-out infinite alternate; }
.open-analysis-search { position: absolute; bottom: 3px; left: 10px; display: flex; gap: 10px; }
.open-analysis-search input { width: 250px; height: 35px; border: 1px solid #888; padding: 4px 7px; }
.open-analysis-search button { width: 45px; height: 35px; border: 1px solid #777; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; background: #add8e6; font-size: 20px; }
.open-analysis-grid-wrap { position: relative; min-height: 0; flex: 1; overflow: auto; margin: 0 10px; border: 1px solid #a3aeb9; }
.open-analysis-grid { width: 1600px; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.open-analysis-grid th { position: sticky; z-index: 2; top: 0; height: 34px; border: 1px solid #9eb6ce; padding: 4px; background: linear-gradient(#f6fafb, #d5ddea); text-align: center; }
.open-analysis-grid th:nth-child(1), .open-analysis-grid th:nth-child(2), .open-analysis-grid th:nth-child(5), .open-analysis-grid th:nth-child(7), .open-analysis-grid th:nth-child(8), .open-analysis-grid th:nth-child(9), .open-analysis-grid th:nth-child(10), .open-analysis-grid th:nth-child(11) { width: 150px; }
.open-analysis-grid th:nth-child(3), .open-analysis-grid th:nth-child(4) { width: 80px; }
.open-analysis-grid th:nth-child(6) { width: 250px; }
.open-analysis-grid td { height: 22px; border: 1px solid #d0d7e5; padding: 3px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.open-analysis-grid tbody tr:nth-child(even) { background: #e0ffff; }
.open-analysis-grid tbody tr:hover { background: #eaf5fc; }
.open-analysis-grid tbody tr.selected { color: #000; background: #eaecf5; outline: 2px solid #f1c263; outline-offset: -2px; }
.open-analysis-loading, .open-analysis-empty { display: flex; min-height: 240px; align-items: center; justify-content: center; gap: 10px; color: #555; }
.open-analysis-actions { display: flex; min-height: 58px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 60px; padding: 7px; }
.open-analysis-actions button, .open-analysis-actions a { display: inline-grid; width: 120px; height: 40px; place-items: center; border: 1px solid #777; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; color: #111; background: #add8e6; text-decoration: none; font-size: 18px; font-weight: 700; }
.open-analysis-actions button:disabled { opacity: .45; }
@keyframes loading-pulse { from { opacity: 1; } to { opacity: .25; } }

.mount-job-title { min-height: 30px; flex: 0 0 auto; padding: 5px; text-align: center; font-family: "Franklin Gothic Medium", "Segoe UI", sans-serif; font-size: 18px; font-weight: 700; }
.mount-commandbar { min-height: 65px; }
.mount-commandbar button { min-width: 61px; }
.mount-workspace { display: grid; min-height: 0; flex: 1; grid-template-columns: 62px minmax(0, 1fr); }
.mount-nav { z-index: 5; min-height: 0; overflow-y: auto; border-right: 1px solid #aaa; background: #f6f6f6; }
.mount-nav h2 { height: 24px; padding: 4px 1px; font-size: 10px; }
.mount-nav button { display: grid; width: 100%; min-height: 49px; place-items: center; border: 0; border-bottom: 1px solid #ddd; padding: 4px 1px; background: #fff; }
.mount-nav button span { color: #195fa7; font-family: "Segoe UI Symbol", sans-serif; font-size: 20px; line-height: 1; }
.mount-nav button small { font-size: 8px; line-height: 1.1; }
.mount-nav button:hover, .mount-nav button.selected { background: #cfe8f8; }
.mdi-workspace { position: relative; min-width: 0; min-height: 0; overflow: auto; background: #969696; }
.mdi-tabs { display: flex; min-height: 30px; flex: 0 0 auto; overflow-x: auto; border-bottom: 1px solid #686868; padding: 2px 4px 0; background: #d5d5d5; }
.mdi-tabs button { min-width: 130px; border: 1px solid #aaa; border-bottom: 0; padding: 5px 8px; background: #eee; text-align: left; white-space: nowrap; }
.mdi-tabs button.selected { position: relative; z-index: 1; background: #fff; font-weight: 700; }
.mdi-tabs button span { float: right; margin-left: 10px; color: #555; font-size: 15px; }
.mdi-empty { display: grid; margin: auto; place-items: center; gap: 8px; border: 1px solid #777; padding: 40px; color: #555; background: #fff; }
.mdi-empty strong { color: #222; font-size: 18px; }
.mdi-empty button { margin-top: 10px; padding: 8px 15px; }
.mdi-window { position: absolute; display: grid; min-width: 190px; min-height: 105px; grid-template-rows: 29px minmax(0, 1fr); margin: 0; overflow: hidden; border: 1px solid #555; box-shadow: 3px 4px 8px rgba(0,0,0,.25); background: #fff; }
.mdi-window.active { z-index: 500 !important; border-color: #083f75; box-shadow: 3px 5px 12px #0007; }
.mdi-window > header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px 10px; color: #fff; background: #195fa7; cursor: move; touch-action: none; user-select: none; }
.mdi-window:not(.active) > header { background: #66798c; }
.mdi-window > header button { width: 28px; height: 22px; border: 0; margin-left: 2px; color: #fff; background: rgba(255,255,255,.12); }
.mdi-window.minimized { min-height: 29px; grid-template-rows: 29px; }
.mdi-window.maximized { min-width: 100%; min-height: 100%; }
.mdi-resize-handle { position: absolute; right: 0; bottom: 0; width: 17px; height: 17px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 0 42%, #777 43% 49%, transparent 50% 61%, #777 62% 68%, transparent 69%); }
.moving-mdi-window, .moving-mdi-window * { cursor: grabbing !important; user-select: none !important; }
.legacy-control { height: 100%; min-height: 0; overflow: auto; padding: 8px; }
.legacy-control:has(.coc-control) { padding: 0; }
.coc-page { background: #eee; }
.standalone-legacy-window { display: grid; width: min(920px, calc(100vw - 30px)); min-height: 540px; grid-template-rows: 28px 1fr; margin: 14px auto; overflow: hidden; border: 1px solid #777; background: #fff; box-shadow: 3px 4px 9px #0004; }
.standalone-legacy-window > header { padding: 5px 9px; color: #222; background: #f5f5f5; font-size: 12px; }
.coc-control { position: relative; display: flex; height: 100%; min-height: 0; flex-direction: column; overflow: auto; background: #fff; color: #111; font-size: 12px; }
.coc-table-wrap { flex: 0 0 auto; overflow-x: auto; padding: 1px 20px 0 0; }
.coc-table { width: 100%; min-width: 610px; table-layout: fixed; border-collapse: collapse; }
.coc-table th, .coc-table td { height: 26px; border: 1px solid #222; padding: 3px 7px; text-align: center; }
.coc-table th:first-child { width: 43%; font-weight: 700; }
.coc-table thead th { background: #fff; font-weight: 700; }
.coc-table tbody td { background: #f5f2d9; }
.coc-table tbody td.editable { padding: 0; background: #fff; }
.coc-table input { width: 100%; height: 25px; border: 0; padding: 2px 7px; background: #fff; text-align: center; }
.coc-table input:focus { outline: 2px solid #2379bd; outline-offset: -2px; }
.coc-table .coc-change-row td { color: #000; background: #f20d0d; font-weight: 700; }
.coc-readonly-note { min-height: 30px; flex: 0 0 auto; padding: 7px 6px 5px; background: #fff; }
.coc-actions { display: grid; width: min(720px, 100%); grid-template-columns: repeat(3, minmax(150px, 1fr)); grid-auto-rows: 50px; align-items: center; gap: 0 30px; padding: 0 28px 12px; background: #fff; }
.coc-actions button { width: 170px; max-width: 100%; height: 31px; justify-self: center; border: 1px solid #888; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; color: #111; font-size: 12px; font-weight: 700; }
.coc-actions .run { background: #20b2aa; }
.coc-actions .load { background: #add8e6; }
.coc-actions .save { background: #ffc0cb; }
.coc-actions .export { background: #90ee90; }
.coc-actions .clear { background: #d3d3d3; }
.coc-notice { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #8ab899; padding: 5px 8px; color: #194d2a; background: #edf9f0; }
.coc-notice.error { border-color: #d8a0a0; color: #792222; background: #fff0f0; }
.coc-notice button { border: 0; background: transparent; color: inherit; font-size: 18px; }
.legacy-form { display: grid; align-content: start; gap: 11px 16px; }
.two-column-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
.three-column-form { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
.legacy-form label { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(120px, 1fr); align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.legacy-form label.field-wide { grid-column: 1 / -1; }
.legacy-form input, .legacy-form select { height: 30px; min-width: 0; border: 1px solid #888; padding: 4px 7px; background: #fff; font-weight: 400; }
.legacy-property-sheet-wrap { min-width: 320px; height: 100%; overflow: auto; background: #fff; }
.legacy-property-sheet { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11px; }
.legacy-property-sheet th, .legacy-property-sheet td { height: 25px; border: 1px solid #f3f3f3; padding: 0; }
.legacy-property-sheet th { width: 48%; padding: 3px 6px; background: linear-gradient(90deg, #eef2f7, #d7dee8); text-align: left; font-weight: 500; }
.legacy-property-sheet td { background: #d9ffff; }
.legacy-property-sheet input { width: 100%; height: 24px; border: 0; padding: 2px 5px; background: transparent; color: #222; font: inherit; }
.legacy-property-sheet input:focus { outline: 2px solid #2585c7; outline-offset: -2px; background: #fff; }
.property-sheet-note { min-height: 36px; padding: 9px 6px; border-top: 1px solid #bbb; background: #fff; }
.property-sheet-tool { display: grid; height: 34px; grid-template-columns: 1fr 52px; align-items: center; border-bottom: 1px solid #bbb; padding: 2px 4px; background: #fff; }
.property-sheet-tool a { justify-self: center; color: #0879bd; text-decoration: underline; font-size: 13px; }
.property-sheet-tool button { height: 28px; border: 1px solid #888; border-right-width: 3px; border-bottom-width: 3px; border-radius: 3px; background: #add8e6; font-weight: 700; }
.legacy-form button, .control-toolbar button, .sector-tabs button { min-height: 30px; border: 1px solid #888; padding: 4px 12px; background: #f4f4f4; }
.control-note { margin-top: 18px; border-left: 4px solid #e1a629; padding: 9px 12px; color: #594516; background: #fff7dc; }
.control-toolbar { display: flex; gap: 6px; margin-bottom: 10px; }
.legacy-table { min-width: 720px; }
.legacy-table th { height: 29px; border: 1px solid #aaa; padding: 5px; background: #d8d8d8; text-align: left; }
.legacy-table td { height: 27px; border: 1px solid #ccc; padding: 5px; }
.legacy-control:has(.appurtenance-grid-wrap) { display: flex; flex-direction: column; padding: 0; }
.appurtenance-grid-wrap { min-height: 0; flex: 1; overflow: auto; background: #eee; }
.appurtenance-grid { min-width: 2200px; table-layout: fixed; border-collapse: collapse; font-size: 10px; }
.appurtenance-grid th { position: sticky; z-index: 2; top: 0; height: 28px; padding: 4px; background: #ffd58d; text-align: center; font-weight: 700; }
.appurtenance-grid td { height: 25px; overflow: hidden; padding: 3px 5px; background: #fff; text-overflow: ellipsis; white-space: nowrap; }
.appurtenance-grid tbody tr:nth-child(even) td { background: #d9ffff; }
.appurtenance-grid .boolean-cell { text-align: center; font-size: 16px; font-weight: 900; }
.appurtenance-grid .boolean-cell.yes { color: #32a824; }
.appurtenance-grid .boolean-cell.no { color: #f03a3a; }
.appurtenance-summary { display: flex; min-height: 38px; flex: 0 0 auto; align-items: center; justify-content: space-around; gap: 18px; overflow-x: auto; border-top: 1px solid #777; padding: 5px 10px; background: #fff; white-space: nowrap; }
.appurtenance-summary label { margin-right: auto; font-weight: 800; }
.appurtenance-summary span b { color: #071ee5; }
.appurtenance-summary strong { display: inline-block; min-width: 34px; margin: 0 9px 0 3px; text-align: right; }
.members-grid { min-width: 460px; table-layout: fixed; }
.members-grid th { background: #d8d8d8; text-align: center; }
.members-grid td { background: #fff; }
.members-grid tbody tr:nth-child(even) td { background: #d9ffff; }
.geometry-sheet { min-width: 190px; }
.geometry-sheet th { width: 46%; text-align: center; }
.legacy-images-control { display: grid; height: 100%; min-height: 220px; grid-template-rows: 34px 1fr; }
.legacy-images-control nav { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #777; }
.legacy-images-control nav button { border: 1px solid #888; border-top: 0; padding: 5px; background: #eee; font-weight: 700; }
.legacy-images-control nav button.selected { background: #add8e6; }
.legacy-image-view { display: grid; place-content: center; place-items: center; gap: 8px; overflow: hidden; background: #fff; }
.legacy-image-view > span { color: #777; font-size: 42px; }
.legacy-image-view small { max-width: 260px; overflow: hidden; color: #666; text-overflow: ellipsis; white-space: nowrap; }
.sector-tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 5px; }
.sector-tabs button.selected { background: #add8e6; font-weight: 700; }
.antenna-sector-grid { min-width: 900px; }
.classification-grid { min-width: 320px; table-layout: fixed; }
.classification-grid th { background: #d8d8d8; text-align: center; }
.classification-grid td { padding: 0 6px; }
.classification-grid td:first-child { width: 54%; background: #e6e6e6; font-weight: 700; }
.classification-grid input { width: 100%; height: 25px; border: 0; padding: 2px 5px; background: #d9ffff; }
.info-sources-grid { min-width: 620px; table-layout: fixed; }
.info-sources-grid th:nth-child(1) { width: 52px; }.info-sources-grid th:nth-child(2) { width: 150px; }.info-sources-grid th:nth-child(3) { width: 170px; }
.info-sources-grid .boolean-cell { text-align: center; font-size: 16px; font-weight: 900; }
.info-sources-grid .boolean-cell.yes { color: #32a824; }.info-sources-grid .boolean-cell.no { color: #f03a3a; }
.placement-surface { display: grid; height: 100%; min-height: 420px; grid-template-columns: minmax(360px, 1fr) 280px; gap: 20px; }
.mount-plan { position: relative; min-height: 400px; overflow: hidden; border: 1px solid #aaa; background: repeating-linear-gradient(0deg, transparent, transparent 19px, #edf3f6 20px), repeating-linear-gradient(90deg, transparent, transparent 19px, #edf3f6 20px); }
.mount-center { position: absolute; top: 50%; left: 50%; display: grid; width: 110px; height: 110px; place-items: center; transform: translate(-50%,-50%) rotate(45deg); border: 8px solid #333; color: transparent; }
.sector { position: absolute; z-index: 1; display: grid; width: 52px; height: 24px; place-items: center; border: 2px solid #1675b8; color: #0d5d92; background: #dff3ff; font-weight: 700; }
.sector-a { top: 12%; left: calc(50% - 26px); }
.sector-b { right: 12%; bottom: 18%; transform: rotate(120deg); }
.sector-c { bottom: 18%; left: 12%; transform: rotate(240deg); }
.image-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.image-slot { display: grid; min-height: 180px; place-items: center; border: 2px dashed #aaa; color: #777; background: #f7f7f7; font-size: 34px; }
.image-slot span { display: block; font-size: 12px; font-weight: 700; }
.sector-tabs { display: flex; margin-bottom: 9px; }
.sector-tabs button.selected { color: #fff; background: #195fa7; }
.document-browser { display: grid; height: 100%; min-height: 350px; grid-template-columns: 190px 1fr; border: 1px solid #aaa; }
.document-browser aside { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid #aaa; padding: 10px; background: #f3f3f3; }
.document-browser aside strong { margin-bottom: 10px; }
.document-browser aside button { border: 0; padding: 8px; background: #fff; text-align: left; }
.document-browser section { padding: 10px; }
.document-empty { display: grid; height: calc(100% - 40px); min-height: 220px; place-items: center; color: #777; }
.migration-gap { display: grid; max-width: 760px; gap: 12px; border: 1px solid #a7a7a7; border-left: 5px solid #e2a327; padding: 20px; background: #fafafa; }
.migration-gap strong { font-size: 17px; }
.migration-gap p { margin: 0; color: #555; line-height: 1.55; }
.migration-gap dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; }
.migration-gap dt { font-weight: 700; }
.migration-gap dd { margin: 0; color: #555; }
.legacy-empty { display: grid; min-height: 200px; place-items: center; border: 1px dashed #aaa; color: #666; background: #fafafa; }
.control-empty-row { min-height: 54px; border: 1px solid #ccc; border-top: 0; padding: 18px; color: #666; background: #fafafa; text-align: center; }

.inventory-page, .surface-page { min-height: 100vh; padding: 28px clamp(18px, 4vw, 60px) 50px; color: #222; background: #f5f5f5; }
.inventory-page > header { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 20px; }
.inventory-page h1, .surface-page h1 { margin: 5px 0; color: #164f9a; font-size: 30px; }
.inventory-page header p { margin: 0; color: #555; }
.inventory-page > header > strong { color: #164f9a; font-size: 28px; white-space: nowrap; }
.inventory-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 22px; }
.inventory-summary div { display: flex; min-height: 65px; flex-direction: column; justify-content: space-between; border: 1px solid #ccc; padding: 10px; background: #fff; }
.inventory-summary span { color: #666; font-size: 11px; font-weight: 700; }
.inventory-summary strong { color: #164f9a; font-size: 22px; }
.inventory-group { margin-bottom: 18px; border: 1px solid #bbb; background: #fff; }
.inventory-group h2 { display: flex; justify-content: space-between; margin: 0; padding: 8px 12px; color: #fff; background: #195fa7; font-size: 15px; }
.inventory-group table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.inventory-group th, .inventory-group td { border-bottom: 1px solid #ddd; padding: 7px 10px; text-align: left; font-size: 12px; }
.inventory-group th:nth-child(1) { width: 28%; }.inventory-group th:nth-child(2) { width: 18%; }
.inventory-group td:last-child { overflow-wrap: anywhere; color: #666; font-family: Consolas, monospace; font-size: 10px; }
.state { display: inline-block; border-radius: 10px; padding: 3px 7px; background: #eee; font-size: 10px; font-weight: 700; }
.state-runnable { color: #126a3a; background: #dff3e8; }.state-shellmapped { color: #0c5785; background: #dceefa; }.state-adapterrequired { color: #704f0b; background: #fff0c9; }.state-protectedunchanged { color: #6d276d; background: #f2dff2; }
.surface-page > header { display: flex; gap: 28px; align-items: center; margin-bottom: 20px; }
.surface-page h1 { margin-bottom: 2px; }.surface-page header span { color: #666; }
.standalone-control { min-height: 520px; border: 1px solid #777; background: #fff; box-shadow: 2px 3px 8px rgba(0,0,0,.15); }
.surface-route { border: 1px solid #aaa; padding: 25px; background: #fff; }.surface-route a { display: inline-block; padding: 9px 14px; text-decoration: none; }

/* Existing Change of Condition component, now framed as a SMARTTool child surface. */
.analysis-layout { padding: 0 18px 24px; }
.page-heading.compact-heading { margin: 0; padding: 18px; border-bottom: 1px solid #aaa; background: #f3f3f3; }
.compact-heading h1 { color: #164f9a; font-size: 28px; }.compact-heading .eyebrow { color: #666; }.compact-heading .back-link::before { content: "SMARTTool / "; color: #777; }
.panel { border-radius: 0; border-color: #aaa; box-shadow: none; }.button { border-radius: 3px; }.button-primary { background: #2196f3; }

#blazor-error-ui { position: fixed; z-index: 9999; right: 0; bottom: 0; left: 0; display: none; padding: 12px 18px; color: #611; background: #fff1c9; box-shadow: 0 -1px 8px rgba(0,0,0,.2); }
#blazor-error-ui .dismiss { float: right; }

@media (max-width: 900px) {
  .login-screen { padding-top: 12vh; }
  .local-preview { position: static; grid-row: 3; max-width: 460px; margin: 5px auto 100px; align-items: center; text-align: center; }
  .login-footer { grid-template-columns: 1fr 1fr; }.login-version { display: none; }
  .projects-workspace { grid-template-columns: 190px minmax(700px, 1fr); }.filters-pane { display: none; }
  .inventory-summary { grid-template-columns: repeat(2, 1fr); }
  .two-column-form, .three-column-form { grid-template-columns: 1fr; }.placement-surface { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-branding .tes-logo, .login-branding .smarttool-logo { width: 90vw; }
  .login-form { display: flex; flex-direction: column; gap: 8px; }.login-form > button { margin-top: 2px; }
  .login-footer { grid-template-columns: 1fr; }.reset-link { justify-self: end; }
  .legacy-titlebar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .projects-workspace { grid-template-columns: minmax(720px, 1fr); }.views-pane { display: none; }
  .mount-workspace { grid-template-columns: 53px minmax(650px, 1fr); overflow-x: auto; }
  .inventory-page > header { align-items: start; flex-direction: column; }.inventory-summary { grid-template-columns: 1fr; }
}
