/* ui1 — the clean look (October 2026): a slim icon bar on the left in the shop's primary color, a white top bar,
   lighter cards, buttons, tables and forms. Loaded after layout.css on every app page; it only restyles — no markup or
   behavior depends on it (remove the <link> to go back). Colors still come from Settings → Shop setup → Appearance
   (css/theme.css variables), so it follows every shop's theme. Icons are line drawings used as masks, so they take
   the text color. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --elt-radius: 10px;
  --elt-radius-sm: 8px;
  --ui-card-radius: 14px;
  --ui-rail: 88px;
  --ui-top: 64px;
  --ui-rail-ink: color-mix(in srgb, var(--elt-on-primary) 72%, transparent);
  --ui-rail-hover: color-mix(in srgb, var(--elt-on-primary) 9%, transparent);
  --ui-rail-on: color-mix(in srgb, var(--elt-on-primary) 16%, transparent);
  --i-list: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13'/%3E%3Cpath d='M3.5 6h.01M3.5 12h.01M3.5 18h.01'/%3E%3C/svg%3E");
  --i-wrench: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.2L3.6 17.2a1.6 1.6 0 0 0 2.3 2.3l5.7-5.7a4 4 0 0 0 5.2-5.4l-2.4 2.4-2.2-.5-.5-2.2z'/%3E%3C/svg%3E");
  --i-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
  --i-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c.8-3.6 3.4-5.5 6.5-5.5s5.7 1.9 6.5 5.5'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7'/%3E%3Cpath d='M18 14.8c2 .7 3.2 2.5 3.5 5.2'/%3E%3C/svg%3E");
  --i-car: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11l1.6-4.2A2 2 0 0 1 8.5 5.5h7a2 2 0 0 1 1.9 1.3L19 11'/%3E%3Crect x='3' y='11' width='18' height='6' rx='2'/%3E%3Cpath d='M6 17v2M18 17v2'/%3E%3Ccircle cx='7.5' cy='14' r='.6'/%3E%3Ccircle cx='16.5' cy='14' r='.6'/%3E%3C/svg%3E");
  --i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E");
  --i-truck: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 7h12v9H2z'/%3E%3Cpath d='M14 10h4l3 3v3h-7'/%3E%3Ccircle cx='6' cy='18' r='1.8'/%3E%3Ccircle cx='17' cy='18' r='1.8'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  --i-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l9-4 9 4v10l-9 4-9-4z'/%3E%3Cpath d='M3 7l9 4 9-4M12 11v10'/%3E%3C/svg%3E");
  --i-checklist: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h6v3H9z'/%3E%3Cpath d='M15 5h3v16H6V5h3'/%3E%3Cpath d='M9 13l2 2 4-4'/%3E%3C/svg%3E");
  --i-gear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E");
  --i-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='12' r='1.3'/%3E%3Ccircle cx='12' cy='12' r='1.3'/%3E%3Ccircle cx='19' cy='12' r='1.3'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.7 2.7L16 10'/%3E%3C/svg%3E");
  --i-columns: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='5' height='16' rx='1.5'/%3E%3Crect x='10' y='4' width='5' height='10' rx='1.5'/%3E%3Crect x='17' y='4' width='4' height='13' rx='1.5'/%3E%3C/svg%3E");
  --i-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l2 3 3.5-.5.5 3.5 3 2-2 3 .5 3.5-3.5.5-2 3-3-2-3.5.5L7 17l-3-2 2-3-.5-3.5L9 8l1-3.5z'/%3E%3Ccircle cx='12' cy='11.5' r='3'/%3E%3C/svg%3E");
  --i-clipboard: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h6v3H9z'/%3E%3Cpath d='M15 5h3v16H6V5h3'/%3E%3Cpath d='M9 12h6M9 16h4'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --i-dollar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M16.5 7.5c-.8-1.3-2.4-2-4.5-2-2.7 0-4.5 1.3-4.5 3.2 0 4.6 9.3 2.1 9.3 6.8 0 2-1.9 3.4-4.8 3.4-2.3 0-4-.8-4.8-2.2'/%3E%3C/svg%3E");
  --i-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7.5' height='7.5' rx='1.5'/%3E%3Crect x='13.5' y='3' width='7.5' height='7.5' rx='1.5'/%3E%3Crect x='3' y='13.5' width='7.5' height='7.5' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='7.5' height='7.5' rx='1.5'/%3E%3C/svg%3E");
  --i-hammer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4l6 6-2 2-2-2-9 9a1.4 1.4 0 0 1-2-2l9-9-2-2z'/%3E%3C/svg%3E");
  --i-printer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8V3h10v5'/%3E%3Crect x='3' y='8' width='18' height='8' rx='2'/%3E%3Cpath d='M7 14h10v7H7z'/%3E%3C/svg%3E");
  --i-tv: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='12' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E");
  --i-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E");
}

body { font-family: var(--font-sans); letter-spacing: -0.003em; }
h1, h2, h3, h4 { letter-spacing: -0.01em; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 24px; font-weight: 700; }

/* ---------- Shell: icon bar on the left, white top bar ---------- */
@media (min-width: 761px) {
  .app-shell {
    grid-template-columns: var(--ui-rail) minmax(0, 1fr);
    grid-template-rows: var(--ui-top) 1fr;
    grid-template-areas: "side topbar" "side main";
  }
  .app-shell > .sidebar {
    grid-area: side;
    position: sticky; top: 0; align-self: start;
    height: 100vh; height: 100dvh;
    overflow-y: auto; scrollbar-width: none;
    background: var(--elt-blue);
    border: 0;
    padding: 14px 8px;
    display: flex; flex-direction: column; gap: 10px;
  }
  .app-shell > .sidebar::-webkit-scrollbar { display: none; }
  .app-shell > .sidebar > nav,
  .app-shell > .sidebar-work > nav { background: transparent; padding: 0; border-radius: 0; display: flex; flex-direction: column; gap: 4px; }
  .app-shell > .sidebar .nav-item {
    position: relative;
    flex-direction: column; justify-content: center; gap: 5px;
    min-height: 58px; margin: 0; padding: 9px 4px;
    border-radius: 12px;
    color: var(--ui-rail-ink);
    font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  .app-shell > .sidebar .nav-item:hover { background: var(--ui-rail-hover); color: var(--elt-on-primary); }
  .app-shell > .sidebar .nav-item.active { background: var(--ui-rail-on); color: var(--elt-on-primary); }
  .app-shell > .sidebar .nav-item.active::before { content: ""; position: absolute; left: -8px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--elt-on-primary); }
  .app-shell > .sidebar .nav-count { position: absolute; top: 4px; right: 6px; margin: 0; min-width: 18px; padding: 1px 5px; font-size: 10px; line-height: 16px; background: #E5484D; }
  /* what's under the menu on the shop computers (stations, TV board, printer) */
  .app-shell > .sidebar > div:not(nav) { margin-top: auto; padding: 10px 2px 2px !important; border-top: 1px solid var(--ui-rail-hover); color: var(--ui-rail-ink) !important; font-size: 10.5px !important; text-align: center; line-height: 1.3; display: flex; flex-direction: column; gap: 6px; }
  .app-shell > .sidebar > div:not(nav) .label { color: inherit; font-size: 9.5px; margin: 0 !important; letter-spacing: .05em; }
  .app-shell > .sidebar > div:not(nav) .btn { width: 100%; height: auto; min-height: 36px; margin: 0 !important; padding: 6px 4px; white-space: normal; line-height: 1.2; font-size: 10.5px; background: transparent; border: 1px solid var(--ui-rail-on); color: var(--elt-on-primary); }
  .app-shell > .sidebar > div:not(nav) .btn:hover { background: var(--ui-rail-hover); }
  .app-shell > .sidebar > div:not(nav) a:not(.btn) { color: var(--elt-on-primary); font-weight: 600; }
  .main { padding: 26px 32px 64px; }
  .app-shell.msgp { grid-template-rows: var(--ui-top) 1fr; }   /* Messages: no menu column, the taller top bar */
}

/* the icons (line drawings in the text color) */
.sidebar .nav-item .icon {
  display: inline-block; flex: none;
  width: 22px; height: 22px;
  font-size: 0; color: inherit; opacity: 1;
  background: currentColor;
  -webkit-mask: var(--ico, var(--i-dots)) center / 22px 22px no-repeat;
          mask: var(--ico, var(--i-dots)) center / 22px 22px no-repeat;
}
.sidebar .nav-item[data-tab="home"]              { --ico: var(--i-home); }
.sidebar .nav-item[data-tab="orders"]            { --ico: var(--i-list); }
.sidebar .nav-item[data-tab="progress"],
.sidebar .nav-item[data-kiosk-view="progress"],
.sidebar .nav-item[data-employee-view="work"]    { --ico: var(--i-wrench); }
.sidebar .nav-item[data-tab="calendar"],
.sidebar .nav-item[data-kiosk-view="calendar"],
.sidebar .nav-item[data-fs-view="schedule"],
.sidebar .nav-item[data-fs-sub="upcoming"]       { --ico: var(--i-calendar); }
.sidebar .nav-item[data-tab="crm"],
.sidebar .nav-item[data-fs-view="crew"]          { --ico: var(--i-users); }
.sidebar .nav-item[href*="field.html"]           { --ico: var(--i-car); }
.sidebar .nav-item[href*="messages.html"]        { --ico: var(--i-chat); }
.sidebar .nav-item[data-tab="ship"],
.sidebar .nav-item[data-kiosk-view="ship"]       { --ico: var(--i-truck); }
.sidebar .nav-item[data-tab="activity"]          { --ico: var(--i-clock); }
.sidebar .nav-item[data-tab="inventory"]         { --ico: var(--i-box); }
.sidebar .nav-item[data-tab="floorcheck"]        { --ico: var(--i-checklist); }
.sidebar .nav-item[data-tab="settings"],
.sidebar .nav-item[href*="owner.html#settings"]  { --ico: var(--i-gear); }
.sidebar .nav-more-btn                           { --ico: var(--i-dots); }
.sidebar .nav-item[data-kiosk-view="today"],
.sidebar .nav-item[data-fs-view="mine"]          { --ico: var(--i-check); }
.sidebar .nav-item[data-kiosk-view="work"],
.sidebar .nav-item[href$="kiosk.html"]           { --ico: var(--i-columns); }
.sidebar .nav-item[data-kiosk-view="parts"]      { --ico: var(--i-bolt); }
.sidebar .nav-item[data-kiosk-view="completed"],
.sidebar .nav-item[data-employee-view="completed"],
.sidebar .nav-item[data-fs-view="jobs"],
.sidebar .nav-item[data-fs-sub="done"]           { --ico: var(--i-clipboard); }
.sidebar .nav-item[data-fs-view="new"]           { --ico: var(--i-plus); }
.sidebar .nav-item[data-fs-view="rates"]         { --ico: var(--i-dollar); }
.sidebar .nav-item[href$="owner.html"]           { --ico: var(--i-grid); }
.sidebar .nav-more-btn .icon::after { content: none; }

/* ---------- Top bar: white, with the search in a soft field ---------- */
.topbar {
  height: var(--ui-top);
  background: var(--elt-card);
  color: var(--elt-text-1);
  border-bottom: 1px solid var(--elt-divider);
  padding: 0 24px;
  gap: 12px;
}
.topbar .brand img { height: 28px; }
.topbar .brand .product { color: var(--elt-text-3); font-size: 12px; letter-spacing: .08em; }
.topbar .user { color: var(--elt-text-1); font-size: 14px; font-weight: 500; }
.topbar .user .btn { height: 34px; }
.osearch-input {
  height: 42px; border-radius: 12px;
  border: 1px solid var(--elt-border); background-color: var(--elt-background); color: var(--elt-text-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.osearch-input::placeholder { color: var(--elt-placeholder); }
.osearch-input:focus { background-color: var(--elt-card); border-color: var(--elt-accent); box-shadow: 0 0 0 3px var(--elt-focus); }
.lang-label { color: var(--elt-text-3); }
.lang-switch { background: var(--elt-background); border: 1px solid var(--elt-divider); }
.lang-btn { color: var(--elt-text-2); }
.lang-btn:hover { color: var(--elt-text-1); background: var(--elt-primary-tint); }
.lang-btn-active, .lang-btn-active:hover { background: var(--elt-card); color: var(--elt-primary-ink); box-shadow: 0 1px 3px rgba(15, 23, 36, .12); }

/* ---------- Cards, buttons, forms, tables ---------- */
.card { border-radius: var(--ui-card-radius); border-color: var(--elt-divider); padding: 18px 20px; box-shadow: none; }
.card-title { font-size: 15px; font-weight: 600; }

.btn { height: 40px; padding: 0 16px; border-radius: var(--elt-radius); background: var(--elt-accent); color: var(--elt-on-accent); font-weight: 600; }
.btn:hover { background: color-mix(in srgb, var(--elt-accent) 86%, black); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--elt-focus); }
.btn-secondary { background: var(--elt-card); border-color: var(--elt-border); color: var(--elt-text-1); }
.btn-secondary:hover { background: var(--elt-card-2); }
.btn-ghost { background: transparent; color: var(--elt-text-1); }
.btn-ghost:hover { background: var(--elt-primary-tint); }
.btn-danger { background: var(--elt-red); color: #fff; }
.btn-danger:hover { background: #B42318; }
.btn-success { background: var(--elt-green); color: #fff; }
.btn-success:hover { background: #17803F; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: var(--elt-radius-sm); }
.btn-lg { height: 48px; border-radius: 12px; }

.input, .textarea, select.input { border-radius: var(--elt-radius); border-color: var(--elt-border); background-color: var(--elt-card); }
.input:focus, .textarea:focus, select.input:focus { border-color: var(--elt-accent); box-shadow: 0 0 0 3px var(--elt-focus); outline: none; }
.label { font-weight: 600; color: var(--elt-text-2); }

.segmented { background: var(--elt-card); border: 1px solid var(--elt-divider); border-radius: 12px; padding: 4px; gap: 4px; }
.segmented-btn { border-radius: 8px; color: var(--elt-text-2); font-weight: 500; }
.segmented-btn.active { background: var(--elt-accent-soft); color: var(--elt-primary-ink); box-shadow: none; font-weight: 600; }

.orders-table-panel, .table-wrap { background: var(--elt-card); border: 1px solid var(--elt-divider); border-radius: var(--ui-card-radius); box-shadow: none; }
.orders-table-panel .table-wrap { border: 0; border-radius: 0; }
table.orders th { background: var(--elt-card-2); color: var(--elt-text-3); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; border-bottom: 1px solid var(--elt-divider); }
table.orders tr { border-bottom-color: var(--elt-divider); }
table.orders tr:hover { background: var(--elt-card-2); }

.pill { font-weight: 600; }
.pill-blue, .pill-note, .banner-info { background: var(--elt-accent-soft); color: var(--elt-primary-ink); }
.banner { border-radius: 12px; }
.modal-card { border-radius: 18px; padding: 24px; }
.drawer.open { box-shadow: -12px 0 40px rgba(15, 23, 36, .14); }

/* ---------- Phones: the menu is a white bar at the bottom (as before), with the same icons ---------- */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; height: 60px; }
  .sidebar { background: var(--elt-card); border-top: 1px solid var(--elt-divider); box-shadow: 0 -4px 16px rgba(15, 23, 36, .05); }
  .sidebar .nav-item { color: var(--elt-text-3); font-size: 11px; font-weight: 600; gap: 3px; padding: 6px 4px; border-radius: 10px; position: relative; }
  .sidebar .nav-item.active,
  .sidebar-work .nav-item.active { background: transparent; color: var(--elt-accent); }
  .sidebar .nav-item .icon { width: 24px; height: 24px; -webkit-mask-size: 24px 24px; mask-size: 24px 24px; }
  .sidebar .nav-count { position: absolute; top: 0; right: 14%; margin: 0; padding: 0 5px; font-size: 10px; line-height: 16px; background: #E5484D; }
  .sidebar:not(.more-open):has(.nav-item.nav-more.active) .nav-more-btn { background: transparent; color: var(--elt-accent); }
}

/* ---------- ui2: Owner → Home (js/pages/home-tab.js) ---------- */
.home-pane { max-width: 1360px; }
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.home-head h1 { margin: 0; font-size: 26px; font-weight: 700; }
.home-head p { margin: 4px 0 0; font-size: 14px; }
.home-refresh { display: flex; align-items: center; gap: 10px; font-size: 13px; }   /* kiss34 */
.home-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.home-kpi { display: flex; flex-direction: column; gap: 6px; background: var(--elt-card); border: 1px solid var(--elt-divider); border-radius: var(--ui-card-radius); padding: 18px 20px; color: var(--elt-text-1); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.home-kpi:hover { text-decoration: none; border-color: var(--elt-border); box-shadow: 0 4px 16px rgba(15, 23, 36, .06); }
.home-kpi-l { font-size: 13px; font-weight: 500; color: var(--elt-text-2); }
.home-kpi-v { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-kpi-n { font-size: 12.5px; color: var(--elt-text-3); }
.home-kpi-split:hover { border-color: var(--elt-divider); box-shadow: none; }
.home-kpi-main { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.home-kpi-main:hover { text-decoration: none; }
.home-kpi-main:hover .home-kpi-v { color: var(--elt-accent, #2563EB); }
.home-kpi-piece { color: inherit; text-decoration: none; }
.home-kpi-piece small { font-size: 15px; font-weight: 600; color: var(--elt-text-2); }
.home-kpi-piece:hover { text-decoration: none; color: var(--elt-accent, #2563EB); }
.home-kpi-sep { color: var(--elt-text-3); font-weight: 400; }
.home-kpi-p { color: inherit; text-decoration: none; white-space: nowrap; }
.home-kpi-p:hover { text-decoration: underline; color: var(--elt-text-1); }
.home-kpi-n.warn, .home-row-end .warn { color: #B45309; font-weight: 600; }
.home-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.home-col-main { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.home-col-side { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.home-card { background: var(--elt-card); border: 1px solid var(--elt-divider); border-radius: var(--ui-card-radius); overflow: hidden; }
.home-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--elt-divider); }
.home-card-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.home-card-h a { font-size: 13px; font-weight: 600; }
.home-sub { font-size: 13px; color: var(--elt-text-2); font-weight: 600; }
.home-badge { font-size: 12px; font-weight: 600; color: var(--elt-primary-ink); background: var(--elt-accent-soft); border-radius: 999px; padding: 3px 10px; }
.home-empty { padding: 22px 20px; color: var(--elt-text-3); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.home-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--elt-divider); color: var(--elt-text-1); text-decoration: none; }
.home-row:last-child { border-bottom: 0; }
.home-row:hover { background: var(--elt-card-2); text-decoration: none; }
.home-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-row-main b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row-main small { font-size: 12.5px; color: var(--elt-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row-time { flex: none; font-size: 12px; color: var(--elt-text-3); }
.home-row-time.late { color: #B42318; font-weight: 600; }
.home-row-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; }
.home-row-end small { font-size: 12px; color: var(--elt-text-3); }
.home-tag { flex: none; min-width: 72px; text-align: center; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.home-tag-blue { background: #EAF1FE; color: #1D4ED8; }
.home-tag-purple { background: #F3E8FF; color: #6D28D9; }
.home-tag-orange { background: #FEF3E2; color: #9A3412; }
.home-tag-green { background: #E7F6EC; color: #166534; }
.home-tag-red { background: #FDECEC; color: #B42318; }
.home-msg.unread b { font-weight: 800; }
.home-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--elt-accent-soft); color: var(--elt-primary-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.home-stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 18px 20px; }
.home-station { border: 1px solid var(--elt-divider); border-radius: 12px; background: var(--elt-card-2); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.home-station b { font-size: 13px; font-weight: 600; }
.home-station-n { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.home-station-n small { font-size: 12px; font-weight: 500; color: var(--elt-text-2); }
.home-station > small { font-size: 12px; color: var(--elt-text-3); }
.home-bar { height: 6px; border-radius: 99px; background: var(--elt-divider); overflow: hidden; }
.home-bar span { display: block; height: 100%; border-radius: 99px; background: var(--elt-accent); }
.home-chart { display: flex; align-items: stretch; gap: 12px; height: 200px; padding: 18px 20px 8px; }
.home-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.home-col-v { font-size: 11px; color: var(--elt-text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.home-col-b { width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--elt-accent) 28%, var(--elt-card)); }
.home-col-b.now { background: var(--elt-accent); }
.home-col small { font-size: 11px; color: var(--elt-text-3); white-space: nowrap; }
.home-foot { margin: 0; padding: 4px 20px 16px; font-size: 12px; color: var(--elt-text-3); }
@media (max-width: 600px) {
  .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-kpi { padding: 14px; }
  .home-kpi-v { font-size: 26px; }
  .home-chart { gap: 6px; }
  .home-col-v { display: none; }
  .home-tag { min-width: 0; }
}

/* ---------- ui3: CRM customer page — customers | timeline | details (js/pages/crm-tab.js renderCustomer) ---------- */
.cx { display: grid; grid-template-columns: 290px minmax(0, 1fr) 330px; gap: 0; background: var(--elt-card); border: 1px solid var(--elt-divider); border-radius: var(--ui-card-radius); overflow: hidden; min-height: calc(100vh - var(--ui-top) - 60px); }
.cx-pad { padding: 18px 20px; display: flex; align-items: center; gap: 8px; }
.cx-list { border-right: 1px solid var(--elt-divider); display: flex; flex-direction: column; min-height: 0; background: var(--elt-card); }
.cx-list-h { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--elt-divider); }
.cx-list-h h2 { margin: 0; font-size: 18px; font-weight: 700; }
.cx-list-b { overflow-y: auto; max-height: calc(100vh - var(--ui-top) - 150px); }
.cx-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid var(--elt-divider); background: none; font: inherit; color: var(--elt-text-1); text-align: left; cursor: pointer; }
.cx-row:hover { background: var(--elt-card-2); }
.cx-row.on { background: var(--elt-accent-soft); border-left-color: var(--elt-accent); }
.cx-row-av, .cx-av { flex: none; border-radius: 50%; background: var(--elt-accent-soft); color: var(--elt-primary-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cx-row-av { width: 36px; height: 36px; font-size: 12.5px; }
.cx-row-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cx-row-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-row-t .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-row-n { flex: none; min-width: 20px; height: 20px; border-radius: 10px; background: var(--elt-accent); color: var(--elt-on-accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.cx-main { min-width: 0; display: flex; flex-direction: column; background: var(--elt-background); }
.cx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 20px; background: var(--elt-card); border-bottom: 1px solid var(--elt-divider); }
.cx-av { width: 48px; height: 48px; font-size: 16px; }
.cx-head-t { flex: 1 1 220px; min-width: 0; }
.cx-head-t h1 { margin: 0; font-size: 20px; font-weight: 700; }
.cx-head-t .muted { font-size: 13px; margin-top: 2px; }
.cx-head-a { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-main .crm-msg:not(:empty) { margin: 10px 20px 0; }
.cx-tabs { display: flex; gap: 20px; padding: 0 20px; background: var(--elt-card); border-bottom: 1px solid var(--elt-divider); overflow-x: auto; }
.cx-tab { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--elt-text-2); padding: 13px 2px 11px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.cx-tab span { font-size: 12px; color: var(--elt-text-3); margin-left: 2px; }
.cx-tab.on { color: var(--elt-text-1); font-weight: 600; border-bottom-color: var(--elt-accent); }
.cx-body { flex: 1 1 auto; padding: 20px; min-width: 0; }
.cx-body .crm-lines-wrap { background: var(--elt-card); border: 1px solid var(--elt-divider); border-radius: 12px; }
.cx-tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.cx-ev { display: flex; gap: 12px; align-items: flex-start; }
.cx-badge { flex: none; width: 40px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.cx-k-blue { background: #EAF1FE; color: #1D4ED8; } .cx-k-yellow { background: #FEF9C3; color: #854D0E; } .cx-k-purple { background: #F3E8FF; color: #6D28D9; }
.cx-k-green { background: #E7F6EC; color: #166534; } .cx-k-orange { background: #FEF3E2; color: #9A3412; } .cx-k-teal { background: #E0F5F3; color: #0F6B63; } .cx-k-grey { background: #F1F5F9; color: #475569; }
.cx-ev-card { flex: 1 1 auto; min-width: 0; background: var(--elt-card); border: 1px solid var(--elt-divider); border-radius: 12px; padding: 11px 14px; }
.cx-ev-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.cx-ev-h b { font-size: 13.5px; font-weight: 600; }
.cx-ev-h time { font-size: 12px; color: var(--elt-text-3); white-space: nowrap; }
.cx-ev-card p { margin: 5px 0 0; font-size: 14px; color: var(--elt-text-2); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-ev-a { margin-top: 6px; font-size: 13px; font-weight: 600; }
.cx-compose { padding: 14px 20px; background: var(--elt-card); border-top: 1px solid var(--elt-divider); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.cx-compose .textarea { width: 100%; resize: vertical; }
.cx-compose-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cx-compose-on { display: flex; align-items: center; gap: 8px; color: var(--elt-text-2); min-width: 0; }
.cx-compose-on select { max-width: 320px; }
.cx-side { border-left: 1px solid var(--elt-divider); padding: 18px; display: flex; flex-direction: column; gap: 18px; background: var(--elt-card); min-width: 0; }
.cx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cx-stats > div { background: var(--elt-card-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.cx-stats b { font-size: 17px; font-weight: 700; }
.cx-stats span { font-size: 11.5px; color: var(--elt-text-3); }
.cx-sec { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--elt-divider); padding-top: 14px; }
.cx-sec h3 { margin: 0; font-size: 12px; font-weight: 700; color: var(--elt-text-3); text-transform: uppercase; letter-spacing: .05em; }
.cx-deal, .cx-next { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; border: 1px solid var(--elt-divider); border-radius: 10px; background: var(--elt-card); padding: 10px 12px; font: inherit; font-size: 13px; color: var(--elt-text-1); cursor: pointer; }
.cx-deal:hover, .cx-next:hover { border-color: var(--elt-border); background: var(--elt-card-2); }
.cx-deal-h { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.cx-next.late b { color: #B42318; }
.cx-details summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.cx-details summary::-webkit-details-marker { display: none; }
.cx-details summary h3::after { content: " ▸"; }
.cx-details[open] summary h3::after { content: " ▾"; }
.cx-details summary .muted { font-size: 12px; }
.cx-side .crm-form2 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1280px) {
  .cx { grid-template-columns: 260px minmax(0, 1fr); }
  .cx-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--elt-divider); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .cx-side .cx-sec { border-top: 0; padding-top: 0; }
}
@media (max-width: 860px) {
  .cx { grid-template-columns: minmax(0, 1fr); }
  .cx-list { display: none; }
  .cx-head-a .btn { flex: 1 1 auto; }
}
.cx .crm-link { color: var(--elt-accent); text-decoration: none; font-weight: 600; }

/* p8: Home → Integrations (each sync's last run; problems first, with Retry) */
.home-sync .home-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; background: var(--elt-text-3, #9aa3af); }
.home-sync.is-ok .home-dot { background: var(--elt-green, #12805c); }
.home-sync.is-bad .home-dot { background: var(--elt-red, #d92d20); }
.home-sync.is-late .home-dot { background: var(--elt-yellow, #f2b705); }
.home-sync.is-warn .home-dot { background: var(--elt-yellow, #f2b705); }   /* kiss2: ran, but not for every order */
.home-exc { padding: 10px 20px 14px; border-top: 1px solid var(--elt-line, #e6e8eb); font-size: 13px; }
.home-exc-row { margin: 4px 0; }
.home-sync.is-bad small, .home-sync.is-late small { color: var(--elt-red, #d92d20); }
.home-sync.is-off { opacity: .7; }
.home-card-alert { box-shadow: inset 3px 0 0 var(--elt-red, #d92d20); }

/* ---------- p10: one look for the same kind of button, and touch-sized buttons on tablets and phones ---------- */
/* Delete in a list or a panel: red text on no fill (solid red is kept for the "are you sure?" box) */
.btn.btn-del, .btn-del { background: transparent; border-color: transparent; color: var(--elt-red); }
.btn.btn-del:hover, .btn-del:hover { background: color-mix(in srgb, var(--elt-red) 10%, transparent); color: var(--elt-red); }
/* Remove a row: one ✕, quiet until pointed at */
.btn.btn-rm, .btn-rm { background: transparent; border-color: transparent; color: var(--elt-text-3); min-width: 32px; padding: 0 8px; }
.btn.btn-rm:hover, .btn-rm:hover { color: var(--elt-red); background: color-mix(in srgb, var(--elt-red) 8%, transparent); }
/* Touch screens (shop tablets, phones): 44 px tap targets */
@media (pointer: coarse) {
  .btn, .btn-sm { min-height: 44px; height: auto; }
  .btn-sm { padding-top: 6px; padding-bottom: 6px; }
  .btn.btn-rm { min-width: 44px; }
  .chip { min-height: 40px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
}

/* p9: tablet job additions — report a problem, job photos, Start all / Complete all */
.job-problem-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.job-problem-reason { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; cursor: pointer; }
.job-problem-reason input { width: 20px; height: 20px; }
.job-problem-reason.is-danger { border-color: var(--elt-red); }
.job-photo-pick { cursor: pointer; }
.job-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.job-photo { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid var(--elt-border); border-radius: 8px; background: var(--elt-card); cursor: pointer; text-align: left; }
.job-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.job-photo span { font-size: 32px; text-align: center; padding: 18px 0; }
.job-photo small { font-size: 11px; color: var(--elt-placeholder); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-photo-view { max-width: min(960px, 96vw); }
.stage-all-block .step-btns { flex-wrap: wrap; }
.problem-btn { margin-left: 8px; }
.home-problems .home-problem { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--elt-divider); }
.home-problems .home-problem:first-of-type { border-top: 0; }
.home-problems .home-problem > div { flex: 1; min-width: 0; }
.home-problems .home-problem.is-emergency b { color: var(--elt-red); }
