:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #193b30;
  background: #f3f6f4;
  font-synthesis: none;
  --muted: #76877d;
  --border: #e1e9e3;
}
* { box-sizing: border-box; }
body { margin: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; min-height: 44px; border: 0; border-radius: 10px; font-weight: 600; }
button:focus-visible, input:focus-visible { outline: 3px solid #76d9ac; outline-offset: 3px; }
aside { position: sticky; top: 0; height: 100vh; background: #113d30; color: #fff; padding: 34px 22px; display: flex; flex-direction: column; }
.brand { font-size: 30px; font-weight: 800; letter-spacing: -1.3px; padding: 0 10px; }
.brand span { color: #36ce92; }
.aside-caption { color: #9abdab; font-size: 12px; padding: 0 10px; margin: 10px 0 42px; }
.nav-current { background: #286348; border-radius: 12px; padding: 17px 15px; font-size: 14px; display: flex; justify-content: space-between; }
.nav-current span { color: #b5e3ca; }
.aside-foot { margin-top: auto; color: #b0c9ba; font-size: 12px; line-height: 1.9; padding: 20px 10px 0; }
.aside-foot span { color: #719782; font-size: 11px; }
main { min-width: 0; padding: 40px clamp(20px, 3.5vw, 56px); width: 100%; max-width: 1900px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
h1 { font-size: 36px; font-weight: 650; letter-spacing: -1.2px; margin: 0 0 9px; }
h2 { margin: 0; font-size: 25px; letter-spacing: -.5px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 10px; color: var(--muted); font-weight: 700; margin: 0 0 11px; }
.subtitle { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
.account { display: flex; align-items: center; gap: 12px; font-size: 13px; flex-shrink: 0; }
.account small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.avatar { width: 42px; height: 42px; background: #deeee3; border: 1px solid #d0e2d5; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.demo-note { background: #edf1ff; color: #56698e; border: 1px solid #dae3f5; padding: 14px 18px; border-radius: 12px; display: flex; gap: 15px; align-items: center; font-size: 12px; line-height: 1.6; }
.demo-note strong { white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0 15px; }
.metrics article { border: 1px solid var(--border); border-radius: 16px; background: white; padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.metrics span { color: var(--muted); font-size: 12px; }
.metrics strong { font-size: clamp(26px, 2.7vw, 38px); letter-spacing: -1px; font-weight: 650; white-space: nowrap; }
.metrics small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.metrics .accent { background: #e4f4e9; border-color: #cce5d4; }
.metrics .accent strong { color: #167950; }
.incomplete { color: #867349; font-size: 12px; line-height: 1.6; min-height: 20px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 28px 0 20px; }
.filters { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: #eaf0eb; }
.filters button { padding: 8px 16px; font-size: 12px; background: transparent; color: #6c8073; white-space: nowrap; }
.filters button.selected { color: #204d36; background: white; box-shadow: 0 1px 4px #173d3012; }
.search-label { max-width: 300px; width: 100%; }
input { min-height: 48px; border: 1px solid #dae4dc; border-radius: 11px; background: white; color: #204333; padding: 12px 16px; width: 100%; font-size: 12px; }
.terminals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.terminal { min-width: 0; border: 1px solid var(--border); border-radius: 17px; padding: 22px; background: white; box-shadow: 0 4px 15px #173d3003; display: flex; flex-direction: column; }
.terminal-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 22px; }
.terminal-id { color: #8a9a8e; font-size: 10px; font-weight: 600; letter-spacing: .8px; }
.badge { display: inline-block; border-radius: 100px; font-size: 10px; font-weight: 600; padding: 6px 10px; white-space: nowrap; }
.badge.good { color: #21734b; background: #e7f5ec; }
.badge.bad { color: #b15e3e; background: #fff0e9; }
.badge.warning { color: #a68128; background: #fff5d8; }
.badge.blue { color: #537cbd; background: #edf3ff; }
.badge.muted { color: #7d8790; background: #eff1f3; }
.terminal h2 { font-size: 20px; line-height: 1.3; margin-bottom: 7px; }
.terminal .location { color: var(--muted); font-size: 12px; min-height: 34px; margin: 0 0 14px; line-height: 1.5; }
.terminal .reason { color: #688071; font-size: 12px; line-height: 1.7; margin: 0 0 18px; min-height: 42px; }
.terminal .reason.bad { color: #ac6346; }
.terminal-values { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #edf1ec; padding-top: 17px; gap: 15px; margin-top: auto; }
.terminal-values small { display: block; color: #859488; font-size: 10px; margin-bottom: 6px; }
.terminal-values strong { font-size: 18px; font-weight: 600; letter-spacing: -.4px; }
.last-seen { color: #9aa59c; font-size: 10px; margin: 18px 0 11px; }
.open { background: #f1f6f2; color: #3b6c4e; width: 100%; font-size: 12px; border: 1px solid #e2ebe3; }
.open:hover { background: #e6f2e9; }
footer { color: #94a294; font-size: 10px; margin: 26px 0; line-height: 1.8; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
dialog { width: min(560px, calc(100vw - 30px)); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--border); border-radius: 22px; padding: 28px; color: #193b30; }
dialog::backdrop { background: #13352c65; }
.dialog-head { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; margin-bottom: 12px; }
.dialog-head button { min-width: 44px; background: #f0f5f0; font-size: 22px; color: #476e55; }
#detail-state { margin-top: 24px; }
#detail-reason { font-size: 14px; line-height: 1.7; }
dl { display: grid; grid-template-columns: 1fr auto; font-size: 13px; gap: 15px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
dt { color: var(--muted); } dd { margin: 0; text-align: right; }
.detail-note { color: #879584; font-size: 12px; line-height: 1.7; }
@media (max-width: 1250px) {
  .terminals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body { grid-template-columns: 195px minmax(0, 1fr); }
  .metrics { gap: 10px; }
  .metrics article { padding: 18px 15px; }
  .toolbar { flex-wrap: wrap; }
}
@media (max-width: 850px) {
  body { display: block; }
  aside { position: relative; height: auto; padding: 20px; flex-direction: row; align-items: center; justify-content: space-between; }
  .aside-caption, .aside-foot { display: none; }
  .brand { padding: 0; font-size: 26px; }
  .nav-current { font-size: 12px; padding: 12px 18px; gap: 16px; }
  main { padding: 26px 20px; }
  h1 { font-size: 30px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-note { flex-direction: column; align-items: flex-start; gap: 4px; }
  .metrics strong { font-size: 30px; }
}
@media (max-width: 500px) {
  main { padding: 25px 16px; }
  .terminals { grid-template-columns: 1fr; }
  .account div { display: none; }
  .filters { width: 100%; justify-content: space-between; gap: 0; }
  .filters button { padding: 8px 12px; font-size: 11px; }
  .search-label { max-width: none; }
  .metrics strong { font-size: 28px; }
  .metrics article { padding: 18px 13px; }
}

[hidden]{display:none!important}.login-screen{position:fixed;inset:0;z-index:10;background:#edf4ef;display:grid;place-items:center;padding:20px}.login-card{background:white;border:1px solid var(--border);border-radius:24px;padding:34px;width:min(420px,100%)}.login-card h1{font-size:27px;margin:30px 0 12px}.login-card label,label{display:block;margin:20px 0 8px;font-size:14px}.login-card input{font-size:17px}.primary{background:#159d68;color:white;padding:13px 20px;min-height:48px}.login-card .primary{width:100%;margin-top:20px}.fleet-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:20px 0}.fleet-controls button,#logout{padding:10px 16px}.fleet-controls span,#login-error,#registration-error{font-size:13px;color:#a45537}dialog .primary{margin-top:20px}

.metrics strong{overflow-wrap:anywhere;white-space:normal}.terminal-values{grid-template-columns:repeat(2,minmax(0,1fr))}.terminal-values strong{overflow-wrap:anywhere}
