#catalog-areas .panel-heading { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 20px; }
#catalog-areas .panel-heading h2 { font-size: 15px; }
#catalog-areas .panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
#catalog-area-form .field { margin-bottom: 16px; }
#scan-vin.button-primary,
.button-primary[data-action="scan-vin"] {
  color: #fff;
}
#scan-vin.button-primary:hover,
#scan-vin.button-primary:focus-visible,
#scan-vin.button-primary:active,
.button-primary[data-action="scan-vin"]:hover,
.button-primary[data-action="scan-vin"]:focus-visible,
.button-primary[data-action="scan-vin"]:active {
  color: #fff;
}
:root {
  --paper: #f4f2ec;
  --surface: #fffefa;
  --surface-2: #f7f5ef;
  --ink: #252b2b;
  --ink-soft: #596461;
  --muted: #6f7975;
  --line: #e2e0d9;
  --nav: #293133;
  --nav-soft: #3c4647;
  --sidebar: #f1f0eb;
  --red: #b4483b;
  --red-soft: #f8e9e5;
  --teal: #198574;
  --teal-soft: #e4f2ee;
  --amber: #d6a42f;
  --amber-soft: #fbf1d9;
  --blue: #527187;
  --blue-soft: #e8eff3;
  --shadow: 0 8px 24px rgba(43, 48, 45, .055);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(25,133,116,.55); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100dvh; }
.sidebar { background: var(--sidebar); color: #646b6e; position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; padding: 22px 15px 15px; border-right: 1px solid #e5e2db; z-index: 4; }
.brand { display: flex; align-items: center; gap: 11px; padding: 1px 9px 31px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: #efb932; border-radius: 12px; color: #333128; font: 800 16px var(--font-display); letter-spacing: -.09em; padding-right: 2px; box-shadow: 0 2px 5px rgba(97,77,24,.12); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; gap: 4px; }
.brand-copy strong { font: 800 15px var(--font-display); letter-spacing: .14em; }
.brand-copy small { font-size: 10px; letter-spacing: .14em; color: #706e64; }
.side-caption { color: #706d62; font-size: 11px; letter-spacing: .12em; font-weight: 700; padding: 0 12px 10px; }
.nav-list { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; padding: 10px 11px; width: 100%; min-height: 44px; border-radius: 7px; text-align: left; color: #6b7274; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-link:hover { background: #e9e6dd; color: #302f2b; transform: translateX(2px); }
.nav-link.active { color: #2c2a24; background: #f2bd43; box-shadow: none; font-weight: 700; }
.nav-link.active .nav-icon { color: #28271f; }
.nav-icon { width: 18px; height: 18px; color: #798184; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-link span:nth-child(2) { flex: 1; font-size: 13px; font-weight: 600; }
.nav-count { color: #91652d; font: 600 11px var(--font-body); }
.sidebar-bottom { margin-top: auto; }
.shift-card { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 9px 16px; display: flex; gap: 9px; align-items: flex-start; }
.live-dot, .today-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #84b69e; box-shadow: 0 0 0 3px rgba(132,182,158,.13); flex: none; margin-top: 5px; }
.shift-card div, .profile-copy { display: flex; flex-direction: column; }
.shift-card strong { font-size: 13px; font-weight: 600; }
.shift-card small { font-size: 12px; color: #b5c2bb; margin-top: 3px; }
.user-profile { padding: 11px 9px 6px; background: transparent; border: 0; border-top: 1px solid rgba(255,255,255,.1); width: 100%; display: flex; align-items: center; text-align: left; gap: 10px; cursor: pointer; }
.avatar { background: #f5d37c; color: #353126; width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.profile-copy { flex: 1; }
.profile-copy strong { font-size: 13px; font-weight: 600; }
.profile-copy small { font-size: 12px; color: #b5c2bb; }
.profile-more { color: #aab6af; font-size: 19px; line-height: 1; }
.main-area { margin-left: 248px; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { min-height: 64px; padding: 0 30px; border-bottom: 1px solid #e8e5dc; background: rgba(255,255,255,.94); display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 3; backdrop-filter: blur(14px); }
.breadcrumb { display: flex; gap: 10px; align-items: center; color: #716f66; font-size: 13px; }
.breadcrumb strong { color: #36352f; font-weight: 700; }
.crumb-slash { color: #c4cbc5; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.today-label { color: #68736e; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.today-dot { width: 6px; height: 6px; margin: 0; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; cursor: pointer; color: #63716c; transition: border .18s, color .18s, transform .18s; }
.icon-button:hover { color: var(--red); border-color: #d8a39c; transform: translateY(-1px); }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.header-cta, .button-primary { border: 0; background: var(--red); color: white; border-radius: 6px; padding: 11px 15px; min-height: 42px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; cursor: pointer; transition: background .18s, transform .18s, box-shadow .18s; box-shadow: 0 3px 9px rgba(201,71,59,.12); }
.header-cta:hover, .button-primary:hover { background: #b53e34; transform: translateY(-1px); box-shadow: 0 6px 13px rgba(201,71,59,.2); }
.header-cta span { font-size: 18px; font-weight: 400; line-height: 12px; }
.content { width: min(1360px, 100%); margin: 0 auto; padding: 29px 30px 36px; flex: 1; }
.page-footer { width: min(1360px, 100%); padding: 14px 30px 17px; margin: 0 auto; display: flex; justify-content: space-between; color: #716f66; font-size: 11px; border-top: 1px solid #e8e5dc; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; color: var(--red); font-weight: 700; font-size: 11px; margin-bottom: 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font: 700 27px/1.18 var(--font-display); letter-spacing: -.045em; color: #23312f; }
.page-subtitle { color: #626d68; font-size: 14px; line-height: 1.55; margin: 0; }
.date-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 8px 11px; color: #64716b; font-size: 10px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 12px; }
.section-title-row h2 { margin: 0; font: 700 16px var(--font-display); letter-spacing: -.015em; }
.section-note { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); padding: 16px 17px 15px; border-radius: 8px; min-height: 119px; position: relative; overflow: hidden; box-shadow: 0 2px 6px rgba(26,43,39,.018); transition: transform .2s, box-shadow .2s; }
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: #626d68; font-size: 12px; }
.metric-icon { display: grid; place-items: center; height: 27px; width: 27px; border-radius: 7px; color: var(--teal); background: var(--teal-soft); }
.metric-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metric-card:nth-child(2) .metric-icon { color: var(--amber); background: var(--amber-soft); }
.metric-card:nth-child(3) .metric-icon { color: var(--red); background: var(--red-soft); }
.metric-card:nth-child(4) .metric-icon { color: var(--blue); background: var(--blue-soft); }
.metric-value { margin-top: 13px; font: 700 27px/1 var(--font-display); letter-spacing: -.05em; color: #263431; }
.metric-foot { display: flex; gap: 5px; align-items: center; color: #66716c; font-size: 11px; line-height: 1.4; margin-top: 8px; }
.metric-up { color: #4e8971; font-weight: 700; }
.overview-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 13px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 2px 6px rgba(26,43,39,.018); }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 17px 12px; }
.panel-title { margin: 0; font: 700 15px var(--font-display); }
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.text-button { border: 0; background: transparent; color: var(--red); font-weight: 600; font-size: 13px; cursor: pointer; padding: 7px 0 7px 8px; }
.text-button:hover { color: #8e3028; text-decoration: underline; text-underline-offset: 3px; }
.orders-preview { padding: 0 17px 7px; }
.order-row { display: grid; grid-template-columns: minmax(115px,1.2fr) minmax(108px,1.1fr) minmax(105px,1fr) 110px; gap: 12px; padding: 11px 0; border-top: 1px solid #edf0eb; align-items: center; cursor: pointer; transition: background .15s; }
.order-row:hover { background: #f8f9f5; }
.order-ident strong, .cell-strong { display: block; font-size: 12px; font-weight: 600; color: #34423e; }
.order-ident small, .cell-muted { font-size: 11px; color: #63706a; display: block; margin-top: 3px; }
.order-car { color: #4e5d57; font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-radius: 20px; padding: 5px 9px; font-size: 11px; font-weight: 600; }
.status:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-ready, .status-completed { color: #397765; background: #e8f2eb; }
.status-progress { color: #a56c27; background: #fbf1df; }
.status-waiting { color: #607e91; background: #edf2f5; }
.status-review { color: #a94e43; background: #f9eae7; }
.work-panel { padding-bottom: 15px; }
.work-panel .panel-head { padding-bottom: 8px; }
.work-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 17px; }
.work-time { width: 39px; padding-top: 2px; color: #7f8b85; font: 600 9px var(--font-body); }
.work-mark { position: relative; width: 11px; flex: none; height: 34px; }
.work-mark:before { content: ""; position: absolute; top: 4px; left: 2px; width: 6px; height: 6px; background: #5f9981; border-radius: 50%; }
.work-mark:after { content: ""; position: absolute; top: 15px; left: 5px; height: 25px; border-left: 1px solid #dce6de; }
.work-item:last-child .work-mark:after { display: none; }
.work-detail { flex: 1; }
.work-detail strong { display: block; font-size: 10px; font-weight: 600; }
.work-detail small { display: block; font-size: 9px; color: #89948e; margin-top: 2px; }
.work-assignee { font-size: 9px; color: #819089; text-align: right; }
.capacity-panel { padding: 15px 17px; margin-top: 13px; }
.capacity-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.capacity-head strong { font: 700 11px var(--font-display); }
.capacity-head span { color: #87928d; font-size: 9px; }
.capacity-bar { display: flex; height: 7px; border-radius: 9px; overflow: hidden; background: #e9ede7; }
.capacity-bar span { background: #507d6f; width: 68%; }
.capacity-bar span:nth-child(2) { background: #d69a52; width: 20%; }
.capacity-bar span:nth-child(3) { background: #dce4de; width: 12%; }
.capacity-legend { display: flex; gap: 15px; margin-top: 9px; font-size: 9px; color: #7e8983; }
.legend-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 5px; background: #507d6f; }
.legend-dot.amber { background: #d69a52; }
.legend-dot.pale { background: #c8d2ca; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: #84908a; fill: none; stroke-width: 1.7; }
.search-input, .select-input { height: 40px; border: 1px solid #dfe5df; background: var(--surface); border-radius: 5px; padding: 0 11px; color: #364440; font-size: 14px; }
.search-input { width: 235px; padding-left: 33px; }
.select-input { min-width: 135px; }
.search-input::placeholder { color: #a0aaa4; }
.button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 1px solid #dce3dc; background: var(--surface); border-radius: 5px; padding: 0 12px; color: #46534e; font-size: 13px; cursor: pointer; transition: background .15s, border .15s, color .15s; }
.button-secondary:hover { background: #f2f6f1; border-color: #b7c8bd; color: #31574b; }
.button-secondary svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.data-table { border-collapse: collapse; width: 100%; min-width: 760px; text-align: left; }
.data-table th { padding: 13px 14px; background: #f8f9f6; color: #59655f; text-transform: uppercase; letter-spacing: .065em; font-size: 11px; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px; border-bottom: 1px solid #edf0eb; font-size: 13px; line-height: 1.45; vertical-align: middle; }
.data-table tbody tr { cursor: pointer; transition: background .15s; }
.data-table tbody tr:hover { background: #f9faf6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-order { font-size: 13px; color: #34423e; font-weight: 700; letter-spacing: .015em; }
.table-car { font-size: 13px; font-weight: 600; color: #35443f; display: block; }
.table-sub { font-size: 11px; color: #626e68; display: block; margin-top: 3px; }
.customer-cell { display: flex; align-items: center; gap: 8px; }
.mini-avatar { height: 25px; width: 25px; border-radius: 50%; background: #e6ece6; color: #63756b; display: grid; place-items: center; font-size: 8px; font-weight: 700; flex: none; }
.table-actions { display: flex; gap: 4px; justify-content: flex-end; }
.tiny-button { width: 36px; height: 36px; display: grid; place-items: center; color: #59655f; border: 1px solid transparent; border-radius: 5px; background: transparent; cursor: pointer; }
.tiny-button:hover { background: #eef3ee; border-color: #dce7dd; color: var(--teal); }
.tiny-button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.table-summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 2px; color: #626e68; font-size: 12px; }
.pagination { display: flex; gap: 4px; }
.page-num { border: 1px solid transparent; background: transparent; color: #59655f; width: 34px; height: 34px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.page-num.active { border-color: #dce5dc; background: #fffefa; color: #315c4c; font-weight: 700; }
.form-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(235px,.75fr); gap: 16px; align-items: start; }
.form-panel { padding: 20px; }
.form-section { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #edf0eb; }
.form-section:last-of-type { border: 0; margin-bottom: 0; padding-bottom: 0; }
.form-section-head { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.step-number { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; color: #527a69; background: #e9f1eb; font: 700 10px var(--font-display); }
.form-section-head h2 { margin: 0; font: 700 12px var(--font-display); }
.form-section-head p { margin: 3px 0 0; color: #59655f; font-size: 12px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #46534e; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { border: 1px solid #dfe5df; background: #fffefa; color: #35423e; border-radius: 5px; min-height: 44px; padding: 9px 12px; font-size: 15px; width: 100%; }
.field textarea { min-height: 76px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #717b76; opacity: 1; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding-top: 16px; border-top: 1px solid #edf0eb; margin-top: 18px; }
.order-aside { display: grid; gap: 12px; }
.aside-card { padding: 17px; }
.aside-card h3 { font: 700 11px var(--font-display); margin: 0 0 11px; }
.aside-card p { color: #59655f; font-size: 12px; margin: 0; line-height: 1.65; }
.service-choice { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid #edf0eb; align-items: flex-start; }
.service-choice:first-of-type { border-top: 0; }
.service-check { accent-color: var(--teal); margin: 3px 0 0; }
.service-choice strong { display: block; font-size: 12px; font-weight: 600; }
.service-choice small { color: #59655f; display: block; margin-top: 3px; font-size: 11px; }
.service-price { margin-left: auto; font: 600 9px var(--font-body); white-space: nowrap; color: #596660; }
.info-line { padding: 9px 0; display: flex; justify-content: space-between; border-bottom: 1px solid #edf0eb; color: #59655f; font-size: 12px; }
.info-line:last-child { border: 0; }
.info-line strong { color: #40504a; font-weight: 600; }
.report-kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.report-hero { background: var(--nav); color: #eef3ed; border-radius: 8px; padding: 17px; position: relative; overflow: hidden; min-height: 125px; }
.report-hero:after { content: ""; position: absolute; height: 140px; width: 140px; border-radius: 50%; border: 1px solid rgba(216,236,222,.12); right: -35px; top: 28px; box-shadow: 0 0 0 18px rgba(216,236,222,.025),0 0 0 39px rgba(216,236,222,.02); }
.report-hero small { color: #c1cec6; font-size: 11px; }
.report-hero strong { display: block; font: 700 28px var(--font-display); letter-spacing: -.05em; margin: 8px 0 2px; }
.report-hero span { font-size: 9px; color: #96c1a9; }
.report-stat { padding: 17px; min-height: 125px; }
.report-stat small { color: #626e68; font-size: 11px; }
.report-stat strong { display: block; margin-top: 10px; font: 700 22px var(--font-display); letter-spacing: -.04em; }
.report-stat span { display: block; color: #626e68; font-size: 11px; margin-top: 6px; }
.chart-panel { padding: 17px 18px; }
.chart-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.chart-header strong { font: 700 12px var(--font-display); }
.chart-legend { color: #59655f; font-size: 11px; }
.chart-legend i { display: inline-block; width: 7px; height: 7px; background: #588a77; border-radius: 50%; margin-right: 5px; }
.bar-chart { height: 180px; display: flex; justify-content: space-around; align-items: end; gap: 10px; padding: 0 10px; border-bottom: 1px solid #e6ebe5; background: repeating-linear-gradient(to bottom, transparent 0, transparent 44px, #edf1ec 45px, transparent 46px); }
.bar-group { flex: 1; display: flex; gap: 4px; align-items: end; justify-content: center; height: 100%; }
.bar { width: min(22px, 32%); background: #6a9c87; border-radius: 3px 3px 0 0; transition: transform .2s; position: relative; }
.bar:nth-child(2) { background: #d7a066; opacity: .78; }
.bar:hover { transform: scaleY(1.04); transform-origin: bottom; }
.chart-labels { display: flex; justify-content: space-around; padding-top: 8px; color: #59655f; font-size: 11px; }
.report-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 13px; }
.service-rank { display: flex; align-items: center; gap: 10px; padding: 10px 17px; border-top: 1px solid #edf0eb; }
.rank-no { color: #9ba49e; width: 17px; font: 600 10px var(--font-display); }
.rank-copy { flex: 1; }
.rank-copy strong { font-size: 10px; display: block; }
.rank-copy small { font-size: 9px; color: #8c9790; }
.rank-value { font-size: 10px; font-weight: 700; }
.catalog-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.catalog-card { padding: 16px; position: relative; }
.catalog-top { display: flex; justify-content: space-between; align-items: start; }
.catalog-symbol { width: 31px; height: 31px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 8px; font: 700 13px var(--font-display); }
.catalog-card:nth-child(3n+2) .catalog-symbol { background: var(--amber-soft); color: var(--amber); }
.catalog-card:nth-child(3n) .catalog-symbol { background: var(--blue-soft); color: var(--blue); }
.catalog-card h3 { margin: 13px 0 4px; font: 700 12px var(--font-display); }
.catalog-card p { margin: 0 0 13px; min-height: 30px; color: #626e68; font-size: 12px; line-height: 1.5; }
.catalog-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid #edf0eb; }
.catalog-price { font: 700 13px var(--font-display); }
.catalog-price small { color: #8b9690; font: 400 9px var(--font-body); }
.active-switch { accent-color: #477f6a; width: 30px; height: 16px; cursor: pointer; }
.entity-layout { display: grid; grid-template-columns: 1.6fr .8fr; gap: 13px; }
.entity-table-card { overflow: hidden; }
.entity-card-top { padding: 14px 16px; border-bottom: 1px solid #edf0eb; display: flex; justify-content: space-between; align-items: center; }
.entity-card-top h2 { margin: 0; font: 700 12px var(--font-display); }
.entity-list { padding: 0 16px; }
.entity-row { padding: 12px 0; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #edf0eb; }
.entity-row:last-child { border-bottom: 0; }
.entity-avatar { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: #e9efe9; color: #557265; font: 700 9px var(--font-display); flex: none; }
.entity-copy { flex: 1; }
.entity-copy strong { font-size: 10px; display: block; }
.entity-copy small { color: #59655f; font-size: 11px; display: block; margin-top: 3px; }
.entity-meta { text-align: right; color: #6b7972; font-size: 9px; }
.entity-meta strong { font-size: 10px; display: block; color: #43514b; }
.insight-card { background: var(--nav); color: #eff3ed; padding: 18px; overflow: hidden; position: relative; }
.insight-card:after { content: ""; position: absolute; width: 130px; height: 130px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; right: -65px; top: -47px; box-shadow: 0 0 0 16px rgba(255,255,255,.025),0 0 0 33px rgba(255,255,255,.02); }
.insight-card .eyebrow { color: #d18c79; }
.insight-card h3 { position: relative; z-index: 1; font: 700 15px/1.4 var(--font-display); max-width: 240px; }
.insight-card p { color: #a8b6ae; font-size: 10px; line-height: 1.7; }
.insight-stat { border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; padding: 10px 0 0; color: #a8b6ae; font-size: 9px; }
.insight-stat strong { color: #eff3ed; font-size: 10px; }
.settings-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 14px; align-items: start; }
.settings-nav { padding: 8px; }
.settings-tab { width: 100%; min-height: 40px; text-align: left; background: transparent; border: 0; border-radius: 5px; padding: 9px; color: #53615b; font-size: 12px; cursor: pointer; }
.settings-tab.active { background: #edf3ee; color: #345b4a; font-weight: 700; }
.settings-panel { padding: 20px; }
.settings-panel h2 { font: 700 13px var(--font-display); margin-bottom: 4px; }
.settings-intro { color: #59655f; font-size: 13px; margin-bottom: 20px; line-height: 1.55; }
.setting-row { padding: 14px 0; border-top: 1px solid #edf0eb; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.setting-row strong { display: block; font-size: 13px; font-weight: 600; }
.setting-row small { display: block; color: #626e68; font-size: 12px; margin-top: 4px; }
.toggle { width: 34px; height: 19px; background: #dfe5df; border-radius: 20px; border: 0; position: relative; flex: none; cursor: pointer; transition: background .18s; }
.toggle:after { content: ""; width: 13px; height: 13px; border-radius: 50%; background: white; position: absolute; left: 3px; top: 3px; transition: transform .18s; box-shadow: 0 1px 3px #9995; }
.toggle.on { background: #4d8570; }
.toggle.on:after { transform: translateX(15px); }
.settings-danger { border-color: #eedbd7; }
.settings-danger h2 { color: #a54539; }
.empty-state { padding: 48px 20px; text-align: center; color: #626e68; }
.empty-state strong { display: block; color: #45534d; font: 700 12px var(--font-display); margin-bottom: 4px; }
.empty-state p { font-size: 13px; margin: 0; }
.toast-region { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 20; }
.toast { background: #243734; color: #f0f4ee; padding: 13px 16px; min-width: 235px; border-radius: 7px; box-shadow: 0 8px 28px rgba(13,30,26,.19); display: flex; align-items: center; gap: 9px; font-size: 13px; animation: toast-in .25s ease both; }
.toast-dot { width: 7px; height: 7px; background: #8dc09f; border-radius: 50%; flex: none; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(16,31,28,.42); backdrop-filter: blur(3px); z-index: 10; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--surface); width: min(490px,100%); padding: 22px; border-radius: 10px; box-shadow: 0 22px 60px rgba(14,29,26,.24); animation: modal-in .2s ease both; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 17px; }
.modal-head h2 { margin: 0; font: 700 17px var(--font-display); letter-spacing: -.04em; }
.modal-head p { margin: 4px 0 0; color: #626e68; font-size: 13px; }
.modal-close { width: 28px; height: 28px; border: 1px solid var(--line); color: #718078; background: transparent; border-radius: 50%; cursor: pointer; font-size: 17px; }
.modal-content { color: #46534e; font-size: 14px; line-height: 1.55; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 15px 0; }
.detail-block { background: #f7f8f4; border-radius: 6px; padding: 10px; }
.detail-block small { color: #626e68; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.detail-block strong { display: block; margin-top: 5px; font-size: 13px; color: #34423e; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; padding-top: 14px; border-top: 1px solid #edf0eb; }
.modal .field { margin: 12px 0; }
.form-alert { color: #8d392f; font-size: 12px; margin: 8px 0 0; }
.mobile-nav { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 1050px) {
  .sidebar { width: 214px; }
  .main-area { margin-left: 214px; }
  .content { padding: 25px 24px 30px; }
  .topbar { padding: 0 24px; }
  .page-footer { padding-left: 24px; padding-right: 24px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 761px) and (max-width: 860px) {
  .overview-grid, .form-layout, .entity-layout, .report-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; padding: 10px 14px 8px; }
  .brand { padding: 0 2px 10px; }
  .brand-mark { width: 29px; height: 29px; font-size: 13px; }
  .brand-copy { flex-direction: row; align-items: baseline; gap: 8px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 7px; }
  .side-caption, .sidebar-bottom { display: none; }
  .nav-list { display: flex; overflow-x: auto; gap: 4px; padding: 0 0 2px; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-link { width: auto; flex: none; gap: 6px; padding: 7px 9px; border-radius: 5px; }
  .nav-link.active { box-shadow: inset 0 -2px var(--red); }
  .nav-icon { width: 15px; height: 15px; }
  .nav-link span:nth-child(2) { font-size: 12px; white-space: nowrap; }
  .nav-count { display: none; }
  .main-area { margin-left: 0; min-height: calc(100dvh - 89px); }
  .topbar { min-height: 52px; padding: 0 16px; position: static; }
  .breadcrumb { font-size: 12px; gap: 7px; }
  .today-label, .help-button { display: none; }
  .topbar-actions { gap: 7px; }
  .header-cta { padding: 9px 11px; min-height: 42px; font-size: 12px; }
  .content { padding: 24px 16px 28px; }
  .page-header { align-items: flex-start; margin-bottom: 19px; }
  h1 { font-size: 24px; }
  .page-subtitle { max-width: 95%; font-size: 13px; }
  .date-chip { font-size: 11px; padding: 8px; white-space: nowrap; }
  .metric-grid { gap: 8px; }
  .metric-card { padding: 12px; min-height: 108px; }
  .metric-value { font-size: 24px; }
  .overview-grid, .form-layout, .entity-layout, .report-bottom-grid { grid-template-columns: 1fr; }
  .overview-grid { gap: 10px; }
  .order-row { grid-template-columns: minmax(95px,1fr) minmax(90px,1fr) 100px; gap: 8px; }
  .order-row .order-assignee { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left { flex-wrap: wrap; }
  .toolbar-right { justify-content: flex-end; }
  .search-wrap { flex: 1; }
  .search-input { width: 100%; }
  .select-input { min-width: 0; flex: 1; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .report-hero { grid-column: 1 / -1; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-tab { width: auto; white-space: nowrap; }
  .page-footer { padding: 12px 16px; gap: 8px; font-size: 10px; }
  .page-footer span:nth-child(2) { display: none; }
}
@media (max-width: 430px) {
  .content { padding-left: 12px; padding-right: 12px; }
  .topbar { padding: 0 12px; }
  .nav-link { padding: 7px; }
  .nav-link span:nth-child(2) { font-size: 12px; }
  .metric-card { padding: 10px; }
  .metric-top { font-size: 11px; }
  .metric-value { font-size: 22px; }
  .metric-foot { font-size: 10px; }
  .order-row { grid-template-columns: minmax(87px,1fr) minmax(76px,1fr) auto; gap: 5px; }
  .order-row .status { font-size: 10px; padding: 5px 7px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .catalog-grid { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
}

/* Tesla-Auftragserfassung und lokale Referenzabläufe */
.demo-only { padding: 15px 9px 10px; color: #edf1eb; font-size: 10px; font-weight: 700; border-top: 1px solid rgba(255,255,255,.1); }
.demo-only span { display: inline-block; margin-top: 4px; color: #9eaca5; font-size: 9px; font-weight: 400; }
.user-profile { border-top: 1px solid rgba(255,255,255,.1); }
.tesla-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.overview-total { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px; margin-top: 13px; }
.overview-total p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.overview-total > strong { flex: none; font-size: 15px; }
.demo-disclaimer { margin: 14px 0 0; color: #59655f; font-size: 12px; line-height: 1.6; }
.table-link { padding: 0; border: 0; background: none; color: var(--red); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.vin-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .035em; overflow-wrap: anywhere; }
.order-toolbar { align-items: flex-start; flex-wrap: wrap; }
.order-toolbar-main { flex: 1 1 100%; min-width: 0; }
.order-search-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.order-search-label { flex: 1 1 auto; min-width: 0; }
.order-toolbar .search-input { width: 100%; padding-left: 11px; }
.order-filter-toggle { flex: 0 0 auto; min-width: 82px; }
.order-filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: #e9eee9; color: #43564e; font-size: 9px; font-weight: 700; }
.order-filter-count.is-empty { display: none; }
.order-filter-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.order-filter-panel[hidden] { display: none !important; }
.order-filter-grid { display: grid; flex: 1 1 auto; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 9px; min-width: 0; }
.order-filter-reset { flex: 0 0 auto; }
.filter-label { display: grid; gap: 5px; color: #46534e; font-size: 12px; font-weight: 700; }
.filter-label .select-input { min-width: 130px; }
.order-filter-grid .filter-label .select-input { min-width: 0; width: 100%; }
.order-toolbar .toolbar-right { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.orders-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.orders-table-wrap .data-table { min-width: 1040px; }
.orders-table-wrap .vin-cell { font-family: inherit; letter-spacing: normal; white-space: nowrap; overflow-wrap: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.order-flow { display: grid; gap: 13px; }
.order-fieldset { display: grid; gap: 13px; min-width: 0; padding: 0; margin: 0; border: 0; }
.order-fieldset:disabled { opacity: .78; }
.step-panel { padding: 20px; }
.step-panel h2 { margin: 0; font: 700 13px var(--font-display); }
.step-panel .form-section-head { margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; color: #46534e; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #dfe5df; border-radius: 5px; background: var(--surface); color: #35423e; font-size: 15px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid rgba(57,118,107,.22); outline-offset: 1px; }
.vin-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px !important; letter-spacing: .12em; }
.vin-actions, .vin-check-row, .inline-actions, .template-actions, .report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vin-actions { margin-bottom: 14px; }
.vin-check-row { margin-top: 12px; }
.field-hint { margin: 8px 0 0; color: #59655f; font-size: 12px; line-height: 1.6; }
.form-alert, .form-success { margin: 12px 0 0; padding: 11px 13px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.form-alert, .duplicate-warning { border: 1px solid #e9c4bd; background: #fae9e5; color: #8d392f; }
.form-success { border: 1px solid #c8dfd1; background: #e8f2eb; color: #326c58; }
.duplicate-warning { margin-top: 12px; padding: 14px; border-radius: 7px; }
.duplicate-warning p { margin: 5px 0 12px; font-size: 10px; }
.pending-note { margin: 12px 0; padding: 12px 14px; border: 1px solid #ead8b9; border-radius: 6px; background: #fbf4e8; color: #735323; font-size: 10px; line-height: 1.6; }
.extras-field { margin-top: 18px; }
.choice-list { display: grid; gap: 6px; margin-top: 4px; }
.choice-option { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 10px; }
.choice-option input { accent-color: var(--teal); }
.choice-option span { flex: 1; }
.choice-option strong { white-space: nowrap; }
.net-total { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-top: 17px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.net-total span { color: #68756e; font-size: 11px; font-weight: 700; }
.net-total strong { color: #263431; font-size: 19px; }
.button-primary:disabled, .button-secondary:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.review-grid > div { min-width: 0; padding: 11px; border-radius: 6px; background: #f7f8f4; }
.review-grid dt { margin-bottom: 4px; color: #7d8982; font-size: 9px; }
.review-grid dd { margin: 0; color: #34423e; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.catalog-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; margin-bottom: 13px; }
.catalog-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-demo-note { padding: 14px 17px; margin-bottom: 14px; border: 1px solid #e8dfba; border-radius: 8px; background: #fffbee; font-size: 11px; line-height: 1.55; }
.catalog-demo-note p { margin: 5px 0; color: #666653; }
.catalog-demo-note > span { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.catalog-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 11px; }
.catalog-overview > span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.catalog-overview > button { margin-left: auto; }
.catalog-panel { margin-bottom: 15px; min-width: 0; }
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; padding: 0 17px 12px; }
.catalog-toolbar .catalog-search { flex: 1 1 210px; }
.catalog-toolbar input { width: 100%; min-height: 35px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.catalog-toolbar .select-input { min-height: 35px; font-size: 11px; max-width: 100%; }
.catalog-groups-table { min-width: 550px; }
.catalog-services-table { min-width: 1040px; }
.catalog-description { max-width: 230px; margin: 4px 0 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.catalog-reference { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.catalog-price { white-space: nowrap; }
.catalog-row-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 140px; }
.catalog-result-count { margin: 0; padding: 0 17px 10px; color: var(--muted); font-size: 10px; }
.catalog-edit-modal { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; }
.order-review-modal { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; }
.direct-choice-group { min-width: 0; padding: 0; margin: 18px 0 0; border: 0; }
.direct-choice-group legend { padding: 0; margin-bottom: 9px; color: #596761; font-size: 12px; font-weight: 700; }
.direct-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.area-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.direct-choice { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 68px; padding: 14px; border: 1px solid #e0ddd5; border-radius: 7px; background: #fff; cursor: pointer; }
.direct-choice input { flex: 0 0 auto; width: 19px; height: 19px; margin: 0; accent-color: #a8790e; }
.direct-choice span { min-width: 0; }
.direct-choice strong { display: block; color: #34433b; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.direct-choice small { display: block; margin-top: 5px; font-size: 11px; line-height: 1.45; color: #737c73; }
.direct-choice.is-selected { border-color: #d4a32f; background: #fff5d9; box-shadow: inset 0 0 0 1px #d4a32f; }
.direct-choice:focus-within { outline: 3px solid rgba(25,133,116,.5); outline-offset: 2px; }
.custom-color-field { margin-top: 12px; }
.custom-color-field[hidden] { display: none; }
.color-catalog-note { padding: 0 18px 14px; }
@media (max-width: 430px) {
  .direct-choice-grid { grid-template-columns: 1fr; }
  .area-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area-choices .direct-choice { padding: 12px 9px; gap: 8px; }
  .area-choices .direct-choice strong { font-size: 12px; }
}
@media (max-width: 760px) {
  .order-flow .field input:not(.vin-input), #catalog-color-form .field input { font-size: 16px; }
}
.catalog-edit-modal textarea { box-sizing: border-box; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; font: inherit; font-size: 12px; resize: vertical; }
.catalog-active-field { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 14px 0; font-size: 12px; font-weight: 700; }
.catalog-active-field > span { color: var(--muted); font-weight: 400; font-size: 10px; }
@media (max-width: 760px) {
  .catalog-header-actions { width: 100%; }
  .catalog-header-actions > button { flex: 1 1 auto; }
  .catalog-toolbar > .filter-label { min-width: 0; flex: 1 1 125px; }
  .catalog-toolbar > .catalog-search { flex-basis: 100%; }
  .catalog-overview > button { margin-left: 0; }
}
.catalog-columns h2, .release-panel h2 { margin: 0 0 11px; font-size: 13px; }
.catalog-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.catalog-chip { display: inline-flex; padding: 7px 10px; border-radius: 20px; background: var(--teal-soft); color: #315c4c; font-size: 10px; font-weight: 700; }
.pending-services { margin-bottom: 13px; }
.pending-service-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.pending-service { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; }
.pending-service strong { font-size: 12px; }
.pending-service > span:last-child { color: #7f8a83; font-size: 9px; }
.catalog-columns .field-hint { margin-bottom: 0; }
.user-editor { margin-top: 13px; }
.user-editor > .field { margin: 12px 0; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.permission-group { padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.permission-group h3 { margin: 0 0 9px; font-size: 11px; }
.permission-group label { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; color: #53615b; font-size: 10px; }
.permission-group input { accent-color: var(--teal); }
.template-actions { margin: 12px 0; }
.account-panel { max-width: 820px; }
.account-status { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; margin-bottom: 5px; border-bottom: 1px solid var(--line); }
.account-status > div { flex: 1; }
.account-status p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.account-panel .setting-row { font-size: 10px; }
.report-creation { margin-bottom: 13px; }
.report-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-toolbar { flex-wrap: wrap; align-items: flex-end; }
.report-toolbar .toolbar-left, .report-toolbar .toolbar-right { flex-wrap: wrap; align-items: flex-end; min-width: 0; max-width: 100%; }
.report-toolbar .report-filter { min-width: 0; }
.customer-report-toolbar { justify-content: flex-start; align-items: flex-end; }
.customer-report-toolbar .field-hint { margin: 0 0 9px; }
.report-preview { margin-top: 13px; }
.report-preview .section-title-row { margin-top: 0; }
.report-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.report-heading h2 { margin: 0; font-size: 20px; }
.release-panel { display: grid; gap: 10px; max-width: 760px; margin-top: 13px; }
.release-panel p { margin: 0; color: #7d8982; font-size: 10px; }
.release-panel .field { max-width: 380px; }
.release-state { color: #7d8982; font-size: 10px; }
.report-actions { margin-top: 13px; }
.camera-video { width: 100%; min-height: 230px; max-height: 65vh; border-radius: 7px; background: #172625; object-fit: cover; }
.camera-frame { position: relative; overflow: hidden; border-radius: 7px; background: #172625; }
.camera-frame .camera-video { display: block; min-height: 230px; border-radius: 0; aspect-ratio: 4 / 3; }
.camera-guide { position: absolute; left: 5%; top: 42.5%; display: grid; width: 90%; height: 15%; place-items: center; border: 2px solid #f1c40f; border-radius: 8px; background: rgba(255,255,255,.035); box-shadow: 0 0 0 100vmax rgba(18,28,23,.16); pointer-events: none; }
.camera-frame[data-mode="code"] .camera-guide { left: 10%; top: 10%; width: 80%; height: 80%; }
.camera-frame[data-mode="ocr"] .camera-guide { left: 15.38%; top: 44.23%; width: 69.24%; height: 11.54%; }
.camera-frame[data-mode="ocr"] .camera-guide span { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); }
.camera-frame[data-mode="ocr"] .camera-video { min-height: 0; max-height: none; height: auto; }
.camera-ocr-modal { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
.camera-ocr-modal #camera-status { font-size: 12px; line-height: 1.5; }
.camera-local-actions { flex-wrap: wrap; margin: 12px 0; }
.camera-local-actions button { min-height: 38px; flex: 1 1 auto; font-size: 11px; }
.camera-diagnostics { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #faf9f5; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.camera-diagnostics dl { margin: 8px 0; }
.camera-diagnostics dl > div { margin: 7px 0; }
.camera-diagnostics dt { font-weight: 700; color: #34453c; }
.camera-diagnostics dd { margin: 1px 0 0; white-space: pre-wrap; }
.camera-diagnostics figure { margin: 10px 0; }
.camera-diagnostics canvas { display: block; width: 100%; height: auto; margin-top: 5px; border: 1px solid var(--line); }
.camera-diagnostics canvas[hidden] { display: none; }
.camera-diagnostics summary { cursor: pointer; font-weight: 700; }
.camera-diagnostics ol { padding-left: 18px; max-height: 180px; overflow: auto; }
.camera-diagnostics li { margin-bottom: 5px; }
.camera-diagnostics p { margin-bottom: 0; color: var(--muted); }
.camera-guide span { padding: 4px 8px; border-radius: 4px; background: rgba(18,28,23,.78); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.modal-content .review-grid { margin-top: 6px; }
.modal-content .pending-note { margin-top: 14px; }

@media (max-width: 1100px) {
  .tesla-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .filter-label .select-input { min-width: 120px; }
  .order-filter-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .tesla-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .overview-total { align-items: flex-start; flex-direction: column; gap: 8px; }
  .catalog-columns, .permission-grid { grid-template-columns: 1fr; }
  .report-header-actions { width: 100%; }
  .report-header-actions > button { flex: 1 1 auto; }
  .pending-service-list { grid-template-columns: 1fr; }
  .order-filter-panel { align-items: stretch; flex-direction: column; }
  .order-filter-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .order-filter-reset { align-self: flex-start; }
  .report-creation .form-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .account-status { align-items: flex-start; flex-wrap: wrap; }
  .account-status > div { min-width: calc(100% - 64px); }
}
@media (max-width: 430px) {
  .tesla-stats { gap: 8px; }
  .tesla-stats .metric-card { min-height: 96px; }
  .tesla-stats .metric-value { font-size: 21px; }
  .overview-total { padding: 13px; }
  .step-panel { padding: 15px; }
  .vin-actions > button { width: 100%; }
  .vin-check-row { align-items: flex-start; flex-direction: column; }
  .order-filter-grid { grid-template-columns: minmax(0,1fr); }
  .order-toolbar .toolbar-right { width: 100%; justify-content: flex-start; }
  .template-actions > button { flex: 1 1 100%; }
  .report-heading { align-items: flex-start; flex-direction: column; }
}
@media print {
  body, html { background: #fff !important; }
  .sidebar, .topbar, .page-footer, .report-actions, .release-panel, .demo-disclaimer { display: none !important; }
  .main-area { margin: 0 !important; }
  .content { width: 100% !important; max-width: none !important; padding: 0 !important; }
  .print-area { border: 0 !important; box-shadow: none !important; }
  .table-wrap { overflow: visible !important; }
  .data-table { min-width: 0 !important; font-size: 8pt !important; }
  .data-table th, .data-table td { padding: 5px !important; }
}

/* Visuelle Angleichung an die helle IS-Portal-Referenz, TESLA-Branding bleibt erhalten. */
.brand-copy strong { color: #292822; }
.brand-copy small { color: #706e64; }
.side-caption { color: #706d62; font-size: 11px; }
.nav-link { color: #5c5a52; }
.nav-link:hover { background: #e9e6dd; color: #302f2b; }
.nav-link.active { color: #28271f; background: #f7bd3b; box-shadow: none; font-weight: 700; }
.nav-link.active .nav-icon { color: #28271f; }
.nav-icon { color: #68665e; }
.demo-only { display: grid; grid-template-columns: 8px 1fr; align-items: center; column-gap: 8px; padding: 12px 10px; margin: 0 2px 5px; color: #4f4d45; font-size: 12px; border: 1px solid #e5e2d9; border-radius: 8px; background: rgba(255,255,255,.58); }
.demo-only strong { font-size: 12px; font-weight: 700; }
.demo-only small { grid-column: 2; margin-top: 3px; color: #666359; font-size: 11px; }
.demo-indicator { width: 7px; height: 7px; border-radius: 50%; background: #6da489; box-shadow: 0 0 0 3px #e3eee6; }
.header-user { display: flex; align-items: center; gap: 9px; min-width: 145px; padding: 0 0 0 4px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.header-user .avatar { width: 34px; height: 34px; border: 1px solid #efe5c9; }
.header-user-copy { display: flex; flex-direction: column; gap: 1px; }
.header-user-copy strong { color: #3b3932; font-size: 12px; font-weight: 700; }
.header-user-copy small { color: #666359; font-size: 11px; }
.header-user:hover .header-user-copy strong { color: var(--red); }
.today-label, .help-button, .header-cta { display: none !important; }
.notification-button { color: #615f56; border-color: #e7e4dc; background: #fff; }
.notification-button:hover { color: #3e3b31; border-color: #d5c99f; background: #fffdf8; }
.notification-button svg { width: 17px; height: 17px; }
.tesla-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card { min-height: 128px; padding: 15px 16px 14px; border-color: #e8e5dc; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(48,45,34,.035); }
.metric-card:hover { box-shadow: 0 5px 16px rgba(48,45,34,.06); }
.metric-top { color: #625f56; font-size: 12px; }
.metric-period { color: #625f56; font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.metric-card:nth-child(2) .metric-icon { color: var(--red); background: var(--red-soft); }
.metric-card:nth-child(3) .metric-icon { color: var(--amber); background: var(--amber-soft); }
.metric-card:nth-child(4) .metric-icon { color: #b34e43; background: #f8e8e3; }
.metric-card:nth-child(5) .metric-icon { color: var(--teal); background: var(--teal-soft); }
.metric-value { margin-top: 8px; color: #282823; font-size: 26px; font-weight: 500; letter-spacing: -.04em; }
.metric-value-text { font-size: 15px; letter-spacing: -.015em; }
.metric-label { margin-top: 5px; color: #36352f; font-size: 12px; line-height: 1.35; font-weight: 700; }
.metric-foot { margin-top: 4px; color: #625f56; font-size: 11px; line-height: 1.4; }
.panel, .table-wrap { border-color: #e8e5dc; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(48,45,34,.035); }
.data-table th { background: #f8f7f3; color: #5d5a51; }
.search-input, .select-input, .field input, .field select, .field textarea { border-color: #e0ddd5; background: #fff; }

@media (max-width: 1100px) {
  .tesla-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tesla-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tesla-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-user { min-width: 0; padding: 0; }
}
@media (max-width: 430px) {
  .header-user-copy { display: none; }
  .header-user .avatar { width: 30px; height: 30px; }
}

[data-action="scan-vin"] {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.order-toolbar .order-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 10px;
}
.order-toolbar .order-search-row .search-wrap {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}
.order-toolbar .order-search-row input#order-search {
  display: block;
  width: 100%;
  height: 40px;
  min-width: 0;
  padding: 0 11px 0 35px;
}
.order-toolbar .order-search-row [data-action="toggle-order-filters"] {
  flex: 0 0 auto;
  height: 40px;
  min-height: 40px;
}
.order-toolbar .order-filter-panel[hidden] {
  display: none !important;
}
.order-toolbar .order-filter-panel:not([hidden]) {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}
.order-toolbar .order-filter-panel .toolbar-left {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.order-toolbar .order-filter-panel .toolbar-left > .field {
  flex: 1 1 135px;
  min-width: 115px;
}
.order-toolbar .order-filter-panel .toolbar-right {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.order-toolbar .order-filter-panel .toolbar-left select,
.order-toolbar .order-filter-panel .toolbar-left input {
  height: 36px;
}
.order-toolbar .order-filter-panel .toolbar-left .field select,
.order-toolbar .order-filter-panel .toolbar-left .field input {
  width: 100%;
}
.button-primary {
  justify-content: center;
  text-align: center;
}

@media (max-width: 760px) {
  .search-input, .select-input,
  .field input, .field select, .field textarea,
  .catalog-toolbar input, .catalog-toolbar .select-input {
    min-height: 44px;
    font-size: 16px;
  }
  .order-toolbar .order-search-row input#order-search { height: 44px; }
  .order-toolbar .order-search-row [data-action="toggle-order-filters"] {
    height: 44px;
    min-height: 44px;
  }
  .order-toolbar .order-filter-panel:not([hidden]) {
    align-items: stretch;
    flex-direction: column;
  }
  .order-toolbar .order-filter-panel .toolbar-left {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
  .order-toolbar .order-filter-panel .toolbar-left > * {
    min-width: 0;
  }
  .order-toolbar .order-filter-panel .toolbar-left > .field {
    min-width: 0;
  }
  .order-toolbar .order-filter-panel .toolbar-right {
    justify-content: flex-end;
  }
}

@media (max-width: 430px) {
  .order-toolbar .order-search-row {
    gap: 7px;
  }
  .order-toolbar .order-search-row [data-action="toggle-order-filters"] {
    padding-right: 10px;
    padding-left: 10px;
  }
  .order-toolbar .order-filter-panel:not([hidden]) {
    padding: 10px;
  }
  .order-toolbar .order-filter-panel .toolbar-left {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Einheitliche Aktionsbuttons: TESLA-Blau, klar zentrierte Beschriftung. */
:is(.header-cta, .button-primary, .button-secondary) {
  justify-content: center;
  text-align: center;
  color: #fff;
  background: #527187;
  border: 1px solid #527187;
  box-shadow: 0 2px 6px rgba(55, 85, 105, .14);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

:is(.header-cta, .button-primary, .button-secondary):hover {
  color: #fff;
  background: #405f75;
  border-color: #405f75;
  box-shadow: 0 4px 10px rgba(55, 85, 105, .2);
  transform: translateY(-1px);
}

:is(.header-cta, .button-primary, .button-secondary):focus-visible {
  outline: 3px solid rgba(82, 113, 135, .38);
  outline-offset: 2px;
}

:is(.header-cta, .button-primary, .button-secondary):active {
  background: #354f62;
  border-color: #354f62;
  transform: translateY(0);
}

:is(.header-cta, .button-primary, .button-secondary):disabled,
:is(.header-cta, .button-primary, .button-secondary)[aria-disabled="true"] {
  color: #f4f6f7;
  background: #9aaab4;
  border-color: #9aaab4;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .72;
  transform: none;
}

/* Every remaining action-button shape gets the same filled blue treatment. */
:is(.text-button, .table-link, .tiny-button, .icon-button, .catalog-move):not(:disabled):not([aria-disabled="true"]) {
  color: #fff;
  background: #527187;
  border-color: #527187;
  box-shadow: 0 2px 6px rgba(55, 85, 105, .14);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

:is(.text-button, .table-link, .tiny-button, .icon-button, .catalog-move) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

:is(.text-button, .table-link, .tiny-button, .icon-button, .catalog-move):not(:disabled):not([aria-disabled="true"]):hover {
  color: #fff;
  background: #405f75;
  border-color: #405f75;
  box-shadow: 0 4px 10px rgba(55, 85, 105, .2);
  transform: translateY(-1px);
}

:is(.text-button, .table-link, .tiny-button, .icon-button, .catalog-move):focus-visible {
  outline: 3px solid rgba(82, 113, 135, .38);
  outline-offset: 2px;
}

:is(.text-button, .table-link, .tiny-button, .icon-button, .catalog-move):disabled,
:is(.text-button, .table-link, .tiny-button, .icon-button, .catalog-move)[aria-disabled="true"] {
  color: #f4f6f7;
  background: #9aaab4;
  border-color: #9aaab4;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .72;
  transform: none;
}

.text-button { padding: 7px 12px; border-radius: 5px; }
.table-link { padding: 7px 10px; border-radius: 5px; text-decoration: none; }
.tiny-button { width: 44px; height: 44px; }
.icon-button { width: 44px; height: 44px; }
.catalog-move { min-width: 44px; min-height: 44px; padding: 8px; border-radius: 5px; cursor: pointer; }

/* Ausschließlich explizit permanente Löschaktionen erhalten Rot. */
:is(
  [data-action="delete-central-report"],
  [data-action="confirm-delete-central-report"],
  [data-action="delete-central-order"],
  [data-central-delete-user]
) {
  color: #fff;
  background: #b4483b;
  border-color: #b4483b;
}

:is(
  [data-action="delete-central-report"],
  [data-action="confirm-delete-central-report"],
  [data-action="delete-central-order"],
  [data-central-delete-user]
):hover {
  color: #fff;
  background: #963a31;
  border-color: #963a31;
}

:is(
  [data-action="delete-central-report"],
  [data-action="confirm-delete-central-report"],
  [data-action="delete-central-order"],
  [data-central-delete-user]
):focus-visible {
  outline: 3px solid rgba(180, 72, 59, .36);
  outline-offset: 2px;
}

:is(
  [data-action="delete-central-report"],
  [data-action="confirm-delete-central-report"],
  [data-action="delete-central-order"],
  [data-central-delete-user]
):disabled {
  color: #fff;
  background: #c9948d;
  border-color: #c9948d;
}

/* Respect the HTML hidden state regardless of component display declarations. */
[hidden] { display: none !important; }
