/* The working application. Keep document and print layouts independent. */
#app .layout {
  --canvas: #f4f6f9;
  --paper: #fff;
  --ink: #172940;
  --muted: #52647b;
  --edge: #d7dfe8;
  --brand: #204eb0;
  --tint: #e9effc;
  --tile: 18px;
  --lift: 0 3px 12px #19375408, 0 1px 2px #19375408;
  font-family: "Baufaden Inter", system-ui, sans-serif;
  color: var(--ink); background: var(--canvas); color-scheme: light;
}
#app .layout .workspace { background: var(--canvas); min-width: 0; }
#app .layout .next-rail {
  --nav-muted: var(--muted); --nav-ink: var(--ink); --nav-accent: var(--brand);
  color: var(--ink); background: #fff; border-color: var(--edge); box-shadow: none;
}
#app .next-rail :is(.next-brand a,.next-nav-link,.next-nav-group-toggle,.next-profile,.next-signout,.next-nav-close) { color: #243951; }
#app .next-rail .next-brand-symbol { background: #204eb0; color: white; }
#app .next-rail .next-brand-symbol > span { background: #c5dcff; }
#app .next-rail :is(.next-nav-search,.next-help) { background: #f1f5fc; color: #273d60; border-color: #cdd8e8!important; }
#app .next-rail .next-nav-search input { color: #172940!important; }
#app .next-rail input::placeholder { color: #51637b; }
#app .next-rail :is(.next-nav-home,.next-nav-items,.next-nav-footer) { border-color: var(--edge); }
#app .next-rail .next-nav-footer { background: #fafbfd; }
#app .next-rail :is(.next-profile small,.next-nav-empty,.next-nav-company,.next-brand-caption) { color: var(--muted); }
#app .next-rail :is(.next-nav-link,.next-nav-group-toggle,.next-signout,.next-profile):hover { background: #edf2f9; color: var(--ink); }
#app .next-rail .next-nav-link.active, #app .next-rail .next-nav-group.current > .next-nav-group-toggle {
  background: var(--tint)!important; color: #173f99!important; box-shadow: inset 3px 0 var(--brand)!important;
}
#app .next-rail .next-nav-link.active > .ico { color: var(--brand); }
#app .layout .topbar { background: #fffffff5; border-color: var(--edge); box-shadow: none; }
#app .layout #content { padding: clamp(14px,2.25vw,38px); }
#app #content .page-head { padding: 0 0 clamp(16px,2vw,28px); margin: 0; gap: 14px; border: 0; background: transparent; }
#app #content :is(.page-head,.desk-header) h1 { font-size: clamp(1.95rem,3.1vw,3.5rem); letter-spacing: -.055em; line-height: 1.06; }
#app #content .page-head p { color: var(--muted); max-width: 72ch; line-height: 1.55; }
#app #content :is(.panel,.product-card,.desk-inbox,.desk-side section,.pc-metric,.fb-field-card,.shop-finder,.next-news,.project-card) {
  background-color: var(--paper); border: 1px solid var(--edge); border-radius: var(--tile); box-shadow: var(--lift); min-width: 0;
}
#app #content :is(.desk-section,.desk-tools,.desk-side h2) { padding: clamp(16px,2vw,26px); }
#app #content :is(.desk-section,.panel-heading,.desk-side) h2 { font-size: clamp(1.12rem,1.45vw,1.5rem); letter-spacing: -.032em; }
#app #content thead th { color: #455a74; background: #f2f5fa; font-weight: 650; }
#app #content tbody tr:hover { background: #f6f8fc; }
#app #content :is(input:not([type=checkbox],[type=radio],[type=range],[type=color]),select,textarea) { border-color: #bac7d8; border-radius: 9px; }
#app #content .desk-header {
  position: relative; isolation: isolate; min-height: clamp(208px,18vw,290px); padding: clamp(22px,3.6vw,58px);
  background: #152c52; border: none; border-radius: 22px; box-shadow: var(--lift);
}
#app #content .desk-header::before {
  inset: 0; background: linear-gradient(90deg,#122643 6%,#14294bea 32%,#14294b25 69%),url("/assets/baufaden-architektur.webp") center 53%/cover;
  mask-image: none;
}
#app #content .desk-header p { color: #d5e3ff; font-weight: 550; letter-spacing: .035em; }
#app #content .desk-header h1 { color: white; }
#app #content .desk-header button.primary { background: white; color: #193864; }
#app #content .desk-commands { gap: 12px; margin: 16px 0 0; grid-template-columns: repeat(auto-fit,minmax(min(100%,155px),1fr)); }
#app #content .desk-commands button[data-workspace-create] { background: white; border: 1px solid var(--edge); border-radius: 15px; min-height: 75px; padding: 14px; box-shadow: var(--lift); }
#app #content .desk-commands .command-icon { background: var(--tint); color: var(--brand); border-radius: 12px; }
#app #content .desk-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 0 16px 15px; gap: 7px; border: none; }
#app #content .desk-tabs button {
  display: flex; flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: 5px;
  padding: 12px; border: 1px solid var(--edge); border-radius: 12px; background: #f8fafd;
  color: #415570; white-space: normal; text-align: left; line-height: 1.25; font-size: .78rem;
}
#app #content .desk-tabs b { font-size: 1.5rem; background: none; padding: 0; line-height: 1; font-variant-numeric: tabular-nums; }
#app #content .desk-tabs button[aria-pressed=true] { background: #e9efff; color: #163d94; border-color: #819ed9; }
#app #content .desk-side button:hover { background: #f1f5fc; }
#app #content .desk-columns { gap: clamp(12px,1.6vw,26px); }
#app #content .shop-finder { padding: clamp(14px,2vw,26px); }
#app #content .shop-products:not(.is-list) { gap: 16px; }
#app #content .catalog-body { min-width: 0; }
#app #content .shop-page .product-card { border-radius: var(--tile); }
#app :is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid #446cc2; outline-offset: 2px; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  #app #content :is(.desk-commands button,.desk-tabs button,.product-card,.project-card) { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
  #app #content :is(.desk-commands button,.desk-tabs button,.product-card,.project-card):hover { transform: translateY(-2px); border-color: #9db0d1; box-shadow: 0 5px 18px #19375414; }
}
@media (max-width:760px) {
  #app .layout #content { padding: 12px; }
  #app #content .desk-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0 12px 12px; }
  #app #content .desk-commands { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  #app #content .desk-commands button[data-workspace-create] { min-width: 0; padding: 10px; gap: 7px; font-size: .79rem; overflow-wrap: anywhere; }
  #app #content .desk-header { min-height: 190px; }
  #app #content .desk-header > div { max-width: 100%; }
  #app #content .desk-header::before { background-position: 58% center; }
  #app #content .table-wrap { max-width: 100%; overflow-x: auto; }
}
#app #content .shop-page .shop-manufacturer-notice {
  background:#eef3fb; border:1px solid #c7d5e9; border-left:3px solid #6986b6;
  color:#3b526e; border-radius:10px; margin:12px 0 18px; padding:10px 14px;
}
#app #content .shop-page .product-card:has(.shop-image-placeholder) .catalog-image {
  width:fit-content; height:auto; min-height:28px; padding:3px 10px; background:#f1f4f9; border:0;
}
#app #content .shop-page .product-card .shop-image-placeholder { min-height:0; width:auto; background:transparent; }
#app #content .shop-page .product-card:has(.shop-image-placeholder) .catalog-buy { margin-top:10px; }
#editor .article-configuration .variant-option[aria-pressed=true],
#app #content :is(.asset-catalog-tabs a[aria-current],.planning-resource-tabs button[aria-selected=true]) { background:#e6edfd; color:#214889; }
#app #content .planning-bar { background:#335c83; }
#app #content .planning-bar.vehicle { background:#326451; }
#app #content .planning-bar.equipment { background:#415f9c; }
#app #content .planning-bar.need { background:#535880; }
#app #content .planning-bar.small { background:#594c79; }
#app #content .planning-bar.conflict { background:#853a4e; }
#app #content .planning-bar,#app #content .planning-bar strong { color:white; }
#app #content .pc-workspace .pc-header .pc-primary { background:#204eb0; border-color:#204eb0; color:white; }
#app #content .pc-workspace .pc-workflow { background:#edf2fa; color:#193656; border-color:#cbd8e8; }
#app #content .pc-workspace .pc-workflow :is(b,span) { color:inherit; }
#app #content .pc-workspace .pc-workflow button { color:#213e67; background:white; }
#app #content .planning-resource-tabs,#app #content .plans-filter-options>.search { background:#f3f6fa; }
