@media (max-width: 760px) {
  :root[data-mobile-color] {
    font-family: Inter, system-ui, sans-serif;
    --color-gold: #ffe36b;
    --color-on-gold: #211b06;
    --color-mint: #a3ecd2;
    --color-lilac: #cdbaff;
    --color-sky: #a4d6ff;
    --color-amber: #ffcc92;
    --color-radius: 14px;
    --color-action: var(--color-gold);
    --color-on-action: var(--color-on-gold);
  }

  :root[data-mobile-color]:is([data-mobile-palette="purple"], :not([data-mobile-graphite])) {
    color-scheme: dark;
    --canvas: #101116;
    --paper: #191b23;
    --raised: #222531;
    --line: #2b2e3b;
    --ink: #f7f7fb;
    --muted: #a6a9bb;
    --primary: var(--color-gold);
    --primary-dark: #ffeb94;
    --accent-surface: #322d1f;
    --workbench-chrome: #16171e;
    --form-control: #16171e;
    --form-tinted: var(--paper);
    --form-selected: var(--accent-surface);
    --graphite-control: var(--raised);
  }

  :root[data-mobile-color][data-mobile-graphite] {
    --prism-button: var(--color-action);
    --prism-on-button: var(--color-on-action);
    --phone-action: var(--color-action);
    --phone-action-ink: var(--color-on-action);
    --workbench-radius: 11px;
    --graphite-cost: linear-gradient(145deg, #a3ecd2 45%, #79d6c3);
    --color-sales: linear-gradient(145deg, #cdbaff 45%, #a6bbfa);
  }

  [data-mobile-color][data-mobile-graphite] .main .topbar {
    background: var(--workbench-chrome);
    isolation: isolate;
  }

  [data-mobile-color][data-mobile-graphite] .topbar:has(#mobile-order-search-form:not([hidden])) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 8px;
  }

  [data-mobile-color] .topbar:has(#mobile-order-search-form:not([hidden])) .orders-topbar { display: contents; }
  [data-mobile-color] .topbar .mobile-brand { grid-area: 1 / 1; }
  [data-mobile-color] .topbar .mobile-brand img { width: 53px; height: auto; }
  [data-mobile-color] .topbar .topbar-right { grid-area: 1 / 3; min-width: 0; gap: 5px; }
  [data-mobile-color] .topbar .orders-mobile-search:not([hidden]) { grid-area: 1 / 2; min-width: 0; }
  [data-mobile-color] .topbar .orders-mobile-search .search { min-height: 40px; border-radius: 11px; padding-inline: 9px; }
  [data-mobile-color] .topbar .orders-mobile-search input { width: 100%; }
  [data-mobile-color] .topbar .orders-topbar-switch { display: none !important; }
  [data-mobile-color] .topbar .phone-board-title { grid-area: 2 / 1 / 3 / 3; font-size: 26px; font-weight: 800; letter-spacing: -.055em; }
  [data-mobile-color] .topbar .new-order-action { grid-area: 2 / 3; justify-self: end; }
  [data-mobile-color] .topbar .new-order-action .color-long-action { display: none; }
  [data-mobile-color][data-mobile-graphite] .topbar .topbar-right :is(.mobile-more, .order-notifications) > summary { min-height: 40px; width: 37px; border-radius: 11px; }

  [data-mobile-color] :is(#view, #editor) :is(.button, .segmented > button) { border-radius: 11px; }
  [data-mobile-color][data-mobile-graphite] :is(#view, #editor, .topbar, .color-order-footer) .button.primary:not(.ticket-action) {
    background: var(--color-action);
    color: var(--color-on-action);
    border-color: transparent;
    box-shadow: none;
  }

  [data-mobile-color][data-mobile-graphite] .mobile-nav { grid-template-rows: 44px; }
  [data-mobile-color][data-mobile-graphite] .mobile-nav a.active[aria-current="page"] { color: var(--primary); }
  [data-mobile-color][data-mobile-graphite] .mobile-nav a.active[aria-current="page"] > [data-icon] {
    color: var(--color-on-action);
    background: var(--color-action);
  }

  [data-mobile-color] #view .graphite-stage-heading { flex-wrap: wrap; gap: 3px; }
  [data-mobile-color] .graphite-stage-heading h2 { margin-inline-end: auto; }
  [data-mobile-color] .graphite-stage-heading .button { padding-inline: 6px; font-size: 12px; }
  [data-mobile-color] .graphite-stage-heading [data-mobile-overview-open] > span[data-icon] { display: none; }
  [data-mobile-color] #view .workbench-stage-arrows .button { width: 30px; min-width: 30px; }
  [data-mobile-color][data-mobile-graphite] #view .mobile-stage-list {
    grid-auto-columns: clamp(90px, 28vw, 148px);
    gap: 8px;
    padding: 0 2px 5px;
  }

  [data-mobile-color][data-mobile-graphite] #view .button.mobile-stage-option {
    position: relative;
    isolation: isolate;
    min-height: 92px;
    padding: 8px;
    overflow: hidden;
    gap: 3px;
    color: #191a23;
    background: var(--color-stage, var(--color-lilac));
    border: 1px solid transparent;
    box-shadow: none;
  }

  [data-mobile-color] #view .mobile-stage-option[data-filter="inbound"] { --color-stage: var(--color-mint); }
  [data-mobile-color] #view .mobile-stage-option[data-filter="repair"] { --color-stage: var(--color-amber); }
  [data-mobile-color] #view .mobile-stage-option[data-filter="testing"] { --color-stage: var(--color-sky); }
  [data-mobile-color] #view .mobile-stage-option[data-filter="parts"] { --color-stage: #dedbed; }
  [data-mobile-color] #view .mobile-stage-option[data-filter="ready"] { --color-stage: #b9f3b1; }
  [data-mobile-color] #view .mobile-stage-option[data-filter="awaiting"] { --color-stage: var(--color-sky); }
  [data-mobile-color][data-mobile-graphite] #view .button.mobile-stage-option[aria-pressed="true"] {
    background: var(--color-stage, var(--color-lilac));
    border-color: #181720;
    outline: 2px solid var(--color-stage, var(--color-lilac));
    outline-offset: -1px;
    box-shadow: inset 0 0 0 2px #181720;
  }

  [data-mobile-color] .mobile-stage-option::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 104px;
    height: 104px;
    right: -49px;
    top: -30px;
    border: 12px solid #ffffff28;
    border-radius: 50%;
    box-shadow: 0 0 0 10px #ffffff28;
    pointer-events: none;
  }

  [data-mobile-color][data-mobile-graphite] #view .mobile-stage-option :is(.graphite-stage-name, .graphite-stage-counts, small, strong, .mobile-stage-icon) { color: #191a23; }
  [data-mobile-color] .mobile-stage-option .graphite-stage-name { font-size: 12px; line-height: 1.18; }
  [data-mobile-color] #view .mobile-stage-option .graphite-stage-name { display: grid; justify-items: start; gap: 3px; }
  [data-mobile-color] #view .mobile-stage-option .mobile-stage-icon { background: #ffffff54; }
  [data-mobile-color] .mobile-stage-option .graphite-stage-counts small { font-size: 11px; line-height: 1.2; }
  [data-mobile-color] .mobile-stage-option strong { font-size: 15px; line-height: 1.2; }

  [data-mobile-color][data-mobile-graphite] #view .graphite-ticket { border-radius: var(--color-radius); background: var(--paper); border-color: var(--line); }
  [data-mobile-color] #view :has(> .graphite-ticket + .graphite-ticket) { display: block; }
  [data-mobile-color][data-mobile-graphite] #view .graphite-ticket:has(+ .graphite-ticket) { border-bottom: 0; border-end-start-radius: 0; border-end-end-radius: 0; }
  [data-mobile-color][data-mobile-graphite] #view .graphite-ticket + .graphite-ticket { border-start-start-radius: 0; border-start-end-radius: 0; }
  [data-mobile-color] #view .graphite-ticket-meta { font-size: 11px; }
  [data-mobile-color] #view .graphite-ticket h3 { font-size: 15px; }
  [data-mobile-color] #view .graphite-ticket-amount strong { font-size: clamp(14px, 4.05vw, 17px); }
  [data-mobile-color] #view .graphite-ticket-foot { min-height: 0; justify-content: flex-end; gap: 5px; padding: 3px 0 0; border: 0; }
  [data-mobile-color] #view .graphite-ticket .ticket-action { min-height: 42px; }
  [data-mobile-color] #view :is(.mobile-stage-summary, .mobile-list-heading) { min-width: 0; }

  [data-mobile-color][data-mobile-graphite] .main:has(#view[data-mobile-page="order"]) {
    grid-template-rows: minmax(0, 1fr) auto;
  }
  [data-mobile-color] .main:has(#view[data-mobile-page="order"]) > .topbar,
  [data-mobile-color] body:has(#view[data-mobile-page="order"]) > .mobile-nav { display: none; }
  [data-mobile-color] #view[data-mobile-page="order"] { grid-row: 1; padding-top: max(6px, env(safe-area-inset-top)); }
  [data-mobile-color] .main:has(.color-order-footer[hidden]) #view[data-mobile-page="order"] { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  [data-mobile-color] .color-order-footer:not([hidden]) {
    grid-row: 2;
    padding: 6px var(--workbench-edge) max(6px, env(safe-area-inset-bottom));
    background: var(--workbench-chrome);
    border-top: 1px solid var(--line);
  }
  [data-mobile-color] .color-order-footer .button { width: 100%; min-height: 44px; white-space: normal; border-radius: 11px; }
  [data-mobile-color] #view .order-concept .oc-top {
    display: grid;
    grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
    gap: 5px;
  }
  [data-mobile-color] #view .oc-top .oc-actions { justify-self: end; min-width: 0; }
  [data-mobile-color] #view .oc-top .back { color: var(--ink); border-color: transparent; background: none; padding-inline: 0; }
  [data-mobile-color] .color-order-ref { align-self: center; font-weight: 700; }
  [data-mobile-color][data-mobile-graphite] #view .order-concept .oc-hero { background: transparent; padding-inline: 0; border: 0; }
  [data-mobile-color] #view .color-order-date { color: var(--muted); font-size: 12px; }
  [data-mobile-color] #view .order-identity .detail-id:empty { display: none; }
  [data-mobile-color] #view .order-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
  [data-mobile-color] #view .oc-hero h1 { font-size: clamp(21px, 6vw, 29px); letter-spacing: -.043em; }
  [data-mobile-color] #view .order-tabs .button { min-width: max-content; font-size: 12px; padding-inline: 8px; }
  [data-mobile-color] #view .order-tabs .button > [data-icon] { display: none; }
  [data-mobile-color] #view .order-tabs .button[aria-pressed="true"] { box-shadow: inset 0 -2px var(--primary); }
  [data-mobile-color] #view .route-steps .current svg { color: var(--primary); }
  [data-mobile-color] #view .phone-order-guide { margin-top: 8px; }
  [data-mobile-color] #view .phone-order-guide .phone-stage-badge { max-width: 100%; }

  [data-mobile-color][data-mobile-graphite] #view .sales-kpi-revenue { background: var(--color-sales); }
  [data-mobile-color][data-mobile-graphite] #view :is(.cost-workspace .cost-summary, .sales-kpi-revenue) {
    --ink: #171824;
    --muted: #343650;
    --line: #25324838;
    --primary: #272647;
    color: var(--ink);
  }
  [data-mobile-color][data-mobile-graphite] #view :is(.cost-workspace .cost-summary, .sales-kpi-revenue) :is(small, b, strong) { color: var(--ink); }
  [data-mobile-color] #view .profile-workspace[data-profile-pane="home"] .profile-settings,
  [data-mobile-color] #view .profile-workspace[data-profile-pane]:not([data-profile-pane="home"]) > :is(.profile-hero, .phone-profile-sales),
  [data-mobile-color] #view .profile-workspace[data-profile-pane]:not([data-profile-pane="home"]) :is(.profile-menu, .profile-recent),
  [data-mobile-color] #view:has(.profile-workspace[data-profile-pane]:not([data-profile-pane="home"])) > :is(.mobile-profile-back, .page-heading) { display: none; }
  [data-mobile-color] #view .profile-menu { display: grid; grid-template-columns: 1fr; gap: 0; background: var(--paper); padding: 0 10px; border-radius: var(--color-radius); }
  [data-mobile-color] #view .profile-menu .button { width: 100%; justify-content: flex-start; min-height: 44px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); }
  [data-mobile-color] #view .profile-menu .button + .button { border-top: 1px solid var(--line); }
  [data-mobile-color] #view [data-color-profile-back] { margin-bottom: 8px; }

  [data-mobile-color][data-mobile-graphite] body:has(.topbar :is(.mobile-more, .order-notifications)[open]) .topbar {
    z-index: 40;
  }
  [data-mobile-color][data-mobile-graphite] .topbar :is(.mobile-more, .order-notifications)[open] > summary::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background: #080912a1;
  }
  [data-mobile-color][data-mobile-graphite] .topbar :is(.mobile-more-panel, .notification-menu) {
    position: fixed;
    inset: auto 0 0;
    z-index: 2;
    width: auto;
    max-width: none;
    max-height: min(82dvh, 650px);
    overflow: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 10px var(--workbench-edge) max(10px, env(safe-area-inset-bottom));
    background: var(--paper);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px #08091255;
  }
  [data-mobile-color] .color-sheet-heading,
  [data-mobile-color] .notification-menu > header { display: flex; align-items: center; gap: 8px; }
  [data-mobile-color] .color-sheet-heading strong,
  [data-mobile-color] .notification-menu > header strong { margin-inline-end: auto; }
  [data-mobile-color] .mobile-more-panel [data-mobile-panel-close],
  [data-mobile-color] .notification-menu [data-mobile-panel-close] { display: grid; place-items: center; width: 40px; padding: 0; min-height: 40px; }

  [data-mobile-color] #editor :is(.field, fieldset, label, .editor-actions > *) { min-width: 0; }
  [data-mobile-color] #editor .editor-head { background: var(--workbench-chrome); color: var(--ink); }
  [data-mobile-color] #editor .editor-actions { background: var(--paper); }
  [data-mobile-color][data-mobile-graphite] #editor[data-color-page][open] {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--canvas);
  }
  [data-mobile-color][data-mobile-keyboard] #editor[data-color-page][open] {
    top: var(--keyboard-viewport-top);
    bottom: auto;
    height: var(--keyboard-viewport-height);
    max-height: var(--keyboard-viewport-height);
  }
  [data-mobile-color] #editor[data-color-page] > form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    max-height: 100%;
  }
  [data-mobile-color] #editor[data-color-page] :is(.editor-head, .editor-body, .editor-actions) { padding-inline: var(--workbench-edge); }
  [data-mobile-color] #editor[data-color-page] .editor-head { padding-top: max(4px, env(safe-area-inset-top)); position: static; }
  [data-mobile-color] #editor[data-color-page] .editor-body { overflow: auto; min-height: 0; overscroll-behavior: contain; }
  [data-mobile-color] #editor[data-color-page] .editor-actions { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  [data-mobile-color] #editor .phone-choice-list { overflow: clip; max-width: 100%; border-radius: var(--color-radius); }
  [data-mobile-color] #editor .phone-choice:has(:checked) { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--accent-surface); }
  [data-mobile-color] #editor .color-payment-reference { padding: 12px; margin-bottom: 9px; border-radius: var(--color-radius); background: var(--color-mint); color: #152921; }
  [data-mobile-color] .color-payment-reference > strong { display: block; font-size: 18px; }
  [data-mobile-color] .color-payment-reference > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
  [data-mobile-color] .color-payment-reference span { font-size: 11px; }
  [data-mobile-color] .color-payment-reference b { display: block; white-space: nowrap; font-size: clamp(11px, 3.6vw, 16px); }
  [data-mobile-color] #editor .payment-position:has(input:checked:disabled) { color: var(--ink); background: color-mix(in srgb, var(--paper) 83%, var(--color-mint)); }
  [data-mobile-color] #editor .payment-position:has(input:checked:enabled) { background: var(--accent-surface); }
  [data-mobile-color] #editor .color-payment-selected { display: grid; gap: 1px; margin-inline-end: auto; }
  [data-mobile-color] #editor .color-payment-selected small { color: var(--muted); }
  [data-mobile-color] #editor .editor-actions:has(.color-payment-selected) > [data-close] { display: none; }
  [data-mobile-color] #editor .editor-actions:has(.color-payment-selected) button[type="submit"] { min-width: 0; }
  [data-mobile-color] #editor .phone-draft-types button[aria-pressed="true"] { background: var(--accent-surface); border-color: var(--primary); color: var(--ink); }
  [data-mobile-color][data-mobile-palette="purple"] #editor .phone-draft-types button[aria-pressed="true"] { background: #322846; border-color: #816ba6; color: #dfd0ff; }

  [data-mobile-color] body.auth-page { color: var(--ink); background: var(--canvas); }
  [data-mobile-color] .auth-page .auth-form { background: var(--paper); color: var(--ink); border-color: var(--line); border-radius: 18px; box-shadow: none; }
  [data-mobile-color] .auth-page .auth-form :is(input:not([type="hidden"]), .button) { border-radius: 11px; min-height: 44px; font-size: 16px; }
  [data-mobile-color] .auth-page .auth-form input:not([type="hidden"]) { background: var(--form-control); color: var(--ink); border-color: var(--line); }
  [data-mobile-color] .auth-page .auth-form .button.primary { color: var(--color-on-action); background: var(--color-action); border-color: transparent; }
}

