/* ==========================================================================
   Macroplanejamento Engenharia — Gantt
   ========================================================================== */
:root{
  --left-w: 268px;
  --row-h: 30px;
  --row-h-obra: 38px;
  --row-h-sub: 24px;
  --head-h: 22px;

  --bg: #ffffff;
  --bg-alt: #fbfbfa;
  --panel: #ffffff;
  --ink: #1f2733;
  --ink-2: #5b6675;
  --ink-3: #8d97a5;
  --line: #e4e7ec;
  --line-2: #eef0f3;
  --line-strong: #cfd4dc;
  --accent: #334155;
  --today: #d4553f;
  --weekend: rgba(15,23,42,.045);

  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*{ box-sizing: border-box; }

/* O atributo hidden so vale enquanto nenhuma regra de autor definir display.
   .modal, .inspector e .cmp-chip definem, e sem o !important abaixo eles ficam
   visiveis mesmo marcados como ocultos. */
[hidden]{ display: none !important; }
html,body{ height:100%; }
body{
  margin:0; font-family: var(--font); color: var(--ink); background: var(--bg);
  display:flex; flex-direction:column; overflow:hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- topbar -------------------------------------------------------- */
.topbar{
  flex:0 0 auto; display:flex; align-items:flex-end; gap:24px; flex-wrap:wrap;
  padding:10px 16px; border-bottom:1px solid var(--line); background:var(--panel);
}
.brand{ display:flex; align-items:center; gap:10px; min-width:260px; padding-bottom:2px; }
.brand-mark{
  width:26px; height:26px; border-radius:7px; flex:0 0 auto;
  background:
    linear-gradient(180deg,#9FBF8C 0 33%, transparent 33%),
    linear-gradient(180deg,transparent 0 40%, #E0B15C 40% 66%, transparent 66%),
    linear-gradient(180deg,transparent 0 72%, #7BA7CC 72% 100%);
  background-color:#334155;
}
.brand-title{ font-size:14px; font-weight:650; letter-spacing:-.01em; line-height:1.2; }
.brand-sub{ font-size:11.5px; color:var(--ink-2); margin-top:2px; }
.brand-sub b{ color:var(--ink); font-weight:600; }

.toolbar{ display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; }
.field{ display:flex; flex-direction:column; gap:4px; }
.field > label{ font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-3); font-weight:600; }

input[type=search]{
  height:28px; width:150px; padding:0 9px; font:inherit; font-size:12.5px;
  border:1px solid var(--line-strong); border-radius:var(--radius); background:#fff; color:var(--ink);
}
input[type=search]:focus{ outline:2px solid #94a3b8; outline-offset:-1px; }

.btn{
  height:28px; padding:0 11px; font:inherit; font-size:12.5px; color:var(--ink);
  background:#fff; border:1px solid var(--line-strong); border-radius:var(--radius); cursor:pointer;
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
}
.btn:hover{ background:#f4f5f7; }
.btnrow{ display:flex; gap:6px; }

.segmented{ display:inline-flex; border:1px solid var(--line-strong); border-radius:var(--radius); overflow:hidden; }
.segmented button{
  height:28px; padding:0 11px; font:inherit; font-size:12.5px; border:0; background:#fff;
  color:var(--ink-2); cursor:pointer; border-right:1px solid var(--line);
}
.segmented button:last-child{ border-right:0; }
.segmented button.on{ background:var(--accent); color:#fff; font-weight:600; }

.checks{ display:flex; gap:12px; height:28px; align-items:center; }
.chk{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--ink-2); cursor:pointer; white-space:nowrap; }
.chk input{ accent-color:var(--accent); }

/* dropdown */
.dropdown{ position:relative; }
.dd-toggle{ min-width:132px; justify-content:space-between; }
.caret{ width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid var(--ink-3); }
.dd-menu{
  position:absolute; z-index:200; top:calc(100% + 4px); left:0; min-width:238px;
  background:#fff; border:1px solid var(--line-strong); border-radius:8px;
  box-shadow:0 10px 26px rgba(15,23,42,.14); padding:6px;
}
.dd-actions{ display:flex; gap:10px; padding:3px 6px 7px; border-bottom:1px solid var(--line-2); margin-bottom:4px; }
.linkbtn{ background:none;border:0;padding:0;font:inherit;font-size:11.5px;color:#3b6ea5;cursor:pointer;text-decoration:underline; }
.dd-list{ max-height:320px; overflow:auto; }
.dd-list label{
  display:flex; align-items:center; gap:8px; padding:5px 7px; border-radius:5px;
  font-size:12.5px; cursor:pointer; color:var(--ink);
}
.dd-list label:hover{ background:#f3f4f6; }
.dd-list input{ accent-color:var(--accent); flex:0 0 auto; }
.swatch{ width:10px;height:10px;border-radius:2px;flex:0 0 auto; }

/* ---------- legend -------------------------------------------------------- */
.legend{
  flex:0 0 auto; display:flex; gap:14px; flex-wrap:wrap; align-items:center;
  padding:7px 16px; border-bottom:1px solid var(--line); background:var(--bg-alt);
  font-size:11.5px; color:var(--ink-2);
}
.legend .item{ display:inline-flex; align-items:center; gap:6px; }
.legend .item i{ width:16px;height:9px;border-radius:2px;display:inline-block; }
.legend .item.bl i{ height:4px; background:repeating-linear-gradient(90deg,#a6aeb9 0 5px,#c3c9d1 5px 10px); }
.legend .item.gp i{ height:7px; background:#94a3b8; }

/* ---------- grid ---------------------------------------------------------- */
.viewport{ flex:1 1 auto; overflow:auto; background:var(--bg); position:relative; }
.canvas{ position:relative; min-width:100%; }

.thead{
  position:sticky; top:0; z-index:60; background:var(--panel);
  box-shadow:0 1px 0 var(--line-strong);
}
.thead-row{ display:flex; height:var(--head-h); }
.thead-row.days{ height:20px; }
.head-left{
  position:sticky; left:0; z-index:70; flex:0 0 var(--left-w); width:var(--left-w);
  background:var(--panel); border-right:1px solid var(--line-strong);
  display:flex; align-items:center; justify-content:flex-end; padding-right:10px;
  font-size:10.5px; color:var(--ink-3); font-weight:600; letter-spacing:.03em;
}
.head-time{ position:relative; flex:0 0 auto; }
.tick{
  font-variant-numeric:tabular-nums;
  position:absolute; top:0; bottom:0; display:flex; align-items:center; justify-content:center;
  font-size:11px; color:var(--ink-2); border-left:1px solid var(--line);
  overflow:hidden; white-space:nowrap;
}
.tick.lvlA{ font-weight:650; color:var(--ink); font-size:11.5px; border-left:1px solid var(--line-strong); }
.tick.lvlB{ font-size:10.5px; }
.tick.lvlC{ font-size:9.5px; color:var(--ink-3); border-left:1px solid var(--line-2); }
.tick.day{ padding:0; }
.tick.day.we{ background:var(--weekend); }
.tick.now{ background:#fdeeea; color:var(--today); font-weight:700; }

/* body */
.tbody{ position:relative; }
.grid-layer{ position:absolute; top:0; bottom:0; left:var(--left-w); pointer-events:none; z-index:1; }
.gl-weekend{ position:absolute; inset:0; }
.gl-sep{ position:absolute; top:0; bottom:0; width:1px; background:var(--line-2); }
.gl-sep.major{ background:var(--line); }
.gl-today{ position:absolute; top:0; bottom:0; width:0; border-left:1.5px dashed var(--today); z-index:3; }
.gl-today::after{
  content:""; position:absolute; top:0; left:-4px; border:4px solid transparent; border-top-color:var(--today);
}

.row{ display:flex; height:var(--row-h); position:relative; z-index:2; }
.row:hover .row-left{ background:#f5f7f9; }
.row:hover .row-time{ background:rgba(15,23,42,.018); }

.row-left{
  position:sticky; left:0; z-index:20; flex:0 0 var(--left-w); width:var(--left-w);
  background:var(--bg); border-right:1px solid var(--line-strong); border-bottom:1px solid var(--line-2);
  display:flex; align-items:center; gap:7px; padding:0 10px 0 12px; overflow:hidden;
}
.row-time{ position:relative; flex:0 0 auto; border-bottom:1px solid var(--line-2); }

/* obra header row */
.row.obra{ height:var(--row-h-obra); }
.row.obra .row-left{ background:#f1f3f5; border-bottom:1px solid var(--line-strong); padding-left:8px; }
.row.obra:hover .row-left{ background:#e9ecef; }
.row.obra .row-time{ background:#f8f9fa; border-bottom:1px solid var(--line-strong); }
.obra-box{ min-width:0; }
.obra-name{ font-size:12.5px; font-weight:700; letter-spacing:-.01em; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.obra-meta{ font-size:10px; color:var(--ink-3); line-height:1.15; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
.twisty{
  width:15px;height:15px;flex:0 0 auto;border:0;background:none;cursor:pointer;padding:0;
  color:var(--ink-3); display:flex; align-items:center; justify-content:center; font-size:9px;
}
.twisty::before{ content:"\25BE"; transition:transform .12s; }
.twisty.closed::before{ transform:rotate(-90deg); }
.twisty.leaf{ visibility:hidden; }

/* package row */
.pkg-dot{ width:9px;height:9px;border-radius:2px;flex:0 0 auto; }
.pkg-name{ font-size:12px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row.sub{ height:var(--row-h-sub); }
.row.sub .row-left{ padding-left:38px; }
.row.sub .pkg-name{ font-size:11px; color:var(--ink-2); }
.row.sub.deep .row-left{ padding-left:56px; }
.row.sub.deep .pkg-name{ color:var(--ink-3); }

.delta{ margin-left:auto; margin-right:2px; font-variant-numeric:tabular-nums; font-size:9.5px; font-weight:650; padding:1px 4px; border-radius:3px; flex:0 0 auto; }
.delta.late{ background:#fdeceb; color:#b3402c; }
.delta.early{ background:#e9f4ec; color:#2e6b45; }

/* bars */
.bar{
  position:absolute; height:15px; top:50%; transform:translateY(-50%); border-radius:3px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.10);
}
.row.obra .bar{ height:11px; border-radius:2px; background:#94a3b8 !important; }
.row.sub .bar{ height:10px; border-radius:2px; opacity:.85; }
.bar-label{
  font-size:9.5px; font-weight:600; color:#fff; padding:0 6px; white-space:nowrap; overflow:hidden;
  text-shadow:0 1px 1px rgba(0,0,0,.22); pointer-events:none;
}
.bar-out{
  position:absolute; top:50%; transform:translateY(-50%); font-size:9.5px; color:var(--ink-2);
  white-space:nowrap; pointer-events:none; padding-left:5px;
}
.bar.ms{ height:11px; border-radius:2px; }
.baseline{
  position:absolute; height:4px; bottom:2px; border-radius:2px;
  background:repeating-linear-gradient(90deg,#a6aeb9 0 5px,#c3c9d1 5px 10px);
}
.row.obra .baseline{ bottom:3px; }
.hit{ position:absolute; top:0; bottom:0; cursor:default; z-index:4; }

/* ---------- misc ---------------------------------------------------------- */
.statusbar{
  flex:0 0 auto; display:flex; justify-content:space-between; gap:16px;
  padding:5px 16px; border-top:1px solid var(--line); background:var(--bg-alt);
  font-size:11px; color:var(--ink-3);
}
.tooltip{
  position:fixed; z-index:500; pointer-events:none; max-width:340px;
  background:#20293a; color:#f1f5f9; border-radius:7px; padding:9px 11px;
  font-size:11.5px; line-height:1.5; box-shadow:0 8px 24px rgba(15,23,42,.3);
}
.tooltip .tt-t{ font-weight:700; font-size:12px; margin-bottom:4px; display:flex; align-items:center; gap:6px; }
.tooltip .tt-o{ color:#9fb0c9; font-weight:500; font-size:10.5px; margin-bottom:5px; }
.tooltip table{ border-collapse:collapse; }
.tooltip td{ padding:1px 0; vertical-align:top; }
.tooltip td:last-child{ font-variant-numeric:tabular-nums; }
.tooltip td:first-child{ color:#9fb0c9; padding-right:12px; white-space:nowrap; }
.tooltip .late{ color:#f8a08c; } .tooltip .early{ color:#9fd8b4; }

.empty{ padding:40px 24px; color:var(--ink-3); font-size:13px; }

/* scrollbars */
.viewport::-webkit-scrollbar{ width:12px;height:12px; }
.viewport::-webkit-scrollbar-thumb{ background:#c6ccd4; border-radius:7px; border:3px solid var(--bg); }
.viewport::-webkit-scrollbar-thumb:hover{ background:#aab2bd; }
.viewport::-webkit-scrollbar-track{ background:var(--bg); }

/* ---------- barra de cenários -------------------------------------------- */
.scenbar{
  flex:0 0 auto; display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding:7px 16px; border-bottom:1px solid var(--line);
  background:var(--bg-alt); font-size:12px; color:var(--ink-2);
}
body.scen .scenbar{ background:#fdf6ec; border-bottom-color:#e8d6b8; }
.scen-group{ display:flex; align-items:center; gap:6px; }
.scen-hint{ font-size:11px; color:var(--ink-3); display:none; }
body.scen .scen-hint{ display:inline; }
.scen-count{ font-size:11px; color:var(--ink-3); font-variant-numeric:tabular-nums; white-space:nowrap; }
.btn.sm{ height:25px; padding:0 9px; font-size:12px; }
.btn:disabled{ opacity:.42; cursor:default; }
.btn:disabled:hover{ background:#fff; }
.scenbar input[type=text]{
  height:25px; width:136px; padding:0 8px; font:inherit; font-size:12px;
  border:1px solid var(--line-strong); border-radius:var(--radius); background:#fff; color:var(--ink);
}
.scenbar select{
  height:25px; max-width:190px; padding:0 6px; font:inherit; font-size:12px;
  border:1px solid var(--line-strong); border-radius:var(--radius); background:#fff; color:var(--ink);
}

/* interruptor */
.switch{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; white-space:nowrap; }
.switch input{ position:absolute; opacity:0; width:0; height:0; }
.switch .track{
  width:34px; height:19px; border-radius:10px; background:#c8cdd5; position:relative;
  transition:background .15s; flex:0 0 auto;
}
.switch .knob{
  position:absolute; top:2px; left:2px; width:15px; height:15px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.3); transition:transform .15s;
}
.switch input:checked + .track{ background:#c98b3a; }
.switch input:checked + .track .knob{ transform:translateX(15px); }
.switch input:focus-visible + .track{ outline:2px solid #94a3b8; outline-offset:2px; }
.switch-label{ font-weight:600; color:var(--ink); }

/* estados das barras em cenário */
.ghost{
  position:absolute; height:15px; top:50%; transform:translateY(-50%);
  border:1px dashed #a3adba; border-radius:3px; background:rgba(148,163,184,.10); z-index:1;
}
.row.obra .ghost{ height:11px; } .row.sub .ghost{ height:10px; }
.bar{ z-index:2; }
.bar.moved{ box-shadow: inset 0 -1px 0 rgba(0,0,0,.10), 0 0 0 1.5px #c98b3a; }
.bar.pinned::after{
  content:""; position:absolute; top:-3px; right:-3px; width:6px; height:6px;
  border-radius:50%; background:#c98b3a; box-shadow:0 0 0 1.5px #fff;
}
.bar.sel{ outline:2px solid #334155; outline-offset:1px; }
body.scen .hit{ cursor:grab; }
body.scen .row.obra .hit{ cursor:grab; }
body.dragging, body.dragging .hit{ cursor:grabbing !important; user-select:none; }
body.dragging .bar,body.dragging .ghost{ transition:none; }

.pkg-name.absent{ color:var(--ink-3); font-style:italic; }
.tt-hint{ margin-top:6px; padding-top:5px; border-top:1px solid #3a465c; color:#9fb0c9; font-size:10.5px; }
.legend .item.gh i{ background:rgba(148,163,184,.10); border:1px dashed #a3adba; }

.flash{
  position:fixed; z-index:600; left:50%; bottom:34px; transform:translateX(-50%);
  background:#20293a; color:#f1f5f9; padding:9px 15px; border-radius:7px; font-size:12px;
  box-shadow:0 8px 24px rgba(15,23,42,.3); max-width:min(520px,90vw); text-align:center;
}
.brand-sub .ok{ color:var(--ink-3); }
.brand-sub .late{ color:#b3402c; font-weight:600; }
.brand-sub .early{ color:#2e6b45; font-weight:600; }

/* ---------- inspetor da tarefa ------------------------------------------- */
.inspector{
  position:fixed; right:16px; bottom:34px; z-index:400; width:286px;
  background:#fff; border:1px solid var(--line-strong); border-radius:9px;
  box-shadow:0 12px 30px rgba(15,23,42,.18); padding:11px 13px 12px;
  display:flex; flex-direction:column; gap:9px; font-size:12px;
}
.ins-head{ display:flex; align-items:flex-start; gap:8px; }
.ins-title{ min-width:0; flex:1; }
.ins-name{ font-size:12.5px; font-weight:650; line-height:1.25; overflow-wrap:anywhere; }
.ins-owner{ font-size:10.5px; color:var(--ink-3); margin-top:2px; }
.ins-close{
  border:0; background:none; cursor:pointer; font-size:18px; line-height:1;
  color:var(--ink-3); padding:0 2px; flex:0 0 auto;
}
.ins-close:hover{ color:var(--ink); }

.ins-grid{ display:grid; grid-template-columns:auto 1fr; gap:7px 10px; align-items:center; }
.ins-grid > label{ font-size:11px; color:var(--ink-2); white-space:nowrap; }
.inspector input[type=date],.inspector input[type=number]{
  height:26px; padding:0 7px; font:inherit; font-size:12px; width:100%;
  border:1px solid var(--line-strong); border-radius:5px; background:#fff; color:var(--ink);
  font-variant-numeric:tabular-nums;
}
.inspector input:disabled{ background:#f4f5f7; color:var(--ink-3); }
.ins-dur{ display:flex; align-items:center; gap:5px; }
.ins-dur input{ width:62px !important; text-align:center; }
.ins-unit{ font-size:10.5px; color:var(--ink-3); white-space:nowrap; }
.ins-orig{ font-size:10.5px; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.ins-orig .late{ color:#b3402c; font-weight:650; }
.ins-orig .early{ color:#2e6b45; font-weight:650; }
.ins-note{ font-size:10.5px; color:#8a6d3b; }
.ins-note:empty{ display:none; }
#insClear{ align-self:flex-start; }

/* pegadores de redimensionamento */
body.scen .bar:not(.obra)::before,
body.scen .bar:not(.obra) > .grip{ pointer-events:none; }
body.scen .hit:hover ~ .bar, body.scen .bar.sel{ }
.grip{
  position:absolute; top:2px; bottom:2px; width:3px; border-radius:2px;
  background:rgba(255,255,255,.75); box-shadow:0 0 0 1px rgba(0,0,0,.12);
  opacity:0; transition:opacity .1s; pointer-events:none;
}
.grip.l{ left:2px; } .grip.r{ right:2px; }
body.scen .bar.wide:hover .grip, body.scen .bar.wide.sel .grip{ opacity:1; }

/* ---------- histórico de cenários ---------------------------------------- */
.cmp-chip{
  display:inline-flex; align-items:center; gap:6px; font-size:11.5px;
  background:#ede9fb; color:#4b3f8f; border:1px solid #cfc6f2;
  padding:2px 6px 2px 9px; border-radius:20px; white-space:nowrap;
}
.cmp-chip b{ font-weight:650; }
.cmp-chip button{
  border:0; background:none; cursor:pointer; color:#6b5fb0; font-size:15px;
  line-height:1; padding:0 2px;
}
.cmp-chip button:hover{ color:#2c2560; }

.modal{
  position:fixed; inset:0; z-index:700; background:rgba(15,23,42,.42);
  display:flex; align-items:center; justify-content:center; padding:26px;
}
.modal-card{
  background:#fff; border-radius:11px; box-shadow:0 24px 60px rgba(15,23,42,.32);
  width:min(1020px, 100%); max-height:100%; display:flex; flex-direction:column; overflow:hidden;
}
.modal-head{
  display:flex; align-items:flex-start; gap:16px; padding:15px 18px 13px;
  border-bottom:1px solid var(--line);
}
.modal-head h2{ margin:0; font-size:15px; font-weight:650; letter-spacing:-.01em; }
.modal-sub{ margin:4px 0 0; font-size:11.5px; color:var(--ink-3); max-width:62ch; line-height:1.5; }
.modal-acts{ margin-left:auto; display:flex; align-items:center; gap:7px; flex:0 0 auto; }
.modal-acts label.btn{ cursor:pointer; }
.modal-body{ overflow:auto; padding:14px 18px 20px; display:flex; flex-direction:column; gap:22px; }

.hist-table{ width:100%; border-collapse:collapse; font-size:12px; }
.hist-table th{
  text-align:left; font-size:10px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--ink-3); font-weight:650; padding:0 9px 6px; border-bottom:1px solid var(--line);
  white-space:nowrap;
}
.hist-table td{ padding:7px 9px; border-bottom:1px solid var(--line-2); vertical-align:top; }
.hist-table .num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.hist-table td.late{ color:#b3402c; font-weight:650; }
.hist-table td.early{ color:#2e6b45; font-weight:650; }
.hist-base td{ background:var(--bg-alt); color:var(--ink-2); }
.hist-ver td:first-child{ padding-left:22px; }
.hist-ver td{ color:var(--ink-2); }
.hist-top.is-current td{ background:#fdf6ec; }
.hist-table tr.is-cmp td{ box-shadow: inset 0 0 0 99px rgba(139,122,214,.09); }
.hist-sub{ font-size:10.5px; color:var(--ink-3); margin-top:2px; }
.hist-vtag{ font-size:11px; color:var(--ink-3); }
.hist-badge{
  font-size:9.5px; font-weight:650; background:#c98b3a; color:#fff;
  padding:1px 5px; border-radius:3px; vertical-align:1px;
}
.hist-imp{ min-width:170px; line-height:1.5; }
.hist-imp .late{ color:#b3402c; font-weight:650; }
.hist-imp .early{ color:#2e6b45; font-weight:650; }
.hist-imp .hist-sub{ display:inline; margin:0; }
.hist-acts{ display:flex; flex-wrap:wrap; gap:9px; justify-content:flex-end; }
.linkbtn2{
  background:none; border:0; padding:0; font:inherit; font-size:11.5px;
  color:#3b6ea5; cursor:pointer; white-space:nowrap;
}
.linkbtn2:hover{ text-decoration:underline; }
.linkbtn2.danger{ color:#b3402c; }
.linkbtn2.on{ color:#4b3f8f; font-weight:650; }
.linkbtn2.armed{ color:#fff; background:#b3402c; padding:1px 6px; border-radius:3px; font-weight:650; }
.hist-rename{
  width:100%; max-width:200px; height:24px; padding:0 6px; font:inherit; font-size:12px;
  border:1px solid #3b6ea5; border-radius:4px; background:#fff; color:var(--ink);
}
.btn.armed{ background:#b3402c; border-color:#b3402c; color:#fff; font-weight:650; }
.btn.armed:hover{ background:#9d3626; }
.hist-empty{ font-size:12.5px; color:var(--ink-2); line-height:1.6; margin:6px 0; max-width:66ch; }
.hist-cmp-head{ font-size:12px; color:var(--ink-2); margin-bottom:8px; }

/* barra do cenário comparado */
.refbar{
  position:absolute; height:4px; top:calc(50% + 9px); transform:translateY(-50%);
  border-radius:2px; background:#8b7ad6; z-index:1;
}
.row.obra .refbar{ top:calc(50% + 8px); }
.row.sub .refbar{ top:calc(50% + 7px); height:3px; }
body.comparing .baseline{ opacity:.5; }
.legend .item.rf i{ height:4px; background:#8b7ad6; }

@media (max-width: 720px){
  :root{ --left-w: 178px; }
  .brand{ min-width:0; }
  .legend{ font-size:10.5px; gap:10px; }
  .scenbar{ gap:10px; font-size:11.5px; }
  .scen-hint{ display:none !important; }
  .inspector{ right:8px; left:8px; width:auto; bottom:30px; }
  .modal{ padding:10px; }
  .modal-body{ padding:12px; }
  .hist-table{ font-size:11px; }
  .hist-acts{ justify-content:flex-start; }
  .obra-meta{ display:none; }
}

@page{ size: A3 landscape; margin: 8mm; }
@media print{
  body{ overflow:visible; height:auto; }
  .toolbar,.statusbar,.scenbar,.flash,.inspector,.modal{ display:none; }
  .viewport{ overflow:visible; }
  .thead{ position:static; }
  .row-left,.head-left{ position:static; }
  .row:hover .row-left,.row:hover .row-time{ background:inherit; }
  .bar,.baseline,.tick.day.we,.row.obra .row-left{ -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
