:root {
  --ink: #171714;
  --ink-2: #24231f;
  --ink-3: #34332d;
  --paper: #f6f0e5;
  --paper-2: #ece4d6;
  --white: #fffdf8;
  --orange: #f47b20;
  --orange-dark: #b44700;
  --orange-soft: #ffd7b8;
  --muted: #706d65;
  --line: rgba(23, 23, 20, .14);
  --line-light: rgba(255, 255, 255, .16);
  --display: "Arial Narrow", "Bahnschrift Condensed", "Roboto Condensed", Impact, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--body); line-height: 1.5; }
body.is-locked { overflow: hidden; }
button, input { font: inherit; }
button, a { color: inherit; -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: var(--orange-soft); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.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; }
.skip-link { position: fixed; z-index: 9999; left: 12px; top: 10px; padding: 12px 16px; color: var(--white); background: var(--ink); transform: translateY(-160%); transition: transform .2s; }
.skip-link:focus { transform: translateY(0); }

.demo-bar { position: relative; z-index: 1200; color: var(--paper); background: #0e0e0c; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .7rem; letter-spacing: .075em; text-transform: uppercase; }
.demo-bar__inner { width: min(100% - 44px, 1480px); min-height: 38px; margin: auto; display: flex; align-items: center; gap: 22px; }
.demo-bar__label { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; }
.demo-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(244,123,32,.14); }
.demo-bar__detail { color: rgba(255,255,255,.52); }
.demo-bar__back { margin-left: auto; color: var(--orange-soft); font-weight: 800; }
.demo-bar__back:hover { color: var(--orange); }

.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand__mark { width: 52px; height: 52px; position: relative; display: grid; place-items: center; color: var(--ink); background: var(--orange); transform: skew(-5deg); overflow: hidden; }
.brand__mark b { font: 900 1.45rem/1 var(--display); transform: skew(5deg) translateX(-4px); }
.brand__mark i { position: absolute; right: 4px; bottom: 3px; font: 900 .58rem/1 var(--body); font-style: normal; transform: skew(5deg); }
.brand__text { display: grid; line-height: 1; }
.brand__text strong { font: 900 1.45rem/.9 var(--display); letter-spacing: .035em; }
.brand__text small { margin-top: 7px; font-size: .54rem; letter-spacing: .18em; opacity: .6; }
.brand--light { color: var(--white); }

/* Login */
.login-view { min-height: calc(100vh - 38px); position: relative; color: var(--white); background: var(--ink); overflow: hidden; }
.login-view__media, .login-view__shade { position: absolute; inset: 0; }
.login-view__media { background: url("../img/werkstatt-hero.webp") 58% center / cover no-repeat; transform: scale(1.015); }
.login-view__shade { background: linear-gradient(90deg, rgba(10,10,9,.98) 0%, rgba(10,10,9,.88) 42%, rgba(10,10,9,.42) 68%, rgba(10,10,9,.58) 100%), linear-gradient(0deg, rgba(10,10,9,.72), transparent 45%); }
.login-shell { width: min(100% - 72px, 1420px); min-height: calc(100vh - 38px); margin: auto; position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(420px, .65fr); gap: 8vw; align-items: center; }
.login-story { min-height: calc(100vh - 38px); padding: 44px 0 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-story__copy { max-width: 830px; margin-block: 80px 50px; }
.no-break { white-space: nowrap; }
.eyebrow { margin: 0 0 22px; display: flex; align-items: center; gap: 12px; color: var(--orange); font-size: .7rem; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow > span { width: 34px; height: 2px; background: currentColor; }
.login-story h1 { margin: 0; font: 900 clamp(4.4rem, 7.1vw, 7.6rem)/.82 var(--display); letter-spacing: -.04em; text-transform: uppercase; }
.login-story h1 em { color: var(--orange); font-style: normal; }
.login-story__copy > p:last-child { max-width: 650px; margin: 32px 0 0; color: rgba(255,255,255,.68); font-size: 1.02rem; line-height: 1.75; }
.login-benefits { max-width: 700px; margin: 0; padding: 26px 0 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 25px; border-top: 1px solid rgba(255,255,255,.18); list-style: none; }
.login-benefits li { display: flex; align-items: center; gap: 12px; }
.login-benefits b { color: var(--orange); font: 900 2.5rem/1 var(--display); }
.login-benefits span { color: rgba(255,255,255,.58); font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; line-height: 1.35; }
.login-card-wrap { padding: 48px 0; }
.login-card { width: min(100%, 520px); margin-left: auto; padding: 42px 46px 38px; color: var(--ink); background: rgba(246,240,229,.97); box-shadow: 22px 22px 0 rgba(244,123,32,.88), 0 32px 100px rgba(0,0,0,.32); backdrop-filter: blur(18px); }
.login-card__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-lock { width: 48px; height: 48px; display: grid; place-items: center; color: var(--orange-dark); background: var(--orange-soft); }
.login-lock svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.demo-badge { padding: 8px 10px; color: var(--orange-dark); border: 1px solid rgba(217,95,11,.28); background: rgba(244,123,32,.08); font-size: .57rem; font-weight: 900; letter-spacing: .11em; }
.login-kicker { margin: 34px 0 8px; color: var(--orange-dark); font-size: .61rem; font-weight: 900; letter-spacing: .18em; }
.login-card h2 { margin: 0; font: 900 clamp(2.55rem,3.2vw,3.6rem)/.9 var(--display); text-transform: uppercase; }
.login-intro { margin: 17px 0 25px; color: var(--muted); font-size: .83rem; }
.demo-credentials { margin-bottom: 24px; border: 1px solid rgba(23,23,20,.14); background: var(--white); }
.demo-credentials > div { min-height: 44px; padding: 8px 12px; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.demo-credentials span { color: var(--muted); font-size: .54rem; font-weight: 900; letter-spacing: .08em; }
.demo-credentials div button { min-width: 0; padding: 3px; color: var(--ink); background: transparent; font-size: .65rem; font-weight: 800; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.demo-credentials div button:hover { color: var(--orange-dark); }
.fill-login { width: 100%; min-height: 39px; padding: 8px 12px; display: flex; justify-content: space-between; color: var(--ink); background: var(--orange-soft); font-size: .61rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.fill-login:hover { background: #ffc99f; }
.login-field { margin-top: 18px; }
.login-field label { display: block; margin-bottom: 8px; font-size: .62rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.login-input { position: relative; }
.login-input > span { position: absolute; z-index: 1; left: 15px; top: 50%; color: var(--orange-dark); font-size: .7rem; font-weight: 900; transform: translateY(-50%); }
.login-input input { width: 100%; min-height: 52px; padding: 0 92px 0 42px; color: var(--ink); border: 1px solid var(--line); border-radius: 0; background: var(--white); }
.login-input input:focus { border-color: var(--orange-dark); outline: 2px solid rgba(244,123,32,.25); outline-offset: 0; }
.login-input input[aria-invalid="true"] { border-color: #a62c1a; }
.password-toggle { position: absolute; right: 8px; top: 50%; padding: 8px; color: var(--muted); background: transparent; font-size: .58rem; font-weight: 850; text-transform: uppercase; transform: translateY(-50%); cursor: pointer; }
.password-toggle:hover { color: var(--ink); }
.login-feedback { min-height: 20px; margin: 9px 0 0; color: #a62c1a; font-size: .7rem; font-weight: 700; }
.login-submit { width: 100%; min-height: 55px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; color: var(--white); background: var(--ink); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.login-submit:hover { color: var(--ink); background: var(--orange); transform: translateY(-2px); }
.login-disclaimer { margin: 18px 0 0; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: .61rem; line-height: 1.5; }
.login-disclaimer > span { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; color: var(--orange-dark); border: 1px solid var(--orange-dark); border-radius: 50%; font-size: .58rem; font-weight: 900; }
.back-link { margin-top: 22px; display: inline-flex; color: var(--muted); font-size: .64rem; font-weight: 850; text-transform: uppercase; }
.back-link:hover { color: var(--orange-dark); }

/* Dashboard shell */
.dashboard { min-height: calc(100vh - 38px); position: relative; background: #eee9df; }
.admin-sidebar { position: fixed; z-index: 1000; left: 0; top: 38px; bottom: 0; width: 272px; padding: 26px 22px; display: flex; flex-direction: column; color: var(--white); background: var(--ink); }
.sidebar-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-head .brand__text small { color: #aaa8a2; opacity: 1; }
.sidebar-close { display: none; width: 42px; height: 42px; color: var(--white); background: rgba(255,255,255,.07); font-size: 1.7rem; cursor: pointer; }
.sidebar-mode { margin: 27px 0 32px; padding: 13px 12px; display: flex; align-items: center; gap: 12px; color: var(--orange-soft); border: 1px solid rgba(244,123,32,.28); background: rgba(244,123,32,.09); }
.sidebar-mode div { display: grid; }
.sidebar-mode b { font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; }
.sidebar-mode small { color: rgba(255,255,255,.47); font-size: .58rem; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav button { min-height: 52px; padding: 0 13px; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 9px; color: #aaa8a2; background: transparent; font-size: .69rem; text-align: left; cursor: pointer; transition: color .2s, background .2s; }
.sidebar-nav button > span { font-size: 1.1rem; text-align: center; }
.sidebar-nav button b { letter-spacing: .03em; }
.sidebar-nav button i { min-width: 24px; padding: 3px 5px; color: #aaa8a2; background: rgba(255,255,255,.06); font-size: .53rem; font-style: normal; text-align: center; }
.sidebar-nav button:hover { color: var(--white); background: rgba(255,255,255,.06); }
.sidebar-nav button.is-active { color: var(--ink); background: var(--orange); }
.sidebar-nav button.is-active i { color: var(--ink); background: rgba(23,23,20,.12); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 8px; }
.sidebar-bottom a { min-height: 58px; padding: 10px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.1); }
.sidebar-bottom a:hover { color: var(--white); border-color: var(--orange); }
.sidebar-bottom a > span { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; color: var(--ink); background: var(--orange); font-size: .73rem; font-weight: 900; }
.sidebar-bottom div { display: grid; }
.sidebar-bottom b { font-size: .63rem; text-transform: uppercase; }
.sidebar-bottom small { color: #aaa8a2; font-size: .56rem; }

.admin-workspace { min-height: calc(100vh - 38px); margin-left: 272px; }
.admin-topbar { min-height: 84px; padding: 0 34px; display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 27px; color: var(--ink); background: rgba(255,253,248,.94); border-bottom: 1px solid var(--line); }
.admin-menu { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.admin-menu > span:not(.sr-only) { width: 20px; height: 2px; margin: 4px auto; display: block; background: var(--ink); }
.admin-title { display: grid; }
.admin-title span, .topbar-date span { color: var(--muted); font-size: .52rem; font-weight: 900; letter-spacing: .12em; }
.admin-title h1 { margin: 3px 0 0; font: 900 1.55rem/1 var(--display); text-transform: uppercase; }
.topbar-date { padding-right: 26px; display: grid; border-right: 1px solid var(--line); }
.topbar-date b { font-size: .7rem; }
.admin-profile { display: flex; align-items: center; gap: 10px; }
.admin-profile > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: var(--orange); font-size: .65rem; font-weight: 900; }
.admin-profile div { display: grid; }
.admin-profile b { font-size: .67rem; }
.admin-profile small { color: var(--muted); font-size: .57rem; }
.logout-button { padding: 10px 0 10px 14px; color: var(--muted); background: transparent; font-size: .61rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.logout-button:hover { color: var(--orange-dark); }
.admin-content { width: min(100% - 58px, 1480px); margin: 0 auto; padding: 30px 0 60px; }
.admin-demo-note { min-height: 58px; margin-bottom: 29px; padding: 11px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; color: #3b352f; border: 1px solid rgba(217,95,11,.25); background: #fff3e9; }
.admin-demo-note > span { padding: 7px 8px; color: var(--white); background: var(--orange-dark); font-size: .54rem; font-weight: 900; letter-spacing: .1em; }
.admin-demo-note p { margin: 0; font-size: .7rem; }
.admin-demo-note a { color: var(--orange-dark); font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.admin-demo-note a:hover { text-decoration: underline; }

.admin-view { animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-heading { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.view-heading p { margin: 0 0 5px; color: var(--orange-dark); font-size: .57rem; font-weight: 900; letter-spacing: .15em; }
.view-heading h2 { margin: 0; font: 900 clamp(2.5rem,4.5vw,4.3rem)/.86 var(--display); letter-spacing: -.025em; text-transform: uppercase; }
.admin-primary, .admin-secondary { min-height: 45px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; font-size: .62rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; cursor: pointer; transition: transform .2s, background .2s, color .2s; }
.admin-primary { color: var(--white); background: var(--ink); }
.admin-primary:hover { color: var(--ink); background: var(--orange); transform: translateY(-2px); }
.admin-primary--full { width: 100%; }
.admin-secondary { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.admin-secondary:hover { border-color: var(--ink); }
.admin-panel { background: var(--white); border: 1px solid rgba(23,23,20,.08); box-shadow: 0 16px 45px rgba(23,23,20,.055); }
.panel-head { min-height: 75px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-head > div { display: grid; }
.panel-head span, .vehicle-profile__copy > span { color: var(--orange-dark); font-size: .53rem; font-weight: 900; letter-spacing: .12em; }
.panel-head h3, .status-editor h3 { margin: 4px 0 0; font: 900 1.45rem/1 var(--display); text-transform: uppercase; }
.panel-head button { color: var(--muted); background: transparent; font-size: .59rem; font-weight: 850; text-transform: uppercase; cursor: pointer; }
.panel-head button:hover { color: var(--orange-dark); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { min-height: 132px; padding: 20px; display: grid; grid-template-columns: 47px 1fr; align-items: center; gap: 15px; background: var(--white); border: 1px solid rgba(23,23,20,.08); box-shadow: 0 12px 35px rgba(23,23,20,.04); }
.stat-card__icon { width: 47px; height: 47px; display: grid; place-items: center; color: var(--orange-dark); background: var(--orange-soft); font: 900 1.2rem/1 var(--display); }
.stat-card__icon--dark { color: var(--white); background: var(--ink); }
.stat-card > div { display: grid; grid-template-columns: 1fr auto; align-items: end; }
.stat-card small { grid-column: 1 / -1; color: var(--muted); font-size: .53rem; font-weight: 900; letter-spacing: .08em; }
.stat-card strong { font: 900 2.9rem/.9 var(--display); }
.stat-card p { grid-column: 1 / -1; margin: 7px 0 0; color: var(--muted); font-size: .56rem; }
.stat-card p i { color: #3d7654; font-style: normal; font-weight: 900; }
.stat-card--orange { color: var(--white); background: var(--orange-dark); }
.stat-card--orange .stat-card__icon { color: var(--ink); background: var(--orange); }
.stat-card--orange small, .stat-card--orange p { color: var(--white); }
.overview-grid { margin-top: 14px; display: grid; grid-template-columns: 1.42fr .72fr; gap: 14px; }
.schedule-list { padding: 0 22px; }
.schedule-row { width: 100%; min-height: 72px; padding: 10px 0; display: grid; grid-template-columns: 58px 8px 1fr auto 16px; align-items: center; gap: 13px; color: var(--ink); background: transparent; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row:hover b { color: var(--orange-dark); }
.schedule-row time { font: 900 1.2rem/1 var(--display); }
.schedule-mark { width: 8px; height: 32px; background: #b8b3aa; }
.schedule-mark--orange { background: var(--orange); }
.schedule-mark--alert { background: #b53825; }
.schedule-row > div { display: grid; }
.schedule-row b { font-size: .69rem; }
.schedule-row small { color: var(--muted); font-size: .6rem; }
.schedule-row em { padding: 5px 7px; color: var(--muted); background: var(--paper); font-size: .5rem; font-style: normal; font-weight: 900; }
.schedule-row > i { color: var(--muted); font-size: 1.2rem; font-style: normal; }
.capacity-panel .panel-head > strong { color: var(--orange-dark); font: 900 2.1rem/1 var(--display); }
.capacity-chart { height: 222px; padding: 22px 20px 8px; display: grid; grid-template-columns: 34px 1fr; gap: 8px; }
.capacity-scale { padding-bottom: 24px; display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: .48rem; }
.capacity-bars { display: grid; grid-template-columns: repeat(6,1fr); align-items: end; gap: 8px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 48px, rgba(23,23,20,.07) 49px, rgba(23,23,20,.07) 50px); }
.capacity-bars > div { height: 100%; display: grid; grid-template-rows: 1fr 20px; align-items: end; }
.capacity-bars i { height: var(--bar); display: block; background: var(--orange); min-height: 8px; transition: height .45s ease; }
.capacity-bars > div:nth-child(3) i, .capacity-bars > div:nth-child(4) i { background: var(--orange-dark); }
.capacity-bars span { padding-top: 6px; color: var(--muted); font-size: .49rem; text-align: center; }
.capacity-legend { padding: 7px 20px 18px 62px; display: flex; gap: 16px; color: var(--muted); font-size: .52rem; }
.capacity-legend span { display: flex; align-items: center; gap: 6px; }
.capacity-legend i { width: 8px; height: 8px; background: var(--orange); }
.capacity-legend span:nth-child(2) i { border: 1px solid var(--line); background: var(--paper); }

.status-editor { margin-top: 14px; }
.status-editor__head { min-height: 95px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--white); background: var(--ink); }
.status-editor__head > div:first-child > span { color: var(--orange); font-size: .53rem; font-weight: 900; letter-spacing: .12em; }
.status-editor__head p { margin: 7px 0 0; color: rgba(255,255,255,.55); font-size: .63rem; }
.order-badge { padding: 9px 11px; display: flex; align-items: center; gap: 8px; color: var(--orange-soft); border: 1px solid rgba(244,123,32,.3); background: rgba(244,123,32,.1); font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.order-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(244,123,32,.12); }
.order-badge span { color: var(--orange-soft); }
.status-editor__body { padding: 28px 24px; display: grid; grid-template-columns: 1fr 310px; gap: 40px; align-items: center; }
.admin-progress { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4,1fr); list-style: none; }
.admin-progress li { min-width: 0; position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.admin-progress li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; left: calc(50% + 18px); right: calc(-50% + 18px); top: 17px; height: 2px; background: #d9d3c8; }
.admin-progress li.is-done:not(:last-child)::after { background: var(--ink); }
.admin-progress li > span { z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); border: 1px solid #cbc4b9; border-radius: 50%; background: var(--white); font-size: .61rem; font-weight: 900; }
.admin-progress li.is-done > span { color: var(--white); border-color: var(--ink); background: var(--ink); }
.admin-progress li.is-current > span { color: var(--ink); border-color: var(--orange); background: var(--orange); box-shadow: 0 0 0 6px rgba(244,123,32,.14); }
.admin-progress li div { display: grid; }
.admin-progress b { font-size: .63rem; text-transform: uppercase; }
.admin-progress small { color: var(--muted); font-size: .52rem; }
.status-actions { padding-left: 28px; display: grid; gap: 9px; border-left: 1px solid var(--line); }
.status-actions p { margin: 0 0 5px; display: grid; }
.status-actions p span { color: var(--muted); font-size: .5rem; font-weight: 900; letter-spacing: .11em; }
.status-actions p b { margin-top: 4px; font: 900 1.65rem/1 var(--display); text-transform: uppercase; }
.status-actions p small { margin-top: 6px; color: var(--muted); font-size: .55rem; line-height: 1.45; }

/* Appointment view */
.filter-bar { margin-bottom: 14px; display: flex; gap: 6px; }
.filter-bar button { min-height: 39px; padding: 8px 12px; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.45); font-size: .59rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.filter-bar button span { margin-left: 5px; padding: 2px 5px; background: rgba(23,23,20,.07); }
.filter-bar button.is-active { color: var(--white); border-color: var(--ink); background: var(--ink); }
.appointments-panel { overflow: hidden; }
.appointments-head, .appointment-item { display: grid; grid-template-columns: 90px 1fr 1.6fr 105px 80px; align-items: center; gap: 18px; }
.appointments-head { min-height: 44px; padding: 0 22px; color: var(--muted); background: var(--paper); font-size: .5rem; font-weight: 900; letter-spacing: .1em; }
.appointment-item { min-height: 82px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.appointment-item:last-child { border-bottom: 0; }
.appointment-item time { display: grid; font: 900 1.4rem/1 var(--display); }
.appointment-item time small { margin-top: 5px; color: var(--muted); font: 500 .52rem/1 var(--body); }
.appointment-item > div { display: grid; }
.appointment-item b { font-size: .68rem; }
.appointment-item small { color: var(--muted); font-size: .58rem; }
.appointment-item > button { color: var(--muted); background: transparent; font-size: .55rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.appointment-item > button:hover { color: var(--orange-dark); }
.tag { justify-self: start; padding: 6px 8px; color: #55534d; background: var(--paper-2); font-size: .49rem; font-style: normal; font-weight: 900; }
.tag--orange { color: var(--orange-dark); background: var(--orange-soft); }
.tag--alert { color: #8b2518; background: #f6d6d0; }

/* Orders */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(230px,1fr)); gap: 12px; align-items: start; }
.kanban-column { min-height: 390px; padding: 12px; background: rgba(255,255,255,.5); border: 1px solid rgba(23,23,20,.08); }
.kanban-column > header { min-height: 43px; padding: 0 4px 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.kanban-column header > div { display: flex; align-items: center; gap: 8px; }
.kanban-dot { width: 8px; height: 8px; border-radius: 50%; background: #98938a; }
.kanban-column--alert .kanban-dot { background: #b53825; }
.kanban-column--orange .kanban-dot { background: var(--orange); }
.kanban-column--done .kanban-dot { background: #377b52; }
.kanban-column header b { font-size: .54rem; letter-spacing: .08em; }
.kanban-column header em { min-width: 24px; padding: 3px 5px; color: var(--muted); background: var(--paper-2); font-size: .5rem; font-style: normal; text-align: center; }
.job-card { margin-top: 10px; padding: 16px; background: var(--white); border: 1px solid rgba(23,23,20,.08); box-shadow: 0 8px 24px rgba(23,23,20,.04); }
.job-card--featured { border-top: 4px solid var(--orange); }
.job-card > div { display: flex; justify-content: space-between; color: var(--orange-dark); font-size: .51rem; font-weight: 900; letter-spacing: .06em; }
.job-card > div small { color: var(--muted); font-size: .48rem; }
.job-card h3 { margin: 18px 0 6px; font: 900 1.15rem/1 var(--display); text-transform: uppercase; }
.job-card p { margin: 0; color: var(--muted); font-size: .57rem; }
.job-card ul { margin: 15px 0; padding: 11px 0; display: grid; gap: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; }
.job-card li { color: var(--muted); font-size: .54rem; }
.job-card li::before { content: "✓"; margin-right: 6px; color: var(--orange-dark); font-weight: 900; }
.job-card > button { margin-top: 15px; padding: 0; color: var(--ink); background: transparent; font-size: .53rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.job-card > button:hover { color: var(--orange-dark); }

/* Vehicles */
.vehicle-overview { display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; }
.vehicle-profile { overflow: hidden; }
.vehicle-profile__visual { min-height: 220px; position: relative; display: grid; place-items: center; color: var(--orange); background: var(--ink); overflow: hidden; }
.vehicle-profile__visual::before { content: "47"; position: absolute; right: -12px; bottom: -58px; color: rgba(255,255,255,.035); font: 900 16rem/.8 var(--display); }
.vehicle-profile__visual > span { font-size: 7rem; line-height: 1; transform: rotate(45deg); }
.vehicle-profile__visual small { position: absolute; left: 18px; bottom: 16px; color: rgba(255,255,255,.55); font-size: .52rem; font-weight: 900; letter-spacing: .12em; }
.vehicle-profile__copy { padding: 25px; }
.vehicle-profile__copy h3 { margin: 6px 0 9px; font: 900 1.8rem/1 var(--display); text-transform: uppercase; }
.vehicle-profile__copy > p { margin: 0; color: var(--muted); font-size: .65rem; }
.vehicle-profile dl { margin: 24px 0 0; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); }
.vehicle-profile dl div { padding: 16px 10px 0 0; }
.vehicle-profile dt { color: var(--muted); font-size: .48rem; font-weight: 900; }
.vehicle-profile dd { margin: 5px 0 0; font-size: .61rem; font-weight: 750; }
.history-panel ol { margin: 0; padding: 0 22px; list-style: none; }
.history-panel li { min-height: 83px; display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.history-panel li:last-child { border-bottom: 0; }
.history-panel li > span { color: var(--orange-dark); font-size: .52rem; font-weight: 900; }
.history-panel li div { display: grid; }
.history-panel li b { font-size: .67rem; }
.history-panel li small { color: var(--muted); font-size: .57rem; }
.history-panel li em { padding: 5px 7px; color: var(--muted); background: var(--paper); font-size: .48rem; font-style: normal; font-weight: 900; }

/* Drawer, modal, toast */
.dashboard-backdrop { position: fixed; z-index: 940; inset: 38px 0 0; background: rgba(10,10,9,.58); backdrop-filter: blur(2px); }
.order-drawer { position: fixed; z-index: 1060; top: 38px; right: 0; bottom: 0; width: min(420px,100%); padding: 44px 34px; color: var(--ink); background: var(--paper); box-shadow: -24px 0 80px rgba(0,0,0,.22); transform: translateX(105%); transition: transform .3s ease; overflow-y: auto; }
.order-drawer.is-open { transform: none; }
.drawer-close { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; background: var(--white); font-size: 1.5rem; cursor: pointer; }
.drawer-kicker { color: var(--orange-dark); font-size: .53rem; font-weight: 900; letter-spacing: .12em; }
.order-drawer h2 { margin: 10px 0 14px; font: 900 3.2rem/.9 var(--display); }
.drawer-state { display: flex; align-items: center; gap: 8px; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.drawer-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.drawer-vehicle { margin: 28px 0; padding: 18px; display: flex; align-items: center; gap: 13px; color: var(--white); background: var(--ink); }
.drawer-vehicle > span { color: var(--orange); font-size: 2rem; transform: rotate(45deg); }
.drawer-vehicle div { display: grid; }
.drawer-vehicle b { font-size: .7rem; }
.drawer-vehicle small { color: rgba(255,255,255,.52); font-size: .58rem; }
.order-drawer dl { margin: 0; }
.order-drawer dl div { min-height: 55px; padding: 10px 0; display: grid; grid-template-columns: 105px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.order-drawer dt { color: var(--muted); font-size: .5rem; font-weight: 900; }
.order-drawer dd { margin: 0; font-size: .66rem; font-weight: 750; }
.drawer-note { margin: 26px 0; padding: 15px; display: flex; gap: 10px; color: var(--orange-dark); border: 1px solid rgba(217,95,11,.23); background: var(--orange-soft); }
.drawer-note > span { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .55rem; font-weight: 900; }
.drawer-note p { margin: 0; color: var(--ink); font-size: .6rem; }
.demo-modal { position: fixed; z-index: 1120; inset: 38px 0 0; padding: 20px; display: grid; place-items: center; background: rgba(10,10,9,.72); backdrop-filter: blur(5px); }
.demo-modal__card { width: min(100%,480px); position: relative; padding: 42px; color: var(--ink); background: var(--paper); box-shadow: 16px 16px 0 var(--orange); text-align: center; }
.modal-close { position: absolute; right: 12px; top: 12px; width: 35px; height: 35px; background: var(--white); font-size: 1.4rem; cursor: pointer; }
.modal-icon { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; color: var(--white); background: var(--orange-dark); font-size: 1.3rem; font-weight: 900; }
.demo-modal__card > p { margin: 0 0 8px; color: var(--orange-dark); font-size: .53rem; font-weight: 900; letter-spacing: .14em; }
.demo-modal__card h2 { margin: 0; font: 900 2.5rem/.9 var(--display); text-transform: uppercase; }
.demo-modal__card > div { margin: 20px 0 26px; color: var(--muted); font-size: .74rem; }
.admin-toast { position: fixed; z-index: 1150; right: 24px; bottom: 24px; min-width: 290px; padding: 13px 16px; display: flex; align-items: center; gap: 11px; color: var(--white); background: var(--ink); box-shadow: 0 18px 45px rgba(0,0,0,.28); transform: translateY(140%); opacity: 0; transition: transform .28s, opacity .28s; }
.admin-toast.is-visible { transform: none; opacity: 1; }
.admin-toast > span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--ink); background: var(--orange); font-size: .68rem; font-weight: 900; }
.admin-toast p { margin: 0; font-size: .66rem; font-weight: 800; }

@media (max-width: 1240px) {
  .login-shell { width: min(100% - 48px, 1120px); grid-template-columns: minmax(0,1fr) minmax(390px,.72fr); gap: 55px; }
  .login-story h1 { font-size: clamp(4rem,6.7vw,6.2rem); }
  .admin-sidebar { width: 244px; padding-inline: 17px; }
  .admin-workspace { margin-left: 244px; }
  .admin-content { width: min(100% - 40px, 1280px); }
  .admin-topbar { padding-inline: 22px; gap: 18px; }
  .stat-card { padding: 16px; grid-template-columns: 39px 1fr; gap: 11px; }
  .stat-card__icon { width: 39px; height: 39px; }
  .status-editor__body { grid-template-columns: 1fr 275px; gap: 25px; }
  .kanban { overflow-x: auto; grid-template-columns: repeat(4, 250px); padding-bottom: 8px; }
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr 380px; gap: 36px; }
  .login-story h1 { font-size: clamp(3.8rem,7.8vw,5.4rem); }
  .login-benefits { grid-template-columns: 1fr; gap: 10px; }
  .login-benefits li { display: grid; grid-template-columns: 35px 1fr; }
  .login-benefits b { font-size: 2rem; }
  .login-benefits span br { display: none; }
  .login-card { padding: 34px; box-shadow: 13px 13px 0 rgba(244,123,32,.88); }
  .admin-sidebar { top: 38px; width: 272px; transform: translateX(-105%); transition: transform .3s ease; box-shadow: 24px 0 70px rgba(0,0,0,.3); }
  .admin-sidebar.is-open { transform: none; }
  .sidebar-close { display: block; }
  .admin-workspace { margin-left: 0; }
  .admin-topbar { grid-template-columns: auto 1fr auto auto auto; }
  .admin-menu { display: block; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .status-editor__body { grid-template-columns: 1fr; }
  .status-actions { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .appointments-head, .appointment-item { grid-template-columns: 80px .9fr 1.3fr 95px 70px; gap: 10px; }
  .vehicle-overview { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .demo-bar__detail { display: none; }
  .login-view { min-height: auto; }
  .login-view__shade { background: rgba(10,10,9,.79); }
  .login-shell { width: min(100% - 30px,600px); min-height: auto; padding: 32px 0 55px; display: block; }
  .login-story { min-height: auto; padding: 0; }
  .login-story__copy { margin: 70px 0 34px; }
  .login-story h1 { font-size: clamp(3.6rem,14vw,5.5rem); }
  .login-story__copy > p:last-child { font-size: .9rem; }
  .login-benefits { display: none; }
  .login-card-wrap { padding: 55px 0 0; }
  .login-card { width: 100%; padding: 34px; margin: 0; }
  .admin-topbar { min-height: 72px; padding: 0 14px; grid-template-columns: auto 1fr auto; gap: 10px; }
  .topbar-date, .admin-profile { display: none; }
  .logout-button { padding-left: 5px; font-size: .55rem; }
  .admin-content { width: min(100% - 28px,700px); padding-top: 18px; }
  .admin-demo-note { grid-template-columns: auto 1fr; }
  .admin-demo-note a { grid-column: 2; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .view-heading h2 { font-size: clamp(2.9rem,13vw,4rem); }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { min-height: 125px; padding: 14px; grid-template-columns: 1fr; align-content: center; }
  .stat-card__icon { width: 34px; height: 34px; }
  .stat-card > div { grid-template-columns: 1fr auto; }
  .schedule-list { padding: 0 14px; }
  .schedule-row { grid-template-columns: 48px 6px 1fr 13px; gap: 9px; }
  .schedule-row em { display: none; }
  .capacity-chart { height: 210px; }
  .status-editor__head { align-items: flex-start; flex-direction: column; }
  .admin-progress { grid-template-columns: 1fr; gap: 0; }
  .admin-progress li { min-height: 64px; grid-template-columns: 42px 1fr; justify-items: stretch; align-items: center; gap: 10px; text-align: left; }
  .admin-progress li:not(:last-child)::after { left: 17px; right: auto; top: 39px; bottom: -3px; width: 2px; height: auto; }
  .admin-progress li > span { grid-column: 1; grid-row: 1; }
  .admin-progress li div { grid-column: 2; grid-row: 1; }
  .appointments-panel { background: transparent; border: 0; box-shadow: none; }
  .appointments-head { display: none; }
  .appointment-item { min-height: 0; margin-bottom: 8px; padding: 15px; grid-template-columns: 65px 1fr auto; gap: 10px; background: var(--white); border: 1px solid rgba(23,23,20,.08); }
  .appointment-item > div:nth-of-type(2) { grid-column: 2; }
  .appointment-item .tag { grid-column: 3; grid-row: 1; }
  .appointment-item > button { grid-column: 2 / -1; text-align: left; }
  .filter-bar { overflow-x: auto; }
  .vehicle-profile dl { grid-template-columns: 1fr; }
  .history-panel ol { padding-inline: 14px; }
  .history-panel li { grid-template-columns: 52px 1fr; }
  .history-panel li em { display: none; }
}

@media (max-width: 480px) {
  .demo-bar { font-size: .56rem; }
  .demo-bar__inner { width: calc(100% - 24px); min-height: 34px; gap: 8px; }
  .demo-bar__back { font-size: 0; }
  .demo-bar__back span { font-size: .8rem; }
  .login-shell { width: calc(100% - 24px); }
  .brand__mark { width: 46px; height: 46px; }
  .brand__text strong { font-size: 1.25rem; }
  .login-story__copy { margin-top: 55px; }
  .login-story h1 { font-size: clamp(3.3rem,16.5vw,4.5rem); }
  .login-card { padding: 26px 20px; box-shadow: 8px 8px 0 rgba(244,123,32,.88); }
  .demo-credentials > div { grid-template-columns: 1fr; gap: 2px; }
  .demo-credentials div button { padding-left: 0; }
  .dashboard { min-height: calc(100vh - 34px); }
  .admin-sidebar, .order-drawer { top: 34px; }
  .dashboard-backdrop, .demo-modal { top: 34px; }
  .admin-title h1 { font-size: 1.25rem; }
  .logout-button { font-size: 0; }
  .logout-button span { font-size: .9rem; }
  .admin-demo-note { padding: 10px; gap: 8px; }
  .admin-demo-note p { font-size: .63rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 105px; grid-template-columns: 39px 1fr; }
  .stat-card__icon { width: 39px; height: 39px; }
  .panel-head { padding-inline: 15px; }
  .capacity-chart { padding-inline: 12px; }
  .capacity-legend { padding-left: 54px; flex-direction: column; gap: 4px; }
  .status-editor__body { padding: 22px 16px; }
  .filter-bar button { flex: 0 0 auto; }
  .appointment-item { grid-template-columns: 60px 1fr; }
  .appointment-item .tag { grid-column: 1; grid-row: 2; }
  .appointment-item > button { grid-column: 2; }
  .order-drawer { padding: 42px 22px; }
  .demo-modal__card { padding: 35px 22px; box-shadow: 8px 8px 0 var(--orange); }
  .admin-toast { left: 14px; right: 14px; bottom: 14px; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .demo-bar, .admin-sidebar, .admin-topbar, .admin-demo-note, .admin-primary, .admin-secondary, .order-drawer, .admin-toast { display: none !important; }
  .admin-workspace { margin: 0; }
  .admin-content { width: 100%; }
}
