/* ==========================================================================
   Agenda do Projeto — estilo minimalista, neutro, com um único tom de destaque
   ========================================================================== */

:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --fill: #eeeeea;
  --fill-soft: #f2f2ef;
  --ink: #1d1d1f;
  --ink-2: #5f5f64;
  --ink-3: #9b9ba0;
  --line: #e7e6e1;
  --line-2: #d6d5cf;

  --accent: #3e6b5c;
  --accent-soft: #e5eee9;
  --accent-ink: #2d5245;

  --rev: #b06b1f;
  --rev-soft: #f7eee2;
  --rev-ink: #7d4a12;

  --radius: 18px;
  --kind: #9b9ba0;
  --shadow: 0 1px 2px rgba(25, 25, 20, 0.04), 0 10px 30px rgba(25, 25, 20, 0.06);
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p { margin: 0; }

.wrap { max-width: 840px; margin: 0 auto; padding: 0 28px; }

.sr-only { position: fixed; opacity: 0; pointer-events: none; }

.icon { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.92); } }

.enter { animation: fadeUp 0.45s var(--ease); }
.fade { animation: fadeUp 0.5s var(--ease); }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { background: var(--fill-soft); border-color: var(--line-2); }
.btn:active { transform: scale(0.98); }
.btn .icon { width: 15px; height: 15px; }

.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #333336; border-color: #333336; }

.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--fill); border-color: transparent; color: var(--ink); }

.btn-light { background: rgba(255, 255, 255, 0.75); border-color: transparent; }
.btn-light:hover { background: #fff; border-color: transparent; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--fill); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Campos ---------- */

.input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input::placeholder, .inline-input::placeholder, .row-input::placeholder, .cell-input::placeholder { color: var(--ink-3); }
.input:hover { border-color: var(--line-2); }
.input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.input-sm { width: auto; min-height: 30px; padding: 3px 8px; font-size: 13.5px; }

.textarea { display: block; resize: none; line-height: 1.55; min-height: 62px; overflow: hidden; }

.inline-input {
  border: 0;
  outline: none;
  background: transparent;
  border-radius: 6px;
  padding: 0;
  min-width: 0;
  transition: background 0.2s, box-shadow 0.2s;
}
.inline-input:hover { background: var(--fill-soft); box-shadow: 0 0 0 6px var(--fill-soft); }
.inline-input:focus { background: #fff; box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--line-2); }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.01em; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Controle segmentado ---------- */

.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  padding: 3px;
  border-radius: 11px;
  background: var(--fill);
  max-width: 520px;
}
.seg::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / var(--count));
  transform: translateX(calc(var(--index) * 100%));
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 3px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.42s var(--ease);
}
.seg-btn {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-active { color: var(--ink); }

.seg-tone[data-value="andamento"] .is-active,
.seg-tone[data-value="fechado"] .is-active { color: var(--accent-ink); }
.seg-tone[data-value="revisao"] .is-active { color: var(--rev-ink); }

.seg-sm { border-radius: 9px; }
.seg-sm::before { border-radius: 7px; }
.seg-sm .seg-btn { height: 26px; font-size: 12.5px; padding: 0 6px; }

.seg-tabs { width: 420px; max-width: 100%; border-radius: 12px; }
.seg-tabs .seg-btn { height: 36px; font-size: 14px; }

/* ---------- Selo de status ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  background: transparent;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.s-andamento { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.pill.s-concluido { background: var(--fill); color: var(--ink); box-shadow: none; }
.pill.s-revisao { background: var(--rev-soft); color: var(--rev-ink); box-shadow: none; }
.pill.pop { animation: pop 0.35s var(--ease); }

.pill-select {
  appearance: none;
  -webkit-appearance: none;
  height: 28px;
  padding: 0 28px 0 11px;
  border: 0;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  background: var(--fill-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9ba0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 10px;
  color: var(--ink-2);
  transition: background-color 0.3s, color 0.3s;
}
.pill-select.s-andamento { background-color: var(--accent-soft); color: var(--accent-ink); }
.pill-select.s-concluido { background-color: var(--fill); color: var(--ink); }
.pill-select.s-revisao { background-color: var(--rev-soft); color: var(--rev-ink); }
.pill-select:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Barra superior ---------- */

.preview-bar { background: var(--ink); color: rgba(255, 255, 255, 0.86); font-size: 13px; }
.preview-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.preview-dot { display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: #8fc2ad; vertical-align: 1px; }
.preview-back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-size: 13px; font-weight: 500;
  transition: background 0.2s;
}
.preview-back:hover { background: rgba(255, 255, 255, 0.1); }
.preview-back .icon { width: 14px; height: 14px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 245, 242, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
}
.brand-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.readonly-tag { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Destaque ---------- */

.hero { padding: 64px 0 0; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.title, .title-input {
  margin: 0;
  width: 100%;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.hero-sub { margin-top: 12px; font-size: 17px; color: var(--ink-2); }

.identity-meta { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 16px; }
.meta-field { display: flex; align-items: baseline; gap: 10px; font-size: 15px; color: var(--ink-2); min-width: 0; }
.meta-field > span { font-size: 12px; color: var(--ink-3); }
.meta-field .inline-input { width: 230px; color: var(--ink); }

.hero-status {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 40px;
  padding: 30px 32px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.now { display: flex; flex-direction: column; gap: 6px; }
.now-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.now-title { font-size: 27px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.now-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 14px; color: var(--ink-2); }

.progress-bar { display: grid; grid-template-columns: repeat(var(--stages, 8), minmax(0, 1fr)); gap: 5px; }
.seg-bar { height: 6px; border-radius: 3px; background: var(--fill); transition: background 0.5s var(--ease); }
.seg-bar.s-concluido { background: var(--ink); }
.seg-bar.s-andamento { background: var(--accent); }
.seg-bar.s-revisao { background: var(--rev); }
.progress-legend { display: flex; justify-content: space-between; margin-top: 11px; font-size: 13px; color: var(--ink-2); }
.progress-pct { font-variant-numeric: tabular-nums; color: var(--ink-3); }

.notices { display: flex; flex-direction: column; gap: 8px; }
.notice {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; color: var(--ink-2); text-align: left;
  transition: background 0.2s;
  animation: fadeUp 0.4s var(--ease);
}
.notice:hover { background: var(--fill-soft); }
.notice strong { color: var(--ink); font-weight: 500; }
.notice > span:not(.icon) { flex: 1; min-width: 0; }
.notice-rev { background: var(--rev-soft); box-shadow: none; color: var(--rev-ink); }
.notice-rev:hover { background: #f3e6d4; }
.notice-rev strong { color: var(--rev-ink); font-weight: 600; }
.notice-arrow { opacity: 0.45; width: 14px; height: 14px; transition: transform 0.25s var(--ease), opacity 0.25s; }
.notice:hover .notice-arrow { opacity: 0.8; transform: translateX(2px); }

/* ---------- Abas ---------- */

.tabs { display: flex; justify-content: center; padding: 52px 0 28px; scroll-margin-top: 64px; }

/* ---------- Cronograma ---------- */

.timeline { display: flex; flex-direction: column; gap: 10px; }

.stage { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); scroll-margin-top: 140px; }
.stage::before {
  content: "";
  position: absolute;
  left: 19.5px;
  top: 43px;
  bottom: -35px;
  width: 1px;
  background: var(--line-2);
  transition: background 0.4s;
}
.stage:last-child::before { display: none; }
.stage.s-concluido::before { background: var(--ink); }

.stage-rail { display: flex; justify-content: center; }
.dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 25px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: var(--bg);
  color: #fff;
  transition: background 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.dot .icon { width: 11px; height: 11px; }
.dot .icon svg { stroke-width: 2.8; }
.dot b { font-size: 11px; line-height: 1; font-weight: 700; }
.s-andamento > .stage-rail .dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.s-concluido > .stage-rail .dot { border-color: var(--ink); background: var(--ink); }
.s-revisao > .stage-rail .dot { border-color: var(--rev); background: var(--rev); box-shadow: 0 0 0 5px var(--rev-soft); }
.is-current.s-andamento > .stage-rail .dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(0.7); opacity: 0.5; } 70%, 100% { transform: scale(1.35); opacity: 0; } }

.stage-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s;
}
.stage.is-open .stage-card { border-color: transparent; box-shadow: var(--shadow); }

.stage-head { position: relative; display: flex; align-items: stretch; }
.stage-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  min-height: 68px;
  padding: 13px 18px 13px 20px;
  text-align: left;
  border-radius: var(--radius);
}
.stage-toggle:focus-visible { outline-offset: -2px; }

.drag-handle {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 18px;
  height: 32px;
  margin-top: -16px;
  border-radius: 6px;
  color: var(--ink-3);
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.drag-handle .icon { width: 14px; height: 14px; }
.drag-handle .icon svg { fill: currentColor; stroke: none; }
.stage-card:hover .drag-handle, .drag-handle:focus-visible { opacity: 1; }
.stage-card:has(.drag-handle):hover .stage-num { opacity: 0; }
.stage-num { transition: opacity 0.2s; }
.drag-handle:hover { background: var(--fill); color: var(--ink); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }

.timeline.is-sorting .stage { transition: transform 0.22s var(--ease); }
.timeline.is-sorting .stage::before { opacity: 0; }
.timeline .stage.is-dragging { z-index: 10; transition: none; }
.timeline .stage.is-dragging .stage-card { box-shadow: 0 18px 50px rgba(20, 20, 15, 0.16); border-color: transparent; }
.timeline .stage.is-dragging .drag-handle { opacity: 1; }
.timeline .stage.is-settling { transition: transform 0.22s var(--ease); }

.stage-files { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stage-files .icon { width: 13px; height: 13px; }
.stage-num { width: 18px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stage-titles { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.stage-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-aguardando .stage-title { color: var(--ink-2); }
.stage-date { font-size: 13px; color: var(--ink-3); }
.stage-meta { display: flex; align-items: center; gap: 10px; }
.rev-flag { display: inline-flex; color: var(--rev); }
.chev { color: var(--ink-3); transition: transform 0.4s var(--ease); }
.stage.is-open > .stage-card > .stage-head .chev,
.comp.is-open > .comp-head .chev { transform: rotate(180deg); }

.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.stage.is-open > .stage-card > .collapse,
.comp.is-open > .collapse { grid-template-rows: 1fr; }
.collapse-inner { min-height: 0; overflow: hidden; }

.stage-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 20px;
  padding: 22px 0 22px;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.stage.is-open .stage-body { opacity: 1; transform: none; transition-delay: 0.06s; }

.editor { display: flex; flex-direction: column; gap: 18px; }

.summary { display: flex; flex-direction: column; gap: 12px; }
.stage-desc { font-size: 15.5px; line-height: 1.6; color: var(--ink); max-width: 60ch; }
.status-hint { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.status-hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.status-hint.s-andamento i { background: var(--accent); }
.status-hint.s-concluido i { background: var(--ink); }
.status-hint.s-revisao i { background: var(--rev); }

/* Blocos do card */
.block { display: flex; flex-direction: column; gap: 10px; }
.block-head { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.block-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.005em; }
input.block-title { padding: 2px 0; }
.block-meta { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.block-remove { width: 26px; height: 26px; opacity: 0.55; }
.block-remove .icon { width: 14px; height: 14px; }
.block-remove:hover { opacity: 1; }
.add-inline { margin-left: -12px; }
.empty { font-size: 14px; color: var(--ink-3); }

.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px 6px 8px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-read { padding: 10px 14px; }
.row-name { flex: 1; min-width: 0; font-size: 14.5px; }
.row-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14.5px;
  outline: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.row-input:hover { background: var(--fill-soft); }
.row-input:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.row-date { flex: 0 0 150px; color: var(--ink); }

.add-form { display: flex; gap: 8px; }
.add-form .input { flex: 1; }
.add-form .btn { height: 38px; }

/* Caixa de seleção redonda */
.check {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  color: transparent;
  transition: background 0.25s var(--ease), border-color 0.25s, color 0.2s, transform 0.15s;
}
.check .icon { width: 12px; height: 12px; }
.check .icon svg { stroke-width: 2.8; }
button.check:hover { border-color: var(--accent); }
button.check:active { transform: scale(0.9); }
.check.is-checked { background: var(--accent); border-color: var(--accent); color: #fff; }
.check-row { padding-left: 12px; }
.check-row .row-name { padding-left: 4px; }
.check-row.is-done .row-input, .check-row.is-done .row-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }

/* Interruptor */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 38px; font-size: 14px; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); transition: background 0.25s var(--ease); flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.3s var(--ease); }
.switch-input:checked + .switch-track { background: var(--accent); }
.switch-input:checked + .switch-track::after { transform: translateX(16px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Aprovação */
.approval {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px 14px 16px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.approval-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--fill); color: var(--ink-2); flex-shrink: 0;
  transition: background 0.3s, color 0.3s;
}
.approval-icon .icon { width: 16px; height: 16px; }
.approval.is-approved .approval-icon { background: var(--accent); color: #fff; }
.approval-text { display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.approval-text strong, .approval-title { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.approval-title { width: 100%; padding: 1px 0; }
.approval-date { display: flex; align-items: center; gap: 6px; margin-top: 3px; }

/* Resumo de orçamentos dentro da timeline */
.teaser {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px 14px 16px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.teaser-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.teaser-text strong { font-size: 14.5px; font-weight: 500; color: var(--ink); }

/* Seletor de blocos */
.picker { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line-2); }
.picker-label { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px 0 9px; border-radius: 999px;
  background: var(--fill-soft); color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.chip .icon { width: 13px; height: 13px; }
.chip:hover { background: var(--fill); color: var(--ink); }
.chip:active { transform: scale(0.97); }

/* Projetos complementares */
.comps { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.comp { border-top: 1px solid var(--line); background: var(--surface); }
.comp:first-child { border-top: 0; }
.comp.is-open { background: var(--surface-2); }
.comp-head { display: flex; align-items: center; gap: 4px; padding-left: 14px; }
.comp-toggle { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 56px; padding: 8px 14px 8px 10px; text-align: left; }
.comp-titles { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.comp-name { font-size: 14.5px; font-weight: 500; }
.comp-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp-body { display: flex; flex-direction: column; gap: 16px; padding: 6px 16px 18px 50px; }
.comp-actions { display: flex; justify-content: flex-end; }
.sent-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comp .seg-sm { max-width: 360px; }
.span-2 { grid-column: 1 / -1; }
.comp .seg-sm .seg-btn { height: 32px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.fact dt { font-size: 12px; color: var(--ink-3); }
.fact dd { margin: 1px 0 0; font-size: 14px; }

/* Anexos */
.files-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.file-chip {
  display: inline-flex; align-items: center; max-width: 100%;
  height: 30px; border-radius: 8px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s;
  animation: fadeUp 0.35s var(--ease);
}
.file-chip:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.file-chip-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; height: 100%; padding: 0 10px 0 5px; color: var(--ink); text-decoration: none; font-size: 13px; }
.file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.file-remove { display: grid; place-items: center; width: 24px; height: 24px; margin-right: 3px; border-radius: 6px; color: var(--ink-3); }
.file-remove:hover { background: var(--fill); color: var(--ink); }
.file-remove .icon { width: 12px; height: 12px; }
.file-add {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 8px;
  color: var(--ink-2); font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line);
  border: 0; background: transparent;
  transition: background 0.2s, color 0.2s;
}
.file-add { box-shadow: none; outline: 1px dashed var(--line-2); outline-offset: -1px; }
.file-add:hover { background: var(--fill-soft); color: var(--ink); }
.file-add .icon { width: 14px; height: 14px; }

.file-badge {
  display: inline-grid; place-items: center; flex-shrink: 0;
  min-width: 30px; height: 20px; padding: 0 4px; border-radius: 5px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em;
  background: var(--fill); color: var(--ink-2);
}
.file-badge.pdf { background: #f3e3df; color: #9a3d2b; }
.file-badge.cad { background: #e3e9f1; color: #34506f; }
.file-badge.bim { background: var(--accent-soft); color: var(--accent-ink); }
.file-badge.img { background: #efe9f3; color: #66457d; }

.files-list { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.files-list > .list { width: 100%; }
.file-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--line); animation: fadeUp 0.35s var(--ease); }
.file-row:first-child { border-top: 0; }
.file-badge-link { text-decoration: none; }
.file-row .file-badge { min-width: 38px; height: 26px; font-size: 10.5px; border-radius: 6px; }
.file-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.file-title { font-size: 14.5px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.file-note { font-size: 13px; color: var(--ink-2); }
.file-note-input { width: 100%; height: 26px; margin-left: -6px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; color: var(--ink-2); outline: none; transition: background 0.2s; }
.file-note-input:hover { background: var(--fill-soft); }
.file-note-input:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); }
.file-meta { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.attach-btn { margin-left: -12px; }

/* Revisões */
.revs { display: flex; flex-direction: column; gap: 10px; }
.rev { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-radius: 14px; background: var(--rev-soft); }
.rev-head { display: flex; align-items: center; gap: 8px; color: var(--rev-ink); }
.rev-title { font-size: 13.5px; font-weight: 600; }
.rev-date { margin-left: auto; font-size: 12.5px; opacity: 0.75; }
.rev-text { font-size: 15px; line-height: 1.55; }
.rev-note { font-size: 13px; color: var(--rev-ink); opacity: 0.85; }
.rev .textarea { background: rgba(255, 255, 255, 0.6); border-color: transparent; min-height: 48px; }
.rev .textarea:focus { background: #fff; border-color: var(--rev); box-shadow: 0 0 0 3px rgba(176, 107, 31, 0.15); }
.rev-actions { display: flex; justify-content: flex-end; }

.stage-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.stage-foot > .btn-ghost:first-child { margin-left: -12px; }
.stage-foot.is-column { flex-direction: column; align-items: stretch; }
.rev-form { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.rev-form-actions { display: flex; justify-content: flex-end; gap: 6px; }

.history summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--ink-3); transition: color 0.2s; }
.history summary::-webkit-details-marker { display: none; }
.history summary::after { content: "›"; display: inline-block; margin-left: 5px; transition: transform 0.25s var(--ease); }
.history[open] summary::after { transform: rotate(90deg); }
.history summary:hover { color: var(--ink); }
.history ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; animation: fadeUp 0.35s var(--ease); }
.history li { display: flex; flex-direction: column; padding-left: 12px; border-left: 2px solid var(--line); font-size: 14px; color: var(--ink-2); }
.history small { font-size: 12px; color: var(--ink-3); }

.stage-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; margin-top: -4px; border-top: 1px solid var(--line); }
.stage-move { display: flex; gap: 2px; margin-left: -12px; }
.btn:disabled { opacity: 0.35; pointer-events: none; }
.btn-danger { color: #a8412e; }
.btn-danger:hover { background: #f6e6e2; color: #8c3322; }

.add-stage {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 40px); margin: 14px 0 0 40px; height: 56px;
  border-radius: var(--radius); border: 1px dashed var(--line-2);
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.add-stage:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-3); }

/* ---------- Agenda (linhas de evento) ---------- */

.agenda-list { background: var(--surface); }
.agenda-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 54px; padding: 8px 12px 8px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  transition: background 0.2s;
}
.agenda-row:first-child { border-top: 0; }
.agenda-row:hover { background: var(--fill-soft); }
.agenda-date { display: flex; flex-direction: column; align-items: center; width: 34px; line-height: 1.05; flex-shrink: 0; }
.agenda-day { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.agenda-month { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.agenda-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--kind); flex-shrink: 0; }
.agenda-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.agenda-title { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-private { display: inline-flex; color: var(--ink-3); }
.agenda-private .icon { width: 14px; height: 14px; }
.agenda-chev { width: 14px; height: 14px; color: var(--ink-3); opacity: 0.6; }
.agenda-row.is-done .agenda-title { color: var(--ink-3); text-decoration: line-through; }
.agenda-row.is-compact { min-height: 48px; }

/* Cores por tipo (sóbrias, variando em torno do grafite e do tom de destaque) */
.k-entrega { --kind: var(--ink); }
.k-inicio { --kind: #b9b8b1; }
.k-reuniao { --kind: var(--accent); }
.k-visita { --kind: #7fa597; }
.k-tarefa { --kind: #8a8a90; }
.k-aprovacao { --kind: #2d5245; }
.k-complementar { --kind: #6b7f99; }
.k-compra { --kind: var(--rev); }

.upcoming { display: flex; flex-direction: column; gap: 10px; }
.upcoming-head { display: flex; justify-content: space-between; align-items: center; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--accent-ink); }
.link-btn .icon { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }
.link-btn:hover .icon { transform: translateX(2px); }

/* ---------- Calendário ---------- */

.calendar { position: relative; left: 50%; width: min(1120px, calc(100vw - 56px)); translate: -50% 0; }
.cal-card { padding: 22px 22px 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.cal-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cal-title { flex: 1; margin: 0 0 0 4px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; text-transform: capitalize; }
.cal-title span { color: var(--ink-3); font-weight: 400; }
.cal-nav { display: flex; align-items: center; gap: 4px; }

.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays span { padding: 0 8px 8px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.cal-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.cal-grid.slide-next { animation: slideNext 0.4s var(--ease); }
.cal-grid.slide-prev { animation: slidePrev 0.4s var(--ease); }
@keyframes slideNext { from { opacity: 0; transform: translateX(14px); } }
@keyframes slidePrev { from { opacity: 0; transform: translateX(-14px); } }

.cal-cell {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0; min-height: 104px; padding: 6px 6px 8px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; outline: none;
  transition: background 0.2s;
}
.cal-cell:hover { background: var(--fill-soft); }
.cal-cell.is-weekend { background: #fbfbf9; }
.cal-cell.is-weekend:hover { background: var(--fill-soft); }
.cal-cell.is-out .cal-daynum { color: var(--line-2); }
.cal-cell.is-out .cal-chips { opacity: 0.5; }
.cal-cell:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.is-selected { background: var(--accent-soft); }
.cal-daynum {
  display: grid; place-items: center; align-self: flex-start;
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px;
  font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.cal-cell.is-today .cal-daynum { background: var(--ink); color: #fff; }
.cal-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-chip {
  display: flex; align-items: center; gap: 5px;
  width: 100%; min-width: 0; height: 21px; padding: 0 6px 0 5px; border-radius: 5px;
  font-size: 11.5px; line-height: 1; text-align: left; color: var(--ink);
  background: color-mix(in srgb, var(--kind) 11%, #fff);
  transition: background 0.2s, transform 0.15s;
}
.cal-chip:hover { background: color-mix(in srgb, var(--kind) 20%, #fff); }
.cal-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--kind); flex-shrink: 0; }
.cal-chip-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cal-chip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.is-done .cal-chip-title { text-decoration: line-through; color: var(--ink-3); }
.cal-more { padding-left: 6px; font-size: 11px; color: var(--ink-3); }
.cal-dots { display: none; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 6px 0; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.legend-item i { width: 8px; height: 8px; border-radius: 50%; background: var(--kind); }

.cal-panels { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 14px; margin-top: 22px; }
.panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.panel-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; }
.panel .list { border-radius: 12px; }

/* ---------- Janela (diálogo) ---------- */

.dialog {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 24px; border: 0;
  background: transparent;
  overflow-y: auto;
}
.dialog[open] { display: grid; place-items: center; }
.dialog::backdrop { background: rgba(28, 28, 26, 0.32); backdrop-filter: blur(4px); animation: fadeIn 0.25s var(--ease); }
.dialog.is-closing::backdrop { opacity: 0; transition: opacity 0.18s; }
.dialog-card {
  width: 100%; max-width: 520px;
  border-radius: 22px; background: var(--surface);
  box-shadow: 0 30px 80px rgba(20, 20, 15, 0.22);
  animation: dialogIn 0.35s var(--ease);
}
.dialog-wide .dialog-card { max-width: 640px; }
.dialog.is-closing .dialog-card { opacity: 0; transform: scale(0.98) translateY(6px); transition: opacity 0.18s, transform 0.18s; }
@keyframes dialogIn { from { opacity: 0; transform: scale(0.97) translateY(10px); } }
@keyframes fadeIn { from { opacity: 0; } }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 22px 6px 26px; }
.dialog-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.dialog-sub { margin-top: 3px; font-size: 13.5px; color: var(--ink-2); }
.dialog-body { padding: 14px 26px 8px; }
.dialog-form { display: flex; flex-direction: column; gap: 16px; }
.dialog-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 16px 22px 22px; }
.dialog-left { margin-right: auto; }
.dialog-hint { font-size: 12.5px; color: var(--ink-3); }
.field[hidden] { display: none; }
.dialog .seg { max-width: none; }

.event-view { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.event-note { font-size: 15px; line-height: 1.55; }
.event-link { font-size: 14px; color: var(--ink-2); }
.event-link strong { color: var(--ink); font-weight: 500; }

.module-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.module-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.module-option:hover { border-color: var(--line-2); }
.module-option .check { margin-top: 1px; }
.module-option.is-selected { border-color: var(--accent); background: #f7faf8; box-shadow: 0 0 0 3px var(--accent-soft); }
.module-option.is-selected .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.module-option-text { display: flex; flex-direction: column; min-width: 0; }
.module-option-text strong { font-size: 14px; font-weight: 500; }
.module-option-text span { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }

/* ---------- Orçamentos ---------- */

.budget-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--line);
  box-shadow: var(--shadow);
}
.stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; background: var(--surface); }
.stat-label { font-size: 12.5px; color: var(--ink-3); }
.stat-value { font-size: 25px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.budget-note { margin: 16px 4px 0; font-size: 13.5px; color: var(--ink-2); }

.categories { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.empty-block { padding: 28px; text-align: center; }

.category { padding: 6px 0 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.category-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px 10px 22px; min-height: 52px; }
.cat-name { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cat-total { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-empty { padding: 4px 22px 8px; }

.items-head, .item-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 140px 140px 32px;
  gap: 14px;
  align-items: center;
}
.is-readonly .items-head, .is-readonly .item-main { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 100px 110px; }
.items-head { padding: 6px 16px 8px 22px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.is-readonly .items-head { padding-right: 22px; }
.item { display: flex; flex-direction: column; gap: 4px; padding: 10px 16px 12px 22px; border-bottom: 1px solid var(--line); }
.is-readonly .item { padding-right: 22px; }
.item:last-child { border-bottom: 0; }
.item-extra { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.item-extra .cell-textarea { width: calc(100% - 46px); }
.is-readonly .item-extra { gap: 8px; padding-top: 2px; }

.cell { min-width: 0; }
.cell-label { display: none; }
.item-supplier { font-weight: 500; }
.item-value, .item-buyby { font-variant-numeric: tabular-nums; }
.item-buyby { font-size: 14px; }
.item-when { font-size: 13.5px; color: var(--ink-2); }

.cell-input {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  margin-left: -8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14.5px;
  outline: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.cell-input:hover { background: var(--fill-soft); }
.cell-input:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.cell-input.num { font-variant-numeric: tabular-nums; margin-left: 0; padding-left: 5px; }
.cell-date { font-size: 13.5px; color: var(--ink-2); }
.cell-textarea { display: block; height: auto; min-height: 30px; padding: 6px 8px; resize: none; overflow: hidden; line-height: 1.4; font-size: 13.5px; color: var(--ink-2); }
.cell-textarea:focus { color: var(--ink); }
.money-field { display: flex; align-items: center; gap: 2px; margin-left: -8px; padding-left: 8px; }
.money-field > span { font-size: 13px; color: var(--ink-3); }
.cell-action { display: flex; justify-content: flex-end; }

.add-item { margin: 8px 0 0 12px; }
.add-category { margin-top: 14px; padding: 10px; border-radius: var(--radius); border: 1px dashed var(--line-2); }
.add-category .input { background: transparent; border-color: transparent; }
.add-category .input:focus { background: #fff; border-color: var(--accent); }

/* ---------- Rodapé e aviso ---------- */

.footer { padding: 64px 0 56px; text-align: center; font-size: 13px; color: var(--ink-3); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.92);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.toast .icon { width: 15px; height: 15px; color: #8fc2ad; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ---------- Abas de clientes ---------- */

.project-bar {
  position: sticky;
  top: 64px;
  z-index: 19;
  background: rgba(245, 245, 242, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.project-bar-inner { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.project-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; padding: 8px 2px; scrollbar-width: none; }
.project-tabs::-webkit-scrollbar { display: none; }

.project-tab {
  --kind: var(--ink-3);
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0; max-width: 260px;
  padding: 7px 14px 7px 11px; border-radius: 12px;
  text-align: left; color: var(--ink-2);
  transition: background 0.2s, box-shadow 0.25s, color 0.2s;
}
.project-tab i { width: 8px; height: 8px; border-radius: 50%; background: var(--kind); flex-shrink: 0; opacity: 0.55; transition: opacity 0.2s, transform 0.2s; }
.project-tab-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.project-tab-text strong { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-tab-text span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-tab:hover { background: var(--fill-soft); color: var(--ink); }
.project-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 20, 15, 0.05), 0 4px 14px rgba(20, 20, 15, 0.05);
}
.project-tab.is-active i { opacity: 1; transform: scale(1.15); }
.new-project { flex-shrink: 0; }
.delete-project { margin-left: auto; }

/* ---------- Comentários ---------- */

.comments { display: flex; flex-direction: column; gap: 10px; }
.comment {
  align-self: flex-start;
  max-width: 88%;
  padding: 11px 14px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: fadeUp 0.35s var(--ease);
}
.comment.is-me { align-self: flex-end; background: var(--accent-soft); border-radius: 14px 14px 4px; box-shadow: none; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; color: var(--ink-3); }
.comment-head strong { font-weight: 600; color: var(--ink-2); }
.comment.is-me .comment-head strong { color: var(--accent-ink); }
.comment-text { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.comment-remove { width: 22px; height: 22px; margin-left: auto; opacity: 0; }
.comment-remove .icon { width: 12px; height: 12px; }
.comment:hover .comment-remove, .comment-remove:focus-visible { opacity: 0.6; }
.comment-remove:hover { opacity: 1; }
.comment-form { display: flex; align-items: flex-end; gap: 8px; }
.comment-input { flex: 1; min-height: 42px; }

/* ---------- Calendário: modos e legenda ---------- */

.cal-scope { margin-bottom: 14px; }
.cal-scope .seg { max-width: 460px; }
.cal-scope .seg-btn { height: 30px; }
.legend-item.is-link { transition: color 0.2s; }
.legend-item.is-link:hover { color: var(--ink); }
.legend-item.is-current { color: var(--ink); font-weight: 500; }
.calendar.is-all .cal-chip { background: color-mix(in srgb, var(--kind) 13%, #fff); }

@media (max-width: 680px) {
  .project-bar { top: 58px; }
  .project-bar-inner { min-height: 50px; }
  .project-tab { padding: 6px 12px 6px 10px; }
  .project-tab-text strong { font-size: 13.5px; }
  .new-project .label { display: none; }
  .new-project { width: 34px; padding: 0; justify-content: center; }
  .delete-project { margin-left: 0; }
  .comment { max-width: 100%; }
  .cal-scope .seg-btn { font-size: 12px; }
  .stage { scroll-margin-top: 140px; }
}


/* ---------- Salvamento, backup e desfazer ---------- */

.save-state { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.save-state:not(:empty)::before { content: "·"; margin-right: 8px; }
.save-state.is-warning { color: var(--rev-ink); }
.save-state.is-warning::before { content: "⚠"; margin-right: 6px; }

.toast-action {
  margin-left: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  transition: background 0.2s;
}
.toast-action:hover { background: rgba(255, 255, 255, 0.28); }
.toast.show { pointer-events: none; }
.toast.show .toast-action { pointer-events: auto; }

.data-list { display: flex; flex-direction: column; gap: 10px; }
.data-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.data-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
.data-text strong { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.data-row .btn { flex-shrink: 0; }

.hero-updated { margin-top: 6px; font-size: 13px; color: var(--ink-3); }

.files-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.file-badge.link { background: #e7eaf0; color: #48566b; }

@media (max-width: 680px) {
  .save-state { display: none; }
  .topbar-actions .btn.icon-only { width: 38px; padding: 0; justify-content: center; }
  .data-row { flex-wrap: wrap; gap: 10px; }
}

/* ---------- Telas médias ---------- */

@media (max-width: 860px) {
  .cal-cell { min-height: 88px; }
  .cal-chip-time { display: none; }
}

/* ---------- Telas pequenas ---------- */

@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .topbar-inner { height: 58px; }
  .topbar-actions .btn .label { display: none; }
  .topbar-actions .btn { width: 38px; padding: 0; justify-content: center; }
  .preview-inner { font-size: 12.5px; }

  .hero { padding-top: 40px; }
  .title, .title-input { font-size: 34px; }
  .hero-sub { font-size: 15.5px; }
  .meta-field .inline-input { width: 100%; }
  .identity-meta { flex-direction: column; }
  .hero-status { margin-top: 28px; padding: 22px 20px; border-radius: 20px; gap: 22px; }
  .now-title { font-size: 23px; }

  .tabs { padding: 36px 0 22px; }
  .seg-tabs { width: 100%; }
  .seg-tabs .seg-btn { font-size: 13px; }

  .stage { grid-template-columns: 26px minmax(0, 1fr); }
  .stage::before { left: 7.5px; }
  .stage-rail { justify-content: flex-start; }
  .stage-toggle { gap: 10px; padding: 13px 14px 13px 18px; }
  .drag-handle { opacity: 0.6; left: 0; }
  .stage-card:has(.drag-handle):hover .stage-num { opacity: 1; }
  .stage-num { display: none; }
  .stage-title { white-space: normal; }
  .stage-meta { gap: 6px; }
  .stage-files { display: none; }
  .stage-meta .pill { padding: 0 8px; }
  .stage-meta .pill i { display: none; }
  .stage-body { margin: 0 16px; }
  .add-stage { width: calc(100% - 26px); margin-left: 26px; }
  .seg:not(.seg-tabs):not(.seg-sm) { overflow-x: auto; }
  .seg:not(.seg-tabs):not(.seg-sm) .seg-btn { font-size: 12px; padding: 0 4px; }
  .field-grid { grid-template-columns: 1fr; }
  .add-form { flex-wrap: wrap; }
  .add-form .input { flex-basis: 100%; }
  .row { flex-wrap: wrap; }
  .approval, .teaser { flex-wrap: wrap; }
  .rev-date { margin-left: 0; width: 100%; }
  .rev-head { flex-wrap: wrap; }
  .comp-body { padding-left: 16px; }
  .comp-sub { white-space: normal; }
  .facts { grid-template-columns: 1fr; }
  .file-row { flex-wrap: wrap; }
  .file-meta { width: 100%; padding-left: 50px; }
  .module-options { grid-template-columns: 1fr; }
  .dialog { padding: 12px; }
  .dialog-body { padding: 12px 20px 6px; }
  .dialog-head { padding: 20px 16px 4px 20px; }

  .calendar { left: 0; width: auto; translate: none; }
  .cal-card { padding: 16px 10px 12px; border-radius: 18px; }
  .cal-toolbar { flex-wrap: wrap; gap: 8px; }
  .cal-title { font-size: 21px; }
  .cal-new { order: 3; width: 100%; justify-content: center; }
  .cal-weekdays span { padding: 0 0 6px; text-align: center; font-size: 10.5px; }
  .cal-cell { min-height: 54px; align-items: center; padding: 4px 2px 6px; }
  .cal-daynum { align-self: center; font-size: 13px; }
  .cal-chips { display: none; }
  .cal-dots { display: flex; gap: 3px; }
  .cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--kind); }
  .cal-panels { grid-template-columns: 1fr; }

  .budget-summary { grid-template-columns: 1fr; }
  .stat { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 14px 18px; }
  .stat-value { font-size: 19px; }
  .items-head { display: none; }
  .item, .is-readonly .item { position: relative; padding: 14px 18px; }
  .item-main, .is-readonly .item-main { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .cell-label { display: block; margin-bottom: 2px; font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
  .cell-action { position: absolute; top: 8px; right: 8px; }
  .item-extra .cell-textarea { width: 100%; }
  .category-head { padding-left: 18px; }
  .add-item { margin-left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Aviso de navegador sem salvamento */
.storage-warning { background: var(--rev-soft); color: var(--rev-ink); font-size: 13.5px; }
.storage-warning-inner { display: flex; align-items: center; gap: 10px; min-height: 46px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.storage-warning-inner > span { flex: 1; min-width: 200px; }

/* ---------- Anexos por item, documentos do projeto, observações ---------- */

.file-badge.doc { background: #e3e9f3; color: #2f4d7a; }
.file-badge.xls { background: #e2eee6; color: #2e6242; }
.file-badge.ppt { background: #f4e5dd; color: #8c4a2b; }
.file-add.is-quiet { color: var(--ink-3); outline-color: transparent; }
.file-add.is-quiet:hover { color: var(--ink); }
.attach-btn.is-quiet { color: var(--ink-3); }
.file-add.is-compact { height: 28px; padding: 0 9px; gap: 5px; font-size: 12.5px; }
.file-add.is-compact .icon { width: 13px; height: 13px; }

/* Detalhamentos: nome | anexos | status | lixeira */
.status-row { display: grid; grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr) auto auto; align-items: center; }
.status-row.row-read { grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr) auto; }
.status-row .files-chips { min-width: 0; }
.status-row .file-chip { height: 28px; }
.status-row .file-name { max-width: 170px; }

/* Documentos do projeto (contrato) no topo */
.project-docs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.project-docs-label { font-size: 12px; color: var(--ink-3); }

/* Observações */
.note-visibility { margin-top: -4px; }
.note-visibility .switch { min-height: 30px; font-size: 13px; color: var(--ink-2); }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--line-2); animation: fadeUp 0.35s var(--ease); }
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); }
.note:hover .comment-remove { opacity: 0.6; }
.note-text { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.note .textarea { min-height: 44px; background: #fff; }

/* Revisões: datas editáveis e histórico em linha própria */
.rev-date-input { min-height: 26px; padding: 1px 6px; font-size: 12.5px; background: rgba(255, 255, 255, 0.7); }
.stage-foot { flex-direction: column; align-items: flex-start; }
.stage-foot .history { width: 100%; }
.history-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }

/* Orçamentos: legenda do prazo */
.cell-deadline { display: flex; flex-direction: column; gap: 1px; }
.cell-caption { font-size: 11px; color: var(--ink-3); }

@media (max-width: 680px) {
  .status-row, .status-row.row-read { grid-template-columns: 1fr auto; row-gap: 6px; }
  .status-row .files-chips { grid-column: 1 / -1; order: 3; }
  .status-row .icon-btn { order: 2; }
  .cell-deadline .cell-caption { display: none; }
}

/* ==========================================================================
   VARIAÇÃO B — sistema visual monocromático
   Hierarquia por peso e tamanho, setorização por painéis e faixas,
   cor só onde exige atenção.
   ========================================================================== */

:root {
  --bg: #f1f0ec;
  --band: #e9e8e3;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --fill: #eceae5;
  --fill-soft: #f4f3ef;
  --ink: #131312;
  --ink-2: #56554f;
  --ink-3: #8d8c85;
  --line: #e2e0da;
  --line-2: #cbc9c1;

  /* Preto é a cor de destaque; âmbar só para atenção. */
  --accent: #131312;
  --accent-soft: #eceae5;
  --accent-ink: #131312;
  --rev: #a8641a;
  --rev-soft: #f6eee2;
  --rev-ink: #7a4711;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(19, 19, 18, 0.04);
  --shadow-lift: 0 1px 2px rgba(19, 19, 18, 0.05), 0 12px 28px rgba(19, 19, 18, 0.06);
}

body { font-size: 15px; color: var(--ink); }

.wrap { max-width: 1060px; padding: 0 32px; }

/* Rótulo de setor: diz o que é cada área da tela. */
.sector-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sector-label b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 10.5px;
  letter-spacing: 0;
}

.eyebrow { font-size: 10.5px; letter-spacing: 0.14em; margin-bottom: 8px; }

/* ---------- Botões ---------- */

.btn {
  height: 34px;
  border-radius: 8px;
  border-color: var(--line-2);
  font-size: 13px;
  letter-spacing: -0.005em;
}
.btn:hover { background: var(--fill-soft); border-color: var(--ink-3); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2c2b29; border-color: #2c2b29; }
.btn-outline { background: transparent; border-color: var(--line-2); }
.btn-outline:hover { background: var(--surface); }
.btn-ghost { color: var(--ink-2); }
.btn-sm { height: 30px; border-radius: 7px; font-size: 12.5px; }
.icon-btn { border-radius: 8px; }
.icon-btn.quiet { color: var(--ink-3); }
.icon-btn.quiet:hover { color: #96331f; background: #f6e7e2; }

/* ---------- Topo ---------- */

.topbar {
  background: rgba(241, 240, 236, 0.88);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: 66px; }
.brand { gap: 12px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; letter-spacing: 0.04em; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.brand-role { font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; }
.save-state { margin-left: 14px; }

/* Faixa de projetos: setor próprio, com fundo mais escuro. */
.project-bar {
  background: var(--band);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
.project-bar-inner { display: block; padding-top: 14px; padding-bottom: 14px; min-height: 0; }
.project-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.project-tabs { gap: 8px; padding: 2px; }
.project-tab {
  gap: 11px;
  padding: 9px 16px 9px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  max-width: 280px;
}
.project-tab:hover { background: rgba(255, 255, 255, 0.55); }
.project-tab.is-active { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.project-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #dedcd6;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.2s, color 0.2s;
}
.project-tab.is-active .project-avatar { background: var(--ink); color: #fff; }
.project-tab-text strong { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.project-tab-text span { font-size: 11.5px; }

/* ---------- Painéis ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero { display: flex; flex-direction: column; gap: 16px; padding: 40px 0 0; }

.project-panel { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 26px 28px 20px; }
.panel-head-text { min-width: 0; }
.title, .title-input { font-size: 38px; line-height: 1.04; letter-spacing: -0.033em; font-weight: 600; }
.panel-head-actions { display: flex; gap: 4px; }

/* Dados do projeto: colunas separadas por fios, como uma ficha técnica. */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.meta-grid .meta-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 16px 20px 18px;
  border-left: 1px solid var(--line);
}
.meta-grid .meta-field:first-child { border-left: 0; }
.meta-grid dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.meta-grid dd { margin: 0; font-size: 14.5px; color: var(--ink); min-width: 0; }
.meta-grid dd span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-grid .inline-input { width: 100%; font-size: 14.5px; }

.panel-section { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 28px 16px; border-top: 1px solid var(--line); }
.project-docs { margin-top: 0; }

/* Painel de situação: duas colunas com divisória. */
.status-panel { padding: 0; }
.status-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.status-main { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px 28px; min-width: 0; }
.status-side { display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 28px; border-left: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.now-title { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.024em; line-height: 1.15; }
.now-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13.5px; color: var(--ink-2); }

.progress { margin-top: 6px; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12.5px; color: var(--ink-2); }
.progress-pct { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-bar { gap: 4px; }
.seg-bar { height: 5px; border-radius: 2px; background: #e4e2dc; }
.seg-bar.s-concluido { background: var(--ink); }
.seg-bar.s-andamento { background: #8d8c85; }
.seg-bar.s-revisao { background: var(--rev); }

.notices { margin-top: 4px; }
.notice { border-radius: 10px; font-size: 13.5px; padding: 11px 13px; }
.notice-rev { background: var(--rev-soft); box-shadow: inset 0 0 0 1px #ecdcc6; }

.agenda-list { border-radius: 12px; background: var(--surface); }
.agenda-row { min-height: 52px; }
.status-side .agenda-list { border-color: var(--line); }

/* ---------- Abas de seção ---------- */

.tabs { justify-content: flex-start; padding: 36px 0 0; border-bottom: 1px solid var(--line); }
.tabbar { display: flex; gap: 28px; }
.tabbar-btn {
  position: relative;
  padding: 0 0 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 0.2s;
}
.tabbar-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.tabbar-btn:hover { color: var(--ink-2); }
.tabbar-btn.is-active { color: var(--ink); font-weight: 600; }
.tabbar-btn.is-active::after { transform: scaleX(1); }

#content { padding-top: 26px; }

/* ---------- Selos de status (preto = concluído, âmbar = atenção) ---------- */

.pill { height: 23px; border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.pill i { width: 5px; height: 5px; }
.pill.s-aguardando { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.s-andamento { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pill.s-concluido { background: var(--ink); color: #fff; box-shadow: none; }
.pill.s-revisao { background: var(--rev-soft); color: var(--rev-ink); box-shadow: inset 0 0 0 1px #ecdcc6; }
.pill-select { border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.pill-select.s-andamento { background-color: var(--fill); color: var(--ink); }
.pill-select.s-concluido { background-color: var(--ink); color: #fff; }

/* ---------- Cronograma ---------- */

.timeline { gap: 8px; }
.stage::before { background: var(--line-2); }
.stage.s-concluido::before { background: var(--ink); }
.dot { background: var(--bg); border-color: var(--line-2); }
.s-andamento > .stage-rail .dot { background: var(--surface); border-color: var(--ink); box-shadow: none; }
.s-andamento > .stage-rail .dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.s-concluido > .stage-rail .dot { background: var(--ink); border-color: var(--ink); }
.s-revisao > .stage-rail .dot { background: var(--rev); border-color: var(--rev); box-shadow: none; }
.is-current.s-andamento > .stage-rail .dot::after { border-color: var(--ink-3); }

.stage-card { border-radius: 14px; transition: border-color 0.25s, box-shadow 0.25s; }
.stage-card:hover { border-color: var(--line-2); }
.stage.is-open .stage-card { border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.stage-toggle { min-height: 66px; padding: 14px 18px 14px 18px; gap: 14px; }
.stage-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--fill-soft);
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
}
.stage.s-concluido .stage-num, .stage.s-andamento .stage-num { color: var(--ink-2); }
.stage-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.012em; }
.s-aguardando .stage-title { color: var(--ink-2); font-weight: 500; }
.stage-date { font-size: 12.5px; }
.stage-body { margin: 0 18px; padding-top: 20px; padding-bottom: 22px; gap: 26px; }
.stage-desc { font-size: 15px; }

/* Blocos: cada um com rótulo e fio, para ficar claro onde começa e termina. */
.block { gap: 12px; }
.block-head { align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.block-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
input.block-title { text-transform: none; font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-2); }
.block-meta { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.list { border-radius: 12px; }
.row { min-height: 46px; }
.row-name { font-size: 14px; }
.picker { border-radius: 12px; border-style: dashed; background: var(--surface-2); }
.chip { border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.chip:hover { background: var(--fill-soft); box-shadow: inset 0 0 0 1px var(--line-2); }

.approval, .teaser, .comp-body .facts { border-radius: 12px; }
.approval.is-approved .approval-icon { background: var(--ink); }
.check.is-checked { background: var(--ink); border-color: var(--ink); }
.switch-input:checked + .switch-track { background: var(--ink); }

.add-stage { border-radius: 14px; border-style: dashed; font-size: 14px; }
.add-stage:hover { border-color: var(--ink-3); }

.comment.is-me { background: var(--fill); }
.comment.is-me .comment-head strong { color: var(--ink); }
.note { border-left-color: var(--ink-3); }

/* ---------- Calendário ---------- */

.cal-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 24px 20px; }
.cal-title { font-size: 22px; letter-spacing: -0.025em; }
.cal-title span { color: var(--ink-3); }
.cal-grid { box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px; }
.cal-cell { min-height: 98px; }
.cal-cell.is-weekend { background: #fbfaf8; }
.cal-cell.is-selected { background: var(--fill-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.cal-daynum { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-cell.is-today .cal-daynum { background: var(--ink); }
.cal-chip { border-radius: 4px; font-size: 11px; background: var(--fill-soft); box-shadow: inset 0 0 0 1px var(--line); }
.cal-chip:hover { background: var(--fill); }
.calendar:not(.is-all) .cal-chip i { background: var(--ink-3); }
.calendar:not(.is-all) .cal-chip.k-entrega i,
.calendar:not(.is-all) .cal-chip.k-aprovacao i { background: var(--ink); }
.calendar:not(.is-all) .cal-chip.k-compra i,
.calendar:not(.is-all) .cal-chip.k-tarefa i { background: var(--rev); }
.legend-item { font-size: 12px; }
.panel-title { font-size: 13.5px; }
.cal-panels .panel { background: var(--surface); }
.panel { padding: 0; }
.cal-panels .panel { padding: 18px 20px 20px; }

/* Cores por tipo em escala de cinza (o âmbar fica para prazos e tarefas) */
.k-entrega { --kind: #131312; }
.k-inicio { --kind: #c3c1ba; }
.k-reuniao { --kind: #56554f; }
.k-visita { --kind: #7b7a73; }
.k-tarefa { --kind: #a8641a; }
.k-aprovacao { --kind: #131312; }
.k-complementar { --kind: #9b9a92; }
.k-compra { --kind: #a8641a; }

/* ---------- Orçamentos ---------- */

.budget-summary { border-radius: var(--radius); box-shadow: var(--shadow); background: var(--line); }
.stat { padding: 20px 24px 22px; }
.stat-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.stat-value { font-size: 26px; letter-spacing: -0.028em; }
.category { border-radius: var(--radius); box-shadow: var(--shadow); padding-bottom: 14px; }
.category-head { padding: 16px 20px 12px 22px; border-bottom: 1px solid var(--line); }
.cat-name { font-size: 15px; font-weight: 600; letter-spacing: 0.01em; text-transform: uppercase; }
input.cat-name { text-transform: none; letter-spacing: -0.01em; font-size: 16px; }
.cat-total { font-size: 13px; }
.items-head { font-size: 10px; letter-spacing: 0.12em; padding-top: 10px; }
.item-value { font-weight: 600; }
.add-category { border-radius: var(--radius); border-style: dashed; }

/* ---------- Janelas ---------- */

.dialog-card { border-radius: 18px; border: 1px solid var(--line); }
.dialog-title { font-size: 19px; letter-spacing: -0.02em; }
.module-option { border-radius: 12px; }
.module-option.is-selected { border-color: var(--ink); background: var(--fill-soft); box-shadow: none; }
.module-option.is-selected .check { background: var(--ink); border-color: var(--ink); }

/* ---------- Rodapé ---------- */

.footer { padding: 72px 0 60px; font-size: 12px; letter-spacing: 0.01em; }

/* ---------- Telas menores ---------- */

@media (max-width: 1000px) {
  .status-grid { grid-template-columns: 1fr; }
  .status-side { border-left: 0; border-top: 1px solid var(--line); }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-grid .meta-field:nth-child(3) { border-left: 0; }
  .meta-grid .meta-field:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .title, .title-input { font-size: 30px; }
  .panel-head { padding: 22px 20px 18px; }
  .meta-grid { grid-template-columns: 1fr; }
  .meta-grid .meta-field { border-left: 0; border-top: 1px solid var(--line); }
  .meta-grid .meta-field:first-child { border-top: 0; }
  .panel-section { padding: 14px 20px 16px; }
  .status-main, .status-side { padding: 22px 20px 24px; }
  .now-title { font-size: 22px; }
  .tabs { padding-top: 28px; }
  .tabbar { gap: 20px; width: 100%; }
  .tabbar-btn { font-size: 13.5px; }
  .project-tab { max-width: 220px; }
}

/* Ajuste de ênfase: o preto marca o que está acontecendo agora;
   o concluído fica discreto, porque já não exige atenção. */
.pill.s-concluido { background: var(--fill-soft); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.pill.s-andamento { background: var(--ink); color: #fff; box-shadow: none; }
.pill.s-andamento i { background: #fff; }
.pill-select.s-concluido { background-color: var(--fill-soft); color: var(--ink-3); }
.pill-select.s-andamento { background-color: var(--ink); color: #fff; }
.seg-bar.s-concluido { background: #76756e; }
.seg-bar.s-andamento { background: var(--ink); }
.stage.s-concluido .stage-title { color: var(--ink-2); font-weight: 500; }
.stage.s-andamento .stage-num { background: var(--ink); color: #fff; }

/* Barra de progresso: cheio = concluído, listrado = em andamento, vazio = aguardando. */
.seg-bar.s-concluido { background: var(--ink); }
.seg-bar.s-andamento {
  background: repeating-linear-gradient(115deg, var(--ink) 0 3px, #d7d5ce 3px 6px);
}
.seg-bar.s-aguardando { background: #e0ded7; }

/* Celular: ficha do projeto em duas colunas, para não virar uma lista longa. */
@media (max-width: 680px) {
  .title, .title-input { font-size: 26px; }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-grid .meta-field { padding: 13px 16px 14px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .meta-grid .meta-field:nth-child(odd) { border-left: 0; }
  .meta-grid .meta-field:nth-child(-n + 2) { border-top: 0; }
  .meta-grid dd { font-size: 13.5px; }
  .meta-grid dt { font-size: 10px; }
  .panel-section { padding: 13px 16px 15px; }
}

/* ==========================================================================
   VARIAÇÃO B — vidro e tarjas
   Fundo com leve profundidade, painéis translúcidos e tarjas pretas
   em alguns títulos, para separar melhor os elementos.
   ========================================================================== */

:root {
  --glass: rgba(255, 255, 255, 0.66);
  --glass-2: rgba(255, 255, 255, 0.4);
  --glass-line: rgba(255, 255, 255, 0.72);
  --glass-shadow: 0 1px 2px rgba(19, 19, 18, 0.04), 0 14px 34px rgba(19, 19, 18, 0.06);
  --on-dark: #d6d4ce;
  --on-dark-strong: #f1efea;
  --blur: saturate(150%) blur(16px);
}

body {
  background:
    radial-gradient(900px 520px at 12% -8%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(760px 460px at 98% 2%, #eceae4 0%, rgba(236, 234, 228, 0) 58%),
    linear-gradient(180deg, #f4f3ef 0%, #edebe6 100%);
  background-attachment: fixed;
}

/* ---------- Superfícies de vidro ---------- */

.panel,
.stage-card,
.cal-card,
.category,
.dialog-card,
.budget-summary {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
}
.panel { overflow: hidden; }
.stage.is-open .stage-card {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(19, 19, 18, 0.05), 0 18px 44px rgba(19, 19, 18, 0.09);
}
.stage-card:hover { border-color: rgba(255, 255, 255, 0.95); }

.topbar { background: rgba(244, 243, 239, 0.72); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.project-bar { background: rgba(228, 226, 220, 0.58); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.project-tab.is-active { background: rgba(255, 255, 255, 0.82); border-color: var(--glass-line); }
.project-tab:hover { background: rgba(255, 255, 255, 0.45); }

.meta-grid { background: rgba(255, 255, 255, 0.28); border-top-color: rgba(19, 19, 18, 0.07); }
.meta-grid .meta-field { border-left-color: rgba(19, 19, 18, 0.07); }
.panel-section { border-top-color: rgba(19, 19, 18, 0.07); }
.list, .agenda-list, .comps { background: rgba(255, 255, 255, 0.5); border-color: rgba(19, 19, 18, 0.08); }
.input, .textarea { background: rgba(255, 255, 255, 0.55); }
.input:focus { background: #fff; }
.picker, .add-category, .add-stage { background: rgba(255, 255, 255, 0.28); border-color: rgba(19, 19, 18, 0.14); }
.chip { background: rgba(255, 255, 255, 0.72); }
.file-chip { background: rgba(255, 255, 255, 0.7); }
.dialog::backdrop { background: rgba(28, 28, 26, 0.28); backdrop-filter: blur(6px); }

/* ---------- Tarjas pretas em alguns títulos ---------- */

/* Coluna dos próximos compromissos */
.status-side { padding: 0 0 18px; background: rgba(255, 255, 255, 0.3); border-left-color: rgba(19, 19, 18, 0.07); }
.status-side .side-head { background: var(--ink); padding: 12px 20px; margin-bottom: 14px; }
.status-side .sector-label { color: var(--on-dark-strong); }
.status-side .link-btn { color: var(--on-dark); }
.status-side .link-btn:hover { color: #fff; }
.status-side .agenda-list,
.status-side .empty { margin: 0 16px; }
.status-side .agenda-list { background: rgba(255, 255, 255, 0.62); }

/* Painéis do calendário */
.cal-panels .panel { padding: 0; }
.cal-panels .panel-head { background: var(--ink); padding: 12px 18px; min-height: 0; }
.cal-panels .panel-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-dark-strong);
}
.cal-panels .panel-head .btn {
  height: 26px;
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
}
.cal-panels .panel-head .btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.cal-panels .panel > .list,
.cal-panels .panel > .empty { margin: 14px 16px 16px; }

/* Categorias de orçamento */
.category { padding-top: 0; overflow: hidden; }
.category-head { background: var(--ink); border-bottom: 0; padding: 12px 14px 12px 20px; min-height: 0; }
.cat-name { font-size: 12px; letter-spacing: 0.13em; color: var(--on-dark-strong); font-weight: 600; }
input.cat-name { background: transparent; color: var(--on-dark-strong); font-size: 12px; letter-spacing: 0.13em; text-transform: uppercase; }
input.cat-name:hover { background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1); }
input.cat-name:focus { background: rgba(255, 255, 255, 0.16); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.16); }
.cat-total { color: #b3b1ab; }
.category-head .icon-btn { color: #97958f; }
.category-head .icon-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.items-head { padding-top: 14px; }

/* Blocos dentro das etapas: etiqueta preta em vez de texto solto */
.block-head { border-bottom-color: rgba(19, 19, 18, 0.08); padding-bottom: 10px; }
.block-title {
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--on-dark-strong);
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.13em;
}
input.block-title {
  flex: 1 1 auto;
  max-width: 320px;
  background: var(--ink);
  color: var(--on-dark-strong);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.13em;
}
input.block-title:hover { background: #2a2927; box-shadow: none; }
input.block-title:focus { background: #2a2927; box-shadow: 0 0 0 2px rgba(19, 19, 18, 0.18); }
.block-head .block-meta { margin-left: auto; }

/* Cabeçalho do calendário e do mês */
.cal-toolbar { padding-bottom: 4px; }
.cal-weekdays span { color: var(--ink-3); }

/* Aviso de revisão continua em âmbar, sobre vidro */
.rev { background: rgba(246, 238, 226, 0.78); backdrop-filter: var(--blur); }
.notice-rev { background: rgba(246, 238, 226, 0.85); }

@media (max-width: 1000px) {
  .status-side { border-left: 0; border-top: 1px solid rgba(19, 19, 18, 0.07); }
}

@media (max-width: 680px) {
  .status-side .side-head { padding: 11px 16px; }
  .status-side .agenda-list, .status-side .empty { margin: 0 12px; }
  .block-title { font-size: 9.5px; letter-spacing: 0.1em; }
}

/* Fundo com mais variação de tom: é o que faz o vidro aparecer. */
body {
  background:
    radial-gradient(820px 520px at 8% -6%, #ffffff 0%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(700px 520px at 88% 4%, #e3e0d8 0%, rgba(227, 224, 216, 0) 60%),
    radial-gradient(900px 700px at 60% 100%, #e6e3db 0%, rgba(230, 227, 219, 0) 62%),
    linear-gradient(168deg, #f5f4f0 0%, #eae8e2 52%, #f2f0ec 100%);
  background-attachment: fixed;
}
.panel, .stage-card, .cal-card, .category, .dialog-card, .budget-summary {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
}
.stage.is-open .stage-card { background: rgba(255, 255, 255, 0.72); }
.status-side { background: rgba(255, 255, 255, 0.22); }
.meta-grid { background: rgba(255, 255, 255, 0.2); }

/* Base um tom abaixo dos painéis: o contraste entre fundo e vidro é o efeito. */
body {
  background:
    radial-gradient(760px 480px at 6% -8%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(680px 520px at 92% 0%, #dfdbd1 0%, rgba(223, 219, 209, 0) 62%),
    radial-gradient(900px 640px at 70% 108%, #dcd8ce 0%, rgba(220, 216, 206, 0) 60%),
    linear-gradient(166deg, #eeece5 0%, #e6e3da 55%, #edebe4 100%);
  background-attachment: fixed;
}
:root { --band: rgba(219, 215, 205, 0.5); }
.topbar { background: rgba(238, 236, 229, 0.6); }
.project-bar { background: rgba(219, 215, 205, 0.42); }

/* Camada de luz atrás de tudo: dá o que o vidro "deixa passar". */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(520px 360px at 78% 18%, rgba(198, 191, 176, 0.42) 0%, rgba(198, 191, 176, 0) 68%),
    radial-gradient(620px 420px at 16% 62%, rgba(203, 197, 183, 0.34) 0%, rgba(203, 197, 183, 0) 66%),
    radial-gradient(420px 300px at 52% 96%, rgba(190, 183, 168, 0.3) 0%, rgba(190, 183, 168, 0) 70%);
}

/* Borda de luz no topo dos painéis: leitura de vidro, não de papel. */
.panel, .stage-card, .cal-card, .category, .dialog-card, .budget-summary {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(19, 19, 18, 0.05),
    0 18px 40px rgba(19, 19, 18, 0.07);
}
.stage.is-open .stage-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 4px rgba(19, 19, 18, 0.06),
    0 24px 56px rgba(19, 19, 18, 0.1);
}
.project-tab.is-active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 18px rgba(19, 19, 18, 0.07); }

/* A tarja acompanha o texto do título, em vez de esticar. */
input.block-title {
  flex: 0 0 auto;
  width: auto;
  min-width: 90px;
  max-width: 300px;
  field-sizing: content;
}

/* ==========================================================================
   VARIAÇÃO B — janela de vidro
   O app inteiro vira um painel translúcido sobre um fundo cinza.
   O desfoque acontece uma vez, na janela; as superfícies internas são
   apenas translúcidas — fica igual e pesa muito menos no navegador.
   ========================================================================== */

body {
  background:
    radial-gradient(900px 600px at 12% -10%, #f2f0ea 0%, rgba(242, 240, 234, 0) 58%),
    radial-gradient(700px 520px at 96% 6%, #c9c5bb 0%, rgba(201, 197, 187, 0) 60%),
    radial-gradient(900px 700px at 62% 104%, #c4c0b5 0%, rgba(196, 192, 181, 0) 62%),
    linear-gradient(164deg, #dedbd3 0%, #d3cfc6 48%, #dcd9d1 100%);
  background-attachment: fixed;
  padding: 0;
}
body::before { display: none; }

/* A janela */
#app {
  max-width: 1340px;
  margin: 18px auto 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: saturate(165%) blur(28px);
  -webkit-backdrop-filter: saturate(165%) blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 6px rgba(28, 26, 22, 0.06),
    0 34px 80px rgba(28, 26, 22, 0.18);
  overflow: clip;
}

/* Barras fixas continuam translúcidas e com desfoque próprio,
   porque o conteúdo passa por baixo delas. */
.topbar { background: rgba(252, 251, 249, 0.62); border-bottom-color: rgba(19, 19, 18, 0.07); }
.project-bar { background: rgba(236, 233, 226, 0.5); border-bottom-color: rgba(19, 19, 18, 0.07); }

/* Superfícies internas: translúcidas, sem desfoque próprio. */
.panel,
.stage-card,
.cal-card,
.category,
.budget-summary {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(28, 26, 22, 0.04),
    0 12px 30px rgba(28, 26, 22, 0.06);
}
.stage.is-open .stage-card {
  background: rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 4px rgba(28, 26, 22, 0.05),
    0 18px 44px rgba(28, 26, 22, 0.09);
}

/* Listas, campos e etiquetas: sempre um véu de branco sobre o vidro. */
.list, .agenda-list, .comps, .items { background: rgba(255, 255, 255, 0.42); }
.row, .file-row, .comp, .item, .visit { background: transparent; }
.comp.is-open { background: rgba(255, 255, 255, 0.38); }
.input, .textarea, .pill-select { background: rgba(255, 255, 255, 0.5); }
.input:hover, .pill-select:hover { background: rgba(255, 255, 255, 0.68); }
.input:focus, .textarea:focus { background: rgba(255, 255, 255, 0.92); }
.btn { background: rgba(255, 255, 255, 0.55); border-color: rgba(255, 255, 255, 0.8); }
.btn:hover { background: rgba(255, 255, 255, 0.8); border-color: rgba(255, 255, 255, 0.95); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.55); }
.btn-outline { background: rgba(255, 255, 255, 0.35); }
.seg { background: rgba(255, 255, 255, 0.4); }
.seg::before { background: rgba(255, 255, 255, 0.85); }
.chip, .file-chip, .check, .module-option { background: rgba(255, 255, 255, 0.6); }
.chip:hover, .file-chip:hover { background: rgba(255, 255, 255, 0.85); }
.pill.s-concluido { background: rgba(255, 255, 255, 0.55); }
.pill-select.s-concluido { background-color: rgba(255, 255, 255, 0.55); }
.approval, .teaser, .rev-form, .note, .picker, .add-category, .add-stage, .comment {
  background: rgba(255, 255, 255, 0.42);
}
.comment.is-me { background: rgba(255, 255, 255, 0.72); }
.rev, .notice-rev { background: rgba(246, 238, 226, 0.72); backdrop-filter: none; }
.storage-warning { background: rgba(246, 238, 226, 0.8); }

/* Calendário */
.cal-grid { background: rgba(255, 255, 255, 0.34); box-shadow: inset 0 0 0 1px rgba(19, 19, 18, 0.07); }
.cal-cell { border-color: rgba(19, 19, 18, 0.07); }
.cal-cell:hover { background: rgba(255, 255, 255, 0.5); }
.cal-cell.is-weekend { background: rgba(255, 255, 255, 0.16); }
.cal-cell.is-selected { background: rgba(255, 255, 255, 0.62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9); }
.cal-cell.is-out { background: rgba(255, 255, 255, 0.08); }
.cal-chip { background: rgba(255, 255, 255, 0.68); box-shadow: inset 0 0 0 1px rgba(19, 19, 18, 0.06); }
.cal-chip:hover { background: rgba(255, 255, 255, 0.92); }

/* Janelas e avisos flutuantes: vidro próprio, porque ficam acima de tudo. */
.dialog-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(170%) blur(26px);
  -webkit-backdrop-filter: saturate(170%) blur(26px);
}
.dialog::backdrop { background: rgba(30, 28, 24, 0.34); backdrop-filter: blur(8px); }
.toast { background: rgba(19, 19, 18, 0.86); }

/* Divisórias mais leves, para o vidro não virar grade. */
.meta-grid, .meta-grid .meta-field, .panel-section, .block-head, .items-head,
.item, .row, .file-row, .comp, .stage-actions, .category-head + .items { border-color: rgba(19, 19, 18, 0.07); }
.list, .agenda-list, .comps { border-color: rgba(19, 19, 18, 0.08); }

@media (max-width: 1100px) {
  #app { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
}

/* Em celular o desfoque grande custa caro: reduz, mantendo a transparência. */
@media (max-width: 680px) {
  #app { backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); }
  .dialog-card { backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); }
}

@media (prefers-reduced-transparency: reduce) {
  #app, .panel, .stage-card, .cal-card, .category, .budget-summary, .dialog-card {
    background: #fbfaf8;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* A janela precisa de moldura cinza em volta. */
#app {
  width: min(1340px, 100% - 72px);
  margin: 30px auto 34px;
}

/* O botão principal volta a ser preto (a regra de vidro tinha apagado). */
.btn-primary,
.btn-primary:hover { color: #fff; border-color: var(--ink); }
.btn-primary { background: var(--ink); }
.btn-primary:hover { background: #2c2b29; }
.btn-danger { background: transparent; border-color: transparent; }
.btn-danger:hover { background: #f6e7e2; }

@media (max-width: 1100px) {
  #app { width: 100%; margin: 0; }
}

/* Moldura um tom mais firme, para a janela destacar. */
body {
  background:
    radial-gradient(900px 600px at 10% -12%, #ebe8e1 0%, rgba(235, 232, 225, 0) 56%),
    radial-gradient(700px 520px at 97% 4%, #bfbab0 0%, rgba(191, 186, 176, 0) 58%),
    radial-gradient(900px 700px at 60% 106%, #bab6ab 0%, rgba(186, 182, 171, 0) 60%),
    linear-gradient(164deg, #d6d2c9 0%, #cac6bc 50%, #d3cfc6 100%);
  background-attachment: fixed;
}

/* ==========================================================================
   VARIAÇÃO C — painel do escritório, barra lateral e caminho de volta
   ========================================================================== */

.shell { display: flex; align-items: stretch; min-height: 100%; }
.shell-main { flex: 1; min-width: 0; }

/* Barra lateral de ícones */
.rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 66px;
  flex-shrink: 0;
  padding: 18px 0 20px;
  background: rgba(255, 255, 255, 0.28);
  border-right: 1px solid rgba(19, 19, 18, 0.07);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}
.rail-top, .rail-bottom { display: flex; flex-direction: column; gap: 8px; }
.rail-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--ink-3);
  transition: background 0.2s, color 0.2s;
}
.rail-btn:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
.rail-btn.is-active { background: var(--ink); color: #f1efea; }
.rail-btn .icon { width: 18px; height: 18px; }

/* Caminho de volta ao painel */
.crumb { background: rgba(236, 233, 226, 0.4); border-bottom: 1px solid rgba(19, 19, 18, 0.07); }
.crumb-inner { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.crumb-back {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px 0 9px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.crumb-back:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
.crumb-back .icon { width: 14px; height: 14px; }
.crumb-sep { color: var(--ink-3); }
.crumb-select {
  appearance: none;
  -webkit-appearance: none;
  height: 32px;
  padding: 0 30px 0 10px;
  border: 0;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d8c85' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 12px;
  transition: background-color 0.2s;
}
.crumb-select:hover { background-color: rgba(255, 255, 255, 0.7); }
.crumb-spacer { flex: 1; }

/* ---------- Painel ---------- */

.dash { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-title { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.028em; }
.dash-sub { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.dash-head-actions { display: flex; align-items: center; gap: 10px; }
.dash-head-actions .seg { width: 210px; background: rgba(255, 255, 255, 0.45); }

.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dash-stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.dash-stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dash-stat.is-alert { background: rgba(246, 238, 226, 0.7); border-color: #ecdcc6; }
.dash-stat.is-alert .dash-stat-value { color: var(--rev-ink); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-panel { padding: 0; overflow: hidden; }
.dash-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(19, 19, 18, 0.07); }
.dash-panel-head.is-dark { background: var(--ink); border-bottom: 0; }
.dash-panel-head.is-dark .sector-label { color: var(--on-dark-strong); }
.dash-panel-head.is-dark .btn { height: 26px; background: transparent; color: var(--on-dark); border-color: rgba(255, 255, 255, 0.22); }
.dash-panel-head.is-dark .btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* Lista de projetos */
.dash-table { display: flex; flex-direction: column; }
.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) 132px 92px 20px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 18px;
  text-align: left;
  border-top: 1px solid rgba(19, 19, 18, 0.06);
  transition: background 0.2s;
}
.dash-row:hover { background: rgba(255, 255, 255, 0.6); }
.dash-row.is-active { background: rgba(255, 255, 255, 0.45); }
.dash-row-head {
  border-top: 0;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
}
.dash-project { display: flex; align-items: center; gap: 11px; min-width: 0; }
.dash-project-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dash-project-text strong { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-project-text span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stage { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dash-stage .pill { min-width: 0; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.dash-stage .pill span, .dash-stage .pill { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-progress { display: flex; align-items: center; gap: 9px; }
.dash-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(19, 19, 18, 0.1); overflow: hidden; }
.dash-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.dash-bar.is-lg { height: 7px; margin: 12px 0 2px; }
.dash-progress-text { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dash-next { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dash-chev { color: var(--ink-3); width: 14px; height: 14px; }

/* Mês compacto */
.mini-cal { padding: 14px 16px 6px; }
.mini-week, .mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mini-week span { text-align: center; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-3); padding-bottom: 6px; }
.mini-cell {
  position: relative;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.mini-cell.is-out { visibility: hidden; }
.mini-cell:hover { background: rgba(255, 255, 255, 0.8); color: var(--ink); }
.mini-cell.has-events::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--ink-3);
}
.mini-cell.is-today { background: var(--ink); color: #fff; font-weight: 600; }
.mini-cell.is-today.has-events::after { background: #fff; }
.dash-agenda { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 16px; border-top: 1px solid rgba(19, 19, 18, 0.07); }

/* Projeto em foco */
.dash-focus-body { padding: 16px 18px 18px; }
.dash-focus-title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.dash-focus-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.dash-focus-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.dash-mini { display: flex; flex-direction: column; gap: 3px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.dash-open { width: 100%; justify-content: center; margin-top: 16px; }

/* Busca do topo (ainda desligada nesta versão) */
.search-field {
  display: flex; align-items: center; gap: 9px;
  flex: 1;
  max-width: 420px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--ink-3);
  font-size: 13.5px;
  cursor: default;
}
.search-field .icon { width: 15px; height: 15px; }

@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 20px; }
  .dash-progress, .dash-next, .dash-row-head { display: none; }
}

@media (max-width: 680px) {
  .rail {
    position: fixed;
    inset: auto 0 0 0;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(250, 249, 246, 0.9);
    backdrop-filter: saturate(150%) blur(14px);
    border-right: 0;
    border-top: 1px solid rgba(19, 19, 18, 0.08);
    z-index: 30;
  }
  .rail-top, .rail-bottom { flex-direction: row; }
  .shell-main { padding-bottom: 70px; }
  .dash { padding-top: 20px; }
  .dash-title { font-size: 23px; }
  .dash-head-actions { width: 100%; }
  .dash-head-actions .seg { flex: 1; width: auto; }
  .crumb-inner { min-height: 46px; }
  .crumb-select { font-size: 13.5px; }
}

/* Lista de projetos: mais espaço para o nome; status vira um ponto discreto. */
.dash-row { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.5fr) 116px 88px 18px; gap: 12px; }
.dash-stage { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.dash-stage-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; }
.dash-stage.s-andamento .dash-dot { background: var(--ink); }
.dash-stage.s-andamento .dash-stage-text { color: var(--ink); font-weight: 500; }
.dash-stage.s-concluido .dash-dot { background: var(--ink-3); }
.dash-stage.s-revisao .dash-dot { background: var(--rev); }
.dash-stage.s-revisao .dash-stage-text { color: var(--rev-ink); }
.dash-project-text strong { font-size: 14px; }

@media (max-width: 1180px) {
  .dash-row { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.4fr) 96px 18px; }
  .dash-next, .dash-row-head > span:nth-child(4) { display: none; }
}

/* Busca não pode espremer o topo. */
.search-field { min-width: 0; white-space: nowrap; overflow: hidden; }
.search-field .icon { flex-shrink: 0; }
@media (max-width: 1150px) { .search-field { display: none; } }

/* Celular: cada projeto vira um bloco de duas linhas, sem cortar o nome. */
@media (max-width: 680px) {
  .dash-row {
    grid-template-columns: minmax(0, 1fr) 18px;
    row-gap: 9px;
    padding: 14px 16px;
  }
  .dash-row-head { display: none; }
  .dash-stage, .dash-progress { grid-column: 1 / -1; display: flex; }
  .dash-progress { gap: 10px; }
  .dash-project-text strong { font-size: 15px; white-space: normal; }
  .dash-project-text span { white-space: normal; }
  .dash-stats { gap: 10px; }
  .dash-stat { padding: 13px 14px 15px; }
  .dash-stat-value { font-size: 22px; }
}

@media (max-width: 680px) {
  .dash-project { grid-column: 1; grid-row: 1; }
  .dash-chev { grid-column: 2; grid-row: 1; align-self: center; }
}

/* ---------- Quadro de etapas (painel) ---------- */

.dash-panel-meta { font-size: 12px; color: var(--ink-3); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(19, 19, 18, 0.07); }
.board-col { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 16px; background: rgba(255, 255, 255, 0.34); min-width: 0; }
.board-col.s-andamento { background: rgba(255, 255, 255, 0.6); }
.board-col.s-revisao { background: rgba(246, 238, 226, 0.5); }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-head b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(19, 19, 18, 0.07);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.board-col.s-andamento .board-head b { background: var(--ink); color: #f1efea; }
.board-col.s-revisao .board-head b { background: var(--rev); color: #fff; }
.board-cards { display: flex; flex-direction: column; gap: 8px; }
.board-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 10px 11px 11px;
  border-radius: 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.05);
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s;
}
.board-card:hover { background: #fff; box-shadow: 0 4px 14px rgba(28, 26, 22, 0.1); transform: translateY(-1px); }
.board-card-project { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); min-width: 0; }
.board-card-project i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.board-card-project { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card-title { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.board-card-date { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.board-more { font-size: 11.5px; color: var(--ink-3); padding-left: 2px; }
.board-empty { font-size: 11.5px; color: var(--ink-3); opacity: 0.7; }

/* ---------- Menu de seções, com mais presença ---------- */

.tabs { padding: 32px 0 0; border-bottom: 0; display: flex; align-items: center; gap: 14px; }
.tabbar { display: flex; align-items: center; gap: 12px; }
.tabbar-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tabbar-group {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(28, 26, 22, 0.04);
}
.tabbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.tabbar-btn::after { display: none; }
.tabbar-btn .icon { width: 15px; height: 15px; opacity: 0.75; }
.tabbar-btn:hover { background: rgba(255, 255, 255, 0.75); color: var(--ink); }
.tabbar-btn.is-active { background: var(--ink); color: #f3f1ec; font-weight: 500; }
.tabbar-btn.is-active .icon { opacity: 1; }

#content { padding-top: 22px; }
#tabs { scroll-margin-top: 112px; }

@media (max-width: 1000px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .board { grid-template-columns: 1fr; }
  .board-col { padding: 12px 14px 14px; }
  .tabs { padding-top: 24px; flex-wrap: wrap; gap: 8px; }
  .tabbar { width: 100%; }
  .tabbar-label { display: none; }
  .tabbar-group { width: 100%; }
  .tabbar-btn { flex: 1; justify-content: center; padding: 0 8px; font-size: 13px; }
  .tabbar-btn .icon { display: none; }
  #tabs { scroll-margin-top: 76px; }
}

/* O quadro se adapta à largura que ele realmente tem, não à da janela. */
.dash-panel { container-type: inline-size; }
.board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 660px) {
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (max-width: 380px) {
  .board { grid-template-columns: 1fr; }
}
.board-card-title { overflow-wrap: anywhere; }

/* ==========================================================================
   Ajustes pedidos pela arquiteta (27/09)
   ========================================================================== */

/* 1. Calendário: o compromisso aparece por inteiro, em vez de cortado. */
.cal-cell { min-height: 116px; }
.cal-chip {
  height: auto;
  min-height: 21px;
  align-items: flex-start;
  padding: 4px 7px 5px 6px;
  line-height: 1.3;
}
.cal-chip i { margin-top: 4px; }
.cal-chip-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.cal-chip-time { flex-shrink: 0; }

/* 2. Linhas de agenda com check de "feito" */
.agenda-row { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; background: transparent; }
.agenda-row:hover { background: rgba(255, 255, 255, 0.6); }
.agenda-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 54px;
  padding: 8px 0;
  text-align: left;
}
.agenda-row.is-compact .agenda-main { min-height: 48px; }
.agenda-row > .check { flex-shrink: 0; width: 20px; height: 20px; }
.agenda-row > .check .icon { width: 11px; height: 11px; }
.agenda-row.is-done .agenda-title { color: var(--ink-3); text-decoration: line-through; }
.agenda-row.is-done .agenda-dot { opacity: 0.4; }

/* 3. Puxador para reordenar itens de uma lista */
.row.is-sortable { position: relative; padding-left: 26px; }
.row-grip {
  position: absolute;
  left: 4px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 18px;
  height: 30px;
  margin-top: -15px;
  border-radius: 6px;
  color: var(--ink-3);
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.row-grip .icon { width: 13px; height: 13px; }
.row-grip .icon svg { fill: currentColor; stroke: none; }
.list:hover .row-grip, .row-grip:focus-visible { opacity: 0.75; }
.row-grip:hover { opacity: 1; background: var(--fill); }
.list.is-sorting .row { transition: transform 0.2s var(--ease); }
.list .row.is-dragging {
  position: relative;
  z-index: 5;
  transition: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(28, 26, 22, 0.14);
}

/* 4. Compromisso pessoal (sem cliente) */
.agenda-row .agenda-sub { overflow: hidden; text-overflow: ellipsis; }

/* Quebra de linha respeitando as palavras (só parte a palavra se não couber mesmo). */
.cal-chip-title { overflow-wrap: break-word; hyphens: auto; }
.cal-chip { font-size: 11px; }

/* ==========================================================================
   Painel v2 — lista larga, faixa de etapas e calendário na base
   ========================================================================== */

.dash-grid { display: none; }
.dash-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }

/* Lista de projetos com espaço de verdade: nada de nome cortado. */
.dash-row {
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.7fr) minmax(150px, 0.9fr) 116px 18px;
  gap: 20px;
  padding: 16px 22px;
}
.dash-row-head { padding-top: 12px; padding-bottom: 12px; }
.dash-project { gap: 13px; }
.dash-project .project-avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 11.5px; }
.dash-project-text strong { font-size: 15px; }
.dash-project-text span { font-size: 12.5px; }
.dash-stage { font-size: 14px; }
.dash-stage .dash-dot { width: 8px; height: 8px; }
.dash-next { font-size: 13.5px; }
.dash-progress-text { font-size: 12.5px; }
.dash-panel-head { padding: 15px 22px; }

/* Faixa de etapas: colunas largas, cartões legíveis. */
.board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board-col { padding: 16px 16px 18px; gap: 12px; }
.board-card { padding: 12px 13px 13px; gap: 4px; }
.board-card-project { font-size: 11.5px; }
.board-card-title { font-size: 14px; }
.board-card-date { font-size: 12px; }

/* Calendário e compromissos na base */
.dash-agenda-list { margin: 0; border: 0; border-radius: 0; background: transparent; }
.dash-agenda-empty { padding: 18px 22px; }
.mini-cal { padding: 16px 18px 18px; }
.mini-cell { height: 34px; font-size: 12.5px; }

@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .board { grid-template-columns: 1fr; }
  .dash-row { padding: 14px 16px; gap: 10px 14px; }
}

/* ==========================================================================
   Tela de entrada (login) e link do cliente
   ========================================================================== */

.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.gate-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 34px 34px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 24px 60px rgba(28, 26, 22, 0.14);
  text-align: left;
}
.gate-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 20px;
  border-radius: 11px;
  background: var(--ink);
  color: #f1efea;
  font-size: 15px;
  font-weight: 600;
}
.gate-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.025em; }
.gate-text { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.gate-form { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.gate-btn { width: 100%; justify-content: center; height: 40px; }
.gate-feedback { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.gate-feedback.is-ok { color: var(--accent-ink); }
.gate-feedback.is-error { color: #96331f; }

.link-box { min-height: 44px; display: flex; align-items: center; }
.link-url {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
