/* ==========================================================================
   Dashboard & reports center. Module stylesheet: tokens only, shared parts live in components.css.
   ========================================================================== */

/* ---- Dashboard (Phase 11): compact header, KPI strip, widget grid ---- */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.dash-head__title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.dash-head__date { margin: 0; color: var(--text-faint, var(--text-muted)); font-size: .8rem; }
.dash-head__actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.dash-timer { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .6rem; border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; max-width: 14rem; color: inherit; text-decoration: none; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); align-items: stretch; }
.dash-w { min-width: 0; }
.dash-w > .m-card { height: 100%; }
/* a lone widget on the last row takes the full width instead of leaving a hole beside it */
.dash-grid > .dash-w:last-child:nth-child(odd) { grid-column: 1 / -1; }
.dash-w--full { grid-column: 1 / -1; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: var(--sp-2); }
.dash-kpi { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 8px); color: inherit; text-decoration: none; min-width: 0; }
.dash-kpi:hover { border-color: var(--accent); }
.dash-kpi__label { font-size: .72rem; color: var(--text-muted); display: flex; gap: .35rem; align-items: center; }
.dash-kpi__value { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.dash-kpi__hint { font-size: .7rem; color: var(--text-muted); }
.dash-kpi.is-danger .dash-kpi__value { color: var(--danger, #dc2626); }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0; }
.dash-col { padding-bottom: var(--sp-2); border-inline-end: 1px solid var(--border); min-width: 0; }
.dash-col:last-child { border-inline-end: 0; }
.dash-col__title { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: .65rem 0 .25rem; padding-inline: .75rem; font-weight: 600; }
.dash-col__title.px-3 { margin-top: .75rem; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: var(--sp-2); padding: .6rem .75rem; margin: 0; }
.dash-stats dt { font-size: .7rem; color: var(--text-muted); font-weight: 500; }
.dash-stats dd { margin: 0; font-weight: 600; }
.dash-stats a { color: inherit; text-decoration: none; }
.dash-sort__handle { cursor: grab; color: var(--text-muted); }
.att-item { display: flex; align-items: center; }
.att-panel { max-height: 22rem; overflow: auto; }
@media (max-width: 991px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-col { border-inline-end: 0; } }
.gsearch__item mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; padding: 0 .1em; border-radius: 2px; }

/* ---- Reports center ---- */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.rep-item { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .8rem; border-top: 1px solid var(--border); color: inherit; text-decoration: none; min-width: 0; }
.rep-item:hover { background: var(--surface-2, color-mix(in srgb, var(--accent) 6%, transparent)); }
.rep-item i { color: var(--text-muted); margin-top: .15rem; }
.rep-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-2); }
.rep-filters .m-select, .rep-filters .m-input { width: auto; max-width: 15rem; }
.rep-range { font-size: .8rem; margin: 0 0 var(--sp-2); }
.rep-totals { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; padding: .5rem .75rem; }
.rep-totals small { color: var(--text-muted); margin-inline-end: .3rem; }
.rep-total-cur { display: inline-flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
@media print { .app-header, .app-subnav, .page-header__actions, .rep-filters, .gsearch { display: none !important; } }

