*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden}
body{background:#0c0e14;color:#c8cdd8;font-family:'Segoe UI',sans-serif;font-size:13px;
      display:flex;flex-direction:column}
.page-top{flex-shrink:0;padding:12px 16px 0}
.table-wrap{flex:1;overflow-y:auto;overflow-x:auto;padding:0 16px 12px;min-height:0}
h2{color:#e8ecf4;font-size:18px;margin-bottom:4px}
.meta{color:#555;font-size:11px;margin-bottom:14px;font-family:monospace;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.role-badge{padding:2px 8px;border-radius:3px;font-size:11px;font-weight:bold;font-family:monospace;white-space:nowrap}
.freshbar-wrap{flex:1;min-width:80px;max-width:160px;height:3px;background:#1a1e28;border-radius:2px;overflow:hidden}
.freshbar{height:3px;background:#f59e0b;border-radius:2px;transition:width 1s linear}
.fresh-lbl{color:#555;font-size:10px;white-space:nowrap}
.stats{display:flex;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.stats-compact{display:none;gap:6px;margin-bottom:6px;align-items:center;justify-content:center;flex-wrap:nowrap}
.sc-pie{display:flex;align-items:center;gap:4px;background:#13161d;border:1px solid #2a2f3d;
         border-radius:5px;padding:3px 6px}
.sc-col{display:flex;flex-direction:column;gap:0;line-height:1.2}
.sc-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 6px;line-height:1.2}
.sc-n{font-family:monospace;font-size:10px;color:#c8cdd8;white-space:nowrap}
.stat{background:#13161d;border:1px solid #2a2f3d;border-radius:6px;padding:7px 10px;font-family:monospace;min-width:0;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}
.stat .val{font-size:20px;font-weight:bold;color:#f59e0b}
.stat .lbl{color:#7b8298;font-size:11px}
.stat.cs{cursor:pointer;transition:border-color .15s}
.stat.cs:hover{border-color:#f59e0b}
.stat.cs.active{border-color:#f59e0b;background:#1a1e28}
.pwr-stat{flex-direction:column;align-items:center;gap:2px;padding:4px 6px}
.pwr-top{display:flex;align-items:center;gap:3px}
.pwr-icon{font-size:13px;line-height:1}
.pwr-lbl{font-size:11px;color:#7a8499;text-transform:uppercase;letter-spacing:0.5px;line-height:1;text-align:center}
.stat-group{display:flex;gap:4px;align-items:center;background:#0d1017;border:1px solid #1e2433;border-radius:8px;padding:4px 6px}
.stat-group-lbl{font-size:12px;color:#8b9bbf;text-transform:uppercase;letter-spacing:1px;writing-mode:vertical-rl;padding:0 4px;user-select:none;cursor:pointer}
table{width:100%;border-collapse:collapse;font-size:12px}
th{background:#13161d;color:#7b8298;text-align:left;padding:5px 7px;border-bottom:2px solid #2a2f3d;
    font-family:monospace;font-size:10px;text-transform:uppercase;letter-spacing:1px;white-space:nowrap;
    position:sticky;top:0;z-index:2}
td{padding:4px 7px;border-bottom:1px solid #1a1e28;vertical-align:middle}
tr:hover td{background:#13161d}
.live{color:#34d399;font-weight:bold} .dead{color:#f87171} .stale{color:#fbbf24;font-weight:bold} .nopanel{color:#444;font-style:italic}
.age{color:#7b8298;font-family:monospace;font-size:11px}
.ip{font-family:monospace;color:#60a5fa;font-size:11px}
.pn{font-family:monospace;font-weight:bold;color:#f59e0b}
.rows1{color:#7b8298} .rows3{color:#60a5fa} .rows5{color:#a78bfa} .rows8{color:#f59e0b}
.sol{color:#fbbf24;font-size:11px} .slp{color:#a78bfa;font-size:11px} .evn{color:#60a5fa;font-size:11px} .elz{color:#38bdf8;font-size:11px} .hyb{color:#c084fc;font-size:11px}
.nm{color:#e8ecf4} .alt{color:#7b8298;font-size:11px} .dist{color:#7b8298;font-size:11px}
.td-name{max-width:220px}
.lines{font-family:monospace;font-size:11px;color:#7b8298;max-width:160px;line-height:1.5}
.td-lines{max-width:140px}
.sn{font-family:monospace;font-size:11px;color:#a78bfa;white-space:nowrap}
.ln{display:inline-block;background:#1a1e28;color:#a78bfa;padding:1px 5px;border-radius:3px;margin:1px 2px 1px 0;font-size:10px}
.filter{margin-bottom:12px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.filter input{background:#13161d;border:1px solid #2a2f3d;color:#c8cdd8;
               padding:5px 9px;border-radius:4px;font-size:13px;width:230px}
.filter select{background:#13161d;border:1px solid #2a2f3d;color:#c8cdd8;
                padding:5px 7px;border-radius:4px;font-size:12px}
/* МЯСТО group — geo filter controls, lives among the stat-groups */
#geo-group input{background:#0c0e14;border:1px solid #2a2f3d;color:#c8cdd8;
                 padding:5px 8px;border-radius:4px;font-size:12px;font-family:monospace}
#geo-group #sgeo{width:148px}
#geo-group #sgeo.geo-on{border-color:#34d399}
#geo-group #srad{width:60px}
#geo-lbl{color:#7b8298;font-size:11px;font-family:monospace;align-self:center;white-space:nowrap}
.gbtn{background:#1e2233;border:1px solid #2a2f3d;color:#c8cdd8;
      padding:5px 9px;border-radius:4px;cursor:pointer;font-size:13px}
.gbtn:hover{background:#2a2f3d}
.gbtn.track{border-color:#34d399;color:#34d399;animation:trkpulse 2s ease-in-out infinite}
@keyframes trkpulse{50%{opacity:.55}}
/* ДИСТ column — visible only while the geo filter is engaged */
.dist-col{display:none}
table.geo-on .dist-col{display:table-cell}
td.dist-col{font-family:monospace;font-size:11px;color:#facc15;white-space:nowrap}
.ab{background:#1e2233;border:1px solid #2a2f3d;color:#c8cdd8;
     padding:2px 6px;border-radius:3px;font-size:11px;cursor:pointer;margin:1px;white-space:nowrap}
.ab:hover{background:#2a2f3d}
.ab.pi{border-color:#4ade80;color:#4ade80} .ab.rb{border-color:#f87171;color:#f87171}
.ab.ft{border-color:#60a5fa;color:#60a5fa} .ab.st{border-color:#a78bfa;color:#a78bfa}
.ab.rs{border-color:#34d399;color:#34d399}
.ab.ri{border-color:#7b8298;color:#7b8298} .ab.pu{border-color:#f59e0b;color:#f59e0b}
.ab.cn{border-color:#f87171;color:#888} .ab.rt{border-color:#34d399;color:#34d399}
.mbg{display:none;position:fixed;top:0;left:0;width:100%;height:100%;
      background:rgba(0,0,0,.78);z-index:100;align-items:center;justify-content:center}
.mbg.open{display:flex}
.md{background:#13161d;border:1px solid #2a2f3d;border-radius:8px;padding:20px;
     max-width:700px;width:92%;max-height:82vh;display:flex;flex-direction:column}
.md h3{color:#e8ecf4;margin-bottom:10px;font-size:14px}
.md pre{background:#0c0e14;border:1px solid #1a1e28;border-radius:4px;padding:12px;
          font-size:12px;font-family:monospace;overflow:auto;flex:1;
          white-space:pre-wrap;word-break:break-all;color:#4ade80}
.md pre.err{color:#f87171}
.mc{margin-top:10px;background:#2a2f3d;border:none;color:#c8cdd8;
     padding:6px 16px;border-radius:4px;cursor:pointer;align-self:flex-end}
.mc:hover{background:#3d4455}
/* ── FETCH-as-CHECK modal ── */
.fcmd{max-width:820px;width:94%;display:flex;flex-direction:column;max-height:88vh}
.fc-pb-wrap{margin:6px 0 10px;display:none;align-items:center;gap:8px}
.fc-pb-wrap.on{display:flex}
.fc-pb{flex:1;height:4px;background:#1a1e28;border-radius:2px;overflow:hidden}
.fc-pb>i{display:block;height:100%;width:0;background:#34d399;transition:width .2s}
.fc-pb-lbl{color:#7b8298;font-size:11px;font-family:monospace;min-width:52px;text-align:right}
.fc-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid #2a2f3d;margin-bottom:10px}
.fc-tabs button{background:none;border:none;color:#7b8298;padding:7px 12px;cursor:pointer;
  font-size:12px;font-family:inherit;border-bottom:2px solid transparent;margin-bottom:-1px}
.fc-tabs button:hover{color:#c8cdd8}
.fc-tabs button.active{color:#34d399;border-bottom-color:#34d399}
.fc-body{flex:1;overflow:auto;min-height:180px}
.fc-body pre{background:#07090f;border:1px solid #1a1e28;border-radius:4px;padding:12px;
  color:#c8cdd8;font-family:'DM Mono',monospace;font-size:12px;line-height:1.6;
  white-space:pre;overflow:auto;max-height:56vh;user-select:text}
/* summary check rows */
.fc-sum{font-size:13px;line-height:1.7}
.fc-sum .kv{display:flex;gap:10px;flex-wrap:wrap;color:#c8cdd8;margin-bottom:2px}
.fc-sum .kv .k{color:#7b8298;min-width:120px}
.fc-checks{margin-top:12px;border:1px solid #2a2f3d;border-radius:6px;overflow:hidden}
.fc-checks .row{display:flex;align-items:center;gap:12px;padding:8px 12px;border-top:1px solid #1a1e28}
.fc-checks .row:first-child{border-top:none}
.fc-checks .lbl{color:#7b8298;min-width:100px;font-size:12px}
.fc-checks .vals{flex:1;font-family:monospace;font-size:12px}
.fc-checks .vals .p{color:#c8cdd8}
.fc-checks .vals .c{color:#7b8298}
.fc-checks .st{font-weight:600;font-size:13px}
.fc-checks .st.ok{color:#34d399}
.fc-checks .st.no{color:#f87171}
.fc-files{margin-top:12px;font-size:12px;color:#7b8298}
.fc-files .f{display:flex;gap:10px;padding:3px 0;font-family:monospace}
.fc-files .f .n{color:#c8cdd8;min-width:200px}
.fc-mism{margin-top:10px;padding:8px 12px;border:1px solid #f87171;border-radius:6px;
  color:#f87171;font-size:12px;line-height:1.4}
.mpb-wrap{margin:8px 0;display:flex;align-items:center;gap:8px}
.mpb{flex:1;height:4px;background:#1a1e28;border-radius:2px;overflow:hidden;position:relative}
.mpb::after{content:'';position:absolute;left:0;top:0;height:100%;width:var(--pct,0%);
             background:#f59e0b;border-radius:2px;transition:width linear}
.mpb-lbl{font-family:monospace;font-size:10px;color:#7b8298;white-space:nowrap;min-width:30px}
/* Push dialog */
.pd{background:#13161d;border:1px solid #2a2f3d;border-radius:8px;padding:20px;
     max-width:480px;width:92%;display:flex;flex-direction:column;gap:10px}
.pd h3{color:#e8ecf4;font-size:14px}
.pd input,.pd select{background:#0c0e14;border:1px solid #2a2f3d;color:#c8cdd8;
     padding:7px 10px;border-radius:4px;font-size:13px;width:100%}
.pd label{color:#7b8298;font-size:11px;margin-bottom:2px;display:block}
.pd-row{display:flex;gap:8px}
.pd-row>div{flex:1}
.pd-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}
.pd-btns button,.rd-btns button{background:#2a2f3d;border:none;color:#c8cdd8;
     padding:6px 16px;border-radius:4px;cursor:pointer;font-size:13px;
     transition:opacity .15s, background .15s}
.pd-btns button:hover:not(:disabled),
.rd-btns button:hover:not(:disabled){background:#3d4455}
/* Traffic-light scheme: red = destructive (push/write), yellow = warning
   (cancel/clear), green = safe (refresh). Disabled state dims the button
   and forbids the click; the colour stays so the operator can still tell
   what the button would do if it were enabled. */
.btn-push{background:#dc2626!important;color:#fff!important;font-weight:bold}
.btn-push:hover:not(:disabled){background:#b91c1c!important}
.btn-warn{background:#ca8a04!important;color:#fff!important;font-weight:bold}
.btn-warn:hover:not(:disabled){background:#a16207!important}
.btn-refresh{background:#15803d!important;color:#fff!important;font-weight:bold}
.btn-refresh:hover:not(:disabled){background:#166534!important}
.pd-btns button:disabled,.rd-btns button:disabled{
     opacity:.35;cursor:not-allowed}
/* Route dialog */
.rd{background:#13161d;border:1px solid #2a2f3d;border-radius:8px;padding:20px;
     max-width:540px;width:95%;display:flex;flex-direction:column;gap:10px}
.rd h3{color:#e8ecf4;font-size:14px}
.rd input,.rd select{background:#0c0e14;border:1px solid #2a2f3d;color:#c8cdd8;
     padding:7px 10px;border-radius:4px;font-size:13px;width:100%}
.rd label{color:#7b8298;font-size:11px;margin-bottom:2px;display:block}
.rd-row{display:flex;gap:8px}
.rd-row>div{flex:1}
.rd-tabs{display:flex;gap:4px;margin-bottom:4px}
.rd-tab{background:#0c0e14;border:1px solid #2a2f3d;color:#7b8298;
         padding:5px 12px;border-radius:4px;cursor:pointer;font-size:12px}
.rd-tab.active{background:#1e2233;border-color:#f59e0b;color:#f59e0b}
.rd-panel{display:none}.rd-panel.active{display:flex;flex-direction:column;gap:10px}
.rd-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}
tr.focused td{background:#1a2535!important;outline:2px solid #f59e0b;outline-offset:-1px}
.sp{display:inline-block;width:12px;height:12px;border:2px solid #333;
     border-top-color:#f59e0b;border-radius:50%;animation:sp .7s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
/* ── Tablet portrait (≤900px): hide least-needed columns ───────── */
@media(max-width:900px){
  th:nth-child(10), td:nth-child(10),  /* BRK */
  th:nth-child(12), td:nth-child(12)   /* ПРЕДИ */
  {display:none}
  .stat{padding:5px 10px}
  .stat .val{font-size:17px}
}
/* ── Phone portrait: compact layout ───────────────────────────── */
@media(max-width:600px) and (orientation:portrait){
  .page-top{padding:4px 8px 0}
  .table-wrap{padding:0 4px 8px}
  h2{font-size:12px;line-height:1.2;margin-bottom:2px}
  .meta{gap:4px;font-size:10px;margin-bottom:4px}
  .role-badge{font-size:9px;padding:1px 5px}
  /* Swap stats: hide full boxes, show compact pie row. The МЯСТО group
     stays visible — the geo filter / tracker is primarily a phone feature. */
  .stats-full{display:flex!important;flex-wrap:wrap;gap:4px;margin-bottom:4px}
  .stats-full>.stat,.stats-full>.stat-group{display:none!important}
  .stats-full>#geo-group{display:flex!important;flex:1 1 100%}
  #geo-group #sgeo{flex:1 1 40%;min-width:0}
  #geo-group #srad{flex:0 1 58px;min-width:0}
  #geo-group .gbtn{flex:0 0 auto;padding:8px 12px}
  #geo-lbl{flex:1 1 auto}
  .stats-compact{display:flex!important}
  /* Filters: compact horizontal, wrap to 2 lines max */
  .filter{flex-direction:row;flex-wrap:wrap;gap:4px;margin-bottom:6px}
  .filter input{flex:1 1 100%;padding:8px;font-size:14px;border-radius:5px}
  .filter select{flex:1 1 30%;min-width:0;padding:7px 4px;font-size:11px;border-radius:5px;
                   -webkit-appearance:menulist}
  /* Toolbar: bigger touch targets */
  .toolbar{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
  .toolbar .ab{padding:8px 10px;font-size:12px;border-radius:5px;flex:1 1 auto;
                text-align:center;min-width:60px}
  #row-lbl{width:100%;text-align:center;padding:4px 0;font-size:12px}
  /* Table: keep only #, ТАБЛО, Адрес, СЪСТОЯНИЕ */
  th:nth-child(4), td:nth-child(4),    /* РАЙОН */
  th:nth-child(5), td:nth-child(5),    /* ЛИНИИ */
  th:nth-child(6), td:nth-child(6),    /* R */
  th:nth-child(7), td:nth-child(7),    /* S/N */
  th:nth-child(8), td:nth-child(8),    /* ЗАХР. */
  th:nth-child(9), td:nth-child(9),    /* IP */
  th:nth-child(10), td:nth-child(10),  /* BRK */
  th:nth-child(12), td:nth-child(12)   /* ПРЕДИ */
  {display:none}
  table{font-size:12px}
  td,th{padding:6px 5px}
  th{font-size:9px;letter-spacing:0.5px}
  .td-name{max-width:160px}
  .nm{font-size:12px}
  .alt{font-size:10px}
  .pn{font-size:12px}
  .live,.dead,.nopanel{font-size:12px}
  /* Dialogs full-width */
  .md,.pd,.rd{max-width:100%;width:96%;border-radius:6px}
  .md pre{font-size:11px}
  .pd input,.pd select,.rd input,.rd select{padding:10px;font-size:15px}
  .pd-btns button,.rd-btns button{padding:10px 16px;font-size:14px}
  .mc{padding:10px 20px;font-size:14px}
}
/* ── Landscape (≤900px): restore all columns, compact sizes ───── */
@media(max-width:900px) and (orientation:landscape){
  th,td{display:table-cell!important}
  .stats-full{display:flex!important}
  .stats-compact{display:none!important}
  table{font-size:11px}
  td,th{padding:3px 5px}
  .td-name{max-width:180px}
  .td-lines{max-width:100px}
  .stat .val{font-size:15px}
  .stat .lbl{font-size:9px}
  .stat{padding:4px 8px}
  .stats{gap:4px;margin-bottom:6px}
  h2{font-size:13px;margin-bottom:2px}
  .meta{margin-bottom:4px}
  .filter input{padding:5px 9px;font-size:12px}
  .filter select{padding:4px 6px;font-size:11px}
  .filter{flex-direction:row;flex-wrap:wrap;gap:4px;margin-bottom:6px}
  .toolbar .ab{padding:3px 7px;font-size:11px;min-width:auto}
  #row-lbl{width:auto}
}

/* ── Auto-refresh control bar (push/arrivals/xml dialogs) ──────────────── */
.ar-bar{margin:6px 0 8px;display:flex;align-items:center;gap:10px;
        font-size:11px;color:#7b8298}
.ar-progress{flex:1;height:4px;background:#13161d;border:1px solid #1e2433;
             border-radius:3px;overflow:hidden;position:relative}
.ar-fill{height:100%;background:#34d399;width:100%;
        transition:width 0.95s linear;transform-origin:left}
.ar-fill.post-push{background:#60a5fa}      /* blue during post-push wait */
.ar-fill.frozen{background:#7b8298;opacity:.4} /* grey while editing */
.ar-fill.off{background:#2a2f3d}             /* dim when auto-refresh off */
.ar-label{font-family:monospace;font-size:10px;min-width:72px;
          text-align:right;color:#7b8298;white-space:nowrap}
.ar-toggle{display:flex;align-items:center;gap:5px;cursor:pointer;
           user-select:none}
.ar-toggle input{margin:0;cursor:pointer}

/* ── Event log accordion ────────────────────────────────────────────────── */
.evlog{flex-shrink:0;margin:0 16px 12px;background:#0d1017;border:1px solid #1e2433;
       border-radius:8px;overflow:hidden;font-family:'Segoe UI',sans-serif}
.evlog-head{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#13161d;
            cursor:pointer;user-select:none;border-bottom:1px solid #1e2433}
.evlog-head:hover{background:#181c25}
.evlog-title{font-weight:bold;color:#e8ecf4;font-size:13px;flex:1}
.evlog-caret{color:#7b8298;font-size:12px;transition:transform 0.15s}
.evlog.collapsed .evlog-caret{transform:rotate(-90deg)}
.evlog.collapsed .evlog-body{display:none}
.evlog-body{max-height:280px;overflow-y:auto}
.evlog-counters{display:flex;gap:8px;padding:8px 12px;background:#0d1017;
                border-bottom:1px solid #1a1e28;font-size:11px;flex-wrap:wrap}
.evlog-bucket{display:flex;align-items:center;gap:6px;background:#13161d;border:1px solid #1e2433;
              border-radius:5px;padding:4px 8px;font-family:monospace}
.evlog-bucket-lbl{color:#7b8298;text-transform:uppercase;letter-spacing:0.5px;font-size:10px}
.evlog-on{color:#34d399;font-weight:bold}
.evlog-off{color:#f87171;font-weight:bold}
.evlog-op{color:#60a5fa;font-weight:bold}
.evlog-sys{color:#22d3ee;font-weight:bold}
.evlog-sep{color:#2a2f3d}
.evlog-list{padding:0}
.evlog-empty{padding:16px;color:#555;text-align:center;font-style:italic;font-size:12px}

/* Grid columns. Header and rows share the same template so cells line up.
   Order: dot · time · stop_id · name · panel · IP · status · duration.
   The name column is the one that gets all the slack. */
.evlog-hdr,.evrow{display:grid;
  grid-template-columns:14px 90px 56px minmax(0,1fr) 60px 130px 110px 130px;
  gap:8px;align-items:baseline;padding:6px 12px;border-bottom:1px solid #131720;
  font-size:12px}
.evlog-hdr{background:#13161d;color:#7b8298;font-family:monospace;font-size:10px;
           text-transform:uppercase;letter-spacing:1px;padding:5px 12px;
           position:sticky;top:0;z-index:1}
.evlog-hdr span:first-child{grid-column-start:2} /* skip dot column in header */
.evrow:last-child{border-bottom:none}
.evrow{cursor:pointer;transition:background .1s}
.evrow:hover{background:#131720}
.evrow.flash{background:#1a2535}

/* Dot — type indicator */
.evrow-dot{font-size:14px;line-height:1;text-align:center}
.evrow-on  .evrow-dot{color:#34d399}
.evrow-off .evrow-dot{color:#f87171}
.evrow-op  .evrow-dot{color:#60a5fa}
.evrow-sys .evrow-dot{color:#22d3ee}

/* Cells */
.evcol-ts{color:#7b8298;font-family:monospace;font-size:11px;white-space:nowrap}
.evcol-sid{color:#e8ecf4;font-family:monospace;font-weight:bold;white-space:nowrap}
.evcol-name{color:#e8ecf4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.evcol-panel{color:#f59e0b;font-family:monospace;font-weight:bold;white-space:nowrap}
.evcol-ip{color:#60a5fa;font-family:monospace;font-size:10px;white-space:nowrap}
.evcol-status{font-weight:bold;font-size:11px;white-space:nowrap;text-transform:uppercase;letter-spacing:0.5px}
.evcol-dur{color:#7b8298;font-family:monospace;font-size:11px;white-space:nowrap;text-align:right}
.evrow-on  .evcol-status{color:#34d399}
.evrow-off .evcol-status{color:#f87171}
.evrow-op  .evcol-status{color:#60a5fa}
.evrow-sys .evcol-status{color:#22d3ee}
.evrow-on  .evcol-dur{color:#34d399}
.evrow-off .evcol-dur{color:#f87171}
.evrow-sys .evcol-dur{color:#22d3ee}
.evrow-sys{cursor:default}
.evrow-sys:hover{background:transparent}
.evrow-stall{color:#fbbf24;margin-left:4px;font-size:10px}

/* Filter-hidden hint — appears briefly when click lands on a row not in the
   current table view */
.evlog-hint{padding:0 12px;font-size:11px;color:#fbbf24;font-style:italic;
            min-height:0;transition:padding .15s}
.evlog-hint.shown{padding:6px 12px;border-top:1px solid #1a1e28}

@media(max-width:900px){
  /* Cram columns: drop IP, narrow others */
  .evlog-hdr,.evrow{
    grid-template-columns:14px 80px 50px minmax(0,1fr) 50px 100px 100px}
  .evcol-ip{display:none}
}
@media(max-width:600px){
  /* Two-line layout: dot+ts+sid+name top, panel+status+dur bottom */
  .evlog-hdr{display:none}
  .evrow{grid-template-columns:14px 70px 1fr;
         grid-template-areas:"dot ts top" "dot panel bot";
         row-gap:2px}
  .evrow-dot{grid-area:dot}
  .evcol-ts{grid-area:ts}
  .evcol-sid{display:none}
  .evcol-name{grid-area:top;font-size:11px}
  .evcol-panel{grid-area:panel;font-size:10px}
  .evcol-ip{display:none}
  .evcol-status{grid-area:bot;font-size:10px;text-align:left}
  .evcol-dur{display:none}
  .evlog-body{max-height:240px}
}

/* line coverage (invisible-bus check) in the fetch-check summary */
.fc-cov{margin-top:12px;border:1px solid #2a2f3d;border-radius:6px;padding:10px 12px}
.fc-cov-hd{font-size:13px;color:#c8cdd8;margin-bottom:8px}
.fc-cov-hd .miss{color:#f87171;font-weight:600}
.fc-cov-hd .ok{color:#34d399;font-weight:600}
.fc-cov-lines{display:flex;flex-wrap:wrap;gap:6px}
.fc-cov-lines .ln{font-family:monospace;font-size:12px;padding:2px 8px;border-radius:4px;border:1px solid}
.fc-cov-lines .ln.ok{color:#34d399;border-color:#1e3a2e;background:#0f1c15}
.fc-cov-lines .ln.no{color:#f87171;border-color:#3a1e1e;background:#1c0f0f;font-weight:600}
.fc-cov-warn{margin-top:8px;padding:7px 10px;border:1px solid #f87171;border-radius:5px;
  color:#fca5a5;font-size:12px;line-height:1.45}

/* ── multi-select + batch ── */
th.selcb,td.selcb{width:26px;text-align:center;padding:2px 4px}
.rowcb{cursor:pointer}
.selbar{display:flex;align-items:center;gap:8px;padding:6px 10px;margin:6px 0;
  background:#13161d;border:1px solid #2a2f3d;border-radius:6px;flex-wrap:wrap}
.selinfo{color:#c8cdd8;font-size:12px;min-width:80px}
.selhint{color:#4b5268;font-size:11px}
.selbar button{background:#1e2233;border:1px solid #2a2f3d;color:#c8cdd8;
  padding:4px 10px;border-radius:4px;cursor:pointer;font-size:12px}
.selbar button:hover{background:#2a2f3d}
.selops{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
.selops .selop{border-color:#3d4455;font-weight:600}
.btmd{max-width:680px;width:92%;max-height:82vh;display:flex;flex-direction:column}
.bt-pb-wrap{display:flex;align-items:center;gap:10px;margin:8px 0}
.bt-pb{flex:1;height:6px;background:#1a1e28;border-radius:3px;overflow:hidden}
.bt-pb i{display:block;height:100%;width:0;background:#34d399;transition:width .25s}
#bt-pct{color:#7b8298;font-size:12px;font-family:monospace;white-space:nowrap}
.bt-body{flex:1;overflow:auto;min-height:120px}
.bt-row{display:flex;align-items:center;gap:10px;padding:5px 8px;
  border-bottom:1px solid #1a1e28;font-size:12px}
.bt-row.clickable{cursor:pointer}
.bt-row.clickable:hover{background:#181c26}
.bt-sid{color:#c8cdd8;font-family:monospace;min-width:46px;font-weight:600}
.bt-st{min-width:44px;text-align:center;font-weight:700}
.bt-st.wait{color:#4b5268}.bt-st.run{color:#60a5fa}
.bt-st.ok{color:#34d399}.bt-st.no{color:#f87171}
.bt-msg{color:#7b8298;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
th.sortable{cursor:pointer;user-select:none}
th.sortable:hover{color:#c8cdd8}
