/* ALLMIGHT marketing: realistic software examples. Every selector is scoped under .am-app. */

.am-app {
  --am-bg: #f3f3f0;
  --am-panel: #ffffff;
  --am-ink: #15171b;
  --am-ink-2: #3a3e45;
  --am-muted: #6c7078;
  --am-rule: #e1e1db;
  --am-rule-2: #edede8;
  --am-hover: #f6f6f2;
  --am-accent: #ff5426;
  --am-accent-ink: #c73a12;
  --am-accent-soft: #fff0eb;
  --am-ok: #1b7f49;
  --am-ok-soft: #e6f4ec;
  --am-warn: #a96200;
  --am-warn-soft: #fdf1dc;
  --am-bad: #c22f27;
  --am-bad-soft: #fbe7e5;
  --am-info: #2a5bc7;
  --am-info-soft: #e8eefb;
  --am-labor: #4b5563;
  --am-vp: #0b0d10;
  --am-vp-2: #11151a;
  --am-vp-grid: #1c222a;
  --am-vp-ink: #d6dbe1;
  --am-vp-muted: #7b8591;
  --am-cyan: #63c7ff;
  --am-radius: 10px;
  container-type: inline-size;
  container-name: am;
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  color: var(--am-ink);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.am-app *, .am-app *::before, .am-app *::after { box-sizing: border-box; }
.am-app button, .am-app input, .am-app select { font: inherit; color: inherit; letter-spacing: inherit; }
.am-app svg { display: block; }

.am-app.am-app--compact { width: 1040px; height: 620px; max-width: none; }
.am-app.am-app--static { pointer-events: none; user-select: none; }
.am-app.am-app--static :disabled { opacity: 1; cursor: default; -webkit-text-fill-color: currentColor; }

/* ---------- frame ---------- */
.am-app .am-frame {
  display: flex;
  flex-direction: column;
  height: 600px;
  width: 100%;
  overflow: hidden;
  background: var(--am-bg);
  border: 1px solid rgba(20, 22, 26, 0.14);
  border-radius: var(--am-radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 24px 60px -28px rgba(0, 0, 0, 0.45);
}
.am-app.am-app--compact .am-frame { height: 100%; }
.am-app .am-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  background: var(--am-panel);
  border-bottom: 1px solid var(--am-rule);
  min-width: 0;
}
.am-app .am-bar__mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--am-ink);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.am-app .am-bar__crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 12.5px; }
.am-app .am-crumb { color: var(--am-muted); overflow: hidden; text-overflow: ellipsis; }
.am-app .am-crumb--now { color: var(--am-ink); font-weight: 600; }
.am-app .am-crumb__sep { color: #b9bbb5; }
.am-app .am-bar__spacer { flex: 1 1 auto; }
.am-app .am-bar__sel { font-size: 12px; color: var(--am-muted); font-variant-numeric: tabular-nums; }
.am-app .am-demo {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--am-rule);
  border-radius: 999px;
  background: var(--am-bg);
  color: var(--am-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.am-app .am-demo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--am-accent); }
.am-app .am-body { flex: 1 1 auto; min-height: 0; padding: 12px; display: flex; flex-direction: column; }
.am-app .am-body > * { flex: 1 1 auto; min-height: 0; }

/* ---------- shared bits ---------- */
.am-app .am-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.am-app .am-card { background: var(--am-panel); border: 1px solid var(--am-rule); border-radius: 8px; min-width: 0; }
.am-app .am-scroll { overflow: auto; min-height: 0; min-width: 0; overscroll-behavior: contain; }
.am-app .am-scroll:focus-visible { outline: 2px solid var(--am-accent); outline-offset: -2px; }
.am-app .am-muted { color: var(--am-muted); }
.am-app .am-small { font-size: 11px; }
.am-app .am-strong { font-weight: 600; }
.am-app .am-nowrap { white-space: nowrap; }
.am-app .am-r { text-align: right; }
.am-app .am-text-warn { color: var(--am-warn); }
.am-app .am-text-bad { color: var(--am-bad); }
.am-app .am-dot { display: inline-block; width: 3px; height: 3px; margin: 0 8px; border-radius: 50%; background: #b6b8b2; vertical-align: middle; }

.am-app .am-head { flex: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 10px; min-width: 0; }
.am-app .am-head__main { min-width: 0; }
.am-app .am-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--am-muted); font-weight: 600; letter-spacing: 0.03em; }
.am-app .am-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }
.am-app .am-title--sm { font-size: 15px; }
.am-app .am-meta { font-size: 12px; color: var(--am-muted); margin-top: 3px; }
.am-app .am-head__stats { display: flex; gap: 6px; flex: none; }
.am-app .am-stat { min-width: 92px; padding: 6px 10px; background: var(--am-panel); border: 1px solid var(--am-rule); border-radius: 7px; }
.am-app .am-stat span { display: block; font-size: 10.5px; color: var(--am-muted); }
.am-app .am-stat b { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.am-app .am-kpis { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.am-app .am-kpi { padding: 8px 11px; background: var(--am-panel); border: 1px solid var(--am-rule); border-radius: 8px; min-width: 0; }
.am-app .am-kpi span { display: block; font-size: 11px; color: var(--am-muted); }
.am-app .am-kpi b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 1px; }
.am-app .am-kpi em { display: block; font-style: normal; font-size: 10.5px; color: var(--am-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-app .am-kpi--warn b { color: var(--am-warn); }

.am-app .am-split-main { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 10px; min-height: 0; }
.am-app .am-side { padding: 12px; overflow: auto; min-height: 0; }
.am-app .am-side__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.am-app .am-side__sub { font-size: 11px; font-weight: 600; color: var(--am-muted); letter-spacing: 0.03em; margin: 12px 0 5px; }
.am-app .am-side__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11px; }

/* tables */
.am-app .am-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.am-app .am-table th, .am-app .am-table td { padding: 6px 9px; border-bottom: 1px solid var(--am-rule-2); vertical-align: middle; }
.am-app .am-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #fafaf8; color: var(--am-muted);
  font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--am-rule);
}
.am-app .am-table thead th.am-r { text-align: right; }
.am-app .am-table tfoot th, .am-app .am-table tfoot td { position: sticky; bottom: 0; background: #fafaf8; border-top: 1px solid var(--am-rule); border-bottom: 0; font-size: 12px; }
.am-app .am-table tfoot th { text-align: left; }
.am-app .am-table tbody tr:last-child td { border-bottom: 0; }
.am-app .am-table--mini th, .am-app .am-table--mini td { padding: 4px 6px; font-size: 12px; }
.am-app .am-table--mini thead th { position: static; background: transparent; font-size: 10.5px; }
.am-app .am-tr-total td { font-weight: 600; border-top: 1px solid var(--am-rule); }
.am-app .am-empty { padding: 28px; text-align: center; color: var(--am-muted); }
.am-app .am-row { cursor: pointer; }
.am-app .am-row:hover td { background: var(--am-hover); }
.am-app .am-row--sel td { background: var(--am-accent-soft); }
.am-app .am-row--sel td:first-child { box-shadow: inset 2px 0 0 var(--am-accent); }
.am-app .am-rowbtn { padding: 0; border: 0; background: none; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.am-app .am-rowbtn:focus-visible { outline: 2px solid var(--am-accent); outline-offset: 2px; border-radius: 2px; }

/* inputs */
.am-app .am-input {
  height: 26px; padding: 0 7px;
  border: 1px solid var(--am-rule); border-radius: 5px;
  background: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums;
  min-width: 0;
}
.am-app .am-input:hover { border-color: #cfd0ca; }
.am-app .am-input:focus { outline: none; border-color: var(--am-accent); box-shadow: 0 0 0 3px rgba(255, 84, 38, 0.16); }
.am-app .am-input--num { width: 78px; text-align: right; }
.am-app .am-input--hrs { width: 52px; }
.am-app .am-input--bad, .am-app .am-input--bad:focus { border-color: var(--am-bad); background: var(--am-bad-soft); box-shadow: none; }
.am-app .am-input--over { border-color: var(--am-warn); background: var(--am-warn-soft); }
.am-app .am-select { padding-right: 4px; }

/* buttons, chips, pills, tags */
.am-app .am-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 28px; padding: 0 11px;
  border: 1px solid var(--am-ink); border-radius: 6px;
  background: var(--am-ink); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.am-app .am-btn:hover { background: #2a2d33; }
.am-app .am-btn:focus-visible, .am-app .am-chip:focus-visible, .am-app .am-link:focus-visible { outline: 2px solid var(--am-accent); outline-offset: 2px; }
.am-app .am-btn--ghost { background: #fff; color: var(--am-ink); border-color: var(--am-rule); }
.am-app .am-btn--ghost:hover { background: var(--am-hover); }
.am-app .am-btn--primary { background: var(--am-accent); border-color: var(--am-accent); color: #fff; min-width: 74px; }
.am-app .am-btn--primary:hover { background: #ee4518; }
.am-app .am-btn--sm { height: 24px; padding: 0 8px; font-size: 11px; }
.am-app .am-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--am-rule); border-radius: 999px; background: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.am-app .am-chip[aria-pressed="true"] { background: var(--am-ink); border-color: var(--am-ink); color: #fff; }
.am-app .am-chip__n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--am-warn-soft); color: var(--am-warn); font-size: 10.5px; }
.am-app .am-chip[aria-pressed="true"] .am-chip__n { background: var(--am-accent); color: #fff; }
.am-app .am-chip--sm { height: 24px; font-size: 11px; padding: 0 8px; }
.am-app .am-pill { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; white-space: nowrap; letter-spacing: 0.01em; }
.am-app .am-pill--ok { background: var(--am-ok-soft); color: var(--am-ok); }
.am-app .am-pill--warn { background: var(--am-warn-soft); color: var(--am-warn); }
.am-app .am-pill--bad { background: var(--am-bad-soft); color: var(--am-bad); }
.am-app .am-pill--info { background: var(--am-info-soft); color: var(--am-info); }
.am-app .am-pill--muted { background: #ededea; color: var(--am-muted); }
.am-app .am-tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; }
.am-app .am-tag--mat { background: var(--am-info-soft); color: var(--am-info); }
.am-app .am-tag--labor { background: #eceeef; color: var(--am-labor); }
.am-app .am-link { border: 1px solid var(--am-rule); background: #fff; border-radius: 6px; padding: 3px 8px; font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--am-info); }
.am-app .am-link:hover { background: var(--am-info-soft); }
.am-app .am-avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e6e6e1; color: var(--am-ink-2); font-size: 9.5px; font-weight: 700; flex: none; }
.am-app .am-avatar--sm { width: 20px; height: 20px; margin-right: 7px; vertical-align: middle; }

/* definition lists, notes, legends */
.am-app .am-dl { margin: 0; }
.am-app .am-dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 12.5px; }
.am-app .am-dl dt { color: var(--am-ink-2); }
.am-app .am-dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.am-app .am-dl--rule { border-top: 1px solid var(--am-rule); margin-top: 8px; padding-top: 4px; }
.am-app .am-dl--compact > div { padding: 2px 0; font-size: 12px; }
.am-app .am-dl__strong { border-top: 1px solid var(--am-rule); margin-top: 2px; padding-top: 5px !important; }
.am-app .am-dl__strong dt { font-weight: 600; color: var(--am-ink); }
.am-app .am-dl--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 8px; }
.am-app .am-dl--grid > div { display: block; padding: 4px 0; border-bottom: 1px solid var(--am-rule-2); }
.am-app .am-dl--grid dt { font-size: 10.5px; color: var(--am-muted); }
.am-app .am-dl--grid dd { font-size: 14px; }
.am-app .am-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding: 10px 0 2px; border-top: 2px solid var(--am-ink); }
.am-app .am-total span { font-weight: 600; }
.am-app .am-total b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.am-app .am-note { margin: 8px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--am-ink-2); }
.am-app .am-note--bad { color: var(--am-bad); }
.am-app .am-note--warn { color: var(--am-warn); }
.am-app .am-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-size: 11px; color: var(--am-muted); }
.am-app .am-legend b { color: var(--am-ink); font-variant-numeric: tabular-nums; }
.am-app .am-sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.am-app .am-sw--a { background: var(--am-info); }
.am-app .am-sw--b { background: var(--am-labor); }
.am-app .am-sw--c { background: #cfe3d7; }
.am-app .am-sw--line { width: 2px; height: 10px; background: var(--am-accent); }
.am-app .am-sw--acc { background: var(--am-accent); height: 3px; width: 14px; vertical-align: 2px; }
.am-app .am-sw--dash { height: 0; width: 14px; border-top: 1px dashed var(--am-vp-muted); vertical-align: 3px; border-radius: 0; }
.am-app .am-bar2 { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--am-rule-2); margin-top: 6px; }
.am-app .am-bar2 span { display: block; height: 100%; }
.am-app .am-bar2__a { background: var(--am-info); }
.am-app .am-bar2__b { background: var(--am-labor); }

.am-app .am-toolbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; min-width: 0; }
.am-app .am-toolbar__count { font-size: 12px; margin-left: auto; }
.am-app .am-search { position: relative; display: flex; align-items: center; flex: 0 1 300px; min-width: 0; }
.am-app .am-search svg { position: absolute; left: 9px; width: 14px; height: 14px; fill: none; stroke: var(--am-muted); stroke-width: 1.6; pointer-events: none; }
.am-app .am-search .am-input { width: 100%; height: 30px; padding-left: 29px; font-size: 12.5px; }

/* ---------- 1 estimating ---------- */
.am-app .am-est { display: flex; flex-direction: column; min-height: 0; }
.am-app .am-est .am-split-main { flex: 1 1 auto; }
.am-app .am-est__table { min-width: 640px; }
.am-app .am-est__table td { padding-top: 4px; padding-bottom: 4px; }
.am-app .am-est__sec th { background: #f7f7f4; font-size: 11.5px; font-weight: 600; text-align: left; color: var(--am-ink-2); padding-top: 5px; padding-bottom: 5px; }
.am-app .am-est__sec td { background: #f7f7f4; font-weight: 600; font-size: 12px; }
.am-app .am-est__desc { min-width: 180px; }
.am-app .am-est__sum { display: flex; flex-direction: column; }

/* ---------- 2 inventory ---------- */
.am-app .am-inv { display: flex; flex-direction: column; min-height: 0; }
.am-app .am-inv .am-split-main { flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 252px; }
.am-app .am-inv__table { min-width: 700px; }
.am-app .am-inv__table td { font-size: 12.5px; }
.am-app .am-detail__name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.am-app .am-stock { position: relative; height: 12px; margin-top: 10px; border-radius: 3px; background: #cfe3d7; overflow: visible; }
.am-app .am-stock__alloc { position: absolute; left: 0; top: 0; bottom: 0; background: var(--am-labor); border-radius: 3px 0 0 3px; }
.am-app .am-stock__rop { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--am-accent); }

/* ---------- 3 crm ---------- */
.am-app .am-crm { display: flex; flex-direction: column; min-height: 0; }
.am-app .am-toolbar--crm { gap: 6px 20px; }
.am-app .am-inline-stat span { display: block; font-size: 10.5px; color: var(--am-muted); }
.am-app .am-inline-stat b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.am-app .am-board { flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; min-height: 0; }
.am-app .am-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #ebebe6; border-radius: 8px; padding: 8px; }
.am-app .am-col__head { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.am-app .am-col__head::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #9aa0a8; }
.am-app .am-col--contacted .am-col__head::before { background: var(--am-info); }
.am-app .am-col--proposal .am-col__head::before { background: var(--am-warn); }
.am-app .am-col--won .am-col__head::before { background: var(--am-ok); }
.am-app .am-col__count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; font-size: 10.5px; }
.am-app .am-col__prob { margin-left: auto; font-size: 10.5px; color: var(--am-muted); font-weight: 600; }
.am-app .am-col__sum { font-size: 12px; font-weight: 600; margin: 3px 0 8px; font-variant-numeric: tabular-nums; }
.am-app .am-col__sum .am-muted { font-weight: 400; font-size: 11px; }
.am-app .am-col__cards { flex: 1 1 auto; display: flex; flex-direction: column; gap: 7px; overflow: auto; min-height: 0; }
.am-app .am-col__empty { padding: 14px; border: 1px dashed #cfd0ca; border-radius: 7px; color: var(--am-muted); text-align: center; font-size: 12px; }
.am-app .am-deal { flex: none; padding: 9px 10px; background: #fff; border: 1px solid var(--am-rule); border-radius: 7px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); outline: none; }
.am-app .am-deal--moved { border-color: var(--am-accent); box-shadow: 0 0 0 3px rgba(255, 84, 38, 0.14); }
.am-app .am-deal__top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.am-app .am-deal__co { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.am-app .am-deal__val { font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.am-app .am-deal__contact { font-size: 11.5px; color: var(--am-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-app .am-deal__next { font-size: 11.5px; margin-top: 6px; padding-left: 8px; border-left: 2px solid var(--am-rule); color: var(--am-ink-2); }
.am-app .am-deal__foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; }
.am-app .am-deal__foot .am-btn { margin-left: auto; }
.am-app .am-won-tag { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--am-ok); }

/* ---------- 4 timesheets ---------- */
.am-app .am-ts { display: flex; flex-direction: column; min-height: 0; }
.am-app .am-ts .am-split-main { flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 248px; }
.am-app .am-ts__table { min-width: 660px; }
.am-app .am-ts__table td { padding-top: 5px; padding-bottom: 5px; }
.am-app .am-ts__first td { border-top: 1px solid var(--am-rule); }
.am-app .am-job { font-weight: 600; font-size: 12px; }
.am-app .am-prow { margin-bottom: 7px; }
.am-app .am-prow__top { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.am-app .am-prow__top span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-app .am-prow__top b { font-variant-numeric: tabular-nums; }
.am-app .am-meter { position: relative; height: 5px; margin-top: 4px; border-radius: 3px; background: var(--am-rule-2); }
.am-app .am-meter span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--am-ink-2); }
.am-app .am-meter span.am-meter--ot { background: var(--am-warn); }
.am-app .am-meter i { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--am-accent); }
.am-app .am-issues { margin: 0; padding: 0 0 0 14px; font-size: 11.5px; color: var(--am-ink-2); }
.am-app .am-issues li { margin: 2px 0; }
.am-app .am-issues--ok { list-style: none; margin-left: -14px !important; color: var(--am-ok); }

/* ---------- 5 erp ---------- */
.am-app.am-app--erp .am-body { padding: 0; }
.am-app .am-erp { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 0; }
.am-app .am-erp__nav { display: flex; flex-direction: column; background: #15181d; color: #c9ced6; padding: 12px 8px; min-height: 0; }
.am-app .am-erp__navtitle { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; color: #7f8794; padding: 0 8px 8px; }
.am-app .am-erp__nav [role="tab"] {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  height: 32px; padding: 0 10px; margin-bottom: 2px;
  border: 0; border-radius: 6px; background: transparent; color: inherit;
  font-size: 12.5px; font-weight: 500; text-align: left; cursor: pointer;
}
.am-app .am-erp__nav [role="tab"]:hover { background: #20242b; }
.am-app .am-erp__nav [role="tab"][aria-selected="true"] { background: #262b33; color: #fff; box-shadow: inset 2px 0 0 var(--am-accent); }
.am-app .am-erp__nav [role="tab"]:focus-visible { outline: 2px solid var(--am-accent); outline-offset: -2px; }
.am-app .am-erp__nav [role="tab"] em { font-style: normal; font-size: 10.5px; color: #8b93a0; }
.am-app .am-erp__navfoot { margin-top: auto; padding: 8px; font-size: 10.5px; color: #6f7784; }
.am-app .am-erp__main { display: flex; flex-direction: column; padding: 12px; min-height: 0; min-width: 0; }
.am-app .am-kpis--erp .am-kpi b { font-size: 16px; }
.am-app .am-erp__panes { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.25fr); gap: 10px; min-height: 0; }
.am-app .am-erp__list .am-table { min-width: 340px; }
.am-app .am-erp__detail { padding: 12px; }
.am-app .am-erp__detail .am-table { min-width: 380px; margin-top: 8px; }
.am-app .am-erp__detail td b { white-space: nowrap; }
.am-app .am-dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.am-app .am-dtotals { width: 300px; max-width: 100%; margin: 8px 0 0 auto; }
.am-app .am-erp__detail .am-side__sub + .am-table { margin-top: 0; }
.am-app .am-linked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; }

/* ---------- dark engineering viewport (6, 7) ---------- */
.am-app .am-vp { background: var(--am-vp); border: 1px solid #1f252d; border-radius: 8px; color: var(--am-vp-ink); min-width: 0; overflow: hidden; }
.am-app .am-vp__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 11px; border-bottom: 1px solid var(--am-vp-grid); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }
.am-app .am-vp__muted, .am-app .am-vp__legend { color: var(--am-vp-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.am-app .am-vp__legend .am-sw { margin-left: 8px; }
.am-app .am-svg { width: 100%; height: auto; }
.am-app .am-svg .am-g { stroke: var(--am-vp-grid); stroke-width: 1; }
.am-app .am-svg .am-g--zero { stroke: #2d3540; }
.am-app .am-svg .am-t { fill: var(--am-vp-muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.am-app .am-svg .am-t--head { fill: var(--am-vp-ink); font-weight: 600; }
.am-app .am-svg .am-t--acc { fill: var(--am-accent); font-weight: 600; }
.am-app .am-svg .am-t--hi { fill: var(--am-cyan); font-weight: 600; }
.am-app .am-svg .am-t--mass { fill: #0b0d10; font-weight: 700; font-size: 12px; }
.am-app .am-svg .am-t-bg { fill: var(--am-vp); }
.am-app .am-svg .am-ref { stroke: #39424e; stroke-width: 1; stroke-dasharray: 4 4; }
.am-app .am-svg .am-beam { fill: none; stroke: var(--am-vp-ink); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.am-app .am-svg .am-support { fill: none; stroke: var(--am-vp-ink); stroke-width: 1.5; }
.am-app .am-svg .am-ground { stroke: var(--am-vp-muted); stroke-width: 1.5; }
.am-app .am-svg .am-load { stroke: var(--am-accent); stroke-width: 2.5; }
.am-app .am-svg .am-load-head { fill: var(--am-accent); }
.am-app .am-svg .am-react { stroke: var(--am-cyan); stroke-width: 1.5; }
.am-app .am-svg .am-react-head { fill: var(--am-cyan); }
.am-app .am-svg .am-dim { stroke: var(--am-vp-muted); stroke-width: 1; }
.am-app .am-svg .am-sec { fill: rgba(99, 199, 255, 0.12); stroke: var(--am-cyan); stroke-width: 1.2; }
.am-app .am-svg .am-curve { fill: none; stroke: var(--am-cyan); stroke-width: 2; }
.am-app .am-svg .am-curve--b { stroke: var(--am-accent); }
.am-app .am-svg .am-area { fill: rgba(255, 84, 38, 0.14); }
.am-app .am-svg .am-ghost { fill: none; stroke: #3a4450; stroke-width: 1.2; }
.am-app .am-svg .am-trace { fill: none; stroke: var(--am-accent); stroke-width: 2.2; stroke-linejoin: round; }
.am-app .am-svg .am-env { fill: none; stroke: var(--am-vp-muted); stroke-width: 1; stroke-dasharray: 3 4; }
.am-app .am-svg .am-playhead { stroke: rgba(214, 219, 225, 0.35); stroke-width: 1; }
.am-app .am-svg .am-dotp { fill: var(--am-accent); stroke: var(--am-vp); stroke-width: 2; }
.am-app .am-svg .am-wall { fill: #2a313a; }
.am-app .am-svg .am-hatch { stroke: #3a434e; stroke-width: 1; }
.am-app .am-svg .am-groundline { stroke: #4a5461; stroke-width: 1.5; }
.am-app .am-svg .am-tick { stroke: #4a5461; stroke-width: 1; }
.am-app .am-svg .am-eq { stroke: #39424e; stroke-width: 1; stroke-dasharray: 4 4; }
.am-app .am-svg .am-spring { fill: none; stroke: var(--am-cyan); stroke-width: 2; stroke-linejoin: round; }
.am-app .am-svg .am-damper { fill: none; stroke: #9aa5b2; stroke-width: 2; }
.am-app .am-svg .am-mass { fill: #e9ecef; stroke: #ffffff; stroke-width: 1; }
.am-app .am-svg .am-wheel { fill: #2a313a; stroke: #9aa5b2; stroke-width: 1.2; }
.am-app .am-svg .am-disp { stroke: var(--am-accent); stroke-width: 2; }

.am-app .am-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; flex: none; }
.am-app .am-res { padding: 6px 10px; background: var(--am-panel); border: 1px solid var(--am-rule); border-radius: 7px; min-width: 0; }
.am-app .am-res span { display: block; font-size: 10.5px; color: var(--am-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-app .am-res b { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 6 calculations ---------- */
.am-app .am-calc { display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 10px; min-height: 0; }
.am-app .am-calc__out { display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; }
.am-app .am-calc__out .am-vp { flex: none; }
.am-app .am-field { margin-bottom: 7px; }
.am-app .am-field label { display: block; font-size: 11px; color: var(--am-ink-2); margin-bottom: 3px; font-weight: 500; }
.am-app .am-field__ctl { display: flex; align-items: center; gap: 6px; }
.am-app .am-field__ctl .am-input--num { width: 100%; flex: 1 1 auto; text-align: right; }
.am-app .am-unit { flex: none; width: 30px; font-size: 11.5px; color: var(--am-muted); }
.am-app .am-field--inline { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; gap: 2px 8px; margin-bottom: 5px; }
.am-app .am-field--inline label { margin: 0; }
.am-app .am-field--inline .am-field__err { grid-column: 1 / -1; text-align: right; }
.am-app .am-field__err { font-size: 10.5px; color: var(--am-bad); min-height: 0; }
.am-app .am-field__err:empty { display: none; }
.am-app .am-presets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.am-app .am-formulas, .am-app .am-assume { margin: 0; padding: 0 0 0 14px; font-size: 11.5px; color: var(--am-ink-2); }
.am-app .am-formulas { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; font-variant-numeric: tabular-nums; }
.am-app .am-formulas li { padding: 3px 6px; background: var(--am-bg); border-radius: 4px; white-space: nowrap; }
.am-app .am-assume li { margin: 2px 0; }

/* ---------- 7 kinetics ---------- */
.am-app .am-kin { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 10px; min-height: 0; }
.am-app .am-kin__main { display: flex; flex-direction: column; gap: 7px; min-height: 0; min-width: 0; }
.am-app .am-kin__main .am-vp { flex: none; }
.am-app .am-field--range { margin-bottom: 6px; }
.am-app .am-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.am-app .am-field__row label { margin: 0; }
.am-app .am-field__row output { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.am-app .am-range { width: 100%; height: 18px; margin: 2px 0 0; accent-color: var(--am-accent); cursor: pointer; }
.am-app .am-transport { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; }
.am-app .am-scrub { flex: 1 1 auto; min-width: 60px; }
.am-app .am-speed { display: flex; align-items: center; gap: 6px; font-size: 11.5px; flex: none; }

/* ---------- responsive (component width, not viewport) ---------- */
@container am (max-width: 900px) {
  .am-app .am-split-main,
  .am-app .am-inv .am-split-main,
  .am-app .am-ts .am-split-main { grid-template-columns: minmax(0, 1fr); }
  .am-app .am-erp__panes { grid-template-columns: minmax(0, 1fr); }
  .am-app .am-calc, .am-app .am-kin { grid-template-columns: minmax(0, 1fr); }
  .am-app .am-frame { height: auto; }
  .am-app .am-body { display: block; }
  .am-app .am-est, .am-app .am-inv, .am-app .am-ts, .am-app .am-crm { display: block; }
  .am-app .am-scroll { max-height: 380px; }
  .am-app .am-side { overflow: visible; }
  .am-app .am-split-main > * + *, .am-app .am-erp__panes { margin-top: 0; }
  .am-app .am-board { grid-template-columns: repeat(4, minmax(220px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .am-app .am-col__cards { overflow: visible; }
  .am-app .am-erp { grid-template-columns: minmax(0, 1fr); }
  .am-app .am-erp__nav { flex-direction: row; align-items: center; gap: 4px; padding: 8px; overflow-x: auto; }
  .am-app .am-erp__nav [role="tablist"] { display: flex; gap: 4px; }
  .am-app .am-erp__nav [role="tab"] { width: auto; gap: 8px; margin: 0; white-space: nowrap; }
  .am-app .am-erp__navtitle, .am-app .am-erp__navfoot { display: none; }
  .am-app .am-erp__detail.am-scroll { max-height: none; }
}
@container am (max-width: 640px) {
  .am-app .am-head { flex-direction: column; align-items: stretch; }
  .am-app .am-head__stats { flex-wrap: wrap; }
  .am-app .am-stat { flex: 1 1 90px; min-width: 0; }
  .am-app .am-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-app .am-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-app .am-dtotals { width: 100%; }
  .am-app .am-erp__detail .am-table--mini td, .am-app .am-erp__detail .am-table--mini th { padding: 3px 4px; font-size: 11px; }
  .am-app .am-toolbar__count { margin-left: 0; width: 100%; }
  .am-app .am-search { flex: 1 1 100%; }
  .am-app .am-bar__crumbs .am-crumb:not(.am-crumb--now), .am-app .am-bar__crumbs .am-crumb__sep { display: none; }
  .am-app .am-transport { flex-wrap: wrap; }
  .am-app .am-scrub { flex-basis: 100%; order: 3; }
  .am-app .am-title { font-size: 15px; }
  .am-app .am-body { padding: 10px; }
}
@container am (max-width: 380px) {
  .am-app .am-kpi b { font-size: 15px; }
  .am-app .am-bar { gap: 7px; padding: 0 9px; }
  .am-app .am-formulas { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .am-app .am-deal--moved { animation: am-flash 0.6s ease-out; }
  @keyframes am-flash { from { box-shadow: 0 0 0 7px rgba(255, 84, 38, 0.28); } to { box-shadow: 0 0 0 3px rgba(255, 84, 38, 0.14); } }
}
