/* FinanzApp Setup — shared visual system. Loaded after legacy component styles.
   Layout uses shrinkable grid tracks; wide tables scroll inside their panel. */
:root {
  color-scheme: dark;
  --bg: #080d15;
  --panel: #111a27;
  --field: #0d1521;
  --text: #edf3fa;
  --muted: #96a8bc;
  --line: #253245;
  --brand: #67e0dc;
  --brand-hover: #94eeea;
  --soft: rgba(103,224,220,.08);
  --ring: rgba(103,224,220,.25);
  --surface-raised: #162130;
  --surface-inset: #0c1420;
  --radius-panel: 18px;
}
body::before,body:not(.profile-menu-open)::after { display: none; }
body { background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--font); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:is(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
button, a { touch-action: manipulation; }
::selection { background: #235b62; color: #fff; }
.app-shell { grid-template-columns: 248px minmax(0,1fr); }
.workspace { padding: 24px clamp(22px,3vw,52px) 56px; }
.workspace::before { display: none; }
.workspace-section { --section-accent: #67e0dc; min-width: 0; }
#workspace-traceability { --section-accent: #a9b7ff; }
#workspace-backups { --section-accent: #92d5b3; }
#workspace-maintenance { --section-accent: #f0c581; }
#workspace-utilities { --section-accent: #aebeff; }
#workspace-alerts { --section-accent: #edb49b; }
:is(.ops-workspace,.grid,.grid-access,.data-stack,.ops-kpi-grid,.util-stats,.repo-grid,.bk-groups,.cal-layout,.channel-grid) > * { min-width: 0; }
:is(.card,.ops-card,.data-panel,.glass-panel,.dr-toolkit,.dr-tool-card,.channel-card,.bk-card,.bk-provider,.util-command-deck,.alert-command-center) {
  border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel);
  box-shadow: 0 5px 20px rgba(0,0,0,.10); -webkit-backdrop-filter: none; backdrop-filter: none;
}
:is(.card,.ops-card,.data-panel,.glass-panel,.stat-card,.dr-toolkit,.dr-tool-card,.channel-card,.bk-card,.bk-provider)::before { display: none; }
:is(.ops-card,.data-panel,.glass-panel) { min-width: 0; }
.eyebrow,.dr-overline { color: var(--section-accent,var(--brand)); font-size: 10px; letter-spacing: .13em; font-weight: 700; }
h1,h2,h3,h4 { text-wrap: balance; }
:is(.ops-header,.data-panel-head,.panel-head) { gap: 16px; }
:is(.ops-header,.data-panel-head) { flex-wrap: wrap; }
:is(.ops-header,.data-panel-head,.panel-head) > * { min-width: 0; max-width: 100%; }
:is(.ops-header,.data-panel-head,.panel-head) h3 { font-size: 17px; letter-spacing: -.025em; }
:is(.ops-header,.data-panel-head,.panel-head) h4 { font-size: 15px; letter-spacing: -.02em; }
.ops-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.ops-header p { max-width: 680px; line-height: 1.65; color: var(--muted); }
.ops-card { padding: 24px; }
.ops-workspace { gap: 24px; margin: 0; grid-template-columns: minmax(0,1fr); }
.data-stack { gap: 24px; }
.data-panel,.glass-panel { padding: 22px; margin-top: 24px; }
.data-panel-head { margin-bottom: 20px; }
.panel-head { padding: 22px 22px 0; }
.section-lead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 4px 0 24px; }
.section-lead .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.section-lead .eyebrow > span { color: var(--muted); padding-right: 10px; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.section-lead h2 { margin: 0 0 10px; font-size: clamp(27px,2.5vw,38px); line-height: 1.16; font-weight: 650; letter-spacing: -.045em; }
.section-description { max-width: 740px; margin: 0; font-size: 13px; line-height: 1.75; color: var(--muted); }
.section-emblem { flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; color: var(--section-accent); background: var(--panel); }
.section-emblem svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ops-workspace > .section-lead { padding-bottom: 4px; }
/* Shell */
.rail { padding: 25px 16px 18px; background: #0c131e; border-color: #202d3d; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.rail::before,.rail::after { display: none; }
.sidebar-brand { margin: 0; padding: 0 6px 26px; gap: 11px; }
.sidebar-brand .brand-icon { width: 38px; height: 38px; flex-basis: 38px; }
.sidebar-brand h2 { font-size: 17px; background: none; color: #dff8f7; -webkit-text-fill-color: #dff8f7; }
.brand-subtitle { margin-top: 7px; font-size: 9px; color: #8d9fb5; font-weight: 500; }
.sidebar-brand .ai-badge { font-size: 9px; padding: 4px 6px; box-shadow: none; }
.rail-nav { padding: 27px 0 10px; gap: 8px; }
.nav-group { gap: 6px; margin-bottom: 18px; }
.nav-group-label { color: #788da5; letter-spacing: .14em; margin-bottom: 9px; font-size: 9px; }
.rail-nav .nav-tab { min-height: 44px; font-size: 12px; font-weight: 550; border-radius: 10px; gap: 11px; color: #9dafc3; }
.rail-nav .nav-tab:hover { transform: none; background: #141f2d; }
.rail-nav .nav-tab.active { color: #9befea; border-color: #2a4b53; background: #152c35; box-shadow: none; }
.rail-nav .nav-tab.active::before { left: -17px; height: 20px; width: 2px; box-shadow: none; }
.rail-nav .tab-alerts.has-deploy-alert { background: #152c35; }
.rail-nav .tab-alerts.has-deploy-alert i,.rail-nav .tab-alerts.has-deploy-alert #alerts-count { animation: none; box-shadow: none; }
.rail-footer { display: flex; align-items: center; gap: 10px; padding: 18px 7px 0; border-top: 1px solid var(--line); color: var(--muted); }
.rail-footer b,.rail-footer small { display: block; font-size: 10px; font-weight: 500; }
.rail-footer small { margin-top: 4px; color: #74879f; font-size: 9px; }
.rail-footer-icon svg { width: 20px; height: 20px; fill: none; stroke: #7bbdb9; stroke-width: 1.5; }
.ws-topbar { min-height: 70px; padding: 0 0 22px; margin: 0 0 30px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ws-topbar::before,.ws-topbar::after { display: none; }
.ws-topbar .topbar-heading .eyebrow { color: #8b9eb5; font-size: 9px; font-weight: 500; letter-spacing: .08em; }
.ws-topbar h1 { font-size: 20px; font-weight: 600; letter-spacing: -.035em; line-height: 1.3; }
.ws-topbar .user { order: 2; margin-left: auto; border: 0; padding: 0; }
.ws-topbar .topbar-context { order: 3; margin-left: 0; padding: 0; border: 0; background: none; }
.ws-topbar .refresh-btn { width: 38px; min-width: 38px; height: 38px; border: 1px solid var(--line); background: var(--panel); box-shadow: none; }
.ws-topbar .user-chip { background: var(--panel); border-color: var(--line); border-radius: 11px; box-shadow: none; padding: 5px 10px 5px 5px; gap: 10px; }
.ws-topbar .user-avatar { background: #27575f; color: #c4fbf4; box-shadow: none; width: 32px; height: 32px; border-radius: 8px; }
.ws-topbar .user-meta b { font-size: 11px; font-weight: 600; }
/* Overview */
#workspace-overview > .intro { margin: 0 0 28px; padding: 8px 0 0; }
#workspace-overview > .intro h2 { font-size: clamp(30px,3vw,44px); font-weight: 600; line-height: 1.16; margin: 12px 0; letter-spacing: -.05em; }
#workspace-overview > .intro h2 em { color: #a0dcd9; }
#workspace-overview > .intro p { line-height: 1.75; font-size: 13px; }
#workspace-overview .kpis { gap: 16px; }
#workspace-overview .kpi { position: relative; min-height: 168px; padding: 21px; background: var(--panel); border-radius: 16px; box-shadow: none; }
#workspace-overview .kpi::after { display: none; }
#workspace-overview .kpi:hover { transform: none; box-shadow: none; border-color: #3a5266; }
#workspace-overview .kpi-value { font-size: 36px; font-weight: 600; letter-spacing: -.055em; }
#workspace-overview .kpi-detail { margin-top: 9px; font-size: 11px; }
.kpi-icon { background: #19333d; border: 0; box-shadow: none; }
#workspace-overview .kpi-trend { border: 0; background: none; color: #8ea5b9; font-size: 8px; }
.progress { height: 4px; background: #263142; }
#workspace-overview .kpi .progress i { box-shadow: none; }
#workspace-overview > .grid { margin-top: 24px; gap: 24px; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); }
.resources-card .chart { border-color: #233143; background: var(--surface-inset); }
.resources-card .capacity-in-resources { box-shadow: none; background: #13242c; }
.resources-card .processes-in-resources { background: transparent; }
:is(.availability-item,.merged-service-list .availability-item,.top-row) { background: var(--surface-inset); border-color: #233143; border-radius: 11px; box-shadow: none; }
:is(.availability-item,.repo-head,.repo-trace,.repo-name,.cal-day,.bk-tile,.stat-body) { min-width: 0; }
:is(.availability-name,.availability-cert,.repo-name,.repo-sub,.bk-tile strong) { overflow-wrap: anywhere; }
.top-updated { padding: 22px; }
.top-updated .panel-head { padding: 0; }
.top-list { gap: 10px; }
.top-row { padding: 14px; }
.top-rank { background: #18353d; box-shadow: none; }
/* Buttons and fields */
.btn { min-height: 38px; padding: 9px 14px; border-radius: 9px; border: 1px solid #78d7d1; background: #7ce0d8; color: #092a2d; font-size: 12px; font-weight: 650; text-shadow: none; box-shadow: none; transition: background .16s,border-color .16s; }
.btn::before,.btn::after { display: none; }
.btn:hover:not(:disabled) { transform: none; background: #a2eeea; box-shadow: none; }
.btn.secondary { background: #1a2737; border-color: #35465a; color: #e2ebf5; box-shadow: none; }
.btn.secondary:hover:not(:disabled) { background: #25364a; border-color: #60778f; }
.btn.ghost { background: transparent; border-color: transparent; color: #a7b8ca; }
.btn.danger { color: #ffe1e6; background: #6c2839; border-color: #9b4057; }
.btn.warning { color: #ffe7bc; background: #684620; border-color: #936b39; }
.btn.transport-btn { background: #28634f !important; color: #defbea; border-color: #44866b; animation: none; box-shadow: none; text-shadow: none; }
.btn.transport-btn .transport-ico { animation: none; }
:is(.search-field,.util-input,.gsel-btn) { min-width: 0; border: 1px solid #344358; border-radius: 9px; background: var(--surface-inset); box-shadow: none; }
.search-field input { min-width: 0; width: 100%; color: var(--text); }
.gsel-btn { max-width: 100%; min-height: 38px; }
:is(.seg,.timeline-filters) { flex-wrap: wrap; background: var(--surface-inset); padding: 4px; border: 1px solid var(--line); border-radius: 10px; gap: 4px; }
:is(.seg,.timeline-filters) button { min-height: 32px; border-radius: 7px; box-shadow: none; }
:is(.seg,.timeline-filters) button[aria-pressed=true] { background: #24414d; color: #bff6f2; border-color: #365965; box-shadow: none; }
/* Deployments: opening a card cannot leave holes between sibling cards. */
.deploy { margin-top: 0; }
.repository-list { padding: 20px; }
#repositories.repo-groups { padding: 20px; gap: 24px; }
.deploy-group { background: var(--surface-inset); border-color: var(--line); border-radius: 14px; box-shadow: none; padding: 18px; }
.deploy-group::before { display: none; }
.deploy-group-head { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.grp-ico { background: #19313b; border-color: #2c4c59; box-shadow: none; }
.deploy-group-head h4 { font-size: 16px; }
.repo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.repository { min-width: 0; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.repository:last-child { border: 1px solid var(--line); }
.repository:hover { transform: none; box-shadow: none; border-color: #3a5266; }
.repository.is-inspecting { grid-column: 1 / -1; }
.repo-head { align-items: flex-start; gap: 14px; }
.repo-head > div:first-child { min-width: 0; }
.repo-name { font-size: 13px; line-height: 1.5; }
.repo-actions { flex-shrink: 0; align-items: flex-end; flex-direction: column; }
.repo-trace { margin-top: 14px; }
.details { padding: 18px; border: 1px solid var(--line); background: var(--surface-inset); overflow-wrap: anywhere; }
.details li { padding: 6px 0; line-height: 1.7; }
.details-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pill { box-shadow: none; }
/* Operational panels: clear nested sections and readable data. */
.ops-kpi-grid { gap: 14px; margin-bottom: 24px; }
.ops-kpi-card { background: var(--surface-raised); border-color: #2c3b4e; border-radius: 13px; box-shadow: none; padding: 18px; }
.stat-card::after { display: none; }
.stat-icon { background: #213542; box-shadow: none; border-color: #354c5d; }
.ops-kpi-card strong { font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.ops-kpi-card small { line-height: 1.6; }
.dr-toolkit { background: var(--surface-inset); padding: 20px; margin: 0 0 24px; }
.dr-tool-card,.dr-runbook { background: var(--panel); border-color: var(--line); box-shadow: none; }
.dr-tool-card { grid-template-columns: auto minmax(0,1fr); }
.dr-readiness { white-space: nowrap; box-shadow: none; }
.glass-panel { background: var(--surface-inset); }
.cal-layout { grid-template-columns: minmax(240px,320px) minmax(0,1fr); gap: 24px; }
.cal { background: var(--panel); border-color: var(--line); box-shadow: none; }
.bk-tile { background: var(--panel); border-color: var(--line); box-shadow: none; }
.bk-provider { background: #14232d; box-shadow: none; }
.ops-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.ops-table { width: 100%; border-collapse: collapse; }
.ops-table th { padding: 14px 16px; color: #a0b5c9; background: #142130; font-size: 9px; font-weight: 650; letter-spacing: .09em; }
.ops-table td { padding: 16px; border-color: #233143; font-size: 12px; line-height: 1.6; background: transparent; }
.ops-table tbody tr:hover { background: #172435; }
.ops-table .empty-cell { padding: 38px 18px; color: var(--muted); text-align: center; white-space: normal; }
.pager { flex-wrap: wrap; gap: 12px; padding-top: 18px; }
.timeline-panel { padding: 24px; }
.timeline-item { padding-top: 16px; padding-bottom: 16px; }
.timeline-footer { flex-wrap: wrap; gap: 10px; border-color: var(--line); color: var(--muted); }
.maintenance-coverage { padding: 14px; background: #142731; border-color: #2d4c58; box-shadow: none; }
.maintenance-session-grid { background: var(--surface-inset); border-color: var(--line); }
.util-command-deck { background: var(--surface-inset); padding: 22px; box-shadow: none; }
.util-command-deck::before,.util-command-deck::after { display: none; }
.util-action-card { background: var(--panel); border-color: #2d3b4d; box-shadow: none; }
.util-action-card:hover { transform: none; box-shadow: none; }
.util-logs-disclosure,.util-config-disclosure { border-color: var(--line); background: var(--surface-inset); box-shadow: none; }
.util-log { background: #080f19; box-shadow: none; font-size: 11px; line-height: 1.8; }
.alert-command-center { background: #142530; border-color: #2d4b58; padding: 24px; box-shadow: none; }
.alert-command-center::before,.alert-command-center::after { display: none; }
.channel-card,.alert-pref-box { background: var(--surface-inset); border-color: var(--line); box-shadow: none; }
.alerts-all-clear { background: #122a28; border-color: #2e5146; }
/* Overlays live above the shell. Opaque surfaces prevent background text bleed. */
.modal { z-index: 400; padding: 24px; background: rgba(3,8,15,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); overflow-y: auto; }
.modal-card { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); background: #121e2d; border-color: #3a4c61; border-radius: 20px; box-shadow: 0 32px 100px #0009; -webkit-backdrop-filter: none; backdrop-filter: none; }
.modal-card > form { display: flex; flex-direction: column; min-height: 0; }
.modal-header { flex-shrink: 0; padding: 24px; border-color: var(--line); }
.modal-heading { min-width: 0; }
.modal-heading h2 { font-size: 20px; line-height: 1.35; }
.modal-icon { flex-shrink: 0; background: #1e3d47; box-shadow: none; }
.modal-body { min-height: 0; padding: 24px; overflow-y: auto; max-height: none; overscroll-behavior: contain; }
.modal-footer,.profile-modal-card .modal-footer { flex-shrink: 0; position: static; flex-wrap: wrap; padding: 18px 24px; border-color: var(--line); background: #101a28; }
.profile-menu { background: #152233; border-color: #3b5067; box-shadow: 0 20px 50px #0008; -webkit-backdrop-filter: none; backdrop-filter: none; }
.gsel-menu { z-index: 500; background: #182638; border-color: #41566e; max-width: calc(100vw - 24px); box-shadow: 0 18px 45px #0008; -webkit-backdrop-filter: none; backdrop-filter: none; }
.gsel-menu button { white-space: normal; overflow-wrap: anywhere; }
.setup-toast { z-index: 550; background: #182638; }
body.profile-menu-open .ws-topbar { z-index: 270; }
/* Responsive composition */
@media (min-width:981px) and (max-width:1250px) {
  .app-shell { grid-template-columns: 224px minmax(0,1fr); }
  .workspace { padding-left: 24px; padding-right: 24px; }
  .repo-grid { grid-template-columns: minmax(0,1fr); }
  .ops-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ws-topbar .topbar-heading .eyebrow { max-width: 220px; }
}
@media (max-width:1100px) {
  #workspace-overview > .grid { grid-template-columns: minmax(0,1fr); }
  #workspace-overview .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cal-layout { grid-template-columns: minmax(0,1fr); }
  .cal { max-width: 380px; width: 100%; }
}
@media (max-width:980px) {
  .app-shell { grid-template-columns: minmax(0,1fr); }
  .workspace { padding: 20px 24px 40px; }
  .rail { height: 100dvh; width: min(296px,88vw); }
  .ws-topbar { display: flex; flex-wrap: nowrap; gap: 14px; align-items: center; }
  .btn-menu-mobile { display: inline-flex; flex-shrink: 0; background: var(--panel); border-color: #34465c; box-shadow: none; }
  .ws-topbar .topbar-heading { flex: 1; }
  .ws-topbar .user { margin-left: 0; }
  .ws-topbar .topbar-context { margin: 0; }
  .modal { z-index: 400; }
  .ops-table { min-width: 620px; }
  .repo-grid { grid-template-columns: minmax(0,1fr); }
  .section-lead { padding-top: 0; }
}
@media (max-width:700px) {
  .workspace { padding: 16px 16px 36px; }
  .ws-topbar { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px 44px; grid-template-areas: 'menu heading tools profile'; gap: 10px; padding: 0 0 18px; margin-bottom: 24px; background: none; border-radius: 0; box-shadow: none; }
  .btn-menu-mobile { width: 40px; height: 40px; border-radius: 10px; }
  .ws-topbar .topbar-heading .eyebrow { display: none; }
  .ws-topbar h1 { font-size: 17px; white-space: normal; overflow: visible; }
  .ws-topbar .user { grid-area: tools; padding: 0 !important; border: 0 !important; width: 40px; }
  .ws-topbar .refresh-btn { width: 38px; height: 38px; min-width: 38px; }
  .ws-topbar .topbar-context { grid-area: profile; }
  .profile-context .user-chip { width: 44px; padding: 4px; }
  .profile-context .user-chip .user-avatar { width: 34px; height: 34px; }
  body.profile-menu-open::after { z-index: 250; background: #030810c9; }
  body.profile-menu-open .ws-topbar { z-index: 270; }
  .profile-menu { position: fixed; inset: auto 12px max(12px,env(safe-area-inset-bottom)); max-height: calc(100dvh - 100px); border-radius: 18px; background: #152233 !important; }
  .section-lead { gap: 12px; padding: 0 0 24px; }
  .section-lead h2 { font-size: 28px; }
  .section-lead .eyebrow { font-size: 8px; margin-bottom: 12px; }
  .section-description { font-size: 12px; line-height: 1.7; }
  .section-emblem { display: none; }
  #workspace-overview > .intro h2 { font-size: 32px; }
  #workspace-overview .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  #workspace-overview .kpi { padding: 15px; min-height: 150px; }
  #workspace-overview .kpi-value { font-size: 30px; }
  #workspace-overview .kpi-detail { font-size: 10px; line-height: 1.6; }
  #workspace-overview .kpi-label { font-size: 11px; }
  #workspace-overview .kpi-main { margin-top: 16px; }
  #workspace-overview > .grid { gap: 16px; margin-top: 16px; }
  :is(.ops-card,.data-panel,.glass-panel,.timeline-panel,.alert-command-center) { padding: 16px; border-radius: 14px; }
  .ops-workspace,.data-stack { gap: 18px; }
  .data-panel,.glass-panel { margin-top: 18px; }
  .ops-header { padding-bottom: 16px; margin-bottom: 18px; }
  .ops-header-actions { width: 100%; flex-wrap: wrap; gap: 8px; }
  .ops-header-actions .btn { flex: 1 1 150px; }
  .ops-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .ops-kpi-card { padding: 14px; }
  .ops-kpi-card strong { font-size: 14px; }
  .ops-kpi-card span.kpi-title { font-size: 9px; }
  .dr-toolkit { padding: 15px; }
  .dr-tool-grid { grid-template-columns: minmax(0,1fr); }
  .data-panel-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .data-panel-title { flex-wrap: wrap; gap: 9px; }
  .util-controls { width: 100%; flex-wrap: wrap; }
  .search-field { width: 100%; max-width: 100%; }
  .gsel,.gsel-btn { max-width: 100%; }
  .util-controls .gsel-btn { width: 100%; }
  .ops-table-wrap::after { display: none; }
  .ops-table td { padding: 13px; }
  .repository-list,#repositories.repo-groups { padding: 12px; }
  .deploy-group { padding: 12px; }
  .repository { padding: 15px; }
  .repo-head { flex-direction: column; }
  .repo-actions { flex-direction: row; align-items: center; flex-wrap: wrap; width: 100%; }
  .repo-actions .pill { max-width: 100%; white-space: normal; }
  .details { padding: 13px; }
  .details-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .details-actions .btn { width: 100%; }
  .timeline-panel-head { flex-direction: column; align-items: stretch; }
  .timeline-filters { display: flex; flex-wrap: wrap; }
  .timeline-filters button { flex: 1 1 auto; }
  .timeline-footer { font-size: 10px; }
  .util-command-deck { padding: 16px; }
  .cal-layout { gap: 18px; }
  .bk-tile { flex-wrap: wrap; }
  .bk-provider { flex-wrap: wrap; }
  .modal { padding: 10px; align-items: center; }
  .modal-card,.profile-modal-card { max-height: calc(100dvh - 20px); border-radius: 17px; width: 100%; }
  .modal-header { padding: 18px; gap: 12px; }
  .modal-body { padding: 18px; max-height: none; }
  .modal-footer,.profile-modal-card .modal-footer { padding: 14px 18px max(14px,env(safe-area-inset-bottom)); gap: 8px; }
  .modal-footer .btn { flex: 1 1 auto; min-height: 42px; }
  .modal-heading h2 { font-size: 18px; }
}
@media (max-width:380px) {
  .workspace { padding: 12px; }
  .ws-topbar { grid-template-columns: 36px minmax(0,1fr) 36px 42px; gap: 7px; }
  .ws-topbar h1 { font-size: 15px; }
  .ws-topbar .refresh-btn,.btn-menu-mobile { width: 36px; min-width: 36px; height: 36px; }
  .ops-kpi-grid { grid-template-columns: minmax(0,1fr); }
  #workspace-overview .kpi { padding: 12px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Shared SVG icons inserted by the console retain their line treatment. */
.kpi-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width:700px) {
 body.profile-menu-open::after { display: block; width: auto; height: auto; inset: 0; border-radius: 0; opacity: 1; filter: none; animation: none; }
}
/* Component sizing at narrow widths must not inherit table intrinsic widths. */
.util-grid > *, .util-panel, .util-head > *, .util-list, .util-row > *, .util-config-content { min-width: 0; }
.util-panel,.util-stat { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.util-panel::before,.util-stat::before { display: none; }
.util-row span { overflow-wrap: anywhere; }
.stat-card { box-shadow: none; }
.stat-card:hover { transform: none; box-shadow: none; }
.resources-card .charts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.operational-timeline { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: none; }
.timeline-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.timeline-head > * { min-width: 0; }
.timeline-head h3 { font-size: 18px; margin: 8px 0; }
.timeline-head p { color: var(--muted); font-size: 12px; line-height: 1.65; }
@media (max-width:700px) {
 .util-grid { grid-template-columns: minmax(0,1fr); }
 .stat-card { flex-direction: column; }
 .resources-card .charts { grid-template-columns: minmax(0,1fr); }
 .operational-timeline { padding: 16px; }
 .timeline-head { flex-direction: column; align-items: stretch; }
}
@media (max-width:540px) {
 .ops-kpi-grid { grid-template-columns: minmax(0,1fr); }
 .stat-card { flex-direction: row; }
}
/* Keep fixed profile controls in the same stacking context as the workspace. */
.modal-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn:not(.secondary):not(.ghost):not(.danger):not(.warning):not(.transport-btn):not(:disabled) { background: #7ce0d8; color: #092a2d; box-shadow: none; }
.btn:not(.secondary):not(.ghost):not(.danger):not(.warning):not(.transport-btn):hover:not(:disabled) { background: #a2eeea; transform: none; box-shadow: none; }
.bk-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,280px),1fr)); }
.toast-stack { z-index: 550; }
@media (max-width:700px) {
 body.profile-menu-open::after { display: none; }
 body.profile-menu-open .app-shell::after { content: ''; position: fixed; inset: 0; z-index: 250; background: #030810c9; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
}
.btn.danger,.btn.maint-action-danger { background: #6c2839 !important; color: #ffe1e6 !important; border-color: #9b4057; box-shadow: none !important; text-shadow: none; }
.btn.warning { background: #684620 !important; color: #ffe7bc; border-color: #936b39; box-shadow: none; text-shadow: none; }
/* Notifications use the same outlined SVG vocabulary as the navigation. */
.toast-icon { flex: 0 0 28px; width: 28px; height: 28px; }
.toast-icon svg,.toast-close svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toast-close { flex: 0 0 26px; }
.toast-copy { min-width: 0; overflow-wrap: anywhere; }
.setup-toast { border-color: #3a4c61; -webkit-backdrop-filter: none; backdrop-filter: none; }
.setup-toast::before { display: none; }
.toast-stack { right: max(16px,env(safe-area-inset-right)); bottom: max(16px,env(safe-area-inset-bottom)); width: min(420px,calc(100vw - 32px)); }
/* A saved login indicator never exposes the workspace before session validation. */
.session-loader { display: none; }
.session-checking #login-view,.session-checking #dashboard { display: none !important; }
.session-checking .session-loader { position: fixed; inset: 0; z-index: 600; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; background: var(--bg); color: var(--muted); font-size: 13px; }
.session-loader img { width: 48px; height: 48px; }
.sidebar-brand { flex-shrink: 0; }
.sidebar-brand .brand-icon { flex-shrink: 0; }
.repo-grid { grid-auto-flow: row; }
.repo-grid > .repository { align-self: stretch; height: auto; }
@media (min-width:1500px) {
  .repo-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .repo-grid > .repository .repo-head { flex: 1; flex-direction: column; gap: 18px; }
  .repo-grid > .repository .repo-actions { margin-top: auto; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .repo-grid > .repository.is-inspecting .repo-head { flex-direction: row; }
  .repo-grid > .repository.is-inspecting .repo-actions { width: auto; margin-top: 0; flex-direction: column; }
}
/* Segmented filters must grow with wrapped controls instead of painting over tables. */
.seg { height: auto; min-height: 40px; align-items: center; }
.util-controls > .seg { flex: 0 0 auto; max-width: 100%; }
.seg button { white-space: nowrap; }
@media (max-width:700px) { .util-controls > .seg { flex: 1 1 100%; } .seg button { flex: 1 1 auto; } }
