/* Equipment Log: styles for this demo only. No inline styles anywhere (strict content policy). */

/* ---- Drawings of the machines ---- */
.eq-draw { background: var(--paper-2); border-radius: 14px; padding: 3px; }
.btn.primary .glyph, .btn.green .glyph { background: #fff; border-radius: 8px; padding: 1px; }

/* ---- The map ---- */
.eq-map { background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.eq-map svg { width: 100%; height: auto; }
.eq-lbl { font: 700 11px var(--display); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.eq-cnt { font: 700 10px var(--display); fill: #fff; text-anchor: middle; }
.eq-mk rect { stroke: #fff; stroke-width: 1.5px; filter: url(#cut); }
.eq-mk text { font: 700 10.5px var(--display); fill: #fff; text-anchor: middle; }
.eq-mk.north rect { fill: var(--blue); }
.eq-mk.south rect { fill: var(--green-ink); }
.eq-mk.depot rect { fill: #fff; stroke: var(--ink); }
.eq-mk.depot text { fill: var(--ink); }
.eq-mk.hi rect { stroke: #C67A12; stroke-width: 3px; }
.eq-hit { fill: #fff; fill-opacity: 0; }
.eq-ring { fill: none; stroke: var(--green-ink); stroke-width: 2.4px; stroke-dasharray: 4 4; }
a.eq-pin { cursor: pointer; outline: none; }
a.eq-pin:hover .eq-pinp, a.eq-pin:focus-visible .eq-pinp { fill: var(--green); }
a.eq-pin:focus-visible .eq-ring { stroke: var(--blue); stroke-width: 3.5px; stroke-dasharray: none; }
.eq-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font: 600 12.5px/1.2 var(--display); color: var(--ink-soft); }
.eq-legend span { display: inline-flex; align-items: center; gap: 6px; }
.eq-key { width: 18px; height: 11px; border-radius: 3px; display: inline-block; }
.eq-key.north { background: var(--blue); }
.eq-key.south { background: var(--green-ink); }
.eq-key.depot { background: #fff; border: 1.5px solid var(--ink); }
.eq-mapcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.eq-pickline { display: flex; align-items: center; gap: 8px; background: var(--green-soft); color: var(--green-ink); border-radius: 16px; padding: 10px 12px; font: 700 15.5px/1.2 var(--display); }
.eq-pickline .glyph { background: #fff; border-radius: 8px; }
.eq-places { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-place { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--card); font: 700 14px/1 var(--display); cursor: pointer; color: var(--ink); }
.eq-place .glyph { width: 22px; height: 22px; }
.eq-place:hover { border-color: var(--green-ink); }
.eq-place.on { border-color: var(--green-ink); background: var(--green-soft); color: var(--green-ink); }

@media (prefers-reduced-motion: no-preference) {
  .eq-ring { transform-box: fill-box; transform-origin: center; animation: eq-spin 8s linear infinite; }
  @keyframes eq-spin { to { transform: rotate(360deg); } }
  .eq-beam { animation: eq-beam 1.4s ease-in-out infinite alternate; }
  @keyframes eq-beam { from { transform: translateY(0); } to { transform: translateY(68px); } }
}

/* ---- Team phone app ---- */
.eq-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eq-sum > div { background: var(--card); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.eq-sum b { font: 800 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.eq-sum span { font-size: 12px; color: var(--ink-faint); line-height: 1.25; margin-top: 4px; }
.eq-sum .north b { color: var(--blue); }
.eq-sum .south b { color: var(--green-ink); }
.eq-big { width: 100%; min-height: 58px; font-size: 17px; border-radius: 18px; }
.eq-big .glyph { width: 30px; height: 30px; }
.eq-center { text-align: center; }

.eq-held { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }
.eq-held .grow, .eq-card .grow, .eq-ret-top .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.eq-held strong, .eq-card strong { font: 700 15px/1.25 var(--display); }
.eq-held .grow > span, .eq-ret-top .grow > span { font-size: 13px; color: var(--ink-faint); }
.eq-held .btn { padding: 7px 11px; }

/* Scan tag */
.eq-scan { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.eq-vf { width: 100%; height: auto; }
.eq-scan p { font: 700 16px/1.3 var(--display); text-align: center; }
.eq-tags { display: flex; flex-direction: column; gap: 8px; }
.eq-tag { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--rule); border-radius: 18px; padding: 10px 12px; cursor: pointer; min-height: 66px; color: var(--ink); }
.eq-tag:hover:not([disabled]) { border-color: var(--blue); }
.eq-tag[disabled] { cursor: not-allowed; background: var(--paper-2); }
.eq-tag[disabled] .eq-draw { opacity: .5; }
.eq-tag .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.eq-tag strong { font: 700 15px/1.25 var(--display); }
.eq-tag small { font-size: 12.5px; color: var(--ink-faint); }
.eq-go { font: 700 14px/1 var(--display); color: #fff; background: var(--blue); border-radius: 999px; padding: 10px 16px; flex: none; }

/* Machines */
.eq-cards { display: flex; flex-direction: column; gap: 10px; }
.eq-card { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; background: var(--card); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
.eq-where { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 5px; font-size: 13.5px; color: var(--ink-soft); }
.eq-where .glyph { width: 18px; height: 18px; }
.eq-card-act { flex-basis: 100%; }
.eq-card-act .btn { width: 100%; }

/* Mine: return with hours */
.eq-ret { background: var(--card); border-radius: 22px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.eq-ret-top { display: flex; align-items: center; gap: 12px; }
.eq-ret-top strong { font: 700 18px/1.2 var(--display); }
.eq-ret-place { display: flex; align-items: center; gap: 8px; background: var(--paper-2); border-radius: 16px; padding: 6px 6px 6px 10px; font: 700 15px/1.2 var(--display); }
.eq-ret-place .grow { flex: 1; min-width: 0; }
.eq-ret-place .glyph { background: #fff; border-radius: 8px; }
.eq-hours { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 8px; }
.eq-hbtn { height: 64px; border-radius: 20px; border: 1.5px solid var(--rule); background: var(--paper); font: 700 30px/1 var(--display); cursor: pointer; color: var(--ink); }
.eq-hbtn:hover { border-color: var(--blue); }
.eq-hval { display: flex; flex-direction: column; align-items: center; }
.eq-hval b { font: 800 50px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.eq-hval span { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.eq-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.eq-q { min-height: 44px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--card); font: 700 14.5px/1 var(--display); cursor: pointer; color: var(--ink); }
.eq-q.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.eq-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; background: var(--card); border-radius: 22px; padding: 20px 16px; box-shadow: var(--shadow); }
.eq-empty strong { font: 700 17px/1.2 var(--display); }
.eq-empty span { color: var(--ink-faint); font-size: 14px; }
.phone-body .rows { background: var(--card); border-radius: 18px; padding: 2px 14px; box-shadow: var(--shadow); }
.phone-body .rows:empty { display: none; }

/* ---- Desk apps (manager, finance) ---- */
.eq-h { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.eq-h .section-title { margin: 0; }
.eq-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.eq-kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eq-kpis .stat { background: var(--card); box-shadow: var(--shadow); border-radius: 18px; padding: 14px 16px; min-width: 0; }
.eq-kpis .stat b { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; }
.eq-kpis.eq-small .stat { background: var(--paper-2); box-shadow: none; padding: 10px 12px; }
.eq-kpis.eq-small .stat b { font-size: 22px; }
.stat.red b { color: var(--red-ink); }
.stat.amber b { color: var(--amber-ink); }
.stat.ink b { color: var(--ink); }
.eq-two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.eq-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.eq-dot.north { background: var(--blue); }
.eq-dot.south { background: var(--green-ink); }

/* Service count */
.eq-svcpanel { container-type: inline-size; }
.rows li.eq-svcrow { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, 1.3fr) auto; gap: 8px 16px; }
.eq-meter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eq-meter-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eq-meter-top b { font-size: 18px; font-weight: 800; }
.eq-meter .bar { height: 12px; }
@container (max-width: 640px) {
  .rows li.eq-svcrow { grid-template-columns: auto minmax(0, 1fr); }
  .eq-svcrow .eq-meter, .eq-svcrow .btn { grid-column: 2; }
  .eq-svcrow .btn { justify-self: start; }
}

/* History */
.eq-pickm { display: flex; flex-wrap: wrap; gap: 8px; }
.eq-mbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 5px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--card); font: 700 14.5px/1 var(--display); cursor: pointer; color: var(--ink); }
.eq-mbtn .eq-draw { background: #fff; border-radius: 50%; }
.eq-mbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.eq-histhead { display: flex; align-items: center; gap: 14px; }
.eq-histhead strong { font: 700 20px/1.2 var(--display); display: block; }
.eq-histhead span { font-size: 13.5px; color: var(--ink-faint); }

/* Costs */
.eq-fin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.eq-fin.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eq-fin .hero-card .big { font-size: 42px; }
.eq-teamcard { background: var(--card); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eq-close .eq-teamcard { background: var(--paper); box-shadow: none; border: 1.5px solid var(--rule); }
.eq-tc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 700 15px/1.2 var(--display); }
.eq-tc-top span { display: inline-flex; align-items: center; gap: 8px; }
.eq-teamcard .big { font: 800 34px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.eq-teamcard.north .big { color: var(--blue); }
.eq-teamcard.south .big { color: var(--green-ink); }
.eq-teamcard .bar { height: 12px; }
.eq-teamcard .muted { font-size: 13.5px; }
.bar.north > i { background: var(--blue); }
.bar.south > i { background: var(--green-ink); }
.bar.soon > i { background: #C67A12; }
.bar.due > i { background: var(--red-ink); }
.eq-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font: 700 15px/1.2 var(--display); border-top: 1px solid var(--rule); padding-top: 12px; }
.eq-total b { font-size: 26px; font-weight: 800; }
.eq-tablepanel { overflow-x: auto; }
.eq-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.eq-table th { text-align: left; font: 700 12.5px/1.2 var(--display); color: var(--ink-faint); padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.eq-table td { padding: 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.eq-table tfoot td { border-bottom: 0; font-weight: 700; }
.eq-table .n { text-align: right; }
.eq-mcell { display: inline-flex; align-items: center; gap: 8px; font: 700 14.5px/1.2 var(--display); }
.eq-mname { font: 500 13px var(--text); color: var(--ink-faint); }

/* 5 % steps for bars (no inline widths) */
.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; }
.w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; }
.w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; }
.w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }

@media (max-width: 1100px) {
  .eq-fin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eq-fin > .hero-card { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .eq-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .eq-kpis, .eq-kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .eq-kpis.k3 > :first-child { grid-column: 1 / -1; }
  .eq-kpis .stat b { font-size: 28px; }
  .eq-kpis.eq-small .stat b { font-size: 20px; }
  .eq-mname { display: none; }
  .eq-table { font-size: 13.5px; }
  .eq-table th, .eq-table td { padding: 7px 4px; }
}
@media (max-width: 520px) {
  .desk-actions .pill { display: none; }
  .eq-fin, .eq-fin.two { grid-template-columns: minmax(0, 1fr); }
  .eq-teamcard .big { font-size: 30px; }
  .eq-mcell .eq-draw { display: none; }
}
