/* MISCHEL 2026-11-08 V9 — shared visual rules for Privat and Firma workspaces.
   Visual only: keep the two account models, permissions, form fields, events and data separate.
   Loaded AFTER the pre-existing styles to resolve previously contradictory Firma rules. */

/* Exactly one design system for the two workspace surfaces. */
html:is(.mischel-account-route,.mischel-firma-route) {
  --mischel-workspace-bg: #f8f5f0;
  --mischel-workspace-ink: #342c25;
  --mischel-workspace-panel: #fffdf9;
  --mischel-workspace-stroke: #e4dacc;
  --mischel-workspace-width: 1144px;
  --mischel-workspace-gutter: clamp(18px,4vw,58px);
  --mischel-workspace-interior: 24px;
}
html.mischel-account-route body,
html.mischel-firma-route body {
  background:var(--mischel-workspace-bg)!important;
  color:var(--mischel-workspace-ink);
}
/* Both intro and profile card follow the SAME width and horizontal alignment. */
html.mischel-account-route #mischel-account-page > :is(.mischel-account-page-intro,#mischel-test-customer-dashboard),
html.mischel-firma-route #mischel-firma-page :is(.firma-page-intro,.firma-page-identity,#firma-page-profile,#firma-page-other) {
  box-sizing:border-box!important;
  width:calc(100% - 2 * var(--mischel-workspace-gutter))!important;
  max-width:var(--mischel-workspace-width)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
/* The desktop navigation remains a full-width, horizontally scrollable toolbar. */
html.mischel-account-route #mischel-account-page > .mischel-customer-topnav,
html.mischel-firma-route #mischel-firma-page .firma-page-tabs {
  min-height:65px!important;
  margin-top:0!important;
  margin-bottom:38px!important;
  box-sizing:border-box!important;
  background:#f7f3ed!important;
  border-bottom:1px solid #dfd3c1!important;
}
html.mischel-account-route #mischel-account-page .mischel-customer-topnav-links,
html.mischel-firma-route #mischel-firma-page .firma-workspace-links {
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:5px!important;
  min-width:0!important;
  overflow-x:auto!important;
  scrollbar-width:none;
}
html.mischel-account-route #mischel-account-page .mischel-customer-topnav-links > button,
html.mischel-firma-route #mischel-firma-page .firma-workspace-links > button {
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  min-height:37px!important;
  padding:8px 10px!important;
  border-radius:9px!important;
  font:500 12px/1.25 Arial,sans-serif!important;
  white-space:nowrap!important;
}
/* Matching section headers; the text itself remains customer-specific. */
html.mischel-account-route #mischel-account-page > .mischel-account-page-intro,
html.mischel-firma-route #mischel-firma-page .firma-page-intro {
  display:block!important;
  border-bottom:1px solid var(--mischel-workspace-stroke)!important;
  padding:0 0 28px!important;
  margin-bottom:26px!important;
}
html.mischel-account-route #mischel-account-page > .mischel-account-page-intro h1,
html.mischel-firma-route #mischel-firma-page .firma-page-intro h1 {
  color:#322920!important;
  font:400 clamp(35px,4vw,52px)/1.15 Georgia,serif!important;
  margin:10px 0 12px!important;
}
html.mischel-account-route #mischel-account-page > .mischel-account-page-intro .fine,
html.mischel-firma-route #mischel-firma-page .firma-page-intro #firma-page-subtitle {
  color:#76685a!important;
  font:400 13px/1.5 Arial,sans-serif!important;
}
/* Firm identity matches the existing Privat account identity card. */
html.mischel-firma-route #mischel-firma-page .firma-page-identity {
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  padding:20px 25px!important;
  margin-bottom:26px!important;
  background:var(--mischel-workspace-panel)!important;
  border:0!important;
  border-radius:14px!important;
  box-shadow:0 4px 18px rgba(65,48,29,.09)!important;
}
/* Remove the extra Firma wrapper frame: the Privat account uses the page shell
   itself, not an additional bordered card surrounding orders/mail/settings. */
html.mischel-firma-route #mischel-firma-page #firma-page-other,
html.mischel-firma-route #mischel-firma-page #firma-page-profile {
  box-sizing:border-box!important;
  min-height:0!important;
  padding:0 var(--mischel-workspace-interior)!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
html.mischel-firma-route #mischel-firma-page #firma-page-profile {
  padding:0!important;
}
html.mischel-firma-route #mischel-firma-page #firma-page-profile #firma-page-form-host {
  padding:0 var(--mischel-workspace-interior)!important;
}
html.mischel-firma-route #mischel-firma-page #firma-page-other > h2:not(:empty) {
  font:400 25px/1.25 Georgia,serif!important;
  margin:4px 0 21px!important;
  color:var(--mischel-workspace-ink)!important;
}
/* In both account types, notification filters immediately follow the identity
   card. Firma already has one heading; Privat's second heading is redundant. */
html.mischel-account-route #mischel-customer-notifications > .mischel-notification-heading {
  display:none!important;
}
html.mischel-firma-route #mischel-firma-page #firma-page-other.firma-notices-active {
  padding:0!important;
}
/* Firma mail list has its own border (same as Privat). Avoid a SECOND frame. */
html.mischel-firma-route #mischel-firma-page #firma-page-other:has(#firma-messages-host:not([hidden])) {
  padding:0 var(--mischel-workspace-interior)!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host {
  width:100%!important;
  margin:0!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox {
  border-radius:12px!important;
  border:1px solid #dccbb7!important;
}
/* Firma orders no longer sit inside a second bordered white card. */
html.mischel-firma-route #mischel-firma-page #firma-page-other:has(#firma-orders-host:not([hidden])) {
  padding:0 var(--mischel-workspace-interior)!important;
}
html.mischel-firma-route #mischel-firma-page #firma-orders-host {
  box-sizing:border-box!important;
  max-width:none!important;
  width:100%!important;
  margin-top:0!important;
}
/* Critical fix: old Firma CSS HID the entire intro and identity on settings.
   Restore both to the same position and visual hierarchy as Privat. */
html.mischel-private-firma-mode.mischel-firma-route #firma-page-content:has(#firma-account-settings-form:not([hidden])) > .firma-page-intro,
html.mischel-private-firma-mode.mischel-firma-route #firma-page-content:has(#firma-account-settings-form:not([hidden])) > .firma-page-identity {
  display:flex!important;
}
html.mischel-private-firma-mode.mischel-firma-route #firma-page-content:has(#firma-account-settings-form:not([hidden])) > .firma-page-intro {
  display:block!important;
}
html.mischel-private-firma-mode.mischel-firma-route #mischel-firma-page #firma-page-other:has(#firma-account-settings-form:not([hidden])) {
  padding:0 var(--mischel-workspace-interior)!important;
  margin-top:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
/* The form fields and permission rules remain independently validated. */
@media(max-width:650px) {
  html.mischel-account-route #mischel-account-page > :is(.mischel-account-page-intro,#mischel-test-customer-dashboard),
  html.mischel-firma-route #mischel-firma-page :is(.firma-page-intro,.firma-page-identity,#firma-page-profile,#firma-page-other) {
    width:calc(100% - 26px)!important;
  }
  html.mischel-firma-route #mischel-firma-page :is(#firma-page-other,#firma-page-profile #firma-page-form-host) {
    padding-left:12px!important;
    padding-right:12px!important;
  }
}

/* V10: same helper and + Neue Nachricht presentation in both accounts. */
html.mischel-firma-route #firma-messages-host > .firma-mailbox-helper {
  margin:0 0 4px!important;
  font:400 12px/1.5 Arial,sans-serif!important;
  color:#78695b!important;
}
html.mischel-firma-route #firma-messages-host > .mischel-mailbox-top > button.firma-order-action {
  background:#fffaf3!important;
  border:1px solid #d8b98e!important;
  border-radius:10px!important;
  color:#33281d!important;
  padding:11px 17px!important;
  box-shadow:0 3px 9px rgba(70,47,21,.08)!important;
  font:400 13px/1.3 Arial,sans-serif!important;
}
html.mischel-firma-route #firma-messages-host > .mischel-mailbox-top > button.firma-order-action:hover {
  background:#f3e7d6!important;
}
html.mischel-account-route #mischel-customer-topnav .mischel-private-message-unread-badge {
  display:inline-flex!important;align-items:center;justify-content:center;
  min-width:17px;min-height:17px;padding:1px 5px;margin-left:5px;
  box-sizing:border-box;border-radius:99px;background:#b28e51;color:#fff;
  font:700 11px/15px Arial,sans-serif;vertical-align:middle;
}


/* V11: a single compact mail composer bar in both user areas. */
html.mischel-account-route #mischel-message-account > .mischel-mailbox-top-compact,
html.mischel-firma-route #firma-messages-host > .mischel-mailbox-top-compact {
  box-sizing:border-box!important;display:flex!important;align-items:center!important;
  justify-content:space-between!important;flex-wrap:nowrap!important;
  gap:14px!important;width:100%!important;margin:0 0 16px!important;
  min-height:46px!important;padding:0!important;
}
html.mischel-account-route #mischel-message-account .mischel-mailbox-inline-helper,
html.mischel-firma-route #firma-messages-host .mischel-mailbox-inline-helper {
  flex:1 1 auto!important;min-width:0!important;max-width:none!important;
  margin:0!important;padding:0!important;border:0!important;
  color:#78695b!important;font:400 12px/1.5 Arial,sans-serif!important;
}
html.mischel-account-route #mischel-message-account > .mischel-mailbox-top-compact > button,
html.mischel-firma-route #firma-messages-host > .mischel-mailbox-top-compact > button {
  flex:0 0 auto!important;white-space:nowrap!important;
  box-sizing:border-box!important;min-height:40px!important;margin:0 0 0 auto!important;
  padding:10px 16px!important;border-radius:10px!important;
  background:#fffaf3!important;border:1px solid #d8b98e!important;
  color:#33281d!important;box-shadow:0 3px 9px rgba(70,47,21,.08)!important;
  font:400 13px/1.3 Arial,sans-serif!important;
}
@media(max-width:650px){
 html.mischel-account-route #mischel-message-account > .mischel-mailbox-top-compact,
 html.mischel-firma-route #firma-messages-host > .mischel-mailbox-top-compact{flex-wrap:wrap!important;}
}
/* V11: same selection control, aligned as Privat and without changing selection actions. */
html.mischel-account-route #mischel-customer-notifications label.mischel-notification-selectall,
html.mischel-firma-route #firma-notifications-host label.mischel-notification-selectall{
 display:inline-flex!important;flex-direction:row!important;
 align-items:center!important;justify-content:flex-start!important;
 gap:7px!important;white-space:nowrap!important;min-height:18px!important;
 margin:0!important;padding:0!important;vertical-align:middle!important;
 font:400 12px/1.4 Arial,sans-serif!important;
}
html.mischel-account-route #mischel-customer-notifications label.mischel-notification-selectall > input[type=checkbox],
html.mischel-firma-route #firma-notifications-host label.mischel-notification-selectall > input[type=checkbox]{
 display:block!important;flex:0 0 16px!important;box-sizing:border-box!important;
 width:16px!important;height:16px!important;min-width:16px!important;
 min-height:16px!important;margin:0!important;padding:0!important;
 position:static!important;transform:none!important;
}
/* V11: the Firma order heading starts at the same gap below the identity as Privat. */
html.mischel-firma-route #mischel-firma-page #firma-page-other:has(#firma-orders-host:not([hidden])) > #firma-page-other-title {
 margin-top:60px!important;
}
/* V12: align Firma's selection label to the correctly spaced Privat control. */
html.mischel-firma-route #mischel-firma-page #firma-notifications-host label.mischel-notification-selectall{
 display:inline-flex!important;align-items:center!important;flex-flow:row nowrap!important;
 gap:9px!important;white-space:nowrap!important;margin:0!important;padding:0!important;
}
html.mischel-firma-route #mischel-firma-page #firma-notifications-host label.mischel-notification-selectall > input[type=checkbox]{
 width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;
 display:block!important;flex:none!important;margin:0!important;position:static!important;
}
/* A status CHANGE awaiting inspection is distinct from the order's saved status. */
.mischel-order-change-new{
 display:inline-flex;align-items:center;white-space:nowrap;
 background:#ae8b51;color:#fff;border-radius:999px;padding:3px 9px;
 font:700 11px/1.4 Arial,sans-serif;vertical-align:middle;
}
/* V11: avoid overflow of the absolutely centred tabs into the brand
   while asynchronous unread badges load or after Ctrl+F5. */
@media(min-width:1221px){
 .mischel-admin-workspace-nav > .mischel-workspace-tabs{
   overflow-x:auto!important;overflow-y:hidden!important;
   max-width:calc(100% - 250px)!important;
   justify-content:safe center!important;scrollbar-width:none!important;
 }
 .mischel-admin-workspace-nav > .mischel-workspace-tabs::-webkit-scrollbar{display:none;}
}
/* V11: fix first-paint administrative tab geometry, do not touch underlying editor buttons. */
.mischel-admin-workspace-nav .mischel-workspace-tabs > button.mischel-workspace-tab{
 box-sizing:border-box!important;display:inline-flex!important;
 position:static!important;left:auto!important;top:auto!important;
 transform:none!important;flex:0 0 auto!important;
 min-height:37px!important;height:auto!important;
 min-width:0!important;width:auto!important;
 margin:0!important;padding:8px 10px!important;
 align-items:center!important;justify-content:center!important;
 font:500 12px/1.25 Arial,sans-serif!important;
 border-radius:9px!important;white-space:nowrap!important;
}
:is(#catalog-admin,#sets-admin,#admin,#promo-admin,#stats-admin,#test-orders-admin,
  #business-admin,#mischel-community-admin,#mischel-notifications-admin,#mischel-security-admin)
  > .mischel-admin-workspace-nav:not(.mischel-admin-nav-ready-v11) .mischel-workspace-tabs {
 visibility:hidden!important;
}

/* V13: concise, matching order spacing in Privat and Firma. */
html.mischel-account-route #mischel-panel-orders .mischel-private-ops{
 padding-top:0!important;margin-top:-10px!important;
}
html.mischel-account-route #mischel-panel-orders .mischel-private-ops > h3:first-child{
 margin-top:0!important;margin-bottom:18px!important;
}
html.mischel-firma-route #mischel-firma-page #firma-page-other:has(#firma-orders-host:not([hidden])) > #firma-page-other-title{
 margin-top:26px!important;margin-bottom:18px!important;
}
/* V13: visually correct Firma checkbox (no change to onchange or bulk actions). */
html.mischel-firma-route #mischel-firma-page #firma-notifications-host label.mischel-notification-selectall{
 display:inline-grid!important;grid-template-columns:16px max-content!important;
 column-gap:9px!important;align-items:center!important;
 width:max-content!important;min-height:20px!important;
 margin:0 0 7px 0!important;padding:0!important;
}
html.mischel-firma-route #mischel-firma-page #firma-notifications-host label.mischel-notification-selectall > input[type=checkbox]{
 width:16px!important;height:16px!important;min-width:16px!important;
 max-width:16px!important;margin:0!important;padding:0!important;
 vertical-align:middle!important;align-self:center!important;
}
html.mischel-firma-route #mischel-firma-page #firma-notifications-host label.mischel-notification-selectall > span{
 display:block!important;margin:0!important;padding:0!important;
 line-height:18px!important;white-space:nowrap!important;
}
/* Firma status and "Neu" form one stable right-aligned cluster. */
html.mischel-firma-route #firma-orders-host .firma-order-heading{
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 flex-wrap:wrap!important;gap:8px 16px!important;
}
html.mischel-firma-route #firma-orders-host .mischel-order-status-cluster{
 margin-left:auto!important;display:inline-flex!important;
 flex:0 0 auto!important;align-items:center!important;gap:10px!important;
}
html.mischel-firma-route #firma-orders-host .firma-order-status{
 box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;
 padding:3px 11px!important;border:1px solid #b7a997!important;
 border-radius:999px!important;font:650 12px/1.45 Arial,sans-serif!important;
 white-space:nowrap!important;background:#f0ede7!important;color:#514637!important;
}
html.mischel-firma-route #firma-orders-host .firma-order-status.state-new{
 background:#e6effc!important;color:#1c4e83!important;border-color:#8aabd2!important;
}
html.mischel-firma-route #firma-orders-host .firma-order-status.state-processing,
html.mischel-firma-route #firma-orders-host .firma-order-status.state-ready{
 background:#fff0d4!important;color:#80510f!important;border-color:#d7aa62!important;
}
html.mischel-firma-route #firma-orders-host .firma-order-status.state-shipped{
 background:#f0ede7!important;color:#514637!important;border-color:#b7a997!important;
}
html.mischel-firma-route #firma-orders-host .firma-order-status.state-delivered,
html.mischel-firma-route #firma-orders-host .firma-order-status.state-collected{
 background:#e2f3e6!important;color:#225f38!important;border-color:#86b899!important;
}
html.mischel-firma-route #firma-orders-host .firma-order-status.state-cancelled{
 background:#fce7e6!important;color:#962e2a!important;border-color:#d99b97!important;
}
html.mischel-firma-route #firma-orders-host .firma-order-status.state-undeliverable,
html.mischel-firma-route #firma-orders-host .firma-order-status.state-returned_to_sender,
html.mischel-firma-route #firma-orders-host .firma-order-status.state-returned{
 background:#fae7e2!important;color:#8a3e27!important;border-color:#dba290!important;
}

/* V13a: Match Privat's bulk-selection indentation in Firma only.
   Prior V13 rule reset margin-left to zero, leaving the control further
   left than the checkboxes on the notice cards. Behaviour unchanged. */
html.mischel-firma-route #mischel-firma-page #firma-notifications-host label.mischel-notification-selectall {
  margin-left:14px!important;
}

/* V13b: PRIVATE + FIRMA ONLY. Center notification card checkboxes vertically,
   matching unchanged Administration. Keep selection handlers untouched. */
html.mischel-account-route #mischel-customer-notifications .mischel-notification-row {
  align-items:center!important;
}
html.mischel-account-route #mischel-customer-notifications .mischel-notification-row > label.mischel-notification-select {
  display:inline-flex!important;
  flex:0 0 16px!important;
  align-self:center!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  width:16px!important;
  height:16px!important;
  margin:0!important;
  padding:0!important;
  line-height:0!important;
}
html.mischel-account-route #mischel-customer-notifications .mischel-notification-row > label.mischel-notification-select > input[type="checkbox"] {
  display:block!important;
  width:16px!important;
  height:16px!important;
  flex:0 0 16px!important;
  align-self:center!important;
  position:static!important;
  transform:none!important;
  margin:0!important;
  padding:0!important;
}
/* Privat: align the select-all box with the card boxes (5px existing gap). */
html.mischel-account-route #mischel-customer-notifications .mischel-notification-selectrow > label.mischel-notification-selectall {
  margin-left:5px!important;
}
/* Firma: its inherited 17px checkbox rule used align-self:start!important.
   Override ONLY card checkbox alignment, without touching the card content. */
html.mischel-firma-route #mischel-firma-page #firma-notifications-host .firma-notice-card {
  align-items:center!important;
}
html.mischel-firma-route #mischel-firma-page #firma-notifications-host .firma-notice-card > input[type="checkbox"] {
  align-self:center!important;
  justify-self:center!important;
  position:static!important;
  transform:none!important;
  margin:0!important;
}
/* Firma: 17px from the container edge matches its read/unread cards. */
html.mischel-firma-route #mischel-firma-page #firma-notifications-host label.mischel-notification-selectall {
  margin-left:17px!important;
}

/* V14: Typography parity for PRIVAT and FIRMA only.
   Scale = larger corresponding size (not identical size for all semantic roles).
   Keep all existing layouts, checkboxes, colors, permissions and Admin untouched.
   No global star selector; badges, SVG icons and counters retain their small sizes. */
html:is(.mischel-account-route,.mischel-firma-route) {
  --mischel-type-section:28px;
  --mischel-type-name:24px;
  --mischel-type-nav:13px;
  --mischel-type-body:14px;
  --mischel-type-control:14px;
  --mischel-type-helper:13px;
  --mischel-type-label:12px;
}
/* Main workspace text: same starting point; H1 already matched at 52px. */
html.mischel-account-route #mischel-account-page,
html.mischel-firma-route #mischel-firma-page {
  font-size:var(--mischel-type-body)!important;
  line-height:1.5;
}
/* Account tab labels: Firma was 13px, shared override had made both 12px. */
html.mischel-account-route #mischel-account-page .mischel-customer-topnav-links > button,
html.mischel-firma-route #mischel-firma-page .firma-workspace-links > button {
  font-size:var(--mischel-type-nav)!important;
}
/* Subtitle under H1: 14px is the larger of 13px and 14px. */
html.mischel-account-route #mischel-account-page .mischel-account-page-intro .fine,
html.mischel-firma-route #mischel-firma-page .firma-page-intro #firma-page-subtitle {
  font-size:var(--mischel-type-body)!important;
}
/* Names and corresponding section titles share the larger Georgia size. */
html.mischel-account-route #mischel-test-customer-dashboard .test-customer-summary > strong,
html.mischel-firma-route #mischel-firma-page .firma-page-identity .firma-user strong {
  font-size:var(--mischel-type-name)!important;
}
html.mischel-account-route #mischel-account-page #mischel-panel-profile h4,
html.mischel-account-route #mischel-account-page #mischel-panel-password h4,
html.mischel-account-route #mischel-panel-orders .mischel-private-ops > h3:first-child,
html.mischel-firma-route #mischel-firma-page #firma-page-other > h2:not(:empty),
html.mischel-firma-route #mischel-firma-page #firma-page-other > #firma-page-other-title,
html.mischel-firma-route #mischel-firma-page .firma-profile-section h3 {
  font-size:var(--mischel-type-section)!important;
  line-height:1.25!important;
}
/* Form field labels, passwords and account data: uniform legible label size.
   Password/show-icon buttons are deliberately excluded. */
html.mischel-account-route #mischel-test-customer-dashboard :is(#test-customer-profile,#mischel-panel-password) label:not(.checkout-check),
html.mischel-firma-route #mischel-firma-page :is(#firma-page-profile,#firma-account-settings-form) label:not(.firma-check),
html.mischel-firma-route #mischel-firma-page #firma-profile-form > label,
html.mischel-firma-route #mischel-firma-page .firma-profile-grid > label,
html.mischel-firma-route #mischel-firma-page .firma-account-password-fields > label {
  font-size:var(--mischel-type-label)!important;
}
html.mischel-account-route #mischel-test-customer-dashboard :is(#test-customer-profile,#mischel-panel-password) :is(input:not([type=checkbox]),textarea,select),
html.mischel-firma-route #mischel-firma-page :is(#firma-page-profile,#firma-account-settings-form) :is(input:not([type=checkbox]),textarea,select) {
  font-size:var(--mischel-type-control)!important;
}
/* Order cards: content and status labels match, time stamps remain secondary. */
html.mischel-account-route #mischel-panel-orders .mischel-private-ops :is(.test-customer-order,.mischel-private-order-details),
html.mischel-firma-route #firma-orders-host :is(.firma-order-card,.mischel-private-order-details) {
  font-size:var(--mischel-type-body)!important;
}
html.mischel-account-route #mischel-panel-orders .mischel-customer-order-status,
html.mischel-firma-route #firma-orders-host .firma-order-status {
  font-size:var(--mischel-type-helper)!important;
}
html.mischel-account-route #mischel-panel-orders .mischel-private-order-field,
html.mischel-account-route #mischel-panel-orders .mischel-private-order-field strong,
html.mischel-firma-route #firma-orders-host .mischel-private-order-field {
  font-size:var(--mischel-type-body)!important;
}
html.mischel-account-route #mischel-panel-orders :is(.mischel-private-order-date,.mischel-private-order-note,.mischel-private-order-hint),
html.mischel-firma-route #firma-orders-host :is(time,small,.firma-order-date) {
  font-size:var(--mischel-type-label)!important;
}
/* Shared mailbox: matching conversation text / search / actions. */
html.mischel-account-route #mischel-message-account :is(.mischel-mailbox-row-main,.mischel-mailbox-detail,.mischel-mailbox-sidebar button),
html.mischel-firma-route #firma-messages-host :is(.mischel-mailbox-row-main,.mischel-mailbox-detail,.mischel-mailbox-sidebar button) {
  font-size:var(--mischel-type-body)!important;
}
html.mischel-account-route #mischel-message-account :is(.mischel-mailbox-search,.mischel-mailbox-top-compact > button),
html.mischel-firma-route #firma-messages-host :is(.mischel-mailbox-search,.mischel-mailbox-top-compact > button) {
  font-size:var(--mischel-type-control)!important;
}
html.mischel-account-route #mischel-message-account .mischel-mailbox-inline-helper,
html.mischel-firma-route #firma-messages-host .mischel-mailbox-inline-helper,
html.mischel-account-route #mischel-message-account .mischel-mailbox-preview,
html.mischel-firma-route #firma-messages-host .mischel-mailbox-preview {
  font-size:var(--mischel-type-helper)!important;
}
/* Notification list/filter text, but not the number chips or selection-square geometry. */
html.mischel-account-route #mischel-customer-notifications :is(.mischel-notification-row,.mischel-notification-toolbar,.mischel-notification-kindfilter),
html.mischel-firma-route #firma-notifications-host :is(.firma-notice-card,.firma-notice-toolbar,.firma-notice-kindfilter) {
  font-size:var(--mischel-type-body)!important;
}
html.mischel-account-route #mischel-customer-notifications :is(button:not(.mischel-notification-select),select),
html.mischel-firma-route #firma-notifications-host :is(button:not(.mischel-notification-select),select) {
  font-size:var(--mischel-type-helper)!important;
}
html.mischel-account-route #mischel-customer-notifications :is(time,small,.mischel-notification-date),
html.mischel-firma-route #firma-notifications-host :is(time,small,.firma-notice-date) {
  font-size:var(--mischel-type-label)!important;
}
/* Keep the proven v13b checkbox positions and 16px square sizes completely intact. */
@media(max-width:650px) {
  html.mischel-account-route #mischel-account-page .mischel-customer-topnav-links > button,
  html.mischel-firma-route #mischel-firma-page .firma-workspace-links > button {
    font-size:12px!important;
  }
}

/* V19 — Only order search fields, matching Administration / Privat / Firma.\n   Client and business use their own existing search APIs and filtering events. */
#test-orders-admin .mischel-test-tools > label {
  box-sizing:border-box!important;
  width:min(570px,100%)!important;
  flex:0 1 570px!important;
  min-width:0!important;
}
#test-orders-admin .mischel-test-tools .mischel-admin-order-search-wrap,
html.mischel-account-route .mischel-private-ops .mischel-unified-order-search,
html.mischel-firma-route #firma-orders-host .mischel-unified-order-search {
  position:relative!important;
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:570px!important;
  min-width:0!important;
}
#test-orders-admin .mischel-test-tools .mischel-admin-order-search-wrap > input,
html.mischel-account-route .mischel-private-ops .mischel-unified-order-search > input,
html.mischel-firma-route #firma-orders-host .mischel-unified-order-search > input {
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:570px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0 45px 0 11px!important;
  margin:0!important;
  border:1px solid #d8cfc2!important;
  border-radius:0!important;
  background:#faf8f4!important;
  box-shadow:none!important;
  color:#31271d!important;
  font:400 13px/1.35 Arial,sans-serif!important;
  text-overflow:clip;
}
html.mischel-account-route .mischel-private-ops .mischel-unified-order-search > input::-webkit-search-cancel-button,
html.mischel-firma-route #firma-orders-host .mischel-unified-order-search > input::-webkit-search-cancel-button {
  -webkit-appearance:none!important;
  display:none!important;
}
/* The native browser X is not consistently visible; our button is explicit. */
#test-orders-admin .mischel-test-tools .mischel-admin-order-search-wrap > .mischel-order-search-clear,
html.mischel-account-route .mischel-private-ops .mischel-unified-order-search > .mischel-order-search-clear,
html.mischel-firma-route #firma-orders-host .mischel-unified-order-search > .mischel-order-search-clear {
  appearance:none!important;
  position:absolute!important;
  top:50%!important;
  right:9px!important;
  bottom:auto!important;
  left:auto!important;
  transform:translateY(-50%)!important;
  z-index:2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  min-height:24px!important;
  max-width:24px!important;
  max-height:24px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:4px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#44382c!important;
  opacity:1!important;
  visibility:visible!important;
  font:400 20px/1 Arial,sans-serif!important;
  cursor:pointer!important;
}
#test-orders-admin .mischel-test-tools .mischel-admin-order-search-wrap > .mischel-order-search-clear[hidden],
html.mischel-account-route .mischel-private-ops .mischel-unified-order-search > .mischel-order-search-clear[hidden],
html.mischel-firma-route #firma-orders-host .mischel-unified-order-search > .mischel-order-search-clear[hidden] {
  display:none!important;
}
#test-orders-admin .mischel-test-tools .mischel-admin-order-search-wrap > .mischel-order-search-clear:hover,
html.mischel-account-route .mischel-private-ops .mischel-unified-order-search > .mischel-order-search-clear:hover,
html.mischel-firma-route #firma-orders-host .mischel-unified-order-search > .mischel-order-search-clear:hover {
  color:#20170f!important;
  background:transparent!important;
}
#test-orders-admin .mischel-test-tools .mischel-admin-order-search-wrap > .mischel-order-search-clear:focus-visible,
html.mischel-account-route .mischel-private-ops .mischel-unified-order-search > .mischel-order-search-clear:focus-visible,
html.mischel-firma-route #firma-orders-host .mischel-unified-order-search > .mischel-order-search-clear:focus-visible {
  outline:2px solid #b88b46!important;
  outline-offset:1px!important;
}


/* V20 — Firma mailbox list layout matches Privat screenshot (only Firma).
   Keep the existing message/filter/bulk action logic and private/admin views. */
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox {
  grid-template-columns:205px minmax(0,1fr)!important;
  background:#fffdf9!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-main {
  box-sizing:border-box!important;
  min-width:0!important;
  padding:0!important;
  background:#fffdf9!important;
}
/* Heading on the left, compact 340px search field aligned to the right. */
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-toolbar {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:nowrap!important;
  column-gap:20px!important;
  min-height:80px!important;
  padding:16px 18px!important;
  border-bottom:1px solid #e6d9c7!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-toolbar > strong {
  flex:0 0 auto!important;
  margin:0!important;
  color:#30271e!important;
  font:400 24px/1.25 Georgia,serif!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-toolbar > .mischel-mailbox-search {
  flex:0 1 340px!important;
  box-sizing:border-box!important;
  width:340px!important;
  min-width:150px!important;
  max-width:340px!important;
  height:43px!important;
  margin:0!important;
  padding:10px 12px!important;
  border:1px solid #ddc6a7!important;
  border-radius:25px!important;
  background:#fff!important;
  box-shadow:none!important;
}
/* Same slender cream selection strip and column alignment as Privat. */
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-bulk {
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  box-sizing:border-box!important;
  flex-wrap:wrap!important;
  gap:8px 12px!important;
  min-height:39px!important;
  margin:0!important;
  padding:7px 15px!important;
  background:#f7f2e9!important;
  border-bottom:1px solid #e6d9c7!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-bulk-left,
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-bulk-select {
  display:inline-flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
  padding:0!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-bulk-left {
  gap:13px!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-bulk-select input,
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-check {
  box-sizing:border-box!important;
  flex:0 0 17px!important;
  width:17px!important;
  height:17px!important;
  margin:0!important;
  accent-color:#aa8853;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-bulk-left :is(label,span) {
  font:400 12px/1.3 Arial,sans-serif!important;
}
/* Privat does not display inactive bulk actions when nothing is selected.
   Keep all actions available when selected, including Papierkorb leeren. */
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-bulk-actions:not(:has(button:enabled)) {
  display:none!important;
}
/* White rows, aligned checkbox/star/message; preserve unread highlighting. */
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-list {
  background:#fffdf9!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-row {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  min-height:97px!important;
  padding:12px 15px!important;
  margin:0!important;
  border-top:0!important;
  border-bottom:1px solid #e6d9c7!important;
  background:#fffdf9!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-row.unread {
  background:#fdf1da!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-star {
  box-sizing:border-box!important;
  flex:0 0 20px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:20px!important;
  min-width:20px!important;
  height:28px!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-row-main {
  flex:1 1 auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  gap:6px!important;
}
html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-row-top {
  display:flex!important;
  justify-content:space-between!important;
  align-items:baseline!important;
  gap:16px!important;
}
/* On small widths use a stacked sidebar and a full-width search, never overflow. */
@media(max-width:760px){
  html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-toolbar {
    flex-wrap:wrap!important;
    min-height:0!important;
    padding:14px!important;
  }
  html.mischel-firma-route #mischel-firma-page #firma-messages-host .mischel-mailbox-toolbar > .mischel-mailbox-search {
    flex:1 1 100%!important;
    max-width:none!important;
    width:100%!important;
  }
}
