/* Signed-in home: an overview of the landlord's saved properties (dashboard.js). */
.dash { padding: 32px 0 8px; }
.dash[hidden] { display: none; }
body.has-dash .hero, body.has-dash .band { display: none; }
body.has-dash.dash-check .hero { display: block; }
html.dash-wait .hero, html.dash-wait .band { display: none; }

.dash-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.dash-head h1 { margin: 0 0 .2rem; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.dash-head p { margin: 0; color: var(--ink-soft); }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-actions .btn-sm { padding: .55rem .95rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.kpi .k-label { color: var(--ink-soft); font-size: .88rem; margin: 0 0 .25rem; }
.kpi .k-value { font-size: 1.6rem; font-weight: 700; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.kpi .k-unit { font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
.kpi .k-sub { color: var(--ink-soft); font-size: .86rem; margin: .3rem 0 0; }
.kpi.attention { border-color: #c4e0cd; background: #f1f8f4; }

.prop { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; }
.prop-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.prop-top h2 { margin: 0; font-size: 1.4rem; }
.prop-top .meta { color: var(--ink-soft); margin: .1rem 0 0; font-size: .95rem; }
.pill { display: inline-block; border-radius: 999px; padding: .25rem .75rem; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.pill.go { background: #e8f4ec; color: #1d4d31; }
.pill.soon { background: #fff4d6; color: #8a5a00; }
.pill.calm { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }

.prop-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); grid-template-areas: "next chart" "facts chart"; column-gap: 28px; align-items: start; }
.prop-body > .next { grid-area: next; }
.prop-body > .chart { grid-area: chart; }
.prop-body > .facts { grid-area: facts; }
.facts { list-style: none; padding: 0; margin: 0 0 14px; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.facts li:last-child { border-bottom: 0; }
.facts .f-k { color: var(--ink-soft); }
.facts .f-v { text-align: right; font-weight: 600; }
.facts .f-v small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .84rem; }
.next { border-radius: 10px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 12px; font-size: .97rem; }
.next.go { background: #f1f8f4; border-color: #c4e0cd; }
.next p { margin: 0 0 .5rem; } .next p:last-child { margin: 0; }
.next .btn-sm { margin-top: .2rem; }

.chart h3 { font-family: "Source Sans 3", system-ui, sans-serif; font-size: 1rem; margin: 0; }
.chart .c-sub { color: var(--ink-soft); font-size: .88rem; margin: .1rem 0 .6rem; }
.chart .c-plot { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart svg:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.chart .c-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .86rem; color: var(--ink-soft); margin: .5rem 0 0; }
.chart .c-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart .key { display: inline-block; width: 16px; height: 0; border-top: 2px solid; border-radius: 2px; }
.c-tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(29,36,51,.12); padding: 8px 10px; font-size: .84rem; min-width: 150px; z-index: 5; }
.c-tip[hidden] { display: none; }
.c-tip .t-date { color: var(--ink-soft); margin-bottom: 4px; }
.c-tip .t-row { display: flex; align-items: center; gap: 8px; }
.c-tip .t-row b { font-variant-numeric: tabular-nums; }
.c-tip .t-row span:last-child { color: var(--ink-soft); }
.chart details { margin-top: .5rem; font-size: .88rem; }
.chart details summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.chart table { border-collapse: collapse; margin-top: .4rem; width: 100%; font-variant-numeric: tabular-nums; }
.chart th, .chart td { text-align: left; padding: .25rem .4rem; border-bottom: 1px solid var(--line); }
.chart td:last-child, .chart th:last-child { text-align: right; }

.dash-foot { color: var(--ink-soft); font-size: .86rem; margin: 6px 0 0; }
.dash-empty { text-align: center; padding: 32px 24px; }

@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .prop-body { grid-template-columns: 1fr; grid-template-areas: "next" "chart" "facts"; }
  .prop-body > .chart { margin: 4px 0 18px; }
}
@media (max-width: 420px) {
  .kpi .k-value { font-size: 1.35rem; }
  .prop { padding: 18px 16px; }
}

/* Phased plan in the next-step box */
.plan { border-top: 1px solid #c4e0cd; margin: .6rem 0 .7rem; padding-top: .6rem; }
.plan-head { margin: 0 0 .45rem; }
.plan-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.plan-steps li { position: relative; padding: 0 0 .55rem 30px; counter-increment: step; display: flex; flex-wrap: wrap; gap: 0 .5rem; }
.plan-steps li::before { content: counter(step); position: absolute; left: 0; top: .1rem; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid #475066; color: #475066; font-size: .72rem; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.plan-steps li:not(:last-child)::after { content: ''; position: absolute; left: 9px; top: calc(.1rem + 22px); bottom: -.1rem; width: 2px; background: #b9c3bd; }
.plan-steps li.now::before { background: #475066; color: #fff; }
.plan-steps .ps-rent { font-weight: 700; }
.plan-steps .ps-when { color: var(--ink-soft); }

.kpi .k-rise { display: block; margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--line); color: var(--good, #1f6f3f); font-weight: 600; }

/* Icons (icons.js) */
.prop-name { display: flex; align-items: center; gap: 10px; }
.name-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.name-ico svg { width: 22px; height: 22px; }
.kpi .k-label { display: flex; align-items: center; gap: 8px; }
.k-ico { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.k-ico svg { width: 17px; height: 17px; }
