/* TED Ops unified visual pass.
   Loaded after page-specific styles so older pages share the same shell language. */

body.ted-unified {
  --r: 8px;
  --r2: 7px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

body.ted-unified .topbar {
  min-height: 52px;
  background: var(--rail);
  color: var(--rail-t);
  border-bottom: 2px solid var(--accent);
  box-shadow: none;
}

body.ted-unified .ted-topbar,
body.ted-unified .topbar {
  position: relative;
  z-index: 30;
}

body.ted-unified .ted-topbar-logo,
body.ted-unified .logo,
body.ted-unified .nav-logo-text,
body.ted-unified .sb-logo-text {
  letter-spacing: 0;
}

body.ted-unified .logo,
body.ted-unified .ted-logo {
  color: var(--rail-accent);
  font-family: var(--mono);
  font-weight: 800;
}

body.ted-unified .logo span,
body.ted-unified .ttitle,
body.ted-unified .tuser,
body.ted-unified .page-sub {
  color: var(--rail-t2);
}

body.ted-unified .home-link,
body.ted-unified .logout-btn,
body.ted-unified .ted-topbar-btn {
  border-color: var(--rail-border);
  color: var(--rail-t2);
  background: transparent;
  border-radius: var(--r2);
}

body.ted-unified .home-link:hover,
body.ted-unified .logout-btn:hover,
body.ted-unified .ted-topbar-btn:hover {
  color: var(--rail-t);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}

body.ted-unified .trole,
body.ted-unified .role-pill,
body.ted-unified .ted-role {
  background: var(--rail-accent-bg);
  color: var(--rail-accent);
  border: 1px solid rgba(45,212,191,.25);
  border-radius: 99px;
}

body.ted-unified .card,
body.ted-unified .panel,
body.ted-unified .kpi,
body.ted-unified .stock-card,
body.ted-unified .modal,
body.ted-unified .sc,
body.ted-unified .ted-card {
  background: var(--card);
  border-color: var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
}

body.ted-unified .page,
body.ted-unified .wrap,
body.ted-unified .page-body {
  color: var(--ink);
}

body.ted-unified h1,
body.ted-unified h2,
body.ted-unified h3,
body.ted-unified .title,
body.ted-unified .page-title,
body.ted-unified .panel-title,
body.ted-unified .section-title {
  letter-spacing: 0;
  color: var(--ink);
}

body.ted-unified .sub,
body.ted-unified .page-sub,
body.ted-unified .panel-sub,
body.ted-unified .app-desc,
body.ted-unified .kpi-sub,
body.ted-unified .fh {
  color: var(--t3);
}

body.ted-unified .btn,
body.ted-unified button.btn {
  border-radius: var(--r2);
  font-family: var(--font);
  font-weight: 700;
  min-height: 32px;
  justify-content: center;
}

body.ted-unified .btn-p,
body.ted-unified .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

body.ted-unified .btn-p:hover,
body.ted-unified .btn-primary:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
}

body.ted-unified .btn-h,
body.ted-unified .btn-g,
body.ted-unified .btn-ghost {
  background: var(--card);
  color: var(--t2);
  border: 1.5px solid var(--border);
}

body.ted-unified .btn-h:hover,
body.ted-unified .btn-g:hover,
body.ted-unified .btn-ghost:hover {
  color: var(--ink);
  border-color: var(--border2);
  background: var(--card2);
}

body.ted-unified input,
body.ted-unified select,
body.ted-unified textarea {
  border-radius: var(--r2);
  font-family: var(--font);
}

body.ted-unified input:focus,
body.ted-unified select:focus,
body.ted-unified textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,.10);
  outline: none;
}

body.ted-unified table th {
  background: var(--card2);
  color: var(--t2);
  letter-spacing: .3px;
}

body.ted-unified table td {
  border-color: var(--border);
}

body.ted-unified .chip.on,
body.ted-unified .cat-tab.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

body.ted-unified .wrap,
body.ted-unified .page-body,
body.ted-unified .main {
  scrollbar-color: var(--border2) transparent;
}

body.ted-unified .nav,
body.ted-unified .sidebar,
body.ted-unified .sb {
  background: var(--rail);
}

body.ted-unified .nav-link.active,
body.ted-unified .sb-btn.active,
body.ted-unified .sb-btn.on {
  background: var(--rail-accent-bg);
  color: var(--rail-accent);
}

body.ted-unified .nav-link:hover,
body.ted-unified .sidebar .sb-btn:hover,
body.ted-unified .sb .sb-btn:hover {
  background: rgba(255,255,255,.07);
  color: var(--rail-t);
}

body.ted-unified .toolbar,
body.ted-unified .tb-actions,
body.ted-unified .header-row,
body.ted-unified .cat-tabs {
  min-width: 0;
}

body.ted-unified .toolbar {
  align-items: center;
}

body.ted-unified .search,
body.ted-unified .fi,
body.ted-unified .ted-input {
  min-height: 34px;
}

body.ted-unified .modal-bg {
  backdrop-filter: blur(2px);
}

body.ted-unified .modal {
  overflow: hidden;
}

body.quote-app .sb,
body.quote-app .li-rail {
  background: var(--rail);
}

body.ted-unified {
  --ico-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='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E");
  --ico-quotes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l4 4v14H7z'/%3E%3Cpath d='M15 3v5h5'/%3E%3Cpath d='M10 12h7M10 16h7'/%3E%3C/svg%3E");
  --ico-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='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --ico-edit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4l11-11-4-4L4 16z'/%3E%3Cpath d='m13 7 4 4'/%3E%3C/svg%3E");
  --ico-send: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2 11 13'/%3E%3Cpath d='m22 2-7 20-4-9-9-4z'/%3E%3C/svg%3E");
  --ico-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='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 8-9-5-9 5 9 5z'/%3E%3Cpath d='M3 8v8l9 5 9-5V8'/%3E%3Cpath d='M12 13v8'/%3E%3C/svg%3E");
  --ico-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5'/%3E%3Cpath d='M4 19h16'/%3E%3Cpath d='M8 16v-5M12 16V8M16 16v-9'/%3E%3C/svg%3E");
  --ico-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a8 8 0 0 0 0-6M4.6 9a8 8 0 0 0 0 6M9 4.6a8 8 0 0 0 6 0M15 19.4a8 8 0 0 0-6 0'/%3E%3C/svg%3E");
  --ico-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='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9.5' cy='7' r='4'/%3E%3Cpath d='M17 11a4 4 0 0 0 0-8M21 21v-2a4 4 0 0 0-3-3.9'/%3E%3C/svg%3E");
  --ico-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13 11 4H4v7l9 9z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E");
  --ico-database: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5'/%3E%3Cpath d='M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3C/svg%3E");
  --ico-tool: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5 5L3 18l3 3 6.7-6.7a4 4 0 0 0 5-5l-2.4 2.4-2-2z'/%3E%3C/svg%3E");
  --ico-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 21h20z'/%3E%3Cpath d='M12 9v5M12 18h.01'/%3E%3C/svg%3E");
  --ico-performance: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17 9 11l4 4 7-8'/%3E%3Cpath d='M14 7h6v6'/%3E%3C/svg%3E");
  --ico-id: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='M6 16c.8-1.3 2-2 3-2s2.2.7 3 2M14 10h4M14 14h4'/%3E%3C/svg%3E");
  --ico-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='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
  --ico-ruler: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20 20 4l-4-4L0 16z' transform='translate(2 2)'/%3E%3Cpath d='M14 6l2 2M11 9l2 2M8 12l2 2M5 15l2 2'/%3E%3C/svg%3E");
}

body.quote-app .sb-btn-icon {
  display: none;
}

body.quote-app .sb-btn::before,
body.ted-unified .nav-link::before,
body.ted-unified .sidebar .sb-btn::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  opacity: .9;
  -webkit-mask: var(--nav-icon, var(--ico-quotes)) center / contain no-repeat;
  mask: var(--nav-icon, var(--ico-quotes)) center / contain no-repeat;
}

body.quote-app .sb-btn { gap: 9px; }
body.quote-app .sb-btn[href="index.html"] { --nav-icon: var(--ico-home); }
body.quote-app #sbtn-quotes { --nav-icon: var(--ico-quotes); }
body.quote-app #sbtn-new { --nav-icon: var(--ico-plus); }
body.quote-app #sb-trello-link { --nav-icon: var(--ico-send); }
body.quote-app #sbtn-products { --nav-icon: var(--ico-tag); }
body.quote-app #sb-dash-link { --nav-icon: var(--ico-chart); }
body.quote-app #sb-inv-link { --nav-icon: var(--ico-box); }
body.quote-app #btn-settings { --nav-icon: var(--ico-settings); }
body.quote-app #btn-clients { --nav-icon: var(--ico-users); }
body.quote-app #btn-materials { --nav-icon: var(--ico-database); }
body.quote-app #btn-hardware { --nav-icon: var(--ico-tool); }

body.ted-unified .nav-link-icon { display: none; }
body.ted-unified #nav-dashboard { --nav-icon: var(--ico-chart); }
body.ted-unified #nav-quotes { --nav-icon: var(--ico-quotes); }
body.ted-unified #nav-app { --nav-icon: var(--ico-edit); }
body.ted-unified #nav-stock { --nav-icon: var(--ico-box); }
body.ted-unified #nav-order { --nav-icon: var(--ico-send); }
body.ted-unified #nav-use { --nav-icon: var(--ico-tool); }
body.ted-unified #nav-counts { --nav-icon: var(--ico-chart); }
body.ted-unified #nav-reports { --nav-icon: var(--ico-performance); }
body.ted-unified #nav-settings { --nav-icon: var(--ico-settings); }
body.ted-unified #nav-log { --nav-icon: var(--ico-warning); }
body.ted-unified #nav-stats { --nav-icon: var(--ico-chart); }

body.ted-unified .app-icon {
  color: #fff;
  font-size: 0;
  box-shadow: 0 8px 18px rgba(13,148,136,.16);
}

body.ted-unified .app-icon::before {
  content: "";
  width: 24px;
  height: 24px;
  display: block;
  margin: auto;
  background: currentColor;
  -webkit-mask: var(--app-icon, var(--ico-quotes)) center / contain no-repeat;
  mask: var(--app-icon, var(--ico-quotes)) center / contain no-repeat;
}

body.ted-unified .app-quotes { --app-icon: var(--ico-quotes); }
body.ted-unified .app-inventory { --app-icon: var(--ico-box); }
body.ted-unified .app-dashboard { --app-icon: var(--ico-chart); }
body.ted-unified .app-trello { --app-icon: var(--ico-send); }
body.ted-unified .app-performance { --app-icon: var(--ico-performance); }
body.ted-unified .app-team { --app-icon: var(--ico-users); }
body.ted-unified .app-employees { --app-icon: var(--ico-id); }
body.ted-unified .app-issues { --app-icon: var(--ico-warning); }
body.ted-unified .app-design { --app-icon: var(--ico-edit); }

body.ted-unified .app-icon.teal {
  background: linear-gradient(135deg, var(--accent), #0f766e);
  border-color: rgba(15,118,110,.35);
}

body.ted-unified .app-icon.slate {
  background: linear-gradient(135deg, #334155, #111827);
  border-color: rgba(17,24,39,.25);
}

body.ted-unified .app-icon.amber {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-color: rgba(180,83,9,.28);
}

body.ted-unified .app-icon.red,
body.ted-unified .app-icon.rose {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: rgba(185,28,28,.25);
}

body.ted-unified .ted-inline-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 8px 18px rgba(180,83,9,.16);
}

body.ted-unified .ted-inline-icon::before {
  content: "";
  width: 21px;
  height: 21px;
  display: block;
  background: #fff;
  -webkit-mask: var(--inline-icon, var(--ico-warning)) center / contain no-repeat;
  mask: var(--inline-icon, var(--ico-warning)) center / contain no-repeat;
}

body.ted-unified .ted-inline-warning { --inline-icon: var(--ico-warning); }

body.ted-unified .ted-option-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  background: currentColor;
  -webkit-mask: var(--option-icon, var(--ico-tool)) center / contain no-repeat;
  mask: var(--option-icon, var(--ico-tool)) center / contain no-repeat;
}

body.ted-unified .ted-empty-mask {
  font-size: 0 !important;
  background: var(--accent) !important;
  -webkit-mask: var(--empty-icon, var(--ico-quotes)) center / 28px 28px no-repeat;
  mask: var(--empty-icon, var(--ico-quotes)) center / 28px 28px no-repeat;
}

body.quote-app .topbar {
  background: var(--card);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

body.quote-app .tb-title {
  color: var(--ink);
}

body.quote-app .tb-r {
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.quote-app .qc,
body.quote-app .qc2,
body.quote-app .sc,
body.quote-app .empty,
body.quote-app .nqm-box,
body.quote-app .mo,
body.quote-app .quick-card {
  border-radius: var(--r);
}

@media (max-width: 900px) {
  body.ted-unified .panels,
  body.ted-unified .panels.wide,
  body.ted-unified .kpi-grid,
  body.ted-unified .stock-grid,
  body.ted-unified .app-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body.ted-unified {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.ted-unified .ted-topbar {
    min-height: 54px;
    height: auto;
    padding: 9px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  body.ted-unified #mob-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    border: 1px solid var(--rail-border) !important;
    border-radius: var(--r2);
  }
  body.ted-unified .ted-topbar-brand {
    min-width: 0;
    flex: 1;
  }
  body.ted-unified .ted-topbar-title {
    max-width: 58vw;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  body.ted-unified .ted-topbar-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  body.ted-unified .ted-topbar-name {
    max-width: 42vw;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  body.ted-unified .page,
  body.ted-unified .wrap,
  body.ted-unified .page-body {
    width: 100%;
    max-width: none;
    padding: 14px;
  }
  body.ted-unified .header-row,
  body.ted-unified .topbar {
    align-items: flex-start;
    gap: 10px;
  }
  body.ted-unified .header-row,
  body.ted-unified .tb-actions {
    flex-direction: column;
  }
  body.ted-unified .tb-actions,
  body.ted-unified .header-row > div:last-child,
  body.ted-unified .toolbar,
  body.ted-unified .cat-tabs {
    width: 100%;
    justify-content: flex-start !important;
  }
  body.ted-unified .search,
  body.ted-unified .toolbar input,
  body.ted-unified .toolbar select {
    width: 100%;
    min-width: 0;
  }
  body.ted-unified .kpi-bar,
  body.ted-unified .kpi-grid,
  body.ted-unified .stock-grid,
  body.ted-unified .app-grid,
  body.ted-unified .panels,
  body.ted-unified .panels.wide,
  body.ted-unified .sg2 {
    grid-template-columns: 1fr !important;
  }
  body.ted-unified .panel,
  body.ted-unified .card,
  body.ted-unified .kpi {
    min-width: 0;
  }
  body.ted-unified table {
    min-width: 640px;
  }
  body.ted-unified .panel:has(table),
  body.ted-unified .table-wrap,
  body.ted-unified .main:has(table) {
    overflow-x: auto;
  }
  body.ted-unified .modal-bg {
    align-items: flex-end;
    padding: 0;
  }
  body.ted-unified .modal {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 8px);
    min-height: 0;
    border-radius: 16px 16px 0 0;
  }
  body.ted-unified .mb,
  body.ted-unified .modal-b,
  body.ted-unified .modal-body,
  body.ted-unified .task-modal-body {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.ted-unified .mf,
  body.ted-unified .modal-f,
  body.ted-unified .task-modal-actions {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  body.ted-unified .shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    flex-direction: column;
  }
  body.ted-unified .shell .nav {
    width: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--rail-border);
  }
  body.ted-unified .shell .nav-brand,
  body.ted-unified .shell .nav-foot,
  body.ted-unified .shell .nav-section {
    display: none;
  }
  body.ted-unified .shell .nav-links {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
  }
  body.ted-unified .shell .nav-link {
    width: auto;
    flex: 0 0 auto;
    border-radius: var(--r2);
    white-space: nowrap;
  }
  body.ted-unified .shell .main {
    min-height: 0;
    overflow: visible;
  }
  body.ted-unified .shell .topbar {
    height: auto;
    min-height: 52px;
    padding: 12px 14px;
  }
  body.quote-app .tb-r {
    max-width: 100%;
    overflow-x: auto;
  }
  body.quote-app .q-summary {
    grid-template-columns: 1fr 1fr;
  }
  body.quote-app .q-stat {
    padding: 10px 12px;
  }
}

@media (max-width: 420px) {
  body.ted-unified .ted-topbar-title {
    max-width: 48vw;
  }
  body.ted-unified .btn,
  body.ted-unified .ted-topbar-btn {
    padding-left: 10px;
    padding-right: 10px;
  }
  body.quote-app .q-summary {
    grid-template-columns: 1fr;
  }
}

/* 2026-08-24 premium operations shell refresh */
body.ted-unified {
  --ops-bg: #f7f5f0;
  --ops-card: #ffffff;
  --ops-card-soft: #fbfaf7;
  --ops-line: #e7e0d8;
  --ops-line-strong: #d8d0c6;
  --ops-ink: #111827;
  --ops-muted: #8a837b;
  --ops-shadow: 0 18px 42px rgba(15, 23, 42, .08);
  --ops-shadow-sm: 0 8px 22px rgba(15, 23, 42, .06);
  --ops-hero: linear-gradient(135deg, #111827 0%, #123f3b 58%, #0f766e 100%);
  background:
    radial-gradient(circle at top right, rgba(13, 148, 136, .08), transparent 34rem),
    var(--ops-bg);
  color: var(--ops-ink);
}

body.ted-unified .ted-topbar {
  border-bottom-color: rgba(20, 184, 166, .8);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}

body.ted-unified .card,
body.ted-unified .panel,
body.ted-unified .tile,
body.ted-unified .metric,
body.ted-unified .kpi,
body.ted-unified .stat,
body.ted-unified .summary-card,
body.ted-unified .command-center,
body.ted-unified .lead-performance,
body.ted-unified .daily-risk,
body.ted-unified .focus-band,
body.ted-unified .owner-focus,
body.ted-unified .section-card,
body.ted-unified .app-card,
body.ted-unified .quote-card,
body.ted-unified .table-card {
  background: var(--ops-card);
  border-color: var(--ops-line);
  border-radius: 16px;
  box-shadow: var(--ops-shadow-sm);
}

body.ted-unified .card:hover,
body.ted-unified .panel:hover,
body.ted-unified .app-card:hover,
body.ted-unified .command-tile:hover,
body.ted-unified .lead-metric:hover {
  box-shadow: var(--ops-shadow);
}

body.ted-unified .panel-head,
body.ted-unified .queue-group-head,
body.ted-unified .lane-head,
body.ted-unified .fix-head,
body.ted-unified th {
  background: #f1eee8;
  border-color: var(--ops-line);
}

body.ted-unified .btn,
body.ted-unified button,
body.ted-unified .ted-topbar-btn,
body.ted-unified .tab,
body.ted-unified .pill {
  border-radius: 999px;
}

body.ted-unified input,
body.ted-unified select,
body.ted-unified textarea,
body.ted-unified .fi {
  border-color: var(--ops-line-strong);
  border-radius: 10px;
}

body.ted-home .wrap {
  max-width: 1240px;
  padding-top: 32px;
}

body.ted-home .hero {
  position: relative;
  min-height: 156px;
  align-items: center;
  padding: 34px 40px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 44%, rgba(255, 255, 255, .10) 0, rgba(255, 255, 255, .10) 5.5rem, transparent 5.7rem),
    radial-gradient(circle at 91% 42%, rgba(255, 255, 255, .08) 0, rgba(255, 255, 255, .08) 9rem, transparent 9.2rem),
    var(--ops-hero);
  box-shadow: var(--ops-shadow);
}

body.ted-home .hero h1 {
  color: #ffffff;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 8px;
}

body.ted-home .hero p,
body.ted-home .motto {
  color: rgba(255, 255, 255, .78);
}

body.ted-home .motto strong {
  color: #2dd4bf;
}

body.ted-home .trial-link {
  border-color: rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

body.ted-home .alerts {
  margin-bottom: 30px;
}

body.ted-home .alert-chip {
  border-radius: 16px;
  box-shadow: var(--ops-shadow-sm);
}

body.ted-home .section {
  margin-bottom: 32px;
}

body.ted-home .section-title {
  color: #111827;
  font-size: 12px;
  letter-spacing: 1px;
}

body.ted-home .section-sub {
  font-size: 12px;
}

body.ted-home .app-grid {
  gap: 20px;
}

body.ted-home .app-card {
  min-height: 126px;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  padding: 22px;
  border-width: 1px;
  border-radius: 18px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

body.ted-home .app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 148, 136, .55);
}

body.ted-home .app-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

body.ted-home .app-name {
  font-size: 16px;
  margin-bottom: 5px;
}

body.ted-home .app-desc {
  color: #817a72;
  font-size: 13px;
}

body.ted-home .owner-focus {
  border-left: 4px solid var(--accent, #0d9488);
}

body.ted-dashboard .shell,
body.ted-dashboard .main,
body.ted-performance .page,
body.ted-workshop-control .page,
body.ted-my-performance .page,
body.ted-inventory .page,
body.ted-issues .page,
body.ted-maintenance .page,
body.ted-site-work .page,
body.ted-employees .page {
  background: var(--ops-bg);
}

body.ted-dashboard .shell .nav {
  box-shadow: 12px 0 34px rgba(15, 23, 42, .10);
}

body.ted-dashboard .page-body,
body.ted-performance .page,
body.ted-workshop-control .page,
body.ted-my-performance .page,
body.ted-inventory .page,
body.ted-issues .page,
body.ted-maintenance .page,
body.ted-site-work .page,
body.ted-employees .page {
  padding-top: 28px;
}

body.ted-workshop-control .head,
body.ted-my-performance .head,
body.ted-performance .perf-head,
body.ted-inventory .head,
body.ted-issues .head,
body.ted-maintenance .head,
body.ted-site-work .head,
body.ted-employees .head {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 26px 30px;
  margin-bottom: 22px;
  border-radius: 20px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 42%, rgba(255, 255, 255, .11) 0, rgba(255, 255, 255, .11) 6rem, transparent 6.2rem),
    var(--ops-hero);
  box-shadow: var(--ops-shadow);
}

body.ted-workshop-control .head h1,
body.ted-my-performance .head h1,
body.ted-performance .perf-head h1,
body.ted-inventory .head h1,
body.ted-issues .head h1,
body.ted-maintenance .head h1,
body.ted-site-work .head h1,
body.ted-employees .head h1 {
  color: #ffffff;
  font-size: clamp(24px, 3vw, 36px);
}

body.ted-workshop-control .head .sub,
body.ted-my-performance .head .sub,
body.ted-performance .perf-head .muted,
body.ted-inventory .head .sub,
body.ted-issues .head .sub,
body.ted-maintenance .head .sub,
body.ted-site-work .head .sub,
body.ted-employees .head .sub {
  color: rgba(255, 255, 255, .76);
}

body.ted-workshop-control .head .btn,
body.ted-performance .perf-head .btn,
body.ted-site-work .head .btn,
body.ted-maintenance .head .btn,
body.ted-inventory .head .btn,
body.ted-issues .head .btn,
body.ted-employees .head .btn {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

body.ted-performance .kpi-row,
body.ted-performance .metric-grid,
body.ted-performance .chart-grid,
body.ted-workshop-control .command-grid,
body.ted-my-performance .grid,
body.ted-dashboard .metric-grid,
body.ted-dashboard .cards-grid {
  gap: 16px;
}

body.ted-performance .kpi,
body.ted-performance .metric,
body.ted-my-performance .stat,
body.ted-workshop-control .command-tile,
body.ted-dashboard .metric,
body.ted-dashboard .stat-card {
  min-height: 106px;
  padding: 18px;
}

body.ted-performance .tabs,
body.ted-dashboard .periods,
body.ted-workshop-control .tabs {
  gap: 8px;
}

body.ted-performance .tab.on,
body.ted-dashboard .period.on,
body.ted-workshop-control .tab.on {
  box-shadow: 0 8px 18px rgba(13, 148, 136, .22);
}

body.ted-unified table {
  border-collapse: separate;
  border-spacing: 0;
}

body.ted-unified tr {
  border-color: var(--ops-line);
}

body.ted-unified .modal {
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .26);
}

@media (max-width: 760px) {
  body.ted-home .wrap {
    padding: 18px 14px 28px;
  }

  body.ted-home .hero {
    min-height: 132px;
    padding: 24px 22px;
    border-radius: 18px;
  }

  body.ted-home .hero h1 {
    font-size: 28px;
  }

  body.ted-home .app-card {
    min-height: 112px;
    grid-template-columns: 50px 1fr;
    padding: 18px;
  }

  body.ted-home .app-icon {
    width: 48px;
    height: 48px;
  }

  body.ted-workshop-control .head,
  body.ted-my-performance .head,
  body.ted-performance .perf-head,
  body.ted-inventory .head,
  body.ted-issues .head,
  body.ted-maintenance .head,
  body.ted-site-work .head,
  body.ted-employees .head {
    display: block;
    padding: 22px;
    border-radius: 18px;
  }

  body.ted-workshop-control .head .toolbar,
  body.ted-performance .perf-head .filters,
  body.ted-site-work .head .toolbar,
  body.ted-maintenance .head .toolbar,
  body.ted-inventory .head .toolbar,
  body.ted-issues .head .toolbar,
  body.ted-employees .head .toolbar {
    margin-top: 14px;
  }
}

/* 2026-08-30 shared topbar normalization */
body.ted-unified .ted-topbar {
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--rail);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
  overflow: visible;
}

body.ted-unified .ted-topbar-brand {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

body.ted-unified .ted-topbar-logo {
  flex: 0 0 auto;
  color: var(--rail-accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

body.ted-unified .ted-topbar-sep {
  color: rgba(221, 225, 240, .34);
}

body.ted-unified .ted-topbar-title {
  min-width: 0;
  overflow: hidden;
  color: var(--rail-t2);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ted-unified .ted-topbar-right {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

body.ted-unified .ted-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 240px;
}

body.ted-unified .ted-topbar-name {
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  color: var(--rail-t);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ted-unified .ted-topbar-role {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid rgba(45, 212, 191, .32);
  border-radius: 999px;
  background: rgba(45, 212, 191, .12);
  color: var(--rail-accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .4px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

body.ted-unified .ted-topbar-btn,
body.ted-unified .notif-bell {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  border: 1px solid var(--rail-border);
  border-radius: 8px;
  background: transparent;
  color: var(--rail-t2);
  box-shadow: none;
}

body.ted-unified .ted-topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

body.ted-unified .ted-topbar-btn:hover,
body.ted-unified .notif-bell:hover {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
  color: var(--rail-t);
}

body.ted-unified .notif-wrap {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

body.ted-unified .notif-bell {
  width: 34px;
  padding: 0;
}

@media (max-width: 720px) {
  body.ted-unified .ted-topbar {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }

  body.ted-unified .ted-topbar-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.ted-unified .ted-topbar-right::-webkit-scrollbar {
    display: none;
  }

  body.ted-unified .ted-topbar-user {
    max-width: 52vw;
  }

  body.ted-unified .ted-topbar-name {
    max-width: 30vw;
  }
}

@media (max-width: 420px) {
  body.ted-unified .ted-topbar-name {
    display: none;
  }
}
