/* Caminho.DEV — the clickable 'dashboard' hero window (assets/js/dash-demo.js).
   Everything here applies only once the script has taken the window over (.is-live),
   so without it the drawn picture in pages.css is untouched. */

.mp-dash.is-live { position: relative; }
.mp-dash.is-live [role="button"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mp-dash.is-live [role="button"]:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 2px; }

/* Sidebar: real tabs now. */
.mp-dash.is-live .mp-dash-side span { transition: background .15s, color .15s; }
.mp-dash.is-live .mp-dash-side span:not(.on):hover { background: #18264f; color: #fff; }
.mp-dash.is-live .mp-dash-side span.on { background: var(--mp-accent); }

/* Main column: fixed to the dashboard's height; other screens scroll inside it. */
.mp-dash.is-live .mp-dash-main { display: flex; flex-direction: column; }
.mp-dash.is-live .mp-dash-view { display: none; flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.mp-dash.is-live .mp-dash-view.on { display: block; animation: mpDashIn .22s ease; }
@keyframes mpDashIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Dashboard tiles lift on hover; the chart gets a tooltip. */
.mp-dash.is-live .mp-dash-tile[role="button"] { transition: transform .15s, box-shadow .15s, border-color .15s; }
.mp-dash.is-live .mp-dash-tile[role="button"]:hover { transform: translateY(-2px); border-color: #cdd6ee; box-shadow: 0 10px 22px -14px rgba(15, 26, 61, .45); }
.mp-dash-chartbox { position: relative; }
.mp-dash-tip { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 8px)); white-space: nowrap;
  background: #0f1a3d; color: #fff; font-size: .62rem; padding: 4px 7px; border-radius: 6px; opacity: 0; transition: opacity .12s; }
.mp-dash-tip.on { opacity: 1; }
.mp-dash-tip b { font-size: .72rem; }
.mp-dash .mp-dash-new { animation: mpDashFlash 1.4s ease; border-radius: 8px; }
@keyframes mpDashFlash { from { background: var(--mp-soft, #eaf0fe); } to { background: transparent; } }

/* Shared bits. */
.mp-dash-pill { font-style: normal; font-size: .6rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.mp-dash-pill--active { background: #eaf0fe; color: #2563eb; }
.mp-dash-pill--review { background: #fef3e2; color: #b45309; }
.mp-dash-pill--done { background: #e6f7ec; color: #15803d; }
.mp-dash-bar { display: block; height: 6px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.mp-dash-bar i { display: block; height: 100%; background: var(--mp-accent); border-radius: 99px; transition: width .4s; }
.mp-dash-btn { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 700; color: #fff;
  background: var(--mp-accent); border-radius: 8px; padding: 7px 11px; }
.mp-dash-btn svg { width: 13px; height: 13px; }
.mp-dash-btn--ghost { background: #fff; color: var(--mp-ink); border: 1px solid var(--mp-line-2); }
.mp-dash-btn:hover { filter: brightness(1.06); }

/* Projects. */
.mp-dash-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.mp-dash-chip { font-size: .64rem; font-weight: 600; color: var(--mp-muted); border: 1px solid var(--mp-line-2); border-radius: 99px; padding: 4px 10px; background: #fff; }
.mp-dash-chip small { opacity: .7; margin-left: 2px; }
.mp-dash-chip.on { background: var(--mp-ink); border-color: var(--mp-ink); color: #fff; }
.mp-dash-list { border: 1px solid var(--mp-line-2); border-radius: 10px; }
.mp-dash-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 92px; gap: 12px; align-items: center; padding: 9px 12px; transition: background .12s; }
.mp-dash-item + .mp-dash-item { border-top: 1px solid var(--mp-line-2); }
.mp-dash-item:hover { background: #f7f9fe; }
.mp-dash-name { min-width: 0; font-size: .62rem; color: var(--mp-muted); }
.mp-dash-name b { display: block; font-size: .74rem; color: var(--mp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-dash-prog { display: flex; align-items: center; gap: 7px; }
.mp-dash-prog .mp-dash-bar { flex: 1; }
.mp-dash-prog small { font-size: .62rem; font-weight: 700; width: 28px; text-align: right; color: var(--mp-ink); }
.mp-dash-back { display: inline-block; font-size: .68rem; font-weight: 600; color: var(--mp-accent); margin-bottom: 10px; }
.mp-dash-detail { border: 1px solid var(--mp-line-2); border-radius: 10px; padding: 14px; }
.mp-dash-detail-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: .66rem; color: var(--mp-muted); }
.mp-dash-detail-h b { display: block; font-size: .92rem; color: var(--mp-ink); margin-bottom: 2px; }
.mp-dash-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 12px; }
.mp-dash-kv span { background: #f6f8fd; border-radius: 8px; padding: 8px 10px; font-size: .74rem; font-weight: 700; color: var(--mp-ink); min-width: 0; }
.mp-dash-kv small { display: block; font-size: .6rem; font-weight: 500; color: var(--mp-muted); margin-bottom: 2px; }
.mp-dash-actions { display: flex; gap: 8px; margin-top: 14px; }

/* Clients. */
.mp-dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.mp-dash-client { border: 1px solid var(--mp-line-2); border-radius: 10px; padding: 11px; min-width: 0; transition: transform .15s, box-shadow .15s; }
.mp-dash-client:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(15, 26, 61, .45); }
.mp-dash-client .mp-dash-dot { font-style: normal; font-size: .62rem; font-weight: 800; margin-bottom: 8px; }
.mp-dash-client span { display: block; font-size: .62rem; color: var(--mp-muted); }
.mp-dash-client b { display: block; font-size: .74rem; color: var(--mp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-dash-client small { display: block; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--mp-line-2); font-size: .6rem; color: var(--mp-muted); }

/* Tasks. */
.mp-dash-hint { margin: 0 0 8px; font-size: .64rem; color: var(--mp-muted); }
.mp-dash-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mp-dash-col { background: #f6f8fc; border-radius: 10px; padding: 8px; min-width: 0; }
.mp-dash-col h6 { display: flex; justify-content: space-between; margin: 2px 2px 8px; font-size: .68rem; font-weight: 700; color: var(--mp-ink); }
.mp-dash-col h6 small { font-weight: 600; color: var(--mp-muted); }
.mp-dash-task { display: flex; gap: 7px; align-items: flex-start; background: #fff; border: 1px solid var(--mp-line-2); border-radius: 8px;
  padding: 7px 8px; margin-bottom: 6px; font-size: .66rem; font-weight: 600; color: var(--mp-ink); line-height: 1.3; transition: box-shadow .15s; }
.mp-dash-task:hover { box-shadow: 0 6px 14px -10px rgba(15, 26, 61, .5); }
.mp-dash-task > i { flex: none; width: 13px; height: 13px; border: 1.5px solid #c3cbe0; border-radius: 4px; display: grid; place-items: center; margin-top: 1px; }
.mp-dash-task.is-done { color: var(--mp-muted); text-decoration: line-through; }
.mp-dash-task.is-done > i { background: var(--mp-ok, #16a34a); border-color: transparent; color: #fff; }
.mp-dash-task > i svg { width: 9px; height: 9px; }

/* Reports. */
.mp-dash-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; }
.mp-dash-split h5 { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mp-dash-split h5 small { font-weight: 500; color: var(--mp-muted); }
.mp-dash-seg { margin-left: auto; display: inline-flex; background: #eef1f7; border-radius: 7px; padding: 2px; }
.mp-dash-seg span { font-size: .58rem; font-weight: 600; color: var(--mp-muted); padding: 3px 7px; border-radius: 5px; }
.mp-dash-seg span.on { background: #fff; color: var(--mp-ink); box-shadow: 0 1px 2px rgba(15, 26, 61, .14); }
.mp-dash-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 16px; }
.mp-dash-bars > span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.mp-dash-bars i { position: relative; width: 100%; max-width: 22px; border-radius: 5px 5px 2px 2px; background: var(--mp-accent);
  transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.mp-dash-bars em { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .56rem; font-weight: 700; color: var(--mp-ink); }
.mp-dash-bars small { font-size: .56rem; color: var(--mp-muted); }
.mp-dash-legend { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.mp-dash-card .mp-dash-legend li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: .66rem; color: var(--mp-ink); }
.mp-dash-legend li .mp-dash-bar { grid-column: 1 / -1; height: 5px; }
.mp-dash-legend span { display: flex; align-items: center; gap: 6px; }
.mp-dash-key { width: 8px; height: 8px; border-radius: 2px; }
.mp-dash-key--active { background: #2563eb; } .mp-dash-key--review { background: #d97706; } .mp-dash-key--done { background: #16a34a; }

/* Settings. */
.mp-dash-pref { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; font-size: .72rem; font-weight: 600; color: var(--mp-ink); }
.mp-dash-pref + .mp-dash-pref { border-top: 1px solid var(--mp-line-2); }
.mp-dash-switch { position: relative; flex: none; width: 32px; height: 18px; border-radius: 99px; background: #d5dbea; transition: background .2s; }
.mp-dash-switch::before { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.mp-dash-switch.on { background: var(--mp-accent); }
.mp-dash-switch.on::before { transform: translateX(14px); }
.mp-dash-swatches { display: flex; gap: 6px; }
.mp-dash-swatches span { width: 18px; height: 18px; border-radius: 6px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px transparent; transition: box-shadow .15s; }
.mp-dash-swatches span.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #9aa6c4; }

/* Toast, inside the window. */
.mp-dash-toast { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 10px); display: flex; align-items: center; gap: 7px;
  background: #0f1a3d; color: #fff; font-size: .68rem; font-weight: 600; padding: 8px 12px; border-radius: 9px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 12px 26px -10px rgba(15, 26, 61, .5); z-index: 3; }
.mp-dash-toast.on { opacity: 1; transform: translate(-50%, 0); }
.mp-dash-toast svg { width: 13px; height: 13px; color: #4ade80; }

@media (max-width: 1180px) {
  .mp-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: pages.css hides the sidebar here, so the live window shows it as a row of tabs. */
@media (max-width: 640px) {
  .mp-dash.is-live .mp-dash-side { display: flex; flex-direction: row; gap: 4px; padding: 8px; overflow-x: auto; scrollbar-width: none; }
  .mp-dash.is-live .mp-dash-side b { display: none; }
  .mp-dash.is-live .mp-dash-side span { font-size: .68rem; gap: 6px; padding: 7px 10px; white-space: nowrap; flex: none; }
  .mp-dash-item { grid-template-columns: minmax(0, 1fr) auto; }
  .mp-dash-prog { display: none; }
  .mp-dash-split { grid-template-columns: minmax(0, 1fr); }
  .mp-dash-board { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .mp-dash.is-live *, .mp-dash.is-live *::before { animation: none !important; transition: none !important; }
}
