/* Shared workspace language, drawn from CH. Layout-specific and operational rules
   stay with their workspaces; these surfaces are loaded after the legacy UI layer. */
#atlas-app.app-shell {
  --aw-frame: #f0f3fb;
  --aw-line: rgba(var(--ui-accent-rgb), .10);
  --aw-soft: rgba(var(--ui-accent-rgb), .045);
  --aw-action: #126d78;
  --aw-positive: #087d58;
  --aw-positive-wash: rgba(8,125,88,.075);
  --aw-negative: #b52742;
  --aw-negative-wash: rgba(181,39,66,.075);
  --aw-warning: #936512;
  --aw-warning-wash: rgba(205,150,38,.09);
  --aw-spring: cubic-bezier(.22,1,.36,1);
  color-scheme: light;
}
html.dark #atlas-app.app-shell {
  --aw-frame: #101928;
  --aw-positive: #76dfb9;
  --aw-positive-wash: rgba(73,193,150,.11);
  --aw-negative: #ffa0b0;
  --aw-negative-wash: rgba(244,116,139,.11);
  --aw-warning: #efc36f;
  --aw-warning-wash: rgba(223,171,65,.11);
  color-scheme: dark;
}

/* Navigation keeps its existing semantics, keyboard behavior and module colors. */
#atlas-app.app-shell .sidebar .sb-nav .nav-item { transition: background .2s var(--aw-spring),color .2s var(--aw-spring); }
#atlas-app.app-shell .sidebar .nav-section { letter-spacing: .14em !important; }
#atlas-app.app-shell .topbar :is(.theme-pill,.user-pill,.bell-btn,.sb-toggle) { transition: background .2s var(--aw-spring),color .2s var(--aw-spring); }
#atlas-app.app-shell > .main > .topbar .bell-btn { width: 36px; min-height: 36px; height: 36px; padding: 8px; background: var(--ui-surface) !important; box-shadow: inset 0 0 0 1px var(--aw-line) !important; }
#atlas-app.app-shell .main :is(.page-header,.docs-header) { align-items: flex-start; gap: 22px; margin-bottom: 26px; }
#atlas-app.app-shell .main .page-header h1 { font-size: clamp(23px,2.1vw,29px) !important; line-height: 1.35; letter-spacing: -.045em; }
#atlas-app.app-shell .main .page-header .sub { max-width: 850px; margin-top: 9px; color: var(--ui-muted); font-size: 12px; line-height: 1.8; }
#atlas-app.app-shell .main :is(.lab-subnav,.tabs-row,.mdf-tabs,.rts-tabs,.fmcsa-workspace-tabs) {
  display: flex; align-items: stretch; flex-wrap: nowrap; width: 100%; max-width: 100%; box-sizing: border-box;
  padding: 0 12px !important; gap: 3px; border: 0 !important; background: var(--ui-surface);
  box-shadow: inset 0 0 0 1px var(--aw-line); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
}
#atlas-app.app-shell .main :is(.lab-subtab,.tab-btn,.api-tab,.portal-tab) { flex: 0 0 auto; min-height: 48px; padding: 14px 17px !important; font-size: 11px !important; transition: color .2s var(--aw-spring),background .2s var(--aw-spring); }
#atlas-app.app-shell .main :is(.lab-subtab,.tab-btn,.api-tab,.portal-tab).active { background: var(--ui-surface-soft) !important; }

/* Five-pixel framing produces CH's inset panel finish without wrapping live targets. */
#atlas-app.app-shell .main :is(.card,.stat-card,.settings-card,.api-pending-panel,.portal-card,.user-card,
    .docs-home-hero,.docs-section-card,.docs-article-card,.docs-search-results,.i3pool-read-result,
    .i3-status-hero,.i3-status-panel,.group-workspace,.webmvr-panel,.fmcsa-workspace-hero) {
  min-width: 0; box-sizing: border-box; border: 5px solid var(--aw-frame) !important;
  background: var(--ui-surface) !important; backdrop-filter: none !important;
  box-shadow: 0 0 0 1px var(--aw-line),inset 0 1px rgba(255,255,255,.16) !important;
}
#atlas-app.app-shell .main :is(.card,.settings-card,.api-pending-panel) { padding: 25px; }
#atlas-app.app-shell .main :is(.card,.settings-card) > :is(h2,h3) { margin-top: 0; margin-bottom: 15px; font-size: 17px !important; line-height: 1.5; letter-spacing: -.035em; }
#atlas-app.app-shell .main :is(.card-head,.card-header-row,.ssc-head,.fmcsa-card-head,.settings-section-head,.rts-section-heading,.webmvr-section-head) {
  display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 15px;
  padding-bottom: 21px; margin-bottom: 22px; border: 0; box-shadow: 0 1px var(--aw-line);
}
#atlas-app.app-shell .main :is(.card-head,.card-header-row,.ssc-head,.fmcsa-card-head,.settings-section-head,.rts-section-heading,.webmvr-section-head) :is(h2,h3) {
  margin: 0 0 7px; font-size: 17px !important; line-height: 1.5; letter-spacing: -.035em;
}
#atlas-app.app-shell .main :is(.card .sub,.ssc-sub,.fmcsa-help,.rts-help,.settings-help,.api-workspace-about) { color: var(--ui-muted); font-size: 11.5px; line-height: 1.85; }
#atlas-app.app-shell .main :is(.lab-grid,.mc-layout,.mdf-credential-layout) { gap: 24px; align-items: start; }
#atlas-app.app-shell .main :is(.lab-grid,.mc-layout,.mdf-credential-layout) > * { min-width: 0; }
#atlas-app.app-shell .main .lab-grid { grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr); }
#atlas-app.app-shell[data-workspace=companies] .main .lab-grid { grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); }

/* Actions: consistent teal primary surfaces; destructive actions remain distinct. */
#atlas-app.app-shell .main :is(.btn,.btn-primary,.btn-success,.btn-info,.btn-danger,.btn-ghost,.group-primary,.overview-secondary) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%;
  min-height: 44px; box-sizing: border-box; padding: 10px 16px; font-family: inherit; font-size: 12px;
  font-weight: 500 !important; line-height: 1.6; letter-spacing: 0; text-decoration: none;
  transition: transform .2s var(--aw-spring),opacity .2s var(--aw-spring),background .2s var(--aw-spring);
}
#atlas-app.app-shell .main :is(.btn-primary,.btn-success,.group-primary):not(.btn-danger):not(.btn-danger-soft) {
  border: 0 !important; background: var(--aw-action) !important; color: #fff !important; box-shadow: inset 0 1px rgba(255,255,255,.13) !important;
}
#atlas-app.app-shell .main :is(.btn,.btn-info,.btn-ghost,.overview-secondary):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-danger-soft) {
  border: 0 !important; background: var(--aw-soft) !important; color: var(--ui-accent) !important; box-shadow: inset 0 0 0 1px var(--aw-line) !important;
}
#atlas-app.app-shell .main :is(.btn-danger,.btn-danger-soft) { border: 0 !important; background: var(--aw-negative-wash) !important; color: var(--aw-negative) !important; box-shadow: inset 0 0 0 1px rgba(181,39,66,.12) !important; }
#atlas-app.app-shell .main :is(.btn-xs,.btn-sm) { min-height: 36px; padding: 8px 11px; font-size: 10.5px; }
#atlas-app.app-shell .main :is(.btn-primary,.btn-success,.group-primary):not(.btn-xs):not(.btn-sm):not(:has(svg)):not([aria-busy=true])::after {
  content: ''; display: block; flex: 0 0 26px; width: 26px; height: 26px; margin: -3px -7px -3px 5px;
  border-radius: 50%; background: rgba(255,255,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.4'%3E%3Cpath d='M5 19 19 5M5 5h14v14'/%3E%3C/svg%3E") center/14px 14px no-repeat;
  transition: transform .2s var(--aw-spring);
}
#atlas-app.app-shell .main :is(.btn-primary,.btn-success,.group-primary):hover::after { transform: translate(1px,-1px); }
#atlas-app.app-shell .main :is(.btn,.btn-primary,.btn-success,.btn-info,.btn-danger,.btn-ghost,.group-primary):not(:disabled):not(.is-disabled):hover { opacity: .86; }
#atlas-app.app-shell .main :is(.btn,.btn-primary,.btn-success,.btn-info,.btn-danger,.btn-ghost,.group-primary):not(:disabled):active { transform: scale(.98); }
#atlas-app.app-shell .main :is(.btn,.btn-primary,.btn-success,.btn-info,.btn-danger,.btn-ghost,.group-primary):is(:disabled,[aria-disabled=true],.is-disabled) { opacity: .45; cursor: not-allowed; transform: none; }
#atlas-app.app-shell .main :is(.btn-primary,.btn-success,.btn-info,.btn-ghost,.group-primary) > svg { flex-shrink: 0; stroke-width: 1.4; }
#atlas-app.app-shell .main :is(.row-actions,.creds-foot,.fmcsa-settings-footer,.mdf-settings-credential-actions) { gap: 14px; }
#atlas-app.app-shell .main form > .row-actions, #atlas-app.app-shell .main .creds-foot { margin-top: 24px; padding-top: 21px; border: 0; box-shadow: 0 -1px var(--aw-line); }

/* Field styling deliberately excludes hidden values, native choices and switches. */
#atlas-app.app-shell .main .field-label { display: block; margin: 0 0 9px; color: var(--ui-ink); font-family: 'DM Sans',sans-serif !important; font-size: 12px; font-weight: 500 !important; line-height: 1.6; letter-spacing: -.01em; text-transform: none; }
#atlas-app.app-shell .main :is(.input,.input-sm,.dt-select):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([hidden]) {
  box-sizing: border-box; min-width: 0; min-height: 44px; padding: 11px 13px; border: 0 !important;
  color: var(--ui-ink) !important; background: var(--ui-surface-soft) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--ui-accent-rgb),.12) !important;
  font-family: inherit; font-size: 12px; line-height: 1.6; transition: box-shadow .2s var(--aw-spring);
}
#atlas-app.app-shell .main :is(.input,.input-sm,.dt-select):not([type=checkbox]):not([type=radio]):focus {
  outline: none; box-shadow: inset 0 0 0 1px rgba(var(--ui-accent-rgb),.6),0 0 0 3px rgba(var(--ui-accent-rgb),.085) !important;
}
#atlas-app.app-shell .main :is(.input,.input-sm,.dt-select)::placeholder { color: var(--ui-muted); opacity: .85; }
#atlas-app.app-shell .main :is(.input,.input-sm,.dt-select):disabled { opacity: .6; cursor: not-allowed; }
#atlas-app.app-shell .main :is(.input,.input-sm,.dt-select)[aria-invalid=true] { box-shadow: inset 0 0 0 1px var(--aw-negative) !important; }
#atlas-app.app-shell .main select.input { padding-right: 30px; }
#atlas-app.app-shell .main textarea.input { min-height: 110px; }
#atlas-app.app-shell .main .input[type=file] { padding: 14px; min-height: 64px; }
#atlas-app.app-shell .main input::file-selector-button { padding: 8px 11px; margin-right: 12px; background: var(--aw-soft); color: var(--ui-accent); border: 0; font: inherit; cursor: pointer; }
#atlas-app.app-shell .main .input[type=checkbox] { width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0; accent-color: var(--aw-action); box-shadow: none !important; }
#atlas-app.app-shell .main :is(.lab-fields,.creds-fields,.i3screen-fields,.mc-fields) { gap: 24px 22px; }
#atlas-app.app-shell .main :is(.lab-field,.creds-field,.rts-field,.mdf-responsive-field) { min-width: 0; }
#atlas-app.app-shell .main :is(.lab-field,.creds-field) > .muted { margin-top: 8px !important; font-size: 10.5px; line-height: 1.8; }
#atlas-app.app-shell .main :is(.field-error,.form-err,.errorlist) { color: var(--aw-negative); font-size: 11px; line-height: 1.75; }
#atlas-app.app-shell .main :is(.api-password-field,.mdf-credential-password) .input { padding-right: 84px !important; }
#atlas-app.app-shell .main :is(.api-password-toggle,.mdf-credential-reveal) { min-width: 63px; min-height: 32px; border: 0; padding: 7px 9px; color: var(--aw-positive); background: var(--aw-positive-wash); font-family: inherit; font-size: 11px; }
#atlas-app.app-shell .main :is(.api-password-toggle,.mdf-credential-reveal)[aria-pressed=true] { color: var(--aw-negative); background: var(--aw-negative-wash); }

/* Semantic status colors are shared, not flattened into the action color. */
#atlas-app.app-shell .main :is(.chip,.badge,.api-state-pill,.portal-state-pill,.group-tag,.group-type):not(.mc-source-state):not(:where(.terminal *,.live-term *,.i3screen-mac-terminal *)) {
  max-width: 100%; padding: 5px 8px; border: 0 !important; background: var(--aw-soft); color: var(--ui-muted);
  font-family: 'DM Sans',sans-serif !important; font-size: 10px; font-weight: 500; line-height: 1.6; box-shadow: none; letter-spacing: 0;
}
#atlas-app.app-shell .main :is(.chip-good,.chip-success,.chip-completed,.badge-success,.api-state-pill.is-prod,.portal-state-pill.is-prod) { color: var(--aw-positive) !important; background: var(--aw-positive-wash) !important; }
#atlas-app.app-shell .main :is(.chip-bad,.chip-error,.chip-failed,.badge-error,.badge-danger) { color: var(--aw-negative) !important; background: var(--aw-negative-wash) !important; }
#atlas-app.app-shell .main :is(.chip-warn,.chip-warning,.chip-pending,.badge-warning,.api-state-pill.is-maint,.api-state-pill.is-todo) { color: var(--aw-warning) !important; background: var(--aw-warning-wash) !important; }
#atlas-app.app-shell .main :is(.chip-info,.chip-processing,.chip-running) { color: var(--ui-accent) !important; background: rgba(var(--ui-accent-rgb),.07) !important; }
#atlas-app.app-shell .main :is(.lab-empty,.empty-row,.group-empty) { padding: 32px 20px; color: var(--ui-muted); font-size: 12px; line-height: 1.85; }

/* Tables keep all cells. Dense/complex grids scroll; ordinary lists become cards. */
#atlas-app.app-shell .main [data-atlas-table-region] { width: 100%; max-width: 100%; min-width: 0; overflow: auto; box-sizing: border-box; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(var(--ui-accent-rgb),.2) transparent; }
#atlas-app.app-shell .main [data-atlas-table-region][data-atlas-dense=true] { max-height: min(72vh,760px); }
#atlas-app.app-shell .main .atlas-record-table { display: table; width: 100%; max-width: none; min-width: 620px; margin: 0; border: 0; border-collapse: collapse; table-layout: auto; background: var(--ui-surface); }
#atlas-app.app-shell .main .atlas-record-table > thead { display: table-header-group; }
#atlas-app.app-shell .main .atlas-record-table > tbody { display: table-row-group; }
#atlas-app.app-shell .main .atlas-record-table tr:not([hidden]):not(.hidden):not(.is-hidden):not(.d-none) { display: table-row; }
#atlas-app.app-shell .main .atlas-record-table :is(th,td):not([hidden]):not(.hidden):not(.is-hidden):not(.d-none) { display: table-cell; min-width: 60px; max-width: 340px; padding: 15px 17px; vertical-align: top; border: 0; border-bottom: 1px solid var(--aw-line) !important; }
#atlas-app.app-shell .main .atlas-record-table thead th { background: var(--ui-surface-soft); color: var(--ui-muted) !important; font: 500 10px/1.7 'JetBrains Mono',monospace; letter-spacing: .05em !important; text-align: left; }
#atlas-app.app-shell .main .atlas-record-table tbody :is(td,th) { font-size: 11.5px; line-height: 1.8; white-space: normal; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .atlas-record-table :is(td,th) :is(code,.font-mono,.mono) { white-space: normal; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .atlas-record-table [data-atlas-cell=selection] { min-width: 20px; width: 20px; }
#atlas-app.app-shell .main .atlas-record-table[hidden], #atlas-app.app-shell .main .atlas-record-table [hidden] { display: none !important; }
#atlas-app.app-shell .main .atlas-record-table tr:last-child > :is(td,th) { border-bottom: 0 !important; }
#atlas-app.app-shell .main .atlas-record-table :is(.btn,.btn-primary,.btn-success,.btn-ghost,.btn-info,.btn-danger) { white-space: normal; }
#atlas-app.app-shell .main :is(.pager,.mc-paging,.i3pool-pagination,.dt-footer) { align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 20px; margin-top: 20px; border-top-color: var(--aw-line); color: var(--ui-muted); font-size: 11px; }

/* Section adapters: existing field groups, filters and live IDs remain untouched. */
#atlas-app.app-shell .main :is(.mdf-run-bar,.fmcsa-command-toolbar,.group-toolbar,.mc-toolbar) { align-items: center; gap: 16px; padding-block: 17px; }
#atlas-app.app-shell .main :is(.rts-cron-status-grid,.mc-metrics,.webmvr-metrics) { gap: 16px; }
#atlas-app.app-shell .main :is(.rts-cron-status-grid,.mc-metrics,.webmvr-metrics) > div { padding: 19px; background: var(--ui-surface); border: 4px solid var(--aw-frame); box-shadow: 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main :is(.mc-facts,.webmvr-facts) > div { padding-block: 15px; border-color: var(--aw-line); font-size: 11.5px; line-height: 1.8; }
#atlas-app.app-shell .main .mc-flow { gap: 24px; }
#atlas-app.app-shell .main .mc-flow > li { background: var(--ui-surface-soft); padding: 19px; border-color: var(--aw-line); }
#atlas-app.app-shell .main :is(.mc-record-filter,.mc-filter-row,.hist-toolbar,.dt-toolbar,.static-add-grid) { gap: 14px; }
#atlas-app.app-shell .main .mc-record-filter :is(input,select) { max-width: 100%; }
#atlas-app.app-shell .main :is(.rts-lookup-form,.fmcsa-db-search-form) { gap: 14px; }
#atlas-app.app-shell .main .rts-lookup-form .input { min-width: 0; }
#atlas-app #fmcsa-settings-pane .fmcsa-settings-save { background: var(--aw-action) !important; border: 0 !important; min-height: 44px; }
#atlas-app #i3screen-workspace :is(#i3screen-pool-panel,#i3screen-test) .card { border: 5px solid var(--aw-frame) !important; box-shadow: 0 0 0 1px var(--aw-line) !important; padding: 25px; }
#atlas-app #i3screen-workspace :is(#i3screen-pool-panel,#i3screen-test) .field-label { font-family: inherit; font-size: 12px; color: var(--ui-ink); text-transform: none; letter-spacing: -.01em; }
#atlas-app #i3screen-workspace :is(#i3screen-pool-panel,#i3screen-test) .btn-info { background: var(--aw-soft) !important; color: var(--ui-accent) !important; border: 0 !important; }
#atlas-app #i3screen-workspace :is(#i3screen-pool-panel,#i3screen-test) .input:not([type=checkbox]):not([type=radio]) { min-height: 44px; background: var(--ui-surface-soft); }
#atlas-app.app-shell .main :is(.i3pool-action-layout,.i3screen-fields,.i3screen-random-layout,.i3screen-settings-grid) { gap: 24px; }
#atlas-app.app-shell .main :is(.i3screen-fieldset,.i3pool-fieldset) { border-color: var(--aw-line); }
#atlas-app.app-shell .main :is(.ifta-input-guide,.ifta-preflight) { border: 0; padding: 18px; background: var(--ui-surface-soft); box-shadow: inset 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main .ifta-guide-grid { grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 12px; }
#atlas-app.app-shell .main .ifta-guide-grid > div { border: 0; background: var(--ui-surface); padding: 14px; }
#atlas-app.app-shell .main :is(.ifta-state-sequence,.ifta-guide-rules,.ifta-preflight p) { color: var(--ui-muted); line-height: 1.85; }
#atlas-app.app-shell .main :is(.users-roster-groups,.mdf-credential-aside) { gap: 24px; }
#atlas-app.app-shell .main .users-roster-group { background: var(--ui-surface-soft); border: 0; padding: 22px; box-shadow: inset 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main :is(.users-group-jump,.group-filterbar) { background: var(--ui-surface); border-color: var(--aw-line); }
#atlas-app.app-shell .main .group-workspace { padding: 24px; }
#atlas-app.app-shell .main .group-dialog { background: var(--ui-surface); color: var(--ui-ink); border: 5px solid var(--aw-frame); max-width: calc(100vw - 28px); box-shadow: 0 18px 55px -25px rgba(20,36,60,.28) !important; }
#atlas-app.app-shell .main :is(.group-dialog-head,.group-dialog-footer) { padding: 22px 25px; border-color: var(--aw-line); }
#atlas-app.app-shell .main .group-dialog-body { padding: 24px 25px; }
#atlas-app.app-shell .main .notif-row { padding-block: 18px; gap: 14px; border-color: var(--aw-line); }
#atlas-app.app-shell .main .notif-text { color: var(--ui-muted); font-size: 11.5px; line-height: 1.85; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .static-add-grid { align-items: end; }
#atlas-app.app-shell .main .atlas-account-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(270px,32%); align-items: start; gap: 24px; }
#atlas-app.app-shell .main .atlas-account-layout > .card { max-width: none; }
#atlas-app.app-shell .main .atlas-eyebrow { display: block; margin-bottom: 9px; color: var(--ui-muted); font: 10px/1.6 'JetBrains Mono',monospace; letter-spacing: .12em; text-transform: uppercase; }
#atlas-app.app-shell .main .atlas-account-form { display: grid; gap: 23px; margin-top: 24px; }
#atlas-app.app-shell .main .atlas-account-form > .row-actions { margin-top: 0; }
#atlas-app.app-shell .main .atlas-account-facts { margin: 22px 0; }
#atlas-app.app-shell .main .atlas-account-facts > div { display: grid; grid-template-columns: minmax(65px,.6fr) minmax(0,1fr); gap: 14px; padding: 14px 0; box-shadow: 0 1px var(--aw-line); font-size: 11px; line-height: 1.8; }
#atlas-app.app-shell .main .atlas-account-facts dt { color: var(--ui-muted); }
#atlas-app.app-shell .main .atlas-account-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

/* Documentation, directories and overview use the same understated framing. */
#atlas-app.app-shell .main .docs-header h1 { font-size: clamp(25px,2.4vw,32px); letter-spacing: -.045em; line-height: 1.35; }
#atlas-app.app-shell .main .docs-header p { margin-top: 10px; color: var(--ui-muted); font-size: 12px; line-height: 1.8; }
#atlas-app.app-shell .main .docs-layout { gap: 26px; }
#atlas-app.app-shell .main .docs-home-hero { padding: 28px; }
#atlas-app.app-shell .main .docs-home-hero h2 { font-size: clamp(23px,2.2vw,31px); line-height: 1.4; letter-spacing: -.04em; }
#atlas-app.app-shell .main :is(.docs-section-card,.docs-article-card) { padding: 25px; }
#atlas-app.app-shell .main .docs-search .input { padding-left: 42px !important; }
#atlas-app.app-shell .main :is(.docs-sidebar,.docs-mobile-browser) { background: var(--ui-surface); padding: 16px; box-shadow: 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main .docs-tree a { color: var(--ui-muted); font-size: 11px; line-height: 1.7; }
#atlas-app.app-shell .main .docs-tree a.active { color: var(--ui-accent); background: var(--aw-soft); }
#atlas-app.app-shell .main :is(.docs-code,.code-shell,.webmvr-code) { border-color: var(--aw-line); box-shadow: none; }
#atlas-app.app-shell .main .api-dir-filters { background: var(--ui-surface); border-color: var(--aw-line); }
#atlas-app.app-shell .main :is(.portal-grid,.api-grid) { gap: 24px; }
#atlas-app.app-shell .main .portal-card { padding: 25px; }
#atlas-app #overview :is(.overview-bezel,.dash-panel-card) { padding: 5px; background: var(--aw-frame); border: 0; box-shadow: 0 0 0 1px var(--aw-line); }
#atlas-app #overview :is(.dash-panel-core,.overview-activity-core,.overview-infrastructure-core,.overview-outage-core) { background: var(--ui-surface); }
#atlas-app #overview .dash-panel-grid { gap: 20px; }
#atlas-app #overview .dash-panel-main { padding: 22px; }
#atlas-app #overview .dash-panel-value { letter-spacing: -.045em; }
#atlas-app #overview .dash-panel-arrow { color: var(--ui-accent); background: var(--aw-soft); }
#atlas-app #overview .dash-panel-links { border-color: var(--aw-line); padding: 12px 22px; }

/* Console content retains its semantic dark palette and scroll position. */
#atlas-app.app-shell .main :is(.terminal,.i3screen-mac-terminal,.live-term) { border: 4px solid #202c3e !important; box-shadow: 0 0 0 1px rgba(120,145,180,.14) !important; border-radius: 0 !important; }
#atlas-app.app-shell .main :is(.terminal,.live-term) :is(.titlebar,.term-head) { background: #202c3e; border-bottom-color: #303c50; padding: 12px 16px; }
#atlas-app.app-shell .main :is(.terminal,.i3screen-mac-terminal,.live-term) :is(pre,.cmd-log-tail) { line-height: 1.85; font-family: 'JetBrains Mono',monospace; overflow-wrap: anywhere; }
#atlas-app.app-shell .main :is(.terminal,.live-term) :is(.btn-info,.btn-ghost) { background: rgba(160,188,255,.1) !important; color: #c9dbff !important; }

@keyframes atlas-workspace-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) { #atlas-app.app-shell .main > .page-header { animation: atlas-workspace-arrive .5s var(--aw-spring) both; } }
@media (max-width: 1100px) {
  #atlas-app.app-shell .main .lab-grid, #atlas-app.app-shell[data-workspace=companies] .main .lab-grid { grid-template-columns: minmax(0,1fr); }
  #atlas-app.app-shell .main .lab-grid > * { grid-column: auto; }
  #atlas-app.app-shell .main .atlas-account-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards], #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] > tbody { display: block; min-width: 0; width: 100%; }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] tbody > tr:not([hidden]):not(.hidden):not(.is-hidden):not(.d-none) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 20px; padding: 22px 17px; box-shadow: 0 1px var(--aw-line); }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] tbody :is(td,th):not([hidden]):not(.hidden):not(.is-hidden):not(.d-none) { display: block; width: auto !important; min-width: 0 !important; max-width: none; padding: 0 !important; border: 0 !important; white-space: normal !important; text-align: left !important; background: transparent !important; }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] [data-atlas-label]::before { display: block; content: attr(data-atlas-label); margin-bottom: 7px; color: var(--ui-muted); font: 9px/1.7 'JetBrains Mono',monospace; letter-spacing: .025em; }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] [data-atlas-cell=primary], #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] [data-atlas-cell=actions], #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] tr[data-atlas-span] > * { grid-column: 1 / -1; }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] [data-atlas-cell=actions] :is(div,span) { flex-wrap: wrap; }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=cards] [data-atlas-cell=actions] :is(a,button) { min-height: 40px; }
  #atlas-app.app-shell .main .atlas-record-table[data-atlas-layout=scroll] { min-width: 760px; }
}
@media (max-width: 600px) {
  #atlas-app.app-shell .main :is(.page-header,.docs-header) { gap: 17px; margin-bottom: 22px; }
  #atlas-app.app-shell .main :is(.card,.settings-card,.api-pending-panel,.group-workspace,.docs-home-hero,.docs-section-card,.docs-article-card) { padding: 20px 17px; }
  #atlas-app #i3screen-workspace :is(#i3screen-pool-panel,#i3screen-test) .card { padding: 20px 17px; }
  #atlas-app.app-shell .main :is(.lab-fields,.creds-fields,.mc-fields) { grid-template-columns: minmax(0,1fr); gap: 22px; }
  #atlas-app.app-shell .main :is(.lab-subnav,.tabs-row,.mdf-tabs,.rts-tabs) { padding-inline: 5px !important; }
  #atlas-app.app-shell .main :is(.lab-subtab,.tab-btn,.api-tab,.portal-tab) { padding: 12px 15px !important; min-height: 44px; }
  #atlas-app.app-shell .main :is(.creds-foot,.fmcsa-settings-footer,.mdf-settings-credential-actions) { align-items: stretch; flex-direction: column; }
  #atlas-app.app-shell .main :is(.creds-foot,.fmcsa-settings-footer,.mdf-settings-credential-actions) > button { width: 100%; justify-content: space-between; }
  #atlas-app.app-shell .main .users-roster-group { padding: 17px 13px; }
  #atlas-app.app-shell .main :is(.group-dialog-head,.group-dialog-body,.group-dialog-footer) { padding: 19px 17px; }
  #atlas-app.app-shell .main .notif-row { flex-wrap: wrap; }
  #atlas-app.app-shell .main .notif-actions { flex-basis: 100%; justify-content: flex-start; }
  #atlas-app.app-shell .main .docs-header h1 { font-size: 25px; }
  #atlas-app #overview .dash-panel-grid { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #atlas-app.app-shell .main > .page-header { animation: none; }
  #atlas-app.app-shell :is(.btn,.btn-primary,.btn-success,.btn-info,.btn-danger,.btn-ghost,.group-primary,.input,.nav-item) { transition: none !important; }
  #atlas-app.app-shell .main :is(.btn-primary,.btn-success,.group-primary)::after { transition: none; }
}
