:root {
  color-scheme: light;
  --bg: #eceef1;
  --bg-glow: rgba(154, 122, 38, 0.06);
  --panel: #ffffff;
  --panel-raised: #ffffff;
  --soft: #f3f5f7;
  --hover: #e9ecef;
  --text: #171a1e;
  --muted: #666d77;
  --line: #d8dce2;
  --grid-line: #e3e6ea;
  --accent: #9a7a26;
  --accent-soft: #f2ecdd;
  --accent-text: #7d6117;
  --danger: #b42318;
  /* Sobre painel branco, a aresta clara não aparece: o bisel vem da borda de cima mais clara e da de baixo mais escura. */
  --edge: rgba(255, 255, 255, 0.9);
  --shade: rgba(23, 26, 30, 0.075);
  --panel-edge: inset 0 1px 0 var(--edge), inset 0 -1px 0 var(--shade);
  --border-top: color-mix(in srgb, var(--line) 52%, #fff 48%);
  --border-bottom: color-mix(in srgb, var(--line) 60%, #000 40%);
  --shadow: 0 1px 1px rgba(23,26,30,.05), 0 6px 14px rgba(23,26,30,.07), 0 24px 48px rgba(23,26,30,.10);
  --shadow-soft: 0 1px 2px rgba(23,26,30,.05), 0 4px 10px rgba(23,26,30,.06);
  --btn-gradient: linear-gradient(180deg, #ffffff 0%, #f8f9fb 40%, #e7eaf0 100%);
  --btn-inset: inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(23,26,30,.11);
  --btn-shadow: 0 1px 1px rgba(23,26,30,.08), 0 3px 6px rgba(23,26,30,.07), 0 9px 18px rgba(23,26,30,.09);
  --btn-shadow-hover: 0 1px 2px rgba(23,26,30,.10), 0 6px 12px rgba(23,26,30,.10), 0 16px 30px rgba(23,26,30,.13);
  --btn-shadow-press: inset 0 2px 5px rgba(23,26,30,.16), inset 0 -1px 0 rgba(255,255,255,.55);
  --lane-shadow: inset 0 1px 3px rgba(23,26,30,.11), inset 0 0 0 1px rgba(23,26,30,.045);
  --bar-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(18,21,26,.1), inset 0 -2px 3px rgba(0,0,0,.22), 0 1px 2px rgba(18,21,26,.3), 0 4px 9px rgba(18,21,26,.2), 0 8px 18px rgba(18,21,26,.12);
  --bar-shadow-hover: inset 0 1px 0 rgba(255,255,255,.66), inset 0 0 0 1px rgba(18,21,26,.16), inset 0 -2px 3px rgba(0,0,0,.24), 0 4px 11px rgba(18,21,26,.32), 0 11px 22px rgba(18,21,26,.2);
  --bar-gloss: linear-gradient(180deg, rgba(255,255,255,.36) 0%, rgba(255,255,255,.08) 46%, rgba(0,0,0,.17) 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23g)' opacity='.05'/%3E%3C/svg%3E");
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0e;
  --bg-glow: rgba(201, 163, 78, 0.05);
  --panel: #141619;
  --panel-raised: #191c20;
  --soft: #1e2126;
  --hover: #262a30;
  --text: #e7e9ec;
  --muted: #8b929c;
  --line: #292d33;
  --grid-line: #2f343a;
  --accent: #c9a34e;
  --accent-soft: #2a2419;
  --accent-text: #dcb863;
  --danger: #ff8b82;
  --edge: rgba(255, 255, 255, 0.11);
  --shade: rgba(0, 0, 0, 0.5);
  --panel-edge: inset 0 1px 0 var(--edge), inset 0 -1px 0 rgba(0,0,0,.5);
  --border-top: color-mix(in srgb, var(--line) 80%, #fff 20%);
  --border-bottom: color-mix(in srgb, var(--line) 55%, #000 45%);
  --shadow: 0 1px 2px rgba(0,0,0,.55), 0 7px 16px rgba(0,0,0,.5), 0 26px 52px rgba(0,0,0,.55);
  --shadow-soft: 0 1px 2px rgba(0,0,0,.5), 0 4px 10px rgba(0,0,0,.38);
  --btn-gradient: linear-gradient(180deg, #2a2e35 0%, #1e2126 42%, #15171b 100%);
  --btn-inset: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.6);
  --btn-shadow: 0 1px 1px rgba(0,0,0,.65), 0 4px 9px rgba(0,0,0,.5), 0 12px 26px rgba(0,0,0,.45);
  --btn-shadow-hover: 0 1px 2px rgba(0,0,0,.7), 0 7px 15px rgba(0,0,0,.6), 0 18px 36px rgba(0,0,0,.55);
  --btn-shadow-press: inset 0 2px 6px rgba(0,0,0,.68), inset 0 -1px 0 rgba(255,255,255,.05);
  --lane-shadow: inset 0 1px 4px rgba(0,0,0,.68), inset 0 0 0 1px rgba(255,255,255,.035);
  --bar-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.13), inset 0 -2px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.65), 0 5px 12px rgba(0,0,0,.48);
  --bar-shadow-hover: inset 0 1px 0 rgba(255,255,255,.62), inset 0 0 0 1px rgba(255,255,255,.24), inset 0 -2px 3px rgba(0,0,0,.42), 0 4px 12px rgba(0,0,0,.7), 0 13px 26px rgba(0,0,0,.52);
  --bar-gloss: linear-gradient(180deg, rgba(255,255,255,.3) 0%, rgba(255,255,255,.06) 46%, rgba(0,0,0,.24) 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23g)' opacity='.07'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
  background-image: radial-gradient(circle at 10% 0%, var(--bg-glow), transparent 34%);
  transition: background-color 180ms ease, color 180ms ease;
}
h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 23px; letter-spacing: -0.035em; }
h2 { font-size: 16px; letter-spacing: -0.015em; }
button { font-family: inherit; }
.page-head {
  max-width: 1480px;
  margin: 0 auto;
  padding: 27px 24px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.head-actions { display: flex; align-items: center; gap: 13px; }
.source-line { color: var(--muted); font-size: 12px; white-space: nowrap; }
.theme-toggle {
  min-width: 118px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-top-color: color-mix(in srgb, var(--line) 60%, white 40%);
  border-radius: 999px;
  background: var(--btn-gradient);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: var(--btn-inset), 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 150ms cubic-bezier(.4,0,.2,1), border-color 150ms ease, box-shadow 180ms ease, background 150ms ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--btn-inset), 0 2px 6px rgba(0,0,0,0.08), 0 8px 20px rgba(0,0,0,0.07); }
.theme-toggle:active { transform: translateY(0.5px); box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.04); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.theme-icon { width: 16px; text-align: center; font-size: 15px; }
.main { max-width: 1480px; margin: auto; padding: 14px 24px 38px; }
.error {
  display: none;
  margin-bottom: 15px;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: 12px;
  color: var(--danger);
  background: var(--panel);
}
.note, .label { color: var(--muted); font-size: 12px; }
.label { display: block; font-weight: 650; letter-spacing: 0.01em; }
.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 17px;
}
.summary-box {
  position: relative;
  min-height: 92px;
  padding: 18px 19px 17px 22px;
  overflow: hidden;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 180ms ease, transform 180ms cubic-bezier(.4,0,.2,1);
}
.summary-box:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.summary-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}
.summary-box.phase-summary::before { background: var(--phase-color, var(--accent)); }
.summary-value {
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.summary-duration {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.summary-duration .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.summary-duration .summary-value {
  margin-top: 0;
  font-size: 22px;
}
.summary-duration[hidden] { display: none; }
.section {
  margin-top: 15px;
  padding: 19px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 200ms ease;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.section-title { display: flex; align-items: center; gap: 9px; }
.section-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.scroll { overflow-x: auto; scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
.scroll::-webkit-scrollbar { height: 9px; }
.scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--panel); }
.overview-head, .phase-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(480px, 3.25fr);
  gap: 14px;
  align-items: center;
  min-width: 770px;
}
.overview-head {
  padding: 0 5px 0 0;
  border: 1px solid transparent;
}
.weeks, .grid {
  display: grid;
  grid-template-columns: repeat(var(--weeks), minmax(28px, 1fr));
}
.weeks { padding: 0 6px 8px 0; }
.weeks span { font-size: 10px; font-weight: 650; color: var(--muted); text-align: center; }
.phase-list { display: grid; gap: 7px; margin-top: 2px; }
.phase-row {
  width: 100%;
  min-height: 43px;
  padding: 4px 5px 4px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--btn-gradient);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--btn-inset), 0 1px 2px rgba(0,0,0,0.03);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms cubic-bezier(.4,0,.2,1), box-shadow 160ms ease;
}
.phase-row:hover { border-color: color-mix(in srgb, var(--phase-color, var(--accent)) 40%, var(--line)); transform: translateY(-0.5px); box-shadow: var(--btn-inset), 0 2px 8px rgba(0,0,0,0.05); }
.phase-row:active { transform: translateY(0.5px); box-shadow: inset 0 1px 3px rgba(0,0,0,0.06); }
.phase-row.active { background: color-mix(in srgb, var(--phase-color, var(--accent)) 12%, var(--panel)); border-color: color-mix(in srgb, var(--phase-color, var(--accent)) 40%, transparent); }
.phase-name {
  position: relative;
  padding: 8px 10px 8px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}
.phase-name::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 5px;
  height: 22px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: var(--phase-color, var(--accent));
}
.phase-id { display: inline-block; width: 30px; color: var(--muted); font-weight: 750; }
.grid {
  position: relative;
  height: 29px;
  margin-right: 6px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--soft);
}
.grid-cell { grid-row: 1; border-left: 1px solid var(--grid-line); }
.grid-cell:first-child { border-left: 0; }
.bar {
  z-index: 2;
  grid-row: 1;
  align-self: center;
  height: 19px;
  margin: 0 3px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--bar-text, #ffffff);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), var(--bar-shadow);
  transition: filter 140ms cubic-bezier(.4,0,.2,1), transform 140ms cubic-bezier(.4,0,.2,1);
}
.bar:hover { filter: saturate(1.12) brightness(1.06); transform: translateY(-1px); }
.unscheduled {
  z-index: 2;
  grid-row: 1;
  grid-column: 1 / -1;
  align-self: center;
  padding-left: 11px;
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
}
.detail-head, .task-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(480px, 3.25fr);
  gap: 8px;
  align-items: center;
  min-width: 760px;
}
.detail-head {
  padding: 10px 10px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.task-list { margin-top: 5px; }
.task-row {
  min-height: 45px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
}
.task-row:hover { background: var(--soft); }
.task-row:last-child { border-bottom: 0; }
.task-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.task-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 23px;
  margin-right: 9px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.task-row.subtask .task-name { padding-left: 22px; }
.task-row.subtask .task-name::before { content: "↳"; margin-left: -16px; margin-right: 5px; color: var(--muted); }
.task-row.group .task-name { font-weight: 700; }
.task-row.group { background: color-mix(in srgb, var(--phase-color, var(--accent)) 5%, transparent); }
.group-toggle {
  width: 34px;
  height: 34px;
  margin: 0 3px 0 -5px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.group-toggle:hover { background: var(--hover); color: var(--text); border-color: var(--line); }
.phase-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.phase-period { margin-left: auto; padding-left: 10px; color: var(--muted); font-size: 11px; }
.num { text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.mobile-detail { display: none; }
.mobile-gantt {
  display: grid;
  grid-template-columns: minmax(142px, 43%) minmax(0, 57%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}
.mobile-labels {
  position: relative;
  z-index: 4;
  border-right: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 8px 0 14px rgba(20, 30, 48, 0.07);
}
html[data-theme="dark"] .mobile-labels { box-shadow: 8px 0 14px rgba(0, 0, 0, 0.18); }
.mobile-column-head,
.mobile-week-head {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 42px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.mobile-column-head { display: flex; align-items: center; padding: 0 10px; }
.mobile-label-row {
  height: 50px;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.mobile-label-row.child { padding-left: 22px; }
.mobile-label-row.group { font-weight: 700; background: color-mix(in srgb, var(--phase-color) 6%, transparent); }
.mobile-label-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-timeline-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.mobile-timeline-inner { min-width: 520px; }
.mobile-week-head {
  display: grid;
  grid-template-columns: repeat(var(--weeks), minmax(22px, 1fr));
}
.mobile-week-head span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
}
.mobile-lane {
  height: 50px;
  display: grid;
  grid-template-columns: repeat(var(--weeks), minmax(22px, 1fr));
  align-items: center;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px);
  background-size: calc(100% / var(--weeks)) 100%;
}
.mobile-lane.group { background-color: color-mix(in srgb, var(--phase-color) 5%, transparent); }
.mobile-bar {
  z-index: 2;
  grid-row: 1;
  align-self: center;
  height: 23px;
  margin: 0 2px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--phase-color);
  color: var(--bar-text, #fff);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), var(--bar-shadow);
}
.mobile-empty {
  grid-column: 1 / -1;
  padding-left: 8px;
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
}
.mobile-swipe-hint {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}
.mobile-selection {
  min-height: 46px;
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--phase-color, var(--accent));
  border-radius: 0 9px 9px 0;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}
.loading { padding: 30px; text-align: center; color: var(--muted); }
@media (max-width: 720px) {
  .page-head { padding: 18px 14px 6px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .head-actions { width: 100%; justify-content: space-between; }
  .theme-toggle { min-width: 42px; width: 42px; padding: 0; }
  .theme-label { display: none; }
  .main { padding: 12px 14px 24px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .summary-box { min-height: 76px; padding: 13px 12px 12px 16px; }
  .summary-value { font-size: 17px; }
  .section { padding: 14px; border-radius: 14px; }
  .section-head { align-items: flex-start; margin-bottom: 12px; }
  .section-head .note { max-width: 130px; text-align: right; }
  .overview-scroll { overflow: visible; }
  .overview-head { display: none; }
  .phase-list { gap: 7px; }
  .phase-row {
    display: block;
    min-width: 0;
    min-height: 60px;
    padding: 8px 10px 10px;
    border-color: var(--line);
    border-radius: 12px;
  }
  .phase-row.active { border-color: var(--phase-color); box-shadow: var(--btn-inset), 0 1px 4px rgba(0,0,0,0.06); }
  .phase-name { display: flex; width: 100%; padding: 4px 2px 8px 13px; }
  .phase-name::before { left: 0; height: 24px; }
  .phase-id { width: 28px; }
  .phase-period { font-size: 10px; }
  .phase-row .grid { width: calc(100% - 13px); height: 8px; margin: 0 0 0 13px; overflow: hidden; border-radius: 999px; }
  .phase-row .grid-cell { border: 0; }
  .phase-row .bar { height: 8px; margin: 0; border-radius: 999px; color: transparent; font-size: 0; box-shadow: none; }
  .phase-row .unscheduled { padding: 0 0 0 5px; font-size: 9px; line-height: 8px; }
  .desktop-detail { display: none; }
  .mobile-detail { display: block; }
  .mobile-bar { min-height: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Usabilidade: controles, detalhes e impressão. */
.toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:16px; }
.search-wrap { flex:1 1 240px; position:relative; }
.search-wrap input { width:100%; min-height:44px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:var(--panel); color:var(--text); font:inherit; font-size:16px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); transition: border-color 140ms ease, box-shadow 140ms ease; }
.search-wrap input:focus { border-color: var(--accent); box-shadow: inset 0 1px 2px rgba(0,0,0,0.04), 0 0 0 3px var(--accent-soft); outline:none; }
.action { min-height:44px; border:1px solid var(--line); border-top-color: color-mix(in srgb, var(--line) 60%, white 40%); border-radius:10px; padding:9px 13px; background:var(--btn-gradient); color:var(--text); cursor:pointer; box-shadow: var(--btn-inset), 0 1px 3px rgba(0,0,0,0.05), 0 3px 10px rgba(0,0,0,0.04); transition: transform 140ms cubic-bezier(.4,0,.2,1), border-color 140ms ease, box-shadow 160ms ease; }
.action:hover { border-color:var(--accent); transform:translateY(-1px); box-shadow: var(--btn-inset), 0 2px 6px rgba(0,0,0,0.07), 0 6px 16px rgba(0,0,0,0.06); }
.action:active { transform:translateY(0.5px); box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.04); }
.action:focus-visible, input:focus-visible, .mobile-bar:focus-visible, .bar:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.search-results { margin-bottom:16px; display:grid; gap:7px; }
.search-results[hidden] { display:none; }
.search-result { text-align:left; width:100%; }
.search-result small { display:block; color:var(--muted); margin-top:4px; }
.sync-note { font-size:11px; color:var(--muted); flex-basis:100%; }
.mobile-selection { display:none; }
.mobile-label-text { cursor:pointer; border:0; background:transparent; color:inherit; font:inherit; text-align:left; padding:0; min-height:44px; flex:1; }
.mobile-bar { position:relative; overflow:visible; cursor:pointer; }
.mobile-bar::after { content:""; position:absolute; inset:-10px 0; }
.task-dialog { width:min(420px, calc(100vw - 28px)); max-height:calc(100dvh - 40px); padding:24px; border:1px solid var(--line); border-top:4px solid var(--phase-color); border-radius:18px; background:var(--panel); color:var(--text); box-shadow: 0 30px 80px rgba(0,0,0,0.3), var(--shadow); }
.task-dialog::backdrop { background:rgba(0,0,0,.65); backdrop-filter:blur(6px); }
.task-dialog:not([open]) { display:none; }
.dialog-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.dialog-head > div { flex:1; min-width:0; }
.dialog-head h2 { font-size:21px; line-height:1.35; overflow-wrap:anywhere; }
.dialog-code { color:var(--muted); font-size:12px; margin-bottom:8px; }
#dialog-close { flex-shrink:0; min-width:44px; min-height:44px; }
.dialog-data { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; margin:20px 0 0; }
.dialog-data div { padding:12px; border-radius:10px; background:var(--soft); }
.dialog-data dt { font-size:12px; color:var(--muted); }
.dialog-data dd { margin:5px 0 0; overflow-wrap:anywhere; }
.dialog-data .wide { grid-column:1/-1; }
.dialog-data .dialog-status-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0; background:none; box-shadow:none; }
.dialog-status-row dd { margin:0; padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:var(--soft); font-size:13px; font-weight:600; line-height:1.4; white-space:nowrap; }
body.dialog-open { overflow:hidden; }
button.bar { border:0; cursor:pointer; padding:0; }
.print-report { display:none; }
@media(max-width:720px) {
  .phase-row .grid { grid-template-columns:repeat(var(--weeks),minmax(0,1fr)); }
  .toolbar .action { flex:1; }
}
@page { size:A3 landscape; margin:8mm; }
@media print {
  :root, html[data-theme="dark"] { color-scheme:light; }
  body { background:white !important; color:#172033 !important; }
  body > header, body > main, dialog { display:none !important; }
  .print-report { display:block; font:7.5pt Arial,sans-serif; color:#172033; }
  .print-title { display:flex; align-items:baseline; justify-content:space-between; margin:0 0 3mm; }
  .print-title h1 { margin:0; font-size:14pt; letter-spacing:.02em; }
  .print-title span { color:#667085; font-size:7pt; }
  .print-row { display:grid; grid-template-columns:32% 8% 60%; align-items:stretch; break-inside:avoid; border-bottom:1px solid #ddd; min-height:4mm; }
  .print-name, .print-period { padding:1mm 1.2mm; overflow-wrap:anywhere; line-height:1.15; }
  .print-lane { display:grid; grid-template-columns:repeat(var(--weeks),minmax(0,1fr)); align-items:center; background:repeating-linear-gradient(to right,#eee 0px,#eee 1px,transparent 1px,transparent calc(100% / var(--weeks))); }
  .print-lane span { grid-row:1; font-size:6.5pt; text-align:center; }
  .print-bar { height:2.2mm; border-radius:1mm; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .print-column-head { min-height:5mm; background:#f1f3f5; font-weight:700; text-transform:uppercase; font-size:6.5pt; }
  .print-phase-head { display:flex; align-items:center; min-height:4.2mm; padding:1mm 1.2mm; border-left:3mm solid var(--phase-color); border-bottom:1px solid #d9dce1; background:#fafafa; font-weight:700; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .print-phase-head small { margin-left:auto; color:#667085; font-weight:400; }
  .print-graphic-weeks, .print-graphic-lane { display:grid; grid-template-columns:repeat(var(--weeks),minmax(0,1fr)); }
  .print-graphic-weeks { height:5mm; background:#f1f3f5; border:1px solid #d9dce1; font-size:6.5pt; font-weight:700; }
  .print-graphic-weeks span { display:flex; align-items:center; justify-content:center; border-left:1px solid #d9dce1; }
  .print-graphic-phase { height:4.1mm; display:flex; align-items:center; gap:2mm; padding:0 1.2mm; border-left:3mm solid var(--phase-color); border-bottom:1px solid #d9dce1; background:#fafafa; font-weight:700; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .print-graphic-phase small { margin-left:auto; color:#667085; font-weight:400; }
  .print-graphic-lane { height:3.6mm; align-items:center; border-bottom:1px solid #eceef1; background-image:linear-gradient(to right,#e1e4e8 1px,transparent 1px); background-size:calc(100% / var(--weeks)) 100%; }
  .print-graphic-bar { grid-row:1; height:2.5mm; margin:0 .35mm; display:flex; align-items:center; justify-content:center; border-radius:.7mm; color:#fff; font-size:5.5pt; font-weight:700; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .print-complete-page { break-inside:avoid; page-break-inside:avoid; }
  .print-phase-page { break-after:page; page-break-after:always; }
  .print-phase-page:last-child { break-after:auto; page-break-after:auto; }
  .print-phase-page .print-title { margin-bottom:2.5mm; }
  .print-phase-heading { display:flex; align-items:center; gap:2mm; height:7mm; margin-bottom:2mm; padding:0 2mm; border-left:3mm solid var(--phase-color); background:#f5f6f8; font-size:11pt; font-weight:700; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .print-phase-heading small { margin-left:auto; color:#667085; font-size:7pt; font-weight:400; }
  .print-phase-columns, .print-phase-task { display:grid; grid-template-columns:31% 6% 6% 7% 50%; align-items:stretch; }
  .print-phase-columns { min-height:6mm; background:#eef0f3; border:1px solid #d9dce1; font-size:6.5pt; font-weight:700; text-transform:uppercase; }
  .print-phase-columns > span { display:flex; align-items:center; padding:0 1.2mm; border-left:1px solid #d9dce1; }
  .print-phase-columns > span:first-child { border-left:0; }
  .print-phase-task { min-height:5.5mm; border:1px solid #e1e4e8; border-top:0; break-inside:avoid; page-break-inside:avoid; }
  .print-phase-task > span { display:flex; align-items:center; padding:0 1.2mm; border-left:1px solid #e1e4e8; overflow-wrap:anywhere; }
  .print-phase-task > span:first-child { border-left:0; }
  .print-phase-task-name.is-subtask { padding-left:4.5mm; color:#475467; }
  .print-phase-task-name.is-group { font-weight:700; }
  .print-phase-task-value { justify-content:center; color:#475467; }
  .print-phase-task-lane { display:grid !important; grid-template-columns:repeat(var(--weeks),minmax(0,1fr)); align-items:center !important; padding:0 !important; background-image:linear-gradient(to right,#e1e4e8 1px,transparent 1px); background-size:calc(100% / var(--weeks)) 100%; }
  .print-phase-task-bar { grid-row:1; height:3.2mm; margin:0 .35mm; display:flex; align-items:center; justify-content:center; border-radius:.8mm; color:#fff; font-size:6pt; font-weight:700; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}


/* Fases independentes e tipografia editorial. */
body { font-size:15px; line-height:1.45; -webkit-font-smoothing:antialiased; }
h1 { font-size:25px; font-weight:600; letter-spacing:.015em; }
h2 { font-size:18px; font-weight:600; letter-spacing:0; }
button, input { font-family:inherit; }
.summary { grid-template-columns:minmax(0,1fr); }
.summary-box { min-height:76px; }
.summary-value { font-weight:600; }
.phase-list { display:flex; flex-direction:column; gap:12px; }
.phase-item { min-width:0; }
.phase-row { width:100%; }
.phase-label { font-size:16px; font-weight:600; letter-spacing:0; }
.phase-id { font-weight:600; }
.phase-chevron { flex-shrink:0; margin-left:10px; font-size:20px; color:var(--muted); transition:transform .15s ease; }
.phase-row[aria-expanded="true"] .phase-chevron { transform:rotate(180deg); }
.phase-detail { min-width:0; margin:8px 0 12px; border:1px solid var(--line); border-left:3px solid var(--phase-color); border-radius:12px; padding:18px; background:var(--panel); }
.phase-detail[hidden] { display:none !important; }
.phase-detail .section-head { margin-bottom:14px; }
.phase-detail .task-name { font-size:14px; font-weight:400; }
.phase-detail .task-row.group .task-name { font-weight:600; }
.phase-detail .mobile-label-row { font-size:14px; }
.phase-detail .mobile-week-head { font-size:12px; font-weight:600; }
.phase-detail .mobile-column-head { font-size:11px; font-weight:600; }
.phase-detail .mobile-swipe-hint { font-size:12px; }
.phase-name { display:flex; align-items:center; }
.phase-label { flex:1; }
.phase-period { white-space:nowrap; }
.phase-row, .phase-row:hover, .phase-row.active, .phase-row:focus-visible { transform:none; }
.view-switch { display:flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:11px; background:var(--soft); box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); }
.view-switch button { min-height:34px; border:1px solid transparent; border-radius:7px; padding:6px 11px; background:transparent; color:var(--muted); font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition: all 140ms cubic-bezier(.4,0,.2,1); }
.view-switch button[aria-pressed="true"] { background:var(--btn-gradient); color:var(--text); border-color: var(--line); box-shadow: var(--btn-inset), 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04); }
.view-switch button:hover:not([aria-pressed="true"]) { color:var(--text); background: var(--hover); }
.complete-list { overflow:hidden; border:1px solid var(--line); border-radius:12px; }
.complete-phase { margin:0; }
.complete-phase-head { display:flex; align-items:center; gap:9px; min-height:34px; padding:6px 11px; border-top:1px solid var(--line); border-left:4px solid var(--phase-color); background:color-mix(in srgb, var(--phase-color) 7%, var(--panel)); }
.complete-phase:first-of-type .complete-phase-head { border-top:0; }
.complete-phase-code { color:var(--phase-color); font-size:13px; font-weight:700; }
.complete-phase-name { font-size:15px; font-weight:600; }
.complete-phase-period { margin-left:auto; color:var(--muted); font-size:12px; }
.complete-panel { margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.complete-panel .section-head, .complete-panel .detail-head { display:none; }
.complete-panel .task-list { margin:0; }
.complete-panel .task-row { min-height:38px; padding-top:4px; padding-bottom:4px; }
.complete-panel .task-row:last-child { border-bottom:0; }
.complete-column-head { margin:0; border-radius:0; border-bottom:1px solid var(--line); }
.complete-mobile { display:none; }
.complete-mobile-board { display:grid; grid-template-columns:minmax(138px,44%) minmax(0,56%); background:var(--panel); }
.complete-mobile-labels { position:relative; z-index:3; min-width:0; border-right:1px solid var(--line); background:var(--panel); box-shadow:8px 0 14px rgba(20,30,48,.08); }
html[data-theme="dark"] .complete-mobile-labels { box-shadow:8px 0 14px rgba(0,0,0,.2); }
.complete-mobile-head { height:40px; display:flex; align-items:center; padding:0 10px; background:var(--soft); color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; }
.complete-mobile-scroll { overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.complete-mobile-inner { min-width:620px; }
.complete-mobile-weeks { height:40px; display:grid; grid-template-columns:repeat(var(--weeks),minmax(28px,1fr)); background:var(--soft); color:var(--muted); font-size:10px; font-weight:700; }
.complete-mobile-weeks span { display:flex; align-items:center; justify-content:center; border-left:1px solid var(--line); }
.complete-mobile-phase-label, .complete-mobile-phase-band { height:34px; border-top:1px solid var(--line); background:color-mix(in srgb,var(--phase-color) 9%,var(--panel)); }
.complete-mobile-phase-label { display:flex; align-items:center; gap:7px; min-width:0; padding:0 8px; border-left:4px solid var(--phase-color); font-size:11px; font-weight:700; }
.complete-mobile-phase-code { color:var(--phase-color); flex-shrink:0; }
.complete-mobile-phase-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.complete-mobile-phase-band { border-left:0; }
.complete-mobile-task-label { height:44px; display:flex; align-items:center; min-width:0; padding:0 8px; border-top:1px solid var(--line); background:var(--panel); }
.complete-mobile-task-label.child { padding-left:19px; }
.complete-mobile-task-button { width:100%; min-width:0; border:0; padding:0; background:transparent; color:var(--text); font:inherit; font-size:11px; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.complete-mobile-task-id { color:var(--muted); font-weight:700; margin-right:5px; }
.complete-mobile-lane { height:44px; display:grid; grid-template-columns:repeat(var(--weeks),minmax(28px,1fr)); align-items:center; border-top:1px solid var(--line); background-image:linear-gradient(to right,var(--grid-line) 1px,transparent 1px); background-size:calc(100% / var(--weeks)) 100%; }
.complete-mobile-bar { z-index:2; grid-row:1; height:20px; margin:0 2px; border:0; border-radius:5px; background:var(--phase-color); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), var(--bar-shadow); cursor:pointer; }
.complete-mobile-empty { grid-column:1/-1; padding-left:7px; color:var(--muted); font-size:9px; font-style:italic; }
.complete-graphic-scroll { overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.complete-graphic-inner { width:100%; min-width:var(--chart-min,420px); background:var(--panel); }
.complete-graphic-weeks, .complete-graphic-lane { display:grid; grid-template-columns:repeat(var(--weeks),minmax(14px,1fr)); }
.complete-graphic-weeks { position:sticky; top:0; z-index:5; height:38px; background:var(--soft); color:var(--muted); border-bottom:1px solid var(--line); font-size:10px; font-weight:700; }
.complete-graphic-weeks span { display:flex; align-items:center; justify-content:center; border-left:1px solid var(--line); }
.complete-graphic-weeks span:first-child { border-left:0; }
.complete-graphic-phase { height:34px; display:flex; align-items:center; gap:8px; padding:0 11px; border-top:1px solid var(--line); border-left:5px solid var(--phase-color); background:color-mix(in srgb,var(--phase-color) 10%,var(--panel)); font-size:13px; font-weight:650; }
.complete-graphic-phase-code { color:var(--phase-color); font-weight:750; }
.complete-graphic-phase-period { margin-left:auto; color:var(--muted); font-size:11px; font-weight:500; }
.complete-graphic-lane { position:relative; height:36px; align-items:center; border-top:1px solid var(--line); background-image:linear-gradient(to right,var(--grid-line) 1px,transparent 1px); background-size:calc(100% / var(--weeks)) 100%; }
.complete-graphic-lane.group { background-color:color-mix(in srgb,var(--phase-color) 4%,transparent); }
.complete-graphic-bar { z-index:2; grid-row:1; height:23px; margin:0 1px; padding:0 1px; overflow:hidden; border:0; border-radius:5px; background:var(--phase-color); color:var(--bar-text,#fff); font:700 8px/1 "Inter","Segoe UI",Arial,sans-serif; white-space:nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), var(--bar-shadow); cursor:pointer; transition: filter 140ms cubic-bezier(.4,0,.2,1), transform 140ms cubic-bezier(.4,0,.2,1); }
.complete-graphic-bar:hover { filter:saturate(1.1) brightness(1.06); transform:translateY(-1px); }
.complete-graphic-bar:focus-visible { outline:2px solid var(--text); outline-offset:2px; }
.complete-graphic-unscheduled { grid-column:1/span 2; height:22px; margin:0 2px; display:flex; align-items:center; justify-content:center; border:1px dashed var(--muted); border-radius:6px; color:var(--muted); font-size:9px; }
@media(max-width:720px) {
  h1 { font-size:22px; }
  .phase-detail { padding:12px 8px; }
  .phase-detail .section-head { gap:6px; flex-wrap:wrap; }
  .phase-detail .section-head .note { max-width:none; text-align:left; }
  .phase-detail h2 { font-size:16px; }
  .phase-label { font-size:15px; }
  .phase-id { width:24px; flex-shrink:0; }
  .phase-period { font-size:11px; padding-left:6px; }
  .phase-chevron { margin-left:6px; }
  .mobile-gantt { grid-template-columns:minmax(115px,43%) minmax(0,57%); }
  .view-switch { width:100%; }
  .view-switch button { flex:1; }
  .complete-phase-name { font-size:16px; }
  .complete-phase-period { font-size:12px; }
  .complete-panel .mobile-gantt { border:0; border-radius:0; }
  .complete-panel .mobile-label-row, .complete-panel .mobile-lane { height:44px; }
  .complete-desktop { display:none; }
  .complete-mobile { display:block; }
  #complete-view { padding:10px 8px; }
  #complete-view > .section-head { padding:4px 5px 0; }
  .complete-graphic-inner { min-width:var(--chart-min,460px); }
  .complete-graphic-weeks { height:36px; }
  .complete-graphic-phase { height:32px; padding:0 8px; font-size:11px; }
  .complete-graphic-lane { height:34px; }
  .complete-graphic-bar { height:21px; font-size:7px; }
}

/* ---- Profundidade usinada: aresta iluminada, sombra em três estágios, trilho rebaixado. ---- */
.section, .summary-box, .phase-detail, .complete-list, .mobile-gantt, .task-dialog, .error {
  box-shadow: var(--shadow), var(--panel-edge);
}
.section, .summary-box, .phase-detail, .complete-list, .mobile-gantt {
  border-top-color: var(--border-top);
  border-bottom-color: var(--border-bottom);
}
.section, .summary-box, .phase-detail, .task-dialog { background-image: var(--grain); }
.page-head { padding: 32px 24px 16px; }
.main { padding: 16px 24px 40px; }
.summary { gap: 16px; margin-bottom: 24px; }
.summary-box { min-height: 96px; padding: 24px; border-radius: 16px; }
.section { margin-top: 24px; padding: 24px; }
.section-head { margin-bottom: 24px; }
.phase-detail { margin: 8px 0 24px; padding: 24px; border-radius: 16px; }
.phase-detail .section-head { margin-bottom: 16px; }
.complete-list { border-radius: 16px; }
.toolbar { gap: 12px; margin-bottom: 24px; }
.task-dialog {
  padding: 24px; border-radius: 20px;
  /* Mantém o drop alto do modal, que a regra de profundidade acima reescreveria. */
  box-shadow: 0 30px 80px rgba(0,0,0,.36), var(--shadow), var(--panel-edge);
}
.summary-box::before, .summary-box.phase-summary::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--phase-color, var(--accent)) 62%, #fff 38%), var(--phase-color, var(--accent)));
}

.grid, .mobile-lane, .complete-graphic-lane { box-shadow: var(--lane-shadow); }
.detail-head, .complete-mobile-head, .complete-mobile-weeks, .complete-graphic-weeks { box-shadow: inset 0 -1px 0 var(--line), inset 0 1px 0 var(--edge); }
.task-id, .dialog-data div { box-shadow: inset 0 1px 2px var(--shade), inset 0 1px 0 var(--edge); }
.search-wrap input { box-shadow: var(--lane-shadow); }
.search-wrap input:focus { box-shadow: var(--lane-shadow), 0 0 0 3px var(--accent-soft); }
.view-switch { box-shadow: var(--lane-shadow); }
.view-switch button:hover:not([aria-pressed="true"]) { box-shadow: inset 0 1px 3px var(--shade); }

.bar, .mobile-bar, .complete-mobile-bar, .complete-graphic-bar { box-shadow: var(--bar-shadow); }
.bar:hover, .mobile-bar:hover, .complete-mobile-bar:hover, .complete-graphic-bar:hover { box-shadow: var(--bar-shadow-hover); }
.bar:hover, .complete-graphic-bar:hover { filter: saturate(1.08) brightness(1.05); }
.mobile-bar, .complete-mobile-bar, .complete-graphic-bar { background-image: var(--bar-gloss); }
/* O fundo da barra vem de style inline definido em JS; !important é o único meio de sobrepor. */
.bar { background-image: var(--bar-gloss) !important; }

.theme-toggle, .action, .phase-row, .view-switch button[aria-pressed="true"] {
  background-image: var(--grain), var(--btn-gradient);
  border-top-color: var(--border-top);
  border-bottom-color: var(--border-bottom);
  box-shadow: var(--btn-inset), var(--btn-shadow);
}
.theme-toggle:hover, .action:hover { transform: translateY(-1px); box-shadow: var(--btn-inset), var(--btn-shadow-hover); }
.theme-toggle:active, .action:active { transform: translateY(1px); box-shadow: var(--btn-shadow-press); }
.phase-row:hover { box-shadow: var(--btn-inset), var(--shadow); }
.phase-row:active { box-shadow: var(--btn-shadow-press); }
.phase-row.active { background-image: var(--grain); box-shadow: var(--btn-inset), var(--shadow-soft); }

@media (max-width: 720px) {
  .page-head { padding: 20px 16px 8px; }
  .main { padding: 12px 16px 28px; }
  .summary { gap: 12px; margin-bottom: 16px; }
  .summary-box { min-height: 80px; padding: 16px; border-radius: 14px; }
  .section { margin-top: 16px; padding: 16px; }
  .section-head { margin-bottom: 16px; }
  .phase-detail { margin-bottom: 16px; padding: 16px 12px; border-radius: 14px; }
  .phase-detail .section-head { margin-bottom: 12px; }
  .task-dialog { padding: 20px; }
  .phase-row .grid { box-shadow: inset 0 1px 1px var(--shade); }
}

/* ---- Painel mestre: cabeçalho, comandos, resumo e cronograma em um único bloco. ---- */
.dashboard-shell {
  max-width: 100%;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top-color: var(--border-top);
  border-bottom-color: var(--border-bottom);
  border-radius: 20px;
  background-color: var(--panel-raised);
  background-image: var(--grain);
  box-shadow: var(--shadow), var(--panel-edge);
}
.dashboard-shell .page-head {
  max-width: none;
  margin: 0;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
.dashboard-shell .toolbar {
  margin: 20px 0 0;
}
.dashboard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}
.dashboard-meta .sync-note {
  flex: 1 1 auto;
  min-width: 0;
}
.dashboard-meta .summary {
  flex: 0 0 auto;
  display: block;
  margin: 0;
}
.dashboard-meta .summary-box {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
}
.dashboard-meta .summary-box:hover {
  transform: none;
  box-shadow: none;
}
.dashboard-meta .summary-box::before {
  display: none;
}
.dashboard-meta .summary-duration {
  justify-content: flex-end;
  white-space: nowrap;
}
.dashboard-meta .summary-duration .label {
  font-size: 11px;
}
.dashboard-meta .summary-duration .summary-value {
  font-size: 20px;
}
.dashboard-shell #phase-view > .section,
.dashboard-shell #complete-view {
  margin-top: 20px;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
}
.dashboard-shell #complete-view .complete-list {
  box-shadow: var(--panel-edge);
}

@media (max-width: 720px) {
  .dashboard-shell {
    padding: 16px 14px;
    border-radius: 16px;
  }
  .dashboard-shell .page-head {
    padding: 0 0 16px;
  }
  .dashboard-shell .toolbar {
    margin-top: 16px;
  }
  .dashboard-meta {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 8px;
    min-height: 0;
    margin-top: 14px;
    padding-top: 12px;
  }
  .dashboard-meta .summary-duration {
    justify-content: flex-start;
  }
  .dashboard-meta .sync-note {
    line-height: 1.35;
  }
  .dashboard-shell #phase-view > .section,
  .dashboard-shell #complete-view {
    margin-top: 16px;
    padding-top: 16px;
  }
}

/* ---- Cabeçalho/controles e Gantt em blocos independentes. ---- */
.dashboard-controls {
  overflow: hidden;
  padding: 18px 24px 24px;
  border: 1px solid var(--line);
  border-top-color: var(--border-top);
  border-bottom-color: var(--border-bottom);
  border-radius: 20px;
  background-color: var(--panel-raised);
  background-image: var(--grain);
  box-shadow: var(--shadow), var(--panel-edge);
}
.dashboard-controls .page-head {
  max-width: none;
  margin: 0;
  padding: 0 0 10px;
}
.dashboard-title {
  display: flex;
  align-items: baseline;
  gap: 20px;
  min-width: 0;
}
.dashboard-title .summary-duration {
  white-space: nowrap;
}
.dashboard-title .summary-duration .label {
  font-size: 11px;
}
.dashboard-title .summary-duration .summary-value {
  font-size: 20px;
}
.dashboard-controls .toolbar {
  margin: 8px 0 0;
}
#phase-view > .section,
#complete-view {
  margin-top: 20px;
  border-radius: 20px;
}

@media (max-width: 720px) {
  .dashboard-controls {
    padding: 13px 14px 16px;
    border-radius: 16px;
  }
  .dashboard-controls .page-head {
    padding: 0 0 8px;
  }
  .dashboard-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .dashboard-controls .toolbar {
    margin-top: 6px;
  }
  #phase-view > .section,
  #complete-view {
    margin-top: 16px;
    border-radius: 16px;
  }
}

.mobile-timeline-inner, .complete-graphic-inner { position: relative; }
.mobile-week-head { z-index: 5; }

/* ---- Progresso dentro das barras ---- */
.has-progress {
  position: relative;
  isolation: isolate;
  background: color-mix(in srgb, var(--phase-color) 16%, var(--panel)) !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--phase-color) 55%, transparent) !important;
}
.has-progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: calc(var(--progress, 0) * 100%);
  border-radius: inherit;
  background-color: var(--phase-color);
  background-image: var(--bar-gloss);
}
.has-progress.is-done { box-shadow: var(--bar-shadow) !important; }
.has-progress.is-light { color: var(--text) !important; }
.bar-check { margin-right: 3px; font-weight: 800; line-height: 1; }
.phase-period.is-done { color: var(--phase-color); font-weight: 700; }
@media print {
  .has-progress {
    background: color-mix(in srgb, var(--phase-color) 18%, #fff) !important;
    box-shadow: inset 0 0 0 .2mm var(--phase-color) !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .has-progress::before { background-image: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .has-progress.is-light { color: #171a1e !important; }
}

/* ---- Status manual: atrasado/adiantado com borda tracejada e símbolo ---- */
.bar-mark { margin-right: 3px; font-weight: 800; line-height: 1; }
.bar.is-late, .bar.is-ahead,
.mobile-bar.is-late, .mobile-bar.is-ahead,
.complete-mobile-bar.is-late, .complete-mobile-bar.is-ahead,
.complete-graphic-bar.is-late, .complete-graphic-bar.is-ahead {
  border: 1.5px dashed color-mix(in srgb, var(--text) 62%, transparent);
}
.has-progress.is-late, .has-progress.is-ahead { box-shadow: 0 1px 3px rgba(18,21,26,.22) !important; }
@media (max-width: 720px) {
  .phase-row .bar.is-late, .phase-row .bar.is-ahead { border: 0; }
}
@media print {
  .is-late, .is-ahead {
    border: .3mm dashed #171a1e !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}