/* Lumen: the existing workspace, with deliberate contrast and shared states. */
:root {
  color-scheme: light;
  --ink: #172338; --ink: oklch(25% .035 260);
  --muted: #526174; --muted: oklch(49% .03 260);
  --surface: #fffdfa; --surface: oklch(99.4% .006 70);
  --ground: #f1f3f6; --ground: oklch(96% .009 260);
  --subtle: #edf0f5; --subtle: oklch(94.9% .012 260);
  --border: #d1d8e3; --border: oklch(87% .018 260);
  --accent: #e66134; --accent-text: #a73b1a;
  --accent-fill: #b83e1c; --accent-hover: #9f3217;
  --accent-soft: #fceae0; --accent-line: #efb297;
  --on-accent: #fffaf5;
  --primary-gradient: linear-gradient(135deg,#c44924,#a73518);
  --active-gradient: linear-gradient(115deg,#fff1e8,#fbe4d8);
  --sidebar-surface: #fafbfe;
  --select-surface: var(--surface); --select-menu: var(--surface);
  --select-hover: #e9edf4; --select-active: var(--accent-soft);
  --select-border: #a4b0c2; --select-text: var(--ink); --select-secondary: var(--muted);
  --select-shadow: 0 12px 36px #1a253622;
  --danger: #b12d36; --success: #15794b;
  --focus: #ab3919; --shadow-soft: 0 4px 18px #17233808;
  --ease: cubic-bezier(.16,1,.3,1);
  --plum: var(--accent-text); --deep: var(--ink); --lavender: var(--subtle); --copper: var(--accent-text);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f2ee; --muted: #a7a4a1;
  --surface: #191a1c; --ground: #101113; --subtle: #242527; --border: #343538;
  --accent: #f89d72; --accent-text: #ffb18b; --accent-fill: #f89d72; --accent-hover: #ffc19f;
  --accent-soft: #30221c; --accent-line: #75482f; --on-accent: #23170f;
  --primary-gradient: linear-gradient(135deg,#f8ac7e,#e47b50);
  --active-gradient: linear-gradient(100deg,#3a281f,#211d1b);
  --sidebar-surface: #141416;
  --select-hover: #2c2c2f; --select-border: #46474b;
  --select-shadow: 0 18px 42px #08080b70;
  --danger: #ff9f9f; --success: #7fdfb3;
  --focus: #ffb18b; --shadow-soft: 0 12px 36px #08080b32;
}
html, body { background: var(--ground); color: var(--ink); }
body { -webkit-font-smoothing: antialiased; }
#shell { font-size: 14px; }
#shell h1, #shell h2, #shell h3, dialog h2 { font-weight: 750; letter-spacing: -.035em; }
#shell h1 { font-size: 28px; }
#shell h2 { font-size: 21px; }
#shell aside { background: var(--sidebar-surface); border-color: var(--border); }
#shell aside .brand strong { font-size: 25px; font-weight: 800; letter-spacing: -.045em; }
#shell aside .brand small { color: var(--muted); letter-spacing: .035em; }
#shell aside .brand-mark, #loading .brand-mark, #login .brand-mark {
  background: var(--primary-gradient); color: var(--on-accent); border-radius: 13px;
  box-shadow: 0 5px 14px #c54a2522;
}
#shell aside .workspace-label { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
#shell aside nav { gap: 6px; }
#shell aside nav button {
  min-height: 46px; border-radius: 11px; font-size: 13px; font-weight: 570;
  padding: 11px 13px; gap: 12px; color: var(--muted); position: relative;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}
#shell aside nav button .icon { width: 21px; height: 21px; flex: none; stroke-width: 1.75; }
#shell aside nav button:hover { color: var(--ink); background: var(--subtle); }
#shell aside nav button.active, #shell aside nav button[aria-current="page"] {
  color: var(--accent-text); background: var(--active-gradient); border-color: var(--accent-line); font-weight: 750;
  box-shadow: 0 2px 7px #af432309;
}
#shell aside nav button.active .icon { stroke-width: 2; }
#shell aside nav button:active { transform: translateY(1px); }
#shell aside .sidebar-note { border-color: var(--border); opacity: 1; }
#shell aside .sidebar-note strong { color: var(--ink); font-weight: 650; }
#shell aside .sidebar-note p { font-size: 11px; line-height: 1.7; }
#shell aside .account { border-color: var(--border); }
#shell aside .account-profile { gap: 11px; }
#shell aside .avatar { color: var(--accent-text); background: var(--accent-soft); font-weight: 750; border: 1px solid var(--accent-line); }
#shell aside #accountName { color: var(--ink); font-weight: 650; }
#shell aside #accountRole { color: var(--muted); }
#shell #sidebarToggle { width: 32px; height: 32px; min-height: 32px; border-radius: 9px; display: grid; place-items: center; }
#sidebarToggle .icon { width: 18px; height: 18px; }
#shell .topbar { color: var(--muted); }
#shell .topbar strong { color: var(--ink); font-weight: 600; }
#shell :is(.catalog-panel,#contractsModule) { border-radius: 14px; box-shadow: var(--shadow-soft); overflow: clip; }
#shell :is(.panel-heading,.module-header,.contracts-bar,.drawing-context,.mep-context) { background: var(--surface); border-color: var(--border); }
#shell .panel-heading strong { color: var(--ink); font-weight: 700; }
#shell .count-chip { color: var(--ink); background: var(--subtle); font-weight: 650; font-variant-numeric: tabular-nums; }
:root button { border-radius: 9px; min-height: 38px; font-weight: 600; touch-action: manipulation; }
:root button, :root a, :root summary {
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
:root button:hover { border-color: var(--muted); }
:root button:active:not(:disabled) { transform: translateY(1px); }
:root button.primary, #shell button.primary {
  background: var(--primary-gradient); color: var(--on-accent); border-color: transparent;
  font-weight: 750; box-shadow: 0 3px 9px #ad431f21;
}
:root button.primary:hover, #shell button.primary:hover { background: var(--primary-gradient); filter: brightness(1.06); box-shadow: 0 5px 15px #ad431f2b; }
:root button:disabled { opacity: .48; box-shadow: none; filter: none; }
:root :is(button,input,select,textarea,summary,a):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:root :is(input,select,textarea), #shell .toolbar :is(input,select), #login input { border-radius: 9px; border-color: var(--select-border); color: var(--ink); background: var(--surface); font-size: 14px; }
:root :is(input,select,textarea):focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent); }
:root :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
:root .styled-select-trigger { border-radius: 9px; font-weight: 550; }
:root .styled-select-menu { border: 1px solid var(--select-border); border-radius: 11px; box-shadow: var(--select-shadow); }
:root .styled-select-option { border-radius: 6px; min-height: 38px; }
#shell th { background: var(--subtle); color: var(--muted); font-weight: 750; font-size: 10px; letter-spacing: .08em; }
#shell td { color: var(--ink); }
#shell tbody tr { transition: background-color 150ms var(--ease); }
#shell tbody tr:hover { background: var(--select-hover); }
#shell .code-token { background: var(--subtle); border-color: var(--border); border-radius: 6px; font-weight: 600; }
#shell .description, #shell .current-table .description { line-height: 1.65; }

/* Catalog controls keep their original actions and permissions. */
#shell .catalog-filter-toggle{display:none}
#shell .catalog-row-menu{min-width:44px}
#shell .catalog-row-menu>summary{
 display:grid;place-items:center;width:44px;min-height:44px;margin-left:auto;
 list-style:none;cursor:pointer;border:1px solid var(--border);border-radius:9px;
 color:var(--ink);background:var(--surface);font-size:18px;
}
#shell .catalog-row-menu>summary::-webkit-details-marker{display:none}
#shell .catalog-row-menu-items{display:grid;gap:4px;padding-top:6px}
#shell .catalog-row-menu-items>button{
 min-height:44px;padding:7px 9px;text-align:left;white-space:normal;
 background:var(--surface);color:var(--ink);border:1px solid var(--border);
}
#shell .catalog-row-menu-items>[data-current-action=delete]{
 margin-top:4px;color:var(--danger);
}
@media(min-width:601px){
 #shell .current-table :is(th,td):last-child{width:165px}
}
@media(max-width:600px),(max-width:950px) and (max-height:520px){
 #shell.current-view .module-navigation .catalog-filter-toggle{
  display:block;min-height:44px;width:100%;text-align:left;white-space:normal;
  padding:6px 10px;color:var(--ink);border:1px solid var(--border);
 }
 #shell.current-view .module-navigation:not(.catalog-filters-open)>.catalog-selector{display:none}
 #shell.current-view .module-header #toolbar{display:grid;grid-template-columns:minmax(0,1fr) repeat(2,44px);gap:5px}
 #shell.current-view .module-header #toolbar>.search-wrap{min-width:0}
 #shell.current-view .module-header #toolbar>.catalog-options,#shell.current-view .module-header #toolbar>#newButton{width:44px;min-width:44px}
 #shell.current-view .module-header #toolbar>.catalog-options{grid-column:3}
 #shell.current-view .module-header #toolbar>#newButton{grid-column:2;grid-row:1}
 #shell.current-view .module-header #toolbar>#newButton[hidden]{display:none!important}
 #shell.current-view #toolbar .catalog-options-menu #refresh{
  display:flex;gap:8px;align-items:center;width:100%;height:auto;min-height:44px
 }
 #shell.current-view #toolbar .catalog-options-menu #refresh span{display:inline}
}
#shell .row-actions .icon-button { color: var(--muted); min-width: 34px; border-radius: 8px; }
#shell .row-actions .icon-button:hover { background: var(--accent-soft); color: var(--accent-text); }
#shell .row-actions .icon-button.danger, #shell .danger { color: var(--danger); }
#shell .catalog-tabs button[aria-selected="true"], #shell .module-navigation button[aria-pressed="true"] { font-weight: 750; color: var(--accent-text); background: var(--active-gradient); }
#shell :is(.electrical-menu,.catalog-options-menu) { border-color: var(--select-border); box-shadow: var(--select-shadow); border-radius: 11px; }
#shell #contractsModule .contracts-bar button:not(.primary), #shell #contractsSettings button { border-radius: 9px; }
#shell #contractsImportPanel .contracts-import-toolbar { background: var(--subtle); border: 1px solid var(--border); border-radius: 11px; }
#shell #contractsImportPanel .contracts-source label { border-radius: 8px; font-weight: 600; }
#shell #contractsImportPanel .contracts-source label:has(input:checked) { background: var(--active-gradient); }
#shell #notice:not(:empty) { border: 1px solid var(--accent-line); padding: 12px 16px; border-radius: 10px; }
#shell #notice.error { color: var(--danger); border-color: var(--danger); background: var(--surface); }
:root .error { color: var(--danger); }
:root dialog { border: 1px solid var(--select-border); border-radius: 16px; box-shadow: 0 25px 80px #07101e50; }
:root dialog[open] { animation: lumen-reveal 180ms var(--ease); }
:root dialog::backdrop { background: #0a122872; }
@keyframes lumen-reveal { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: none; } }
.lumen-enter { animation: lumen-reveal 200ms var(--ease); }
#shell .lumen-no-access { padding: 60px 24px; text-align: center; color: var(--muted); }
#shell .lumen-no-access h2 { color: var(--ink); }
/* The login remains in its established layout, using the same palette. */
#login .login-brand { background: linear-gradient(150deg,var(--subtle),var(--surface)); border-color: var(--border); color: var(--ink); }
#login .brand strong, #login .login-story h1 { color: var(--ink); }
#login .login-story h1 { font-weight: 780; letter-spacing: -.055em; }
#login .login-story em { color: var(--accent-text); }
#login :is(.login-story p,.login-bottom,.art-label,.brand small) { color: var(--muted); }
#login .login-form { background: var(--surface); color: var(--ink); }
#login :is(.login-form h2,.login-form label) { color: var(--ink); }
#login :is(.muted,.login-help,.login-footer,.login-top) { color: var(--muted); }
#login .form-symbol { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-line); }
#login .pipe-art { filter: saturate(.7); }
#login .engineering-art { opacity: .9; }
:root[data-theme="dark"] #login .engineering-art { opacity: .7; }
@media (min-width:601px) {
  #shell.sidebar-collapsed aside nav button { width: 46px; padding: 11px; }
  #shell.sidebar-collapsed aside nav button .icon { width: 22px; height: 22px; }
}
@media (pointer:coarse), (max-width:700px) {
  :root :is(button,.styled-select-trigger), :root .styled-select-option { min-height: 44px; }
  #shell .row-actions .icon-button { min-width: 44px; }
  #shell h1 { font-size: 25px; }
  #shell aside nav button { min-height: 44px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}

/* Smooth, reversible sidebar movement, including the workspace beside it. */
@media (min-width:601px) {
  #shell aside { overflow-x:clip; transition:width 320ms var(--ease),padding 320ms var(--ease),background-color 220ms var(--ease); }
  #shell main { transition:margin-left 320ms var(--ease); }
  #shell .sidebar-brand-row { height:86px; min-height:86px; position:relative; align-items:flex-start; }
  #shell aside .brand { padding:0 6px; }
  #shell #sidebarToggle { position:absolute; right:0; top:2px; transition:transform 320ms var(--ease),background-color 180ms var(--ease); }
  #shell.sidebar-collapsed #sidebarToggle { transform:translateY(48px); right:8px; }
  #shell.sidebar-collapsed .sidebar-brand-row { flex-direction:row; justify-content:center; align-items:flex-start; gap:0; }
  #shell aside nav, #shell.sidebar-collapsed aside nav { margin-top:0; align-items:stretch; }
  #shell aside nav button { overflow:hidden; justify-content:flex-start; white-space:normal; height:56px; }
  #shell aside nav button .icon { transition:transform 220ms var(--ease); }
  #shell aside nav button:hover .icon { transform:translateX(2px); }
  #shell aside nav button > span:not(.nav-count) { white-space:normal; }
  #shell aside .brand>div,#shell .workspace-label,#shell aside nav button span,#shell .sidebar-note { transition:opacity 160ms ease,transform 260ms var(--ease); }
  #shell.sidebar-collapsed aside .brand>div,#shell.sidebar-collapsed .workspace-label,#shell.sidebar-collapsed aside nav button span,#shell.sidebar-collapsed .sidebar-note { display:block!important; opacity:0; visibility:hidden; pointer-events:none; transform:translateX(-8px); }
  #shell.sidebar-collapsed aside .brand>div { position:absolute; left:58px; }
  #shell .workspace-label { height:24px; white-space:nowrap; }
  #shell .sidebar-note { width:166px; }
  #shell.sidebar-collapsed aside nav button { justify-content:flex-start; padding:11px; height:56px; }
  #shell.sidebar-collapsed .nav-count { position:absolute; }
}
:root[data-theme="dark"] #shell aside { background:linear-gradient(180deg,#181719,#111214 72%); }
:root[data-theme="dark"] #shell aside nav button.active { border-color:transparent; box-shadow:inset 0 1px #ffb18b14; }
:root[data-theme="dark"] #shell :is(.topbar,.contracts-bar,.toolbar,.pagination) button:not(.primary),
:root[data-theme="dark"] #shell #sidebarToggle { background:var(--subtle); color:var(--ink); border-color:var(--border); }
:root[data-theme="dark"] #shell :is(.contracts-bar,.toolbar,.pagination) button:not(.primary):hover { background:#303033; border-color:#646167; }
:root[data-theme="dark"] #shell .styled-select-trigger { background:var(--surface); color:var(--ink); border-color:var(--select-border); }
:root[data-theme="dark"] #shell :is(.account-actions,.apu-breadcrumb) button { background:transparent; }
:root[data-theme="dark"] #shell :is(.contracts-bar,.module-header) { background:linear-gradient(180deg,#202022,#191a1c); }
:root[data-theme="dark"] #shell th { background:#222225; color:#c4c0bc; }
:root[data-theme="dark"] #shell :is(input,select,textarea) { background:#141416; border-color:var(--select-border); color:var(--ink); }
:root[data-theme="dark"] #shell .code-token { background:#252528; color:#eeebe6; border-color:#3b393b; }
@media (prefers-reduced-motion:reduce) {
  #shell aside,#shell main,#shell aside * { transition:none!important; }
}

@media(min-width:601px){#shell.sidebar-collapsed aside nav button>span{white-space:nowrap;}#shell.sidebar-collapsed aside .brand{width:44px;min-height:44px;}}

/* Lumen40 â€” shared contract tools and compact field headings. */
:root label:has(select) { display:flex;flex-direction:column;align-items:stretch;gap:5px; }
#contractsNewWork,#contractsNewContract,#contractsMep,#contractsDrawing,#mepApu,#drawingApu { display:none!important; }
#shell :is(.contracts-bar,.mep-context,.drawing-context) { align-items:flex-end; gap:12px; padding:12px 16px; flex-wrap:wrap; }
#shell .contracts-selector,#shell :is(.mep-context,.drawing-context)>label { display:flex; flex-direction:column; align-items:stretch; gap:5px; margin:0; flex:1 1 200px; min-width:150px; max-width:390px; font-size:11px; line-height:16px; font-weight:700; color:var(--muted); }
#shell .contracts-selector>label { margin:0; color:var(--muted); font-size:11px; font-weight:700; }
#shell :is(.contracts-selector,.mep-context,.drawing-context) .styled-select { margin-top:0; max-width:none; width:100%; flex:auto; }
#shell .contracts-selector>.styled-select .styled-select-trigger { padding-left:12px; }
#shell .workspace-tools { display:flex; gap:3px; padding:4px; border:1px solid var(--border); background:var(--subtle); border-radius:11px; margin-left:auto; flex:none; }
#shell .workspace-tools button { min-height:36px; padding:7px 11px; border:0; background:transparent; color:var(--muted); font-weight:700; font-size:12px; border-radius:7px; }
#shell .workspace-tools button .icon { width:17px;height:17px; }
#shell .workspace-tools button:hover { color:var(--ink); background:var(--surface); }
#shell .workspace-tools button[aria-pressed="true"] { color:var(--accent-text); background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent-line); }
#shell .apu-breadcrumb { align-items:center; min-height:48px; gap:7px; padding:7px 16px; overflow:visible; white-space:normal; flex-wrap:wrap; }
#shell .apu-breadcrumb>span { font-size:11px; }
#shell .workspace-create { display:flex; align-items:center; gap:7px; margin-left:auto; }
#shell .workspace-create button { min-height:32px; padding:5px 9px; border:1px solid var(--border); border-radius:7px; color:var(--ink); background:var(--surface); font-size:11px; font-weight:650; }
#shell .workspace-create button:hover { background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-text); }
#shell .workspace-create button>span { font-size:18px; line-height:16px; color:var(--accent-text); }
#shell .contracts-bar #contractsSearch { flex:1 1 140px; width:140px; max-width:230px; }
#shell .contracts-bar>.workspace-tools { order:1; }
#shell .contracts-bar>:is(#contractsSearch,#contractsImport,#contractsHistoryButton,#contractsSettingsButton) { order:2; }
#shell .contracts-bar>button { padding:10px; min-height:44px; }
#shell :is(#mepMessage,#drawingMessage):empty { display:none; }
#shell .filter-heading { display:flex;flex-direction:column;gap:5px;font-size:11px;margin:0;flex:0 1 225px; }
#shell .filter-heading .styled-select { margin:0; }
#shell .toolbar { align-items:flex-end; }
:root[data-theme="dark"] :is(input,select,textarea):is(:focus,:active) { background:var(--surface);color:var(--ink); }
:root[data-theme="dark"] .styled-select-option:is(:hover,:focus-visible,.is-active,[aria-selected="true"]) { background:var(--select-hover);color:var(--ink);border-color:var(--select-border); }
:root[data-theme="dark"] #shell button:not(.primary):not(.active):active { background:var(--select-hover);color:var(--ink); }
:root[data-theme="dark"] option { background:var(--surface);color:var(--ink); }
@media(min-width:1050px) { #shell .contracts-bar .contracts-selector { flex:1 1 190px;max-width:320px; } }
@media(max-width:800px) { #shell :is(.contracts-bar,.mep-context,.drawing-context) { gap:8px;padding:10px; } #shell .workspace-tools { margin-left:0; } #shell .apu-breadcrumb { padding:7px 10px; } #shell .workspace-create { gap:5px; } }
@media(pointer:coarse) { #shell .workspace-tools button,#shell .workspace-create button { min-height:44px; } }

/* MEP: auxiliary actions share the context row; currency stays informational. */
#shell #mepModule .mep-extra-tools { display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-left:auto;font-size:12px;color:var(--muted); }
#shell #mepModule .mep-extra-tools:has(> [role="status"]:only-child:empty) { display:none; }
#shell #mepModule .mep-extra-tools button { min-height:44px; }
#shell #mepModule .mep-extra-tools [role="status"]:empty { display:none; }
#shell #mepModule .mep-route-currency { color:var(--muted);font-size:11px;font-weight:600;white-space:nowrap;margin-left:8px; }

/* Dibujo: one top route and a folding context, giving the height back to the canvas. */
#shell.drawing-view main>.topbar>div { display:none; }
#shell.drawing-view main>.topbar { gap:8px;height:auto;min-height:46px; }
#shell .topbar>.drawing-top-route { display:flex;flex:1;min-width:0;margin:0;padding:4px 0;border:0;background:transparent;gap:7px;min-height:46px; }
#shell .drawing-top-route .workspace-create { flex-shrink:0; }
#shell .drawing-context-fold { display:grid;grid-template-rows:1fr;flex-shrink:0;transition:grid-template-rows 260ms cubic-bezier(.2,.8,.2,1); }
#shell .drawing-context-fold.is-collapsed { grid-template-rows:0fr; }
#shell .drawing-context-clip { min-height:0;overflow:hidden;opacity:1;transition:opacity 160ms ease; }
#shell .drawing-context-fold.is-collapsed .drawing-context-clip { opacity:0; }
#shell .drawing-context-toggle .icon { width:16px;height:16px; }
@media(max-width:1100px){#shell .drawing-top-route .workspace-create { gap:5px; } #shell .drawing-top-route .workspace-create button { padding-inline:7px; } }
@media(prefers-reduced-motion:reduce){#shell .drawing-context-fold,#shell .drawing-context-clip{transition:none;}}
#shell .drawing-top-route .drawing-context-toggle>span { font-size:11px;line-height:16px;color:var(--ink); }
#shell .topbar>.drawing-top-route>button { background:transparent!important;border:0;padding:3px 1px;min-height:30px;color:var(--accent-text); }

/* MEP shares the compact route and fold, with its own saved preference. */
#shell.mep-view main>.topbar>div { display:none; }
#shell.mep-view main>.topbar { gap:8px;height:auto;min-height:46px; }
#shell .mep-top-route .mep-route-currency { color:var(--muted);font-size:11px;font-weight:600;white-space:nowrap;margin-left:8px; }

/* Lumen 69: capture owns the viewport, not the space remaining below navigation. */
html.mep-capture-open,html.mep-capture-open body{overflow:hidden!important;height:100dvh}
html.mep-capture-open #shell.mep-view>aside,html.mep-capture-open #shell.mep-view>main>.topbar{display:none!important}
html.mep-capture-open #shell.mep-view>main{margin:0!important;padding:0!important;height:100dvh!important;min-height:0!important}
html.mep-capture-open #mepModule{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;z-index:900;border:0;border-radius:0;transform:none!important;animation:none!important}
html.mep-capture-open #mepModule>:not(.mep-host){display:none!important}
html.mep-capture-open #mepModule .mep-host,html.mep-capture-open #mepModule iframe{height:100%;min-height:0}
@media(max-width:600px){
 #shell>aside{position:relative!important;inset:auto!important;width:100%!important;height:52px!important;min-height:52px;padding:4px 10px!important;display:flex!important;align-items:center;justify-content:space-between;z-index:200}
 #shell aside .sidebar-brand-row{display:flex!important;align-items:center;justify-content:space-between;width:100%;margin:0}
 #shell aside .brand{padding:0;gap:8px}#shell aside .brand-mark{width:34px;height:34px;font-size:26px}#shell aside .brand strong{font-size:19px}#shell aside .brand small{display:none}
 #shell #sidebarToggle{display:flex!important;position:static!important;transform:none!important;width:44px;height:44px;align-items:center;justify-content:center}
 #shell>aside>:not(.sidebar-brand-row){display:none!important}
 #shell.mobile-nav-open>aside nav{display:flex!important;position:absolute;top:52px;left:8px;right:8px;background:var(--surface);border:1px solid var(--border);box-shadow:0 16px 40px #0003;border-radius:12px;padding:8px;flex-direction:column;align-items:stretch;margin:0;max-height:calc(100dvh - 120px);overflow:auto}
 #shell.mobile-nav-open>aside nav button{width:100%;min-height:44px;justify-content:flex-start}#shell.mobile-nav-open>aside nav button span{display:inline!important}
 #shell>main{margin-left:0!important}#shell.mep-view>main{height:calc(100dvh - 52px)!important;min-height:0!important;padding:0 4px 4px}
 #shell.mep-view .mep-frame{min-height:0}
 #shell:is(.mep-view,.drawing-view) main>.topbar{height:48px!important;min-height:48px;flex-wrap:nowrap;gap:4px}
 #shell .topbar>.drawing-top-route{height:48px;min-height:48px;flex-wrap:nowrap;white-space:nowrap;overflow:hidden;gap:5px}
 #shell .drawing-top-route>:nth-child(-n+4),#shell .drawing-top-route>[data-work-level="root"],#shell .drawing-top-route>[data-work-level="root"]+span{display:none}
 #shell .drawing-top-route>[data-work-level="work"]{max-width:95px;overflow:hidden;text-overflow:ellipsis;flex-shrink:1;font-size:10px}
 #shell .drawing-top-route>span:not(.mep-route-currency){overflow:hidden;text-overflow:ellipsis;min-width:0;font-size:10px}
 #shell .drawing-top-route .mep-route-currency{display:none}
 #shell .drawing-top-route .workspace-create{margin-left:auto;gap:0}
 #shell .drawing-top-route .workspace-create>button:not(.drawing-context-toggle){display:none}
 #shell .drawing-top-route .drawing-context-toggle{width:40px;min-width:40px;height:40px;padding:8px}
 #shell .drawing-top-route .drawing-context-toggle>span{display:none}
 #shell .topbar>[data-theme-toggle]{width:36px;min-width:36px;height:36px;padding:7px}
}

/* Lumen 70: the mobile shell is one icon row, with account actions on demand. */
.mobile-account-toggle{display:none}
@media(max-width:600px){
 #shell>aside{display:grid!important;grid-template-columns:34px minmax(0,1fr) 38px!important;gap:6px;flex-wrap:nowrap!important;height:52px!important;min-height:52px!important;padding:4px 8px!important;box-sizing:border-box}
 #shell aside .sidebar-brand-row{width:34px!important;min-width:0;gap:0}
 #shell aside .brand>div,#shell #sidebarToggle{display:none!important}
 #shell>aside>nav[aria-label],#shell.mobile-nav-open>aside>nav[aria-label]{display:flex!important;position:static!important;width:100%;min-width:0;height:44px;max-height:44px;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:2px;margin:0!important;padding:0!important;border:0!important;border-radius:0;box-shadow:none!important;background:transparent!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
 #shell>aside>nav[aria-label]::-webkit-scrollbar{display:none}
 #shell aside nav button,#shell.mobile-nav-open aside nav button{width:40px!important;min-width:40px!important;height:44px!important;min-height:44px!important;flex:0 0 40px;padding:9px!important;justify-content:center!important;border-radius:10px}
 #shell aside nav button>span,#shell.mobile-nav-open aside nav button>span{display:none!important}
 #shell aside nav button .icon{width:21px;height:21px;flex-shrink:0}
 #shell>aside>.account{display:block!important;width:38px!important;margin:0!important;padding:0!important;border:0!important;position:relative}
 #shell aside .account-profile{display:none!important}
 #shell aside .mobile-account-toggle{display:flex;width:38px;height:44px;min-height:44px;padding:3px;align-items:center;justify-content:center;border:0;background:transparent}
 #shell aside .mobile-account-toggle .avatar{width:30px;height:30px;font-size:11px}
 #shell aside .account-actions{display:none!important}
 #shell.mobile-account-open aside .account-actions{display:flex!important;position:absolute;top:48px;right:0;flex-direction:column;align-items:stretch;gap:4px;width:190px;padding:8px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 12px 32px #0003;z-index:210}
 #shell.mobile-account-open aside .account-actions button{display:flex;width:100%;min-height:44px;justify-content:flex-start;padding:10px;gap:8px}
 #shell.mobile-account-open aside .account-actions button span{display:inline!important}
}
@media(max-width:600px){#shell>aside>.sidebar-brand-row{grid-area:1/1/2/2!important}#shell>aside>nav[aria-label]{grid-area:1/2/2/3!important;align-self:center!important}#shell>aside>.account{grid-area:1/3/2/4!important}}

/* Shared test-work context; same controls and layout as the live modules. */
.playground-badge{display:flex;align-items:center;gap:.65rem;margin-inline-start:auto;padding:.38rem .65rem;border:1px solid color-mix(in srgb,var(--accent,#c94719) 35%,transparent);border-radius:9px;background:color-mix(in srgb,var(--accent,#c94719) 9%,transparent);font-size:12px;line-height:1.35}
.playground-badge[hidden]{display:none}.playground-badge strong{color:var(--accent,#c94719)}.playground-badge span{color:var(--muted,#687386)}
@media(max-width:760px){.playground-badge{font-size:10px;gap:.3rem;padding:.3rem .45rem;flex-wrap:wrap}.playground-badge span{display:none}}

/* Keep all sidebar actions reachable on short screens and at browser zoom. */
@media(min-width:601px){
 #shell>aside{overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
 #shell>aside>*{flex-shrink:0}
 #shell.sidebar-collapsed>aside>.sidebar-note{display:none!important}
}

.uuc-legal-access{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 16px;margin:8px 0;box-sizing:border-box;border:1px solid currentColor;border-color:color-mix(in srgb,currentColor 28%,transparent);border-radius:10px;background:color-mix(in srgb,currentColor 7%,transparent);color:inherit!important;font-family:inherit;font-size:14px;font-weight:650;line-height:1.4;text-decoration:none!important;white-space:nowrap;flex-shrink:0;box-shadow:0 2px 5px #0000000a;transition:background .16s,border-color .16s,box-shadow .16s}.uuc-legal-access:hover{background:color-mix(in srgb,currentColor 14%,transparent);border-color:color-mix(in srgb,currentColor 55%,transparent);box-shadow:0 3px 8px #00000012}.uuc-legal-access:active{background:color-mix(in srgb,currentColor 20%,transparent);box-shadow:none}.uuc-legal-access:focus-visible{outline:3px solid currentColor;outline-offset:3px}.uuc-legal-access svg{width:18px!important;height:18px!important;flex:0 0 18px;fill:none!important;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.uuc-legal-access span{font:inherit!important;color:inherit!important}.auth-card>.uuc-legal-access,.access-panel>.uuc-legal-access{display:flex!important;width:max-content;margin:18px auto 0}.mobile-header>.uuc-legal-access{padding:8px;font-size:13px}.sidebar--collapsed .sidebar-foot>.uuc-legal-access{padding:7px;font-size:12px}.sidebar--collapsed .sidebar-foot>.uuc-legal-access svg{display:none}.bx-brand>.uuc-legal-access{font-size:13px;margin:0 0 0 12px}.sidebar-bottom>.uuc-legal-access{justify-self:start}.sidebar.is-collapsed .sidebar-bottom>.uuc-legal-access{padding:8px}.sidebar.is-collapsed .sidebar-bottom>.uuc-legal-access span{display:none}@media(prefers-reduced-motion:reduce){.uuc-legal-access{transition:none}}

/* Work logos: consistent upload controls, without replacing native file access. */
#contractsModule .work-logo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:24px}
#contractsModule .work-logo-field{display:flex;flex-direction:column;gap:14px;min-width:0;margin:0;padding:20px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:0 4px 16px #00000006}
#contractsModule .work-logo-field>strong{font-size:14px}
#contractsModule .work-logo-field>img:not([hidden]){display:block;width:100%;height:120px;object-fit:contain;padding:12px;border-radius:10px;background:var(--subtle)}
#contractsModule .work-logo-field input[type=file]{width:100%;min-width:0;padding:0;border:0;border-radius:10px;background:transparent;color:var(--muted);font:inherit;font-size:12px;line-height:44px;cursor:pointer}
#contractsModule .work-logo-field input[type=file]::file-selector-button{margin-right:12px;min-height:44px;padding:0 16px;border:1px solid var(--accent-line,var(--border));border-radius:10px;background:var(--accent-soft);color:var(--accent-text);font:inherit;font-weight:650;cursor:pointer;transition:background .15s,box-shadow .15s}
#contractsModule .work-logo-field input[type=file]:hover::file-selector-button{background:var(--subtle);box-shadow:0 2px 8px #00000012}
#contractsModule .work-logo-field input[type=file]:focus-visible{outline:2px solid var(--accent-text);outline-offset:4px}
#contractsModule .work-logo-field input[type=file]:disabled{opacity:.55;cursor:wait}
@media(max-width:700px){#contractsModule .work-logo-grid{grid-template-columns:1fr}#contractsModule .work-logo-field{padding:16px}}

#contractsModule .work-logo-layout{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(380px,1.2fr);gap:28px;align-items:start;margin-top:24px}
#contractsModule .work-logo-layout .work-logo-grid{grid-template-columns:1fr;margin:0;max-width:none}
.work-logo-preview{position:sticky;top:20px;min-width:0;padding:22px;border-radius:18px;background:var(--subtle);border:1px solid var(--border)}
.work-logo-preview-title{display:flex;flex-direction:column;gap:5px;margin-bottom:18px}.work-logo-preview-title small{color:var(--muted)}
.work-logo-paper{background:#fff;color:#172638;padding:22px;border-radius:3px;box-shadow:0 12px 28px #00000016;border:1px solid #d8dee6}
.work-logo-document-head{display:grid;grid-template-columns:1fr 1.8fr 1fr;align-items:center;gap:12px;min-height:115px;border:2px solid #253340;padding:12px;text-align:center}
.work-logo-document-head>strong{font-size:clamp(12px,1.3vw,19px);line-height:1.25}.work-logo-document-head>div{height:85px;display:flex;align-items:center;justify-content:center;min-width:0}.work-logo-document-head img{width:100%;height:100%;object-fit:contain}.work-logo-document-head span{font-size:11px;color:#657487;border:1px dashed #b8c2ce;border-radius:6px;padding:10px}
.work-logo-document-work{display:flex;gap:12px;align-items:center;padding:12px 8px;border:1px solid #7a8794;border-top:0;font-size:11px}.work-logo-document-work small{font-size:9px;flex-shrink:0}.work-logo-document-section{margin-top:16px;border:1px solid #7a8794;padding:7px;text-align:center;font-size:10px;font-weight:700}.work-logo-document-lines{height:100px;border:1px solid #7a8794;border-top:0;background:repeating-linear-gradient(white,white 24px,#edf0f3 25px)}
@media(max-width:1000px){#contractsModule .work-logo-layout{grid-template-columns:1fr}.work-logo-preview{position:static;padding:16px}.work-logo-paper{padding:12px}.work-logo-document-head{gap:7px;padding:8px}}

.work-logo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;max-width:850px}.work-logo-field{padding:20px;border:1px solid var(--border,#ccd3dc);border-radius:14px;display:grid;gap:16px;background:var(--surface,#faf9f7)}.work-logo-field img{height:100px;max-width:100%;object-fit:contain;object-position:left}.work-logo-field input{max-width:100%}.work-logo-field input::file-selector-button{border:1px solid #b8bdc5;border-radius:8px;padding:10px;font:inherit;background:transparent;color:inherit}

   #shell .mep-top-route .lumen-mep-view-switch { display:inline-flex;flex-direction:row;flex-wrap:nowrap;flex:0 0 auto;align-items:center;align-self:center;gap:2px;height:44px;box-sizing:border-box;margin:0;padding:3px;border:1px solid var(--border,#d1d8e3);border-radius:12px;background:var(--subtle,#edf0f5); }
   #shell .mep-top-route .lumen-mep-view-switch button { display:inline-flex;align-items:center;justify-content:center;flex:1 0 auto;width:auto;min-height:36px;height:36px;margin:0;padding:0 16px;border:0;border-radius:8px;white-space:nowrap;font:inherit;font-size:13px;font-weight:600;background:transparent;color:var(--muted,#526174);cursor:pointer; }
   #shell .mep-top-route .lumen-mep-view-switch button[aria-current="page"] { background:var(--surface,#fffdfa);color:var(--accent,#a73b1a);box-shadow:0 1px 4px #0002; }
   #shell .mep-top-route .lumen-mep-view-switch button:hover:not(:disabled) { color:var(--accent,#a73b1a); }
   #shell .mep-top-route .lumen-mep-view-switch button:focus:not(:focus-visible) { outline:none; }
   #shell .mep-top-route .lumen-mep-view-switch button:focus-visible { outline:2px solid var(--accent,#a73b1a);outline-offset:1px; }
   #shell .mep-top-route .lumen-mep-view-switch button:disabled { opacity:.55;cursor:wait; }
   @media(max-width:600px){#shell .mep-top-route .lumen-mep-view-switch{margin-left:0;}}
  
.account-actions .legal-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:4px;margin:0;border:0;background:transparent;color:inherit;text-decoration:none}.legal-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6}.account-actions{align-items:center}.ot-work-settings>header button{flex:none}

/* Work workspace: persistent work navigation, contextual actions, bounded rows. */
#contractsModule:not([hidden]){display:grid;grid-template-columns:224px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"route route" "rail content";min-height:0}
#contractsModule>.apu-breadcrumb{grid-area:route;min-width:0;flex-wrap:wrap;white-space:normal;overflow:visible;padding:10px 16px;gap:6px}
#contractsModule>.works-rail{grid-area:rail;min-width:0;min-height:0;display:flex;flex-direction:column;gap:12px;padding:20px 12px;border-right:1px solid var(--border);background:var(--subtle)}
.works-rail-heading{display:flex;justify-content:space-between;align-items:center;padding:0 8px}.works-rail-heading strong{font-size:15px}.works-rail-heading span{font-size:12px;color:var(--muted)}
#contractsModule .works-filter-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#contractsModule #worksFilter{width:100%;min-width:0;margin:0;font-size:12px;padding:10px 12px}
.works-rail-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:6px;scrollbar-width:thin}
#contractsModule .works-rail-list button{flex-shrink:0;display:block;width:100%;min-height:46px;padding:13px 12px;text-align:left;white-space:normal;overflow-wrap:anywhere;border:1px solid transparent;background:transparent;color:var(--muted);font-size:12px;font-weight:600;line-height:1.45;border-radius:9px}
#contractsModule .works-rail-list button:hover{background:var(--surface);color:var(--ink)}
#contractsModule .works-rail-list button[aria-current=page]{background:var(--surface);color:var(--accent-text);border-color:var(--accent-line,var(--border));box-shadow:inset 3px 0 var(--accent-text)}
#contractsModule .works-rail-list button:focus-visible{outline:2px solid var(--accent-text);outline-offset:-2px}
.works-rail-empty{font-size:12px;color:var(--muted);padding:0 8px}
#contractsModule>.works-content{grid-area:content;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
#contractsModule .works-heading{flex:none;padding:12px 18px;border-bottom:1px solid var(--border);display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;min-width:0;background:var(--surface)}
.works-heading small{display:none}
#contractsModule #worksSelectedName{margin:0;line-height:1.3;font-size:20px;overflow-wrap:anywhere}
#contractsModule .works-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#contractsModule .works-actions button{min-height:38px;padding:8px 12px;font-size:12px;white-space:normal}
#contractsModule .works-native-selector{display:none!important}
#contractsModule .contracts-bar{flex:none;padding:12px 18px;gap:8px;align-items:end;min-width:0}
#contractsModule .contracts-bar>.contracts-selector{flex:1 1 220px;max-width:340px}
#contractsModule .contracts-bar>.contracts-selector>.styled-select{max-width:none}
#contractsModule #contractsSearch{flex:1 1 160px;min-width:100px;width:auto;max-width:360px;margin:0}
#contractsModule #contractsHistoryButton{flex:none;min-height:42px}
#contractsModule #contractsList{display:flex;flex:1 1 0;flex-direction:column;min-height:0;min-width:0;overflow:hidden}
#contractsModule #contractsRows{flex:1 1 0;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#contractsModule .contracts-footer{flex:none;padding:12px 18px;gap:8px;border-top:1px solid var(--border);background:var(--surface);min-width:0;flex-wrap:wrap}
#contractsModule .contracts-footer>div{display:flex;align-items:center;gap:8px}
#contractsModule .contracts-footer button{padding:9px 12px;min-height:38px}
#contractsModule .contracts-editor{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px}
#contractsModule .apu-choices{min-height:0;padding:22px}
#contractsModule .apu-choices>div{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-top:18px}
#contractsModule .apu-choices [data-choice]{min-height:104px;padding:18px;border-radius:12px;background:var(--surface);justify-content:space-between;gap:16px}
#contractsModule .apu-choices [data-choice]:hover{border-color:var(--accent-text);background:var(--accent-soft)}
.works-welcome{padding:50px 30px;max-width:540px;margin:auto}.works-welcome>span{font-size:32px;color:var(--accent-text)}.works-welcome p{color:var(--muted);line-height:1.8}
#contractsModule .works-mobile-controls{display:none}
#shell.works-layout-active{height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}
#shell.works-layout-active>aside{flex:none}
#shell.works-layout-active>main{flex:1 1 0;min-height:0;display:flex;flex-direction:column;padding-bottom:12px;overflow:hidden}
#shell.works-layout-active>main>.topbar{flex:none;height:48px}
#shell.works-layout-active #contractsModule:not([hidden]){flex:1 1 0;min-height:0;margin:0;overflow:hidden}
@media(min-width:1024px) and (max-width:1400px){#contractsModule:not([hidden]){grid-template-columns:200px minmax(0,1fr)}}
@media(max-width:1023px){
 #contractsModule:not([hidden]){grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:"route" "toggle" "content"}
 #contractsModule .works-mobile-controls{grid-area:toggle;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-bottom:1px solid var(--border)}
 #contractsModule .works-mobile-controls button{min-height:44px;margin:0;padding:8px 12px;white-space:normal}
 #contractsModule>.works-rail{display:none;border-right:0;padding:12px;overflow:hidden}
 #contractsModule.works-rail-open{grid-template-areas:"route" "toggle" "rail"}
 #contractsModule.works-rail-open>.works-rail{display:flex}
 #contractsModule.works-rail-open>.works-content{display:none}
 #contractsModule .works-heading{padding:0;border:0;flex-direction:column;align-items:stretch}
 #contractsModule .works-heading>div:not(.works-actions){display:none}
 #contractsModule.works-actions-open .works-heading{padding:10px 12px;border-bottom:1px solid var(--border)}
 #contractsModule.works-actions-open .works-content{overflow:auto}
 #contractsModule.works-actions-open #contractsList{flex:1 0 250px}
 #contractsModule.works-actions-open .contracts-editor{flex:1 0 240px}
 #contractsModule .works-actions{display:none}
 #contractsModule.works-actions-open .works-actions:not([hidden]){display:flex;max-height:25dvh;overflow:auto}
 #contractsModule .contracts-editor{padding:14px}
 #contractsModule .apu-choices{padding:16px}
}
@media(max-width:600px){
 #contractsModule.works-actions-open .works-actions:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #contractsModule .works-actions button{min-height:44px;padding:8px;font-size:11px}
 #contractsModule .contracts-bar{padding:12px}
 #contractsModule .contracts-bar>.contracts-selector{flex-basis:100%;max-width:none}
 #shell #contractsModule #contractsSearch{flex:1 1 100px;min-width:80px;max-width:none}
 #contractsModule .apu-choices>div{grid-template-columns:minmax(0,1fr)}
 #contractsModule .contracts-footer{padding:8px 12px;justify-content:space-between;gap:5px}
 #contractsModule .contracts-footer>span{flex-basis:100%;font-size:11px}
 #contractsModule .contracts-footer>div{width:100%;justify-content:space-between}
 #shell.works-layout-active>main{padding:0 6px 6px}
 #contractsModule .contracts-bar{gap:6px}
 #contractsModule #worksSelectedName{font-size:17px}
 #shell.works-layout-active .apu-breadcrumb{gap:4px;padding:6px 10px}
 #shell.works-layout-active .apu-breadcrumb>button[data-level=master],#shell.works-layout-active .apu-breadcrumb>button[data-level=master]+span{display:none}
 #contractsModule .contracts-heading{flex-wrap:wrap}
}

#contractsModule .works-actions #contractsSettingsButton{width:auto;min-width:90px;flex:0 0 auto;padding:8px 12px}

/* Short landscape views keep controls reachable within the work pane. */
@media(max-height:500px){
 #contractsModule>.works-content{overflow:auto;overscroll-behavior:contain}
 #contractsModule #contractsList{flex:1 0 250px}
 #contractsModule .contracts-editor{flex:1 0 240px}
}

/* The legacy archive is no longer shown in the workspace navigation. */
#shell aside nav > button#archiveNav,
#shell aside nav > button[data-view="catalog"]{display:none!important}

/* Playground is selected as a work, not as a separate navigation module. */
#shell aside nav > #playgroundNav{display:none!important}

/* MEP view tabs stay beside the selector toggle, outside the folding panel. */
#shell .mep-top-route .mep-view-tabs-slot{display:flex;flex:none;align-items:center;min-width:0}
#shell .mep-top-route .mep-view-tabs-slot:empty{display:none}
@media(max-width:600px){
 #shell .mep-top-route .lumen-mep-view-switch button{padding:0 10px;font-size:12px}
}

/* Shared capture controls belong to the MEP breadcrumb row. */
#shell .mep-top-route [data-workspace-create]{display:none}
#shell .mep-draft-actions-slot,#shell .shared-capture-actions{display:flex;align-items:center;gap:7px;flex:none}
#shell .mep-draft-actions-slot:empty{display:none}
#shell .shared-capture-actions button{white-space:nowrap}
@media(max-width:800px){#shell .mep-top-route .workspace-create{flex-wrap:wrap;justify-content:flex-end}#shell .shared-capture-actions button{min-height:40px}}

/* Compact shared-capture actions, with accessible labels and tooltips. */
#shell .shared-capture-actions .shared-capture-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;min-width:36px;height:36px;min-height:36px;padding:0}
#shell .shared-capture-icon svg{width:18px;height:18px;flex:none;pointer-events:none}
#shell .shared-capture-icon.is-active{color:var(--accent-text);background:var(--accent-soft);border-color:var(--accent-line)}
@media(pointer:coarse){#shell .shared-capture-actions .shared-capture-icon{width:44px;min-width:44px;height:44px;min-height:44px}}

/* Lucide controls match the Dibujo toolrail size and stroke. */
#shell .shared-capture-actions .shared-capture-icon{width:40px;min-width:40px;height:40px;min-height:40px;border-radius:10px}
#shell .shared-capture-icon svg{width:20px;height:20px;stroke-width:1.7}
@media(pointer:coarse){#shell .shared-capture-actions .shared-capture-icon{width:44px;min-width:44px;height:44px;min-height:44px}}

/* Unified MEP: the selected desktop layout keeps the global navigation visible. */
@media(min-width:760px){
 #shell.mep-view:not([hidden]){display:grid!important}
 #shell.mep-view{grid-template-columns:86px minmax(0,1fr)!important;gap:0!important}
 #shell.mep-view>aside{width:86px!important;min-width:86px!important;padding:16px 8px!important}
 #shell.mep-view>aside .brand-mark{width:46px;height:46px;font-size:28px;border-radius:12px}
 #shell.mep-view>aside .brand>div,#shell.mep-view>aside .workspace-label,#shell.mep-view>aside .sidebar-note,#shell.mep-view>aside #sidebarToggle{display:none!important}
 #shell.mep-view>aside nav{margin-top:28px!important;padding:0!important;gap:10px}
 #shell.mep-view>aside nav button{width:70px!important;height:76px!important;padding:10px 4px!important;display:flex!important;flex-direction:column;justify-content:center;align-items:center;gap:6px;border-radius:9px}
 #shell.mep-view>aside nav button>span{position:static!important;display:block!important;opacity:1!important;visibility:visible!important;transform:none!important;max-width:70px;font-size:10px;line-height:1.25;text-align:center;white-space:normal!important}
 #shell.mep-view>aside nav button .icon{width:23px;height:23px;flex:none}
 #shell.mep-view>aside .account-profile{display:flex;flex-direction:column;align-items:center;padding:0!important;gap:6px}
 #shell.mep-view>aside #accountName{font-size:10px;max-width:65px;overflow:hidden;text-overflow:ellipsis;display:block}
 #shell.mep-view>aside #accountRole{font-size:9px;text-align:center}
 #shell.mep-view>aside .account-actions{flex-direction:column;align-items:center;gap:5px;padding:6px 0}
 #shell.mep-view>aside .account-actions button span,#shell.mep-view>aside .legal-icon{display:none}
 #shell.mep-view>main{padding:0!important;margin:0!important;min-width:0;gap:0!important;height:100dvh;overflow:hidden}
 #shell.mep-view>main>.topbar{min-height:46px;padding:8px 22px!important;border-bottom:1px solid var(--border)}
 #shell.mep-view .mep-context{padding:8px 18px;gap:12px;align-items:center;background:var(--surface)}
 #shell.mep-view #mepModule{border:0!important;border-radius:0!important}
 #shell.mep-view .mep-frame{min-height:0!important}
}
@media(min-width:760px){#shell.mep-view>aside{grid-column:1;grid-row:1}#shell.mep-view>main{grid-column:2;grid-row:1;width:auto!important}}

/* MEP rail: honor hidden controls, keep labels readable and scroll only navigation. */
#shell.mep-view>aside nav>button[hidden]{display:none!important}
@media(min-width:760px){
 #shell.mep-view:not(.mobile-hybrid-nav){grid-template-columns:112px minmax(0,1fr)!important}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside{box-sizing:border-box;width:112px!important;min-width:112px!important;height:100dvh;min-height:0;display:flex;flex-direction:column;align-items:stretch;padding:12px 8px!important;overflow:hidden}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .sidebar-brand-row{height:56px;min-height:56px;flex:none;display:flex;align-items:center;justify-content:center}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .brand{padding:0}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside nav{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;flex:1 1 0;min-height:0;width:100%;margin:12px 0 0!important;padding:0!important;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside nav>button:not([hidden]){box-sizing:border-box;width:100%!important;min-width:0;height:auto!important;min-height:68px;flex:0 0 auto;padding:8px 4px!important;gap:5px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside nav>button>span:not(.nav-count){box-sizing:border-box;width:100%;max-width:none;min-width:0;font-size:11px;line-height:1.3;overflow-wrap:normal;word-break:normal}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside>.account{box-sizing:border-box;flex:none;width:100%;margin:8px 0 0;padding:10px 0 0}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .account-actions{padding:6px 0 0;gap:4px}
}

/* Desktop MEP uses the existing persisted sidebar toggle; phone navigation stays independent. */
@media(min-width:760px){
 #shell.mep-view:not(.mobile-hybrid-nav){--mep-sidebar-width:240px;grid-template-columns:var(--mep-sidebar-width) minmax(0,1fr)!important}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav){--mep-sidebar-width:112px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside{width:var(--mep-sidebar-width)!important;min-width:var(--mep-sidebar-width)!important}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .sidebar-brand-row{justify-content:space-between;gap:4px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside #sidebarToggle{display:grid!important;position:static;transform:none;flex:none;width:36px;height:36px;min-height:36px;padding:6px}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside .brand>div{display:block!important;position:static;opacity:1;visibility:visible;transform:none}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside nav>button:not([hidden]){flex-direction:row;justify-content:flex-start;min-height:48px;padding:10px 12px!important;gap:12px}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside nav>button>span:not(.nav-count){width:auto;text-align:left;font-size:13px;line-height:1.4}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside .account-profile{flex-direction:row;justify-content:flex-start;padding:0 6px!important;gap:10px}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside #accountName{font-size:13px;max-width:155px}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside #accountRole{font-size:11px;text-align:left}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside .account-actions{flex-direction:row;justify-content:flex-start;flex-wrap:wrap;gap:8px}
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav)>aside .account-actions button span{display:inline}
}

/* MEP context is part of the breadcrumb, using the same live controls. */
#shell .mep-top-route>.mep-inline-context{display:flex;flex:0 1 440px;min-width:0;align-items:center;gap:6px;padding:0!important;border:0;background:transparent;flex-wrap:nowrap}
#shell .mep-top-route .mep-inline-context>label{display:flex;flex:1 1 190px;min-width:100px;max-width:340px;align-items:stretch;margin:0;gap:0;font-size:0;line-height:0}
#shell .mep-top-route .mep-inline-context>label:first-child{flex:1.5 1 290px}
#shell .mep-inline-context .styled-select{margin:0;min-width:0;max-width:100%;width:100%;flex:auto}
#shell .mep-inline-context .styled-select-trigger,#shell .mep-inline-context select{min-width:0;width:100%;min-height:36px;height:36px;margin:0;padding-left:8px;border-color:transparent;background:transparent;box-shadow:none;color:var(--accent-text);font-size:12px;line-height:20px}
#shell .mep-inline-context .styled-select-value{padding:7px 0;line-height:20px}
#shell .mep-inline-context .styled-select-trigger{gap:6px}
#shell .mep-inline-context .select-arrow-zone{width:24px;border-left:0;margin-left:0}
#shell .mep-inline-context .styled-select-trigger:hover,#shell .mep-inline-context .styled-select.is-open>.styled-select-trigger{background:var(--accent-soft);border-color:var(--accent-line)}
#shell .mep-inline-context .mep-context-divider{flex:none;color:var(--muted);font-size:11px;line-height:20px}
#shell .mep-top-route>.workspace-create{min-width:0;max-width:100%;flex-wrap:wrap;row-gap:6px}
#shell .mep-top-route .mep-extra-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0;font-size:12px}
#shell .mep-top-route .mep-extra-tools [role="status"]:empty{display:none}
@media(max-width:900px){#shell .mep-top-route>.mep-inline-context{flex:1 1 400px}#shell .mep-top-route>.workspace-create{flex:1 1 auto;justify-content:flex-end}}
@media(max-width:600px){#shell.mep-view main>.topbar{height:auto!important;align-items:flex-start}#shell .topbar>.mep-top-route{height:auto;flex-wrap:wrap;white-space:normal;overflow:visible}#shell .mep-top-route>.mep-inline-context{flex:1 1 100%;width:100%}#shell .mep-top-route .mep-inline-context>label{min-width:90px}#shell .mep-top-route .lumen-mep-view-switch{max-width:100%;flex-wrap:wrap}}
@media(pointer:coarse){#shell .mep-inline-context .styled-select-trigger,#shell .mep-inline-context select{min-height:44px;height:44px}}

/* Photo viewer: secondary close action, consistent with the app controls. */
.unified-photo-view>button{appearance:none;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 14px;border:1px solid var(--border,#d1d8e3);border-radius:10px;background:var(--surface,#fffdfa);color:var(--ink,#172338);font:600 14px/1 var(--lumen-font-ui,ui-rounded,'Nunito Sans',system-ui,sans-serif);box-shadow:none;cursor:pointer;outline:none}
.unified-photo-view>button::before{content:'×';font:400 23px/1 system-ui,sans-serif}
.unified-photo-view>button:hover{background:var(--surface-soft,#f3f5f8);border-color:var(--muted,#526174)}
.unified-photo-view>button:active{transform:translateY(1px)}
.unified-photo-view>button:focus-visible{outline:2px solid var(--accent,#bd3e1b);outline-offset:3px}
/* Short landscape phones must not inherit MEP's desktop minimum height. */
@media(min-width:601px) and (max-width:950px) and (max-height:520px){
 #shell.mep-view{height:100dvh;min-height:0;overflow:hidden}
 #shell.mep-view>main{min-height:0!important;height:100dvh!important}
}

/* Mobile forms keep their title and actions visible while fields scroll. */
@media(max-width:600px){
 #shell :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),textarea,select),
 #dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),textarea,select),
 #shell .styled-select-trigger,#dialog .styled-select-trigger{font-size:16px!important}
 #dialog{box-sizing:border-box;width:calc(100% - 24px);max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:0;overflow:hidden}
 #dialog #modalForm{display:flex;flex-direction:column;max-height:calc(100dvh - 26px);min-height:0;min-width:0;margin:0}
 #dialog .modal-head{flex:none;margin:0;padding:16px;gap:12px}
 #dialog .modal-head h2{min-width:0;font-size:22px;overflow-wrap:anywhere}
 #dialog #closeModal{flex:none;min-width:44px;min-height:44px;font-size:24px;line-height:1}
 #dialog #modalBody{flex:1 1 auto;min-height:0;min-width:0;padding:16px;overflow:auto;overscroll-behavior:contain}
 #dialog #modalBody>p:first-child{margin-top:0}
 #dialog #modalBody :is(.duplicate-form,.work-logo-layout,.work-logo-grid){grid-template-columns:minmax(0,1fr)!important}
 #dialog #modalBody label{min-width:0}
 #dialog #modalError:not(:empty){flex:none;margin:0;padding:8px 16px;max-height:20dvh;overflow:auto}
 #dialog .modal-actions{flex:none;flex-wrap:wrap;margin:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border)}
 #dialog .modal-actions button{flex:1;min-height:44px;min-width:0;white-space:normal}
 #shell #contractsModule .contracts-version{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #shell #contractsModule .contracts-version>div{grid-column:1/-1;min-width:0;overflow-wrap:anywhere}
 #shell #contractsModule .contracts-version>button{width:100%;min-width:0;min-height:44px}
 /* Read each catalog entry without a 790px table or off-screen actions. */
 #shell .current-table table{display:block;width:100%;min-width:0!important}
 #shell .current-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #shell .current-table tbody{display:block;width:100%}
 #shell .current-table tbody tr{display:grid;position:relative;grid-template-columns:repeat(3,minmax(0,1fr)) 44px;column-gap:6px;row-gap:6px;padding:10px 12px;border-bottom:1px solid var(--border);align-items:center}
 #shell .current-table tbody td{display:block;width:auto;min-width:0!important;max-width:100%;padding:0!important;border:0;white-space:normal;overflow-wrap:anywhere}
 #shell .current-table td.description{grid-column:1/-1;grid-row:2;font-size:14px;line-height:1.55}
 #shell .current-table td.code:first-child{grid-column:1/3;grid-row:1}
 #shell .current-table table:has(th:nth-child(6)) td.code:first-child{grid-column:1}
 #shell .current-table td.code:nth-child(2){grid-column:2;grid-row:1}
 #shell .current-table td.symbol-cell{display:none;grid-column:1/-1;grid-row:4}
 #shell .current-table tr:has(.catalog-row-menu[open]) td.symbol-cell{display:block}
 #shell .current-table td:nth-last-child(2){grid-column:3;grid-row:1;text-align:right;font-size:12px}
 #shell .current-table td:nth-last-child(2):not(:empty)::before{content:'Unidad';display:block;font-size:11px;color:var(--muted)}
 #shell .current-table td:last-child{grid-column:4;grid-row:1;min-height:44px}
 #shell .current-table tr:has(.catalog-row-menu[open]) td:last-child{grid-column:1/-1;grid-row:3}
 #shell .current-table .catalog-row-menu[open]>summary{position:absolute;right:12px;top:10px}
 #shell .current-table tr:has(.catalog-row-menu[open]) td:nth-last-child(2){min-height:44px;align-content:center}
 #shell .current-table .row-actions{justify-content:flex-end;gap:4px}
 #shell .current-table .row-actions button{width:44px;min-width:44px;height:44px;min-height:44px}
 #shell.mobile-hybrid-nav.current-view:not(.works-layout-active)>main>.topbar{height:30px;min-height:30px;flex:none}
 #shell.current-view .catalog-panel .module-navigation{padding-block:6px}
 #shell.current-view .catalog-panel #toolbar{padding-block:0 6px}
 #shell.drawing-view{height:100dvh;min-height:0;overflow:hidden}
 #shell.drawing-view>main{height:calc(100dvh - 52px)!important;min-height:0!important;padding:0 4px 4px}
 #shell.drawing-view .drawing-frame{min-height:0}
}

/* Selected phone direction: original modules at the bottom, task forms on top. */
.mobile-theme-slot,.mobile-module-shortcut{display:none}
.mobile-workspace-actions>summary{display:none}
@media(max-width:600px),(max-width:950px) and (max-height:520px){
 #shell.mobile-hybrid-nav:not([hidden]){--lumen-mobile-header-height:64px;--lumen-mobile-nav-height:calc(72px + env(safe-area-inset-bottom));display:flex!important;flex-direction:column;height:100dvh;min-height:0;overflow:hidden}
 #shell.mobile-hybrid-nav>aside{position:relative!important;inset:auto!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;gap:8px;width:100%!important;min-width:0!important;height:var(--lumen-mobile-header-height)!important;min-height:var(--lumen-mobile-header-height)!important;flex:none;padding:8px 12px!important;border-bottom:1px solid var(--border);box-sizing:border-box;z-index:400}
 #shell.mobile-hybrid-nav>aside .sidebar-brand-row{display:flex!important;flex-direction:row!important;align-items:center;flex:1;min-width:0;width:auto!important;height:auto!important;min-height:0;margin:0;gap:8px}
 #shell.mobile-hybrid-nav>aside .workspace-label,#shell.mobile-hybrid-nav>aside .sidebar-legal{display:none!important}
 #shell.mobile-hybrid-nav>aside .brand{gap:8px;padding:0}
 #shell.mobile-hybrid-nav>aside .brand-mark{width:40px;height:40px;font-size:28px;flex:none}
 #shell.mobile-hybrid-nav>aside .brand>div{display:block!important}
 #shell.mobile-hybrid-nav>aside .brand strong{font-size:21px;line-height:1.2}
 #shell.mobile-hybrid-nav>aside .brand small,#shell.mobile-hybrid-nav #sidebarToggle{display:none!important}
 #shell.mobile-hybrid-nav>aside>.mobile-theme-slot{display:flex!important;flex:none;align-items:center}
 #shell.mobile-hybrid-nav .mobile-theme-slot>[data-theme-toggle]{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:8px;border-radius:12px}
 #shell.mobile-hybrid-nav>aside>.account{display:block!important;flex:none;width:44px!important;min-width:44px;margin:0!important;padding:0!important;border:0!important;position:relative}
 #shell.mobile-hybrid-nav aside .account-profile{display:none!important}
 #shell.mobile-hybrid-nav aside .mobile-account-toggle{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:3px;border:0;background:transparent}
 #shell.mobile-hybrid-nav aside .account-actions{display:none!important}
 #shell.mobile-hybrid-nav.mobile-account-open aside .account-actions{display:flex!important;position:absolute;top:48px;right:0;flex-direction:column;align-items:stretch;gap:4px;width:220px;max-height:70dvh;overflow:auto;padding:8px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 12px 32px #0003;z-index:600}
 #shell.mobile-hybrid-nav.mobile-account-open aside .account-actions button:not([hidden]){display:flex;width:100%;min-height:44px;justify-content:flex-start;padding:10px;gap:8px}
 #shell.mobile-hybrid-nav.mobile-account-open aside .account-actions button span{display:inline!important}
 #shell.mobile-hybrid-nav aside .mobile-account-toggle .avatar{width:34px;height:34px;font-size:12px}
 #shell.mobile-hybrid-nav>aside>nav[aria-label]{position:fixed!important;inset:auto 0 0!important;display:grid!important;grid-template-columns:repeat(var(--mobile-module-count,5),minmax(0,1fr));align-items:center!important;gap:0!important;width:100%!important;height:var(--lumen-mobile-nav-height)!important;min-height:var(--lumen-mobile-nav-height)!important;max-height:none!important;margin:0!important;padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;box-sizing:border-box;background:var(--surface)!important;border:0!important;border-top:1px solid var(--border)!important;border-radius:0!important;overflow:visible!important;box-shadow:0 -6px 24px #00000008!important;z-index:400}
 #shell.mobile-hybrid-nav aside nav button.mobile-primary-module:not([hidden]){display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px;width:100%!important;min-width:0!important;height:56px!important;min-height:56px!important;padding:6px 2px!important;flex:initial!important;border-radius:12px;white-space:normal}
 #shell.mobile-hybrid-nav aside nav button.mobile-primary-module>span:not(.nav-count){position:static!important;display:block!important;opacity:1!important;visibility:visible!important;transform:none!important;font-size:11px;line-height:1.2;text-align:center;white-space:nowrap}
 #shell.mobile-hybrid-nav aside nav .mobile-primary-module .icon{width:23px;height:23px}
 #shell.mobile-hybrid-nav aside nav .nav-count,#shell.mobile-hybrid-nav aside nav .mobile-overflow-source{display:none!important}
 #shell.mobile-hybrid-nav .mobile-module-shortcut:not([hidden]){display:flex;min-height:44px;width:100%}
 #shell .mobile-module-shortcut[hidden]{display:none!important}
 #shell.mobile-hybrid-nav.mobile-nav-empty{--lumen-mobile-nav-height:0px}
 #shell.mobile-hybrid-nav.mobile-nav-empty>aside>nav[aria-label]{display:none!important}
 #shell.mobile-hybrid-nav>main{flex:1 1 0;min-width:0;min-height:0!important;width:100%;height:calc(100dvh - var(--lumen-mobile-header-height))!important;margin:0!important;padding-bottom:calc(var(--lumen-mobile-nav-height) + 8px)!important;box-sizing:border-box}
 #shell.mobile-hybrid-nav:is(.mep-view,.drawing-view)>main{display:flex;flex-direction:column;padding:0 6px calc(var(--lumen-mobile-nav-height) + 4px)!important;overflow:hidden}
 #shell.mobile-hybrid-nav:is(.mep-view,.drawing-view) .topbar{flex:none;min-height:52px;height:auto!important;padding:6px 0!important;overflow:visible}
 #shell.mobile-hybrid-nav.mep-view>main>.topbar{flex-direction:column;align-items:stretch;gap:4px}
 #shell.mobile-hybrid-nav .mep-top-route{
  display:flex;align-items:flex-end;flex-wrap:wrap!important;gap:8px;
  width:100%;min-width:0;height:auto;min-height:0;overflow:visible!important
 }
 #shell.mobile-hybrid-nav .mep-top-route>.mep-inline-context{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;
  flex:1 1 0!important;width:auto!important;min-width:0;gap:8px!important;
  padding:0!important;border:0!important;background:transparent
 }
 #shell.mobile-hybrid-nav .mep-top-route .mep-inline-context>label{
  min-width:0!important;max-width:none;gap:4px;
  font-size:11px;line-height:1.2;color:var(--muted)
 }
 #shell.mobile-hybrid-nav .mep-inline-context .mep-context-divider{display:none}
 #shell.mobile-hybrid-nav .mep-inline-context .styled-select{display:flex;flex:1 1 auto}
 #shell.mobile-hybrid-nav .mep-inline-context .styled-select-trigger{
  flex:1;min-height:44px;height:auto;font-size:12px!important;padding-left:8px;
  border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--ink)
 }
 #shell.mobile-hybrid-nav .mep-inline-context .styled-select-value{
  min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.25
 }
 #shell.mobile-hybrid-nav.mep-view .playground-badge:not([hidden]){
  align-self:flex-start;margin:0;padding:2px 0;border:0;background:transparent
 }
 #shell.mobile-hybrid-nav.mep-view .playground-badge strong{display:none}
 #shell.mobile-hybrid-nav.mep-view .playground-badge span{display:inline}
 #shell.mobile-hybrid-nav .mobile-workspace-actions{display:block;position:relative;flex:none}
 #shell.mobile-hybrid-nav .mobile-workspace-actions>summary{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;min-height:44px;padding:6px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink);font-size:12px;font-weight:650;cursor:pointer;list-style:none}
 #shell.mobile-hybrid-nav .mobile-workspace-actions>summary::-webkit-details-marker{display:none}
 #shell.mobile-hybrid-nav .mobile-workspace-actions>.workspace-create{display:none!important}
 #shell.mobile-hybrid-nav .mobile-workspace-actions[open]>.workspace-create{position:absolute;top:calc(100% + 8px);right:0;display:flex!important;flex-direction:column;align-items:stretch;gap:8px;width:min(280px,calc(100vw - 24px));max-height:60dvh;overflow:auto;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:0 14px 36px #0003;z-index:600}
 #shell.mobile-hybrid-nav .mobile-workspace-actions .shared-capture-actions{flex-wrap:wrap;justify-content:flex-start}
 #shell.mobile-hybrid-nav.current-view>main{display:flex;flex-direction:column;overflow:hidden;padding-top:0}
 #shell.mobile-hybrid-nav.current-view .catalog-panel:not([hidden]){display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden}
 #shell.mobile-hybrid-nav.current-view #content{flex:1 1 0;min-height:0;overflow:hidden}
 #shell.mobile-hybrid-nav.current-view #content .table-wrap{height:100%!important;min-height:0!important;max-height:none!important}
 #shell.mobile-hybrid-nav.current-view .catalog-panel>footer{flex:none}
 #shell.mobile-hybrid-nav.users-view>main{display:flex;flex-direction:column;overflow:hidden}
 #shell.mobile-hybrid-nav.symbol-module-view{--lumen-mobile-nav-height:0px}
 #shell.mobile-hybrid-nav.symbol-module-view>aside>nav[aria-label]{display:none!important}
 #shell.mobile-hybrid-nav.symbol-module-view>main{overflow:auto}
 #dialog[open][data-mobile-kind=form]{position:fixed;inset:0;box-sizing:border-box;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0}
 #dialog[data-mobile-kind=form] #modalForm{height:100%;max-height:100dvh}
 #dialog[data-mobile-kind=form] .modal-head{padding:16px;border-bottom:1px solid var(--border)}
 #dialog[data-mobile-kind=form] #modalBody{padding:20px 16px}
 #dialog[data-mobile-kind=form] .modal-actions{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}
 #dialog[open][data-mobile-kind=sheet]{inset:auto 8px 8px;max-height:85dvh;margin:0;width:calc(100% - 16px);max-width:none;border-radius:20px}
 html.mep-capture-open #shell.mobile-hybrid-nav>aside{display:none!important}
 html.mep-capture-open #shell.mobile-hybrid-nav.mep-view>main{height:100dvh!important;padding:0!important}
}
@media(min-width:601px) and (max-width:950px) and (max-height:520px){
 #shell.mobile-hybrid-nav:not([hidden]){--lumen-mobile-header-height:56px;--lumen-mobile-nav-height:calc(56px + env(safe-area-inset-bottom))}
 #shell.mobile-hybrid-nav.current-view>main{padding:8px 12px calc(var(--lumen-mobile-nav-height) + 8px)!important}
 #shell.mobile-hybrid-nav.current-view>main>.topbar{display:none!important}
 #shell.mobile-hybrid-nav>aside>nav[aria-label]{padding-top:2px!important;padding-bottom:calc(2px + env(safe-area-inset-bottom))!important}
 #shell.mobile-hybrid-nav aside nav button.mobile-primary-module:not([hidden]){height:50px!important;min-height:50px!important;padding:3px 2px!important;gap:2px}
 #shell.mobile-hybrid-nav aside nav .mobile-primary-module .icon{width:20px;height:20px}
}
@media(min-width:601px) and (max-width:950px) and (max-height:520px){
 #shell.drawing-view{height:100dvh;min-height:0;overflow:hidden}
 #shell.drawing-view>main{min-height:0!important;height:100dvh!important}
 #shell.drawing-view .drawing-frame{min-height:0}
}
.additional-control{max-width:none;padding:8px 0 32px;color:var(--text,inherit)}
.additional-control[hidden]{display:none!important}
.ac-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap;margin:8px 0 22px}
.ac-header h1{margin:4px 0;font-size:clamp(1.65rem,3vw,2.3rem)}
.ac-header p{margin:4px 0;color:var(--muted,#999)}
.ac-eyebrow{font-size:.72rem;font-weight:700;letter-spacing:.12em}
.ac-actions{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.ac-work{display:grid;gap:6px;font-size:.78rem;min-width:200px}
.ac-work select,.ac-ot select,.ac-toolbar input{border:1px solid var(--border,#515154);background:var(--surface,#1d1e20);color:inherit;border-radius:9px;padding:10px;font:inherit;max-width:100%}
.ac-upload{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:11px 16px;border-radius:9px;background:#f19a6c;color:#24170f;font-weight:700;min-height:42px}
.ac-upload[hidden]{display:none!important}
.ac-upload:focus-within{outline:2px solid #f19a6c;outline-offset:3px}
.ac-phase-tabs{display:flex;gap:8px;border-bottom:1px solid var(--border,#454548);padding-bottom:12px;overflow:auto}
.ac-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:9px;margin:0 0 18px}.ac-summary>div{border:1px solid var(--border,#454548);border-radius:10px;background:var(--surface,#fff);padding:12px 14px;min-width:0}.ac-summary span{display:block;color:var(--muted,#999);font-size:.72rem}.ac-summary strong{display:block;margin-top:5px;font-size:1.05rem;overflow-wrap:anywhere}
.ac-total-summary{display:flex;gap:10px 22px;flex-wrap:wrap;align-items:center;margin:-5px 0 18px;padding:10px 12px;border-left:3px solid var(--accent,#e66134);background:var(--accent-soft,#fceae0);font-size:.75rem}.ac-total-summary[hidden]{display:none!important}.ac-total-summary span:first-child{font-weight:700}.ac-total-summary strong{margin-left:3px}
.ac-phase-tabs button{white-space:nowrap;border:1px solid var(--border,#515154);border-radius:9px;padding:9px 16px;background:transparent;color:inherit;cursor:pointer}
.ac-phase-tabs button.active{background:#f19a6c;color:#24170f;border-color:#f19a6c;font-weight:700}
.ac-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;font-size:.8rem;color:var(--muted,#aaa)}
.ac-toolbar input{width:min(100%,360px);color:var(--text,inherit)}
.ac-table-wrap{overflow:auto;border:1px solid var(--border,#454548);border-radius:12px;max-height:calc(100vh - 270px)}
.ac-table{border-collapse:collapse;width:100%;min-width:1490px;table-layout:fixed;font-size:.82rem;text-align:left}
.ac-table col:nth-child(1){width:50px}.ac-table col:nth-child(2){width:64px}.ac-table col:nth-child(3){width:250px}.ac-table col:nth-child(4){width:205px}.ac-table col:nth-child(5){width:86px}.ac-table col:nth-child(6){width:85px}.ac-table col:nth-child(7){width:95px}.ac-table col:nth-child(8){width:100px}.ac-table col:nth-child(9){width:90px}.ac-table col:nth-child(10){width:75px}.ac-table col:nth-child(11){width:75px}.ac-table col:nth-child(12){width:95px}.ac-table col:nth-child(13){width:85px}.ac-table col:nth-child(14){width:145px}
.ac-table th,.ac-table td{padding:8px 7px;border-bottom:1px solid var(--border,#454548);vertical-align:middle;overflow-wrap:anywhere}
.ac-table thead th{position:sticky;top:0;background:var(--surface,#232427);z-index:1;font-size:.72rem;white-space:normal!important;line-height:1.25;overflow-wrap:normal;word-break:normal}
.ac-table .ac-area th{background:var(--accent-soft,rgba(241,154,108,.12));color:var(--accent-text,#a73b1a);text-transform:uppercase;letter-spacing:.06em}
.ac-flag{display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;border-radius:6px;font-weight:700}.ac-flag-yes{color:var(--success,#15794b);background:color-mix(in srgb,var(--success,#15794b) 14%,transparent)}.ac-flag-no{color:var(--danger,#b12d36);background:color-mix(in srgb,var(--danger,#b12d36) 12%,transparent)}
.ac-description{min-width:0;max-width:none}.ac-ot{min-width:0}.ac-ot select{display:block;width:100%;margin-top:7px;font-size:.75rem}.ac-ot small{margin:0;opacity:.7}.ac-ot a{color:var(--accent-text,#a73b1a);font-weight:700}.ac-pending{opacity:.7}.ac-empty{padding:32px;text-align:center}
.ac-scroll-hint{display:none}
.ac-ot-status{display:flex;gap:4px 8px;align-items:center;flex-wrap:wrap}.ac-ot a{display:inline;margin:0}.ac-row-actions{display:flex;gap:5px;align-items:flex-start;flex-wrap:wrap;margin-top:5px}.ac-row-actions .ac-edit-button,.ac-ot-details summary{display:inline-flex;align-items:center;margin:0;padding:4px 7px;min-height:28px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--ink);font-size:.72rem;line-height:1.2;cursor:pointer}.ac-ot-details summary{list-style:none}.ac-ot-details summary::-webkit-details-marker{display:none}.ac-ot-details summary:focus-visible,.ac-edit-button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.ac-ot-tools{width:190px;max-width:100%;padding:4px 0}.ac-ot-tools .styled-select{width:100%}.ac-ot-upload{display:inline-flex;margin-top:7px;padding:6px 9px;border:1px solid var(--border,#555);border-radius:7px;cursor:pointer;font-size:.73rem}.ac-ot-upload:focus-within{outline:2px solid #f19a6c;outline-offset:2px}
.ac-edit-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ac-edit-fields label{display:grid;gap:5px;font-size:.78rem}.ac-edit-fields input,.ac-edit-fields textarea{width:100%;box-sizing:border-box;padding:9px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit}.ac-edit-fields label:last-child{grid-column:1/-1}.ac-edit-fields textarea{min-height:70px;resize:vertical}#acEditDialog{max-height:90dvh;overflow:hidden;padding:0}#acEditDialog form{display:flex;flex-direction:column;max-height:90dvh}#acEditDialog h2{padding:20px 24px 0;margin:0}#acEditDialog p{margin:8px 24px}#acEditDialog .ac-edit-fields{overflow:auto;flex:1 1 auto;padding:6px 24px;margin:8px 0}#acEditDialog .ac-dialog-actions{flex-shrink:0;padding:12px 24px 18px;background:var(--surface);border-top:1px solid var(--border)}
.ac-table .ac-inline-input{display:block;width:100%;min-width:0;box-sizing:border-box;margin:2px 0;padding:6px 5px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--ink);font:inherit}
.ac-table textarea.ac-inline-input{min-height:62px;resize:vertical}.ac-table .ac-editing{background:var(--accent-soft)}.ac-row-actions .ac-save-button{background:var(--accent-fill);color:var(--on-accent)}.ac-edit-error{color:var(--danger);font-size:.75rem;margin:6px 0;overflow-wrap:anywhere}
#acEditDialog #acSaveEdit{background:var(--accent-fill);color:var(--on-accent)}
#acEditDialog .styled-select-trigger{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--border)!important}
.ac-dialog-actions{display:flex;justify-content:flex-end;gap:10px}.additional-control dialog{max-width:min(90vw,520px);border:1px solid var(--border,#555);border-radius:14px;background:var(--surface,#242426);color:var(--text,inherit);padding:24px}.additional-control dialog::backdrop{background:#0009}
@media(max-width:600px){.ac-header{align-items:stretch}.ac-actions,.ac-work{width:100%}.ac-work select{width:100%}.ac-summary{display:flex;overflow-x:auto}.ac-summary>div{min-width:145px;flex:0 0 auto}.ac-scroll-hint{display:block;color:var(--muted,#999);font-size:.73rem;margin:0 0 8px}.ac-table-wrap{max-height:calc(100dvh - 310px)}.ac-toolbar{flex-wrap:wrap}.ac-toolbar input{width:100%}.additional-control .ac-table{display:table!important;min-width:1490px!important}.additional-control .ac-table thead{display:table-header-group!important}.additional-control .ac-table tbody{display:table-row-group!important}.additional-control .ac-table tr{display:table-row!important}.additional-control .ac-table th,.additional-control .ac-table td{display:table-cell!important;width:auto!important}.additional-control .ac-table td:before{content:none!important}.ac-row-actions .ac-edit-button,.ac-ot-details summary,.ac-ot-upload{min-height:40px}}
@media(max-width:600px){.ac-header{gap:8px;margin:0 0 10px}.ac-header h1{font-size:1.45rem;margin:0}.ac-header>div:first-child p{display:none}.ac-actions{gap:7px}.ac-summary{margin-bottom:8px}.ac-summary>div{padding:8px 10px}.ac-total-summary{margin:0 0 8px;padding:7px 9px}.ac-phase-tabs{padding-bottom:6px}.ac-toolbar{flex-wrap:nowrap;padding:8px 0}.ac-toolbar input{width:auto;min-width:0;flex:1}.ac-toolbar span{white-space:nowrap}.ac-scroll-hint{margin-bottom:5px}}
/* Control de adicionales: los datos y la tabla son la cabecera principal. */
.additional-control .ac-header{justify-content:flex-end;gap:8px;margin:0 0 12px}.additional-control .ac-header>div:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.additional-control .ac-header>div:first-child p{display:none}
.additional-control .ac-summary{display:flex;flex-wrap:wrap;gap:6px 22px;margin:0 0 7px;padding:7px 0;border-bottom:1px solid var(--border)}.additional-control .ac-summary>div{display:flex;align-items:baseline;gap:6px;min-width:0;padding:0;border:0;border-radius:0;background:transparent}.additional-control .ac-summary span,.additional-control .ac-summary strong{display:inline;margin:0;font-size:.78rem}.additional-control .ac-summary strong{font-weight:700}
.additional-control .ac-total-summary{gap:7px 20px;margin:0 0 10px;padding:0;background:transparent;border:0;color:var(--muted);font-size:.75rem}.additional-control .ac-total-summary strong{color:var(--ink)}
.ac-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);padding:0 0 10px;margin:0 0 10px}.additional-control .ac-controls .ac-phase-tabs{flex:0 0 auto;border:0;padding:0}.additional-control .ac-controls .ac-toolbar{flex:1 1 auto;justify-content:flex-end;padding:0;min-width:0}.additional-control .ac-controls .ac-toolbar input{max-width:360px;min-width:0}
@media(max-width:900px){.ac-controls{flex-wrap:wrap}.additional-control .ac-controls .ac-toolbar{flex:1 1 300px}}
@media(max-width:600px){.additional-control .ac-header{margin-bottom:9px}.additional-control .ac-summary{flex-wrap:nowrap;overflow-x:auto;gap:18px;padding:6px 0}.additional-control .ac-summary>div{flex:0 0 auto}.additional-control .ac-total-summary{flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;padding:2px 0 6px}.ac-controls{gap:8px;margin-bottom:7px;padding-bottom:8px}.additional-control .ac-controls .ac-toolbar{flex-basis:100%}.additional-control .ac-controls .ac-toolbar input{max-width:none}}
.ac-actions .ac-work,.ac-actions .ac-upload{margin:0}
@media(min-width:1280px){.additional-control.ac-docked .ac-header{height:0;min-height:0;margin:0;padding:0}.additional-control.ac-docked{padding-top:0}#shell main>.topbar>.ac-actions-docked{display:flex;align-items:center;gap:10px;margin-left:auto}#shell main>.topbar>.ac-actions-docked .ac-work{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0}#shell main>.topbar>.ac-actions-docked .ac-work .styled-select{width:260px;max-width:25vw}}
/* Importes alineados para comparar la fase con el total del Excel. */
.additional-control .ac-overview{margin:0 0 10px}.additional-control .ac-overview .ac-summary,.additional-control .ac-overview .ac-total-summary{display:grid;grid-template-columns:minmax(240px,1.35fr) repeat(3,minmax(145px,1fr));align-items:center;gap:8px 20px;margin:0;padding:7px 0;border:0;border-bottom:1px solid var(--border);background:transparent;overflow:visible}.additional-control .ac-overview .ac-total-summary[hidden]{display:none!important}
.additional-control .ac-overview .ac-summary>div,.additional-control .ac-overview .ac-total-summary>div{display:flex;align-items:baseline;gap:8px;min-width:0;margin:0;padding:0;border:0;background:transparent;font-size:.78rem}.additional-control .ac-overview .ac-overview-name{justify-content:flex-start}.additional-control .ac-overview .ac-overview-name strong{color:var(--ink);white-space:nowrap}.additional-control .ac-overview .ac-overview-name span{color:var(--muted);white-space:nowrap}.additional-control .ac-overview .ac-overview-amount{justify-content:flex-end;white-space:nowrap}.additional-control .ac-overview .ac-overview-amount span{color:var(--muted);font-size:.75rem;font-weight:400}.additional-control .ac-overview .ac-overview-amount strong{color:var(--ink);font-size:.8rem;white-space:nowrap}.additional-control .ac-overview .ac-overview-repeat{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:1100px){.additional-control .ac-overview .ac-summary,.additional-control .ac-overview .ac-total-summary{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:18px}.additional-control .ac-overview .ac-summary>div,.additional-control .ac-overview .ac-total-summary>div{flex:0 0 auto}.additional-control .ac-overview .ac-total-summary .ac-overview-amount{justify-content:flex-start}.additional-control .ac-overview .ac-overview-repeat{position:static;width:auto;height:auto;margin:0;overflow:visible;clip-path:none;white-space:nowrap}}
@media(max-width:600px){.additional-control .ac-overview .ac-summary,.additional-control .ac-overview .ac-total-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 8px;overflow:visible;padding:5px 0}.additional-control .ac-overview .ac-summary>.ac-overview-name,.additional-control .ac-overview .ac-total-summary>.ac-overview-name{grid-column:1/-1}.additional-control .ac-overview .ac-summary>.ac-overview-amount,.additional-control .ac-overview .ac-total-summary>.ac-overview-amount{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:1px;white-space:normal}.additional-control .ac-overview .ac-overview-amount span{font-size:.67rem;white-space:nowrap}.additional-control .ac-overview .ac-overview-amount strong{font-size:.75rem;white-space:normal;overflow-wrap:anywhere}}
#shell.mep-view .mep-inline-context .styled-select-trigger,#shell.mep-view .mep-inline-context select:not(.styled-select-native){min-height:42px;height:auto;margin:0;padding:0 0 0 12px;border:1px solid var(--select-border);border-radius:10px;background:var(--select-surface);color:var(--select-text);font-size:13px;font-weight:650;box-shadow:none}
#shell.mep-view .mep-inline-context .styled-select-value{padding:8px 0;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
#shell.mep-view .mep-inline-context .select-arrow-zone{width:36px;margin-left:8px;border-left:1px solid var(--select-border);color:var(--muted)}
#shell.mep-view .mep-inline-context .styled-select-trigger:hover,#shell.mep-view .mep-inline-context .styled-select.is-open>.styled-select-trigger{background:var(--select-hover);border-color:var(--accent-line)}
#shell.mep-view .mep-inline-context .styled-select-trigger:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
@media(max-width:600px),(pointer:coarse){#shell.mep-view .mep-inline-context .styled-select-trigger,#shell.mep-view .mep-inline-context select:not(.styled-select-native){min-height:44px;height:auto}#shell.mep-view .mep-inline-context .styled-select-value{padding:9px 0}}
@media(max-width:600px){#shell.mep-view .mep-inline-context .styled-select-trigger{padding-left:8px;font-size:12px!important}#shell.mep-view .mep-inline-context .styled-select-value{padding:4px 0;line-height:1.2}#shell.mep-view .mep-inline-context .select-arrow-zone{width:28px;margin-left:4px}}
@media(min-width:901px){#shell.mep-view .mep-top-route>.mep-inline-context{flex-basis:520px}}
@media(min-width:901px){
 #shell.mep-view:not(.mobile-hybrid-nav) main>.topbar>.playground-badge{align-self:flex-start;margin-top:10px}
 #shell.mep-view:not(.mobile-hybrid-nav) main>.topbar>[data-theme-toggle]{align-self:flex-start;margin-top:6px}
}
@media(min-width:601px) and (max-width:900px){#shell.mep-view main>.topbar{flex-wrap:wrap;align-items:center}#shell.mep-view main>.topbar>.mep-top-route{flex:1 0 100%;width:100%;flex-wrap:wrap}#shell.mep-view .mep-top-route>.mep-inline-context{flex:1 1 100%;width:100%}#shell.mep-view .mep-top-route>.workspace-create{flex:1 1 100%;justify-content:flex-start}}
@media(min-width:601px){
 #shell.sidebar-collapsed:not(.mep-view):not(.mobile-hybrid-nav)>aside nav{align-items:center}
 #shell.sidebar-collapsed:not(.mep-view):not(.mobile-hybrid-nav)>aside nav button{justify-content:center;gap:0}
 #shell.sidebar-collapsed:not(.mep-view):not(.mobile-hybrid-nav)>aside nav button>span{position:absolute}
 #shell.sidebar-collapsed:not(.mep-view):not(.mobile-hybrid-nav)>aside #sidebarToggle{left:50%;right:auto;transform:translate(-50%,48px)}
}

/* MEP comparte la navegación de escritorio del resto de Lumen. */
@media(min-width:760px){
 #shell.mep-view:not(.mobile-hybrid-nav){--mep-sidebar-width:234px}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav){--mep-sidebar-width:96px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside{padding:34px 18px 20px!important;overflow-x:clip;overflow-y:auto}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .sidebar-brand-row{height:86px;min-height:86px;align-items:flex-start;justify-content:space-between}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .brand{padding:0 6px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .brand-mark{width:43px;height:43px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside #sidebarToggle{position:absolute;right:0;top:2px;transform:none;width:32px;height:32px;min-height:32px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .workspace-label{display:block!important}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside nav{flex:0 1 auto;min-height:0;width:auto;margin:0!important;padding:0!important;gap:6px;overflow:visible;align-items:stretch}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside nav>button:not([hidden]){width:auto!important;height:56px!important;min-height:44px;flex:0 0 auto;padding:11px 12px!important;flex-direction:row;justify-content:flex-start;gap:12px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside nav>button>span:not(.nav-count){width:auto;max-width:none;font-size:13px;line-height:1.4;text-align:left}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside>.account{width:auto;margin-top:auto;padding:20px 9px 0}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .account-profile{flex-direction:row;align-items:center;justify-content:flex-start;gap:11px}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .account-actions{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:0}
 #shell.mep-view:not(.mobile-hybrid-nav)>aside .account-actions button span{display:inline}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside{padding:20px 9px!important}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .sidebar-brand-row{justify-content:center}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .brand{padding:0!important}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside #sidebarToggle{left:50%;right:auto;transform:translate(-50%,48px)}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .workspace-label{visibility:hidden}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside nav{align-items:center}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside nav>button:not([hidden]){width:46px!important;min-height:44px;padding:11px!important;justify-content:center;gap:0}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside nav>button>span{position:absolute!important;opacity:0!important;visibility:hidden!important;pointer-events:none}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .account-profile{justify-content:center}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .account-actions{flex-direction:column;align-items:center;justify-content:center;gap:2px}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .logout-guide-row{width:88px;max-width:none;gap:0;align-self:center}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .logout-guide-row>#logout,#shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .logout-guide-row>.nori-guide-link{width:44px;min-width:44px;padding:8px}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside .account-actions button span{display:none}
}
@media(min-width:760px) and (max-width:1150px){#shell.mep-view:not(.mobile-hybrid-nav){--mep-sidebar-width:205px}#shell.mep-view:not(.mobile-hybrid-nav)>aside{padding-left:12px!important;padding-right:12px!important}}
@media(min-width:760px) and (max-width:820px){#shell.mep-view:not(.mobile-hybrid-nav){--mep-sidebar-width:176px}}
@media(min-width:760px) and (max-width:1150px){#shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav){--mep-sidebar-width:96px}#shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav)>aside{padding-left:9px!important;padding-right:9px!important}}
.additional-control,.ac-status-menu{--ac-pending-bg:#f0f2f5;--ac-pending-ink:#515b6b;--ac-pending-line:#bcc4cf;--ac-yes-bg:#e5f3eb;--ac-yes-hover:#d5eadf;--ac-yes-ink:#17613b;--ac-yes-line:#83b79a;--ac-no-bg:#fcebec;--ac-no-hover:#f7dcdf;--ac-no-ink:#a12b37;--ac-no-line:#d99ba4}
:root[data-theme="dark"] :is(.additional-control,.ac-status-menu){--ac-pending-bg:#26292e;--ac-pending-ink:#c6ccd5;--ac-pending-line:#59616d;--ac-yes-bg:#1c382a;--ac-yes-hover:#294c39;--ac-yes-ink:#a4e2bb;--ac-yes-line:#4e936a;--ac-no-bg:#42282f;--ac-no-hover:#57333d;--ac-no-ink:#ffbac3;--ac-no-line:#a86473}
.ac-status-control,.ac-status-menu .styled-select-option{--ac-state-bg:var(--ac-pending-bg);--ac-state-ink:var(--ac-pending-ink);--ac-state-line:var(--ac-pending-line);--ac-state-hover:var(--subtle)}
.ac-status-control[data-ac-status="yes"],.ac-status-menu .styled-select-option[data-ac-status="yes"]{--ac-state-bg:var(--ac-yes-bg);--ac-state-ink:var(--ac-yes-ink);--ac-state-line:var(--ac-yes-line);--ac-state-hover:var(--ac-yes-hover)}
.ac-status-control[data-ac-status="no"],.ac-status-menu .styled-select-option[data-ac-status="no"]{--ac-state-bg:var(--ac-no-bg);--ac-state-ink:var(--ac-no-ink);--ac-state-line:var(--ac-no-line);--ac-state-hover:var(--ac-no-hover)}
#additionalControlModule .ac-status-control[data-ac-status] .styled-select-trigger{background:var(--ac-state-bg);color:var(--ac-state-ink);border:1px solid var(--ac-state-line);border-radius:8px;min-height:36px;font-weight:750;box-shadow:inset 0 1px #ffffff0d}
#additionalControlModule .ac-status-control .styled-select-value{color:inherit;text-align:center;flex:1;padding-inline:2px}
#additionalControlModule .ac-status-control .select-arrow-zone{width:24px;margin-left:3px;color:inherit;border-color:var(--ac-state-line);background:transparent}
#additionalControlModule .ac-status-control[data-ac-status] .styled-select-trigger:hover:not(:disabled){background:var(--ac-state-hover);border-color:var(--ac-state-ink)}
#additionalControlModule .ac-status-control[data-ac-status] .styled-select-trigger:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-color:var(--accent)}
.ac-status-menu{padding:5px;background:var(--surface);border-color:var(--select-border);box-shadow:var(--select-shadow)}
.ac-status-menu .styled-select-option[data-ac-status]{margin:3px 0;padding:9px 10px;border:1px solid var(--ac-state-line);background:var(--ac-state-bg);color:var(--ac-state-ink);font-weight:600}
.ac-status-menu .styled-select-option[data-ac-status]:is(:hover,:focus-visible,.is-active){background:var(--ac-state-hover);color:var(--ac-state-ink);border-color:var(--ac-state-ink)}
.ac-status-menu .styled-select-option[data-ac-status][aria-selected="true"]{background:var(--ac-state-hover);color:var(--ac-state-ink);border-color:var(--ac-state-ink);font-weight:750}
.ac-status-menu .styled-select-option.is-active{outline:1px solid var(--focus);outline-offset:0}
#additionalControlModule .ac-flag{border:1px solid transparent;min-width:26px;min-height:26px;border-radius:7px;font-size:.82rem}
#additionalControlModule .ac-flag-yes{background:var(--ac-yes-bg);color:var(--ac-yes-ink);border-color:var(--ac-yes-line)}
#additionalControlModule .ac-flag-no{background:var(--ac-no-bg);color:var(--ac-no-ink);border-color:var(--ac-no-line)}
#additionalControlModule .ac-flag-pending{background:var(--ac-pending-bg);color:var(--ac-pending-ink);border-color:var(--ac-pending-line)}
#additionalControlModule .ac-table .ac-editing{background:color-mix(in srgb,var(--accent) 5%,var(--surface))}
#additionalControlModule .ac-table .ac-editing>td:first-child{box-shadow:inset 3px 0 var(--accent)}
@media(max-width:600px),(pointer:coarse){#additionalControlModule .ac-status-control[data-ac-status] .styled-select-trigger{min-height:44px}.ac-status-menu .styled-select-option[data-ac-status]{min-height:44px}}
#additionalControlModule .ac-row-actions .ac-save-button{background:var(--accent-fill);color:var(--on-accent);border-color:var(--accent-fill)}
@media(min-width:760px){
 #shell.mep-view:not(.sidebar-collapsed):not(.mobile-hybrid-nav){--mep-sidebar-width:clamp(156px,13vw,192px)}
 #shell.mep-view.sidebar-collapsed:not(.mobile-hybrid-nav){--mep-sidebar-width:76px}
}
#additionalControlModule .ac-controls{flex-wrap:wrap;min-width:0}
#additionalControlModule .ac-controls .ac-phase-tabs{max-width:100%;min-width:0}
#additionalControlModule .ac-controls .ac-toolbar{flex-wrap:wrap;gap:8px;max-width:100%;min-width:0}
#additionalControlModule .ac-controls .ac-toolbar>button{flex:0 0 auto;min-height:36px;white-space:nowrap}
@media(max-width:600px){#additionalControlModule .ac-controls .ac-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:1 1 100%;width:100%;justify-content:stretch}#additionalControlModule .ac-controls .ac-toolbar>input{grid-column:1/-1;width:100%;max-width:none;box-sizing:border-box;min-height:44px}#additionalControlModule .ac-controls .ac-toolbar>#acCount{grid-column:1/-1;justify-self:end}#additionalControlModule .ac-controls .ac-toolbar>button{width:100%;min-width:0;min-height:44px;padding:8px;box-sizing:border-box}}

/* Jerarquía visual de acciones y superficies de trabajo. */
#shell :is(.catalog-panel,#contractsModule,.additional-control){box-shadow:0 8px 28px #1c2b3b0d,0 1px 3px #1c2b3b0d}
:root[data-theme="dark"] #shell :is(.catalog-panel,#contractsModule,.additional-control){box-shadow:0 10px 26px #0003,0 1px 0 #ffffff08 inset}
#shell :is(.panel-heading,.module-header,.contracts-bar,.drawing-context,.mep-context){box-shadow:inset 0 -1px 0 var(--border)}
#shell :is(.toolbar,.contracts-bar,.ac-toolbar,.module-navigation) button:not(.primary):not(:disabled):not([aria-pressed="true"]){border-color:var(--select-border);box-shadow:inset 0 1px 0 #ffffff12,0 2px 5px #0000000d}
#shell :is(.toolbar,.contracts-bar,.ac-toolbar,.module-navigation) button:not(.primary):not(:disabled):not([aria-pressed="true"]):hover{border-color:var(--accent-line);background:var(--accent-soft);color:var(--accent-text)}
#shell :is(.toolbar,.contracts-bar,.ac-toolbar,.module-navigation) button.primary:not(:disabled){box-shadow:inset 0 1px 0 #ffffff40,0 3px 9px #a7391a2e}
#shell :is(.toolbar,.contracts-bar,.ac-toolbar,.module-navigation) button:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
@media(prefers-reduced-motion:reduce){#shell :is(.toolbar,.contracts-bar,.ac-toolbar,.module-navigation) button{transition:none!important;transform:none!important}}

/* Fases: altura natural, sin barras de desplazamiento internas. */
#additionalControlModule .ac-controls .ac-phase-tabs{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:8px;height:auto;max-height:none;overflow:visible;min-width:0;max-width:100%}
#additionalControlModule .ac-controls .ac-phase-tabs>button{flex:0 0 auto;box-sizing:border-box}
@media(max-width:600px){#additionalControlModule .ac-controls .ac-phase-tabs{flex-basis:100%;width:100%}}

/* Obras and Adicionales share the existing Lumen surfaces and copper accent. */
#contractsModule .works-rail-list button[aria-current=page]{
 background:color-mix(in srgb,var(--accent) 12%,var(--surface));
 border-color:var(--accent-line,var(--border));
}
#contractsModule #worksSelectedName{font-weight:750;letter-spacing:-.025em}
#contractsModule .works-content button:focus-visible,
#additionalControlModule :is(button,input,select):focus-visible{outline:2px solid var(--accent-text,var(--accent));outline-offset:2px}
#additionalControlModule .ac-controls{gap:10px;padding-block:8px;align-items:center}
#additionalControlModule .ac-controls .ac-toolbar{column-gap:8px;row-gap:6px}
#additionalControlModule .ac-controls .ac-phase-tabs>button.active{box-shadow:inset 0 -2px 0 #26170f40}
#additionalControlModule .ac-table thead th{background:var(--subtle,var(--surface));border-bottom:2px solid var(--border);padding-block:10px}
#additionalControlModule .ac-table td{font-variant-numeric:tabular-nums}
#additionalControlModule .ac-table tbody tr:not(.ac-area):hover td{background:color-mix(in srgb,var(--accent) 5%,var(--surface))}
@media(max-width:600px){
 #contractsModule .works-rail-list button{min-height:44px}
 #additionalControlModule .ac-controls .ac-phase-tabs>button,
 #additionalControlModule .ac-controls .ac-toolbar>button{min-height:44px}
}

@media(max-width:600px){
 #shell #contractsModule .contracts-bar #contractsSearch{
  order:1;flex:1 0 100%;width:100%;min-height:44px;
 }
 #shell #contractsModule .contracts-bar{row-gap:6px}
 #shell #contractsModule .contracts-bar :is(#contractsImport,#contractsHistoryButton){min-height:44px}
 #additionalControlModule .ac-controls{gap:6px;padding-block:5px}
 #additionalControlModule .ac-controls .ac-phase-tabs{padding-bottom:4px}
 #additionalControlModule .ac-controls .ac-toolbar{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-block:0;gap:5px 7px;
 }
 #additionalControlModule .ac-controls .ac-toolbar input{
  grid-column:1/-1;width:100%;min-height:44px;
 }
 #additionalControlModule .ac-controls .ac-toolbar>span{
  grid-column:1/-1;line-height:1.1;justify-self:end;
 }
 #additionalControlModule .ac-controls .ac-toolbar>button{
  width:100%;min-width:0;min-height:44px;padding:6px 8px;white-space:normal;
 }
 #additionalControlModule .ac-table-wrap{max-height:none}
}
