/* TOPMET 213 / Enterprise Premium Plus – common, scoped visual layer */
:root{--tm213-ink:#252525;--tm213-accent:#f5d400;--tm213-canvas:#f5f6f7;--tm213-surface:#fff;--tm213-border:#e4e6e9;--tm213-muted:#64707b;--tm213-radius:12px;--tm213-ease:180ms cubic-bezier(.2,.75,.25,1)}
html.tm213-theme-dark{--tm213-ink:#e8ebef;--tm213-accent:#f5d400;--tm213-canvas:#17191c;--tm213-surface:#23262a;--tm213-border:#3c4046;--tm213-muted:#aeb5bd;color-scheme:dark}
body.tm213-active{background:var(--tm213-canvas);transition:background var(--tm213-ease)}
.tm213-active .app-main{min-width:0}
.tm213-active .main-content{min-width:0}
.tm213-active .content-wrapper{max-width:1600px;margin-inline:auto}
.tm213-active .app-topbar{gap:12px;min-height:68px}
.tm213-active .tm213-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.tm213-active .tm213-tool{border:1px solid var(--tm213-border);background:var(--tm213-surface);color:var(--tm213-ink);border-radius:10px;min-width:38px;min-height:38px;padding:6px 11px;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:box-shadow var(--tm213-ease),transform var(--tm213-ease)}
.tm213-tool:hover{box-shadow:0 3px 13px #00000014;transform:translateY(-1px)}
.tm213-tool:focus-visible,.tm213-dialog button:focus-visible,.tm213-dialog input:focus-visible{outline:3px solid #bd9600;outline-offset:2px}
.tm213-tool .tm213-label{font-size:12px;font-weight:600}
.tm213-active .tm-top-tools{display:none!important} /* Replace 205 duplicate launcher, retain underlying legacy behavior */
.tm213-active .tm213-breadcrumb-supplement{font-size:11px;color:var(--tm213-muted);margin-left:8px}
.tm213-active .tm213-page-note{display:inline-flex;gap:6px;align-items:center;font-size:12px;color:var(--tm213-muted)}
.tm213-active .content-wrapper :is(.card,.tm-home-panel,.tm210-compare,.tm212-studio,.clean-card){border-radius:var(--tm213-radius)}
.tm213-active .content-wrapper :is(.card,.tm-home-panel){box-shadow:0 2px 9px #00000007}
.tm213-active :is(.form-control,.form-select,textarea){transition:border-color var(--tm213-ease),box-shadow var(--tm213-ease)}
.tm213-active :is(.form-control,.form-select,textarea):focus{border-color:#ae9600;box-shadow:0 0 0 3px #f4d40033}
.tm213-active .tm213-input-hint{display:block;color:var(--tm213-muted);font-size:11px;margin-top:4px;line-height:1.35}
.tm213-active .tm213-invalid{border-color:#b42318!important}
.tm213-active .tm213-help-dot{margin-left:5px;background:transparent;color:var(--tm213-muted);border:0;padding:2px;vertical-align:middle}
.tm213-active .tm213-help-dot:hover{color:#a28700}
.tm213-active .tm213-dialog[hidden]{display:none!important}
.tm213-dialog{position:fixed;inset:0;background:#0b0d12ab;z-index:11000;display:grid;place-items:start center;padding:clamp(22px,10vh,95px) 16px 16px;overflow:auto}
.tm213-dialog-panel{width:min(660px,100%);max-height:min(78vh,750px);overflow:auto;background:var(--tm213-surface);border:1px solid var(--tm213-border);border-radius:16px;box-shadow:0 20px 65px #0004;color:var(--tm213-ink);padding:20px}
.tm213-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.tm213-dialog-head h2{font-size:19px;font-weight:750;margin:0}
.tm213-dialog .tm213-close{border:0;background:transparent;color:inherit;padding:7px;border-radius:7px;font-size:20px}
.tm213-dialog .tm213-search{width:100%;background:var(--tm213-canvas);color:var(--tm213-ink);border:1px solid var(--tm213-border);border-radius:10px;padding:12px;margin-bottom:10px}
.tm213-list{display:grid;gap:6px;margin-block:10px}
.tm213-listitem{border:1px solid var(--tm213-border);border-radius:10px;background:var(--tm213-surface);color:var(--tm213-ink);padding:11px 12px;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:10px}
.tm213-listitem:hover,.tm213-listitem[aria-selected=true]{border-color:#d9b700;background:color-mix(in srgb,var(--tm213-accent) 12%,var(--tm213-surface))}
.tm213-muted{color:var(--tm213-muted);font-size:12px}
.tm213-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
.tm213-field{display:grid;gap:5px;font-size:12px;font-weight:650}
.tm213-field select,.tm213-field input{background:var(--tm213-surface);color:var(--tm213-ink);border:1px solid var(--tm213-border);border-radius:9px;padding:9px}
.tm213-actions-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}
.tm213-btn{background:var(--tm213-accent);color:#171717;border:1px solid #d4b800;border-radius:9px;font-size:13px;font-weight:650;padding:9px 13px}
.tm213-btn-alt{background:var(--tm213-surface);color:var(--tm213-ink);border-color:var(--tm213-border)}
.tm213-workspace{display:flex;gap:10px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--tm213-border);padding:10px 0}
.tm213-workspace strong{font-size:13px}
.tm213-active.tm213-density-compact .content-wrapper :is(.card,.tm-home-panel){padding:12px!important}
.tm213-active.tm213-density-compact :is(.table td,.table th){padding:.35rem .5rem}
.tm213-active.tm213-focus .app-sidebar{display:none!important}
.tm213-active.tm213-focus .app-main{margin-left:0!important;width:100%!important;max-width:none!important}
.tm213-active.tm213-focus .app-topbar{position:sticky;top:0;z-index:100}
.tm213-active.tm213-focus .content-wrapper{max-width:1800px}
html.tm213-theme-dark body.tm213-active :is(.app-main,.main-content,.content-wrapper){background:var(--tm213-canvas);color:var(--tm213-ink)}
html.tm213-theme-dark body.tm213-active :is(.card,.tm-home-panel,.tm210-compare,.table-responsive,.tm-scroll-table,.modal-content,.dropdown-menu){background:var(--tm213-surface);color:var(--tm213-ink);border-color:var(--tm213-border)}
html.tm213-theme-dark body.tm213-active :is(.form-control,.form-select,.input-group-text){background:#2c2f33;color:var(--tm213-ink);border-color:var(--tm213-border)}
html.tm213-theme-dark body.tm213-active :is(.table,.table-striped){--bs-table-color:var(--tm213-ink);--bs-table-bg:var(--tm213-surface);--bs-table-border-color:var(--tm213-border);--bs-table-striped-bg:#2e3136}
html.tm213-theme-dark body.tm213-active :is(.text-muted,.text-secondary,.form-text){color:var(--tm213-muted)!important}
html.tm213-theme-dark body.tm213-active .tm-home:not([data-tm212-theme]){color:var(--tm213-ink)}
@media(max-width:900px){.tm213-tool .tm213-label{display:none}.tm213-active .tm213-actions{gap:3px}.tm213-active .app-topbar{padding-inline:9px!important}.tm213-active .tm213-tool{min-width:34px;min-height:34px;padding:5px}}
@media(max-width:550px){.tm213-grid{grid-template-columns:1fr}.tm213-active .tm213-actions{flex-wrap:wrap;justify-content:flex-end}.tm213-dialog{padding-top:12px}}
@media(prefers-reduced-motion:reduce){.tm213-active *{animation-duration:.01ms!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
html.tm213-reduce-motion .tm213-active *{animation-duration:.01ms!important;transition-duration:.01ms!important}
