/* ============================================================
   parent.css — Parent mode (efficient, dense). Report summary cards,
   medication heatmap (Phase 3), split-a-spend editor (Phase 4).
   ============================================================ */

/* ---------- Report summary stat cards (A.5) ---------- */
.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-card);
    padding: var(--space-3);
    box-shadow: var(--shadow-card);
}

.stat-card .stat-label { color: var(--c-text-muted); font-weight: 700; font-size: 0.8rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.week-stepper { display: flex; align-items: center; gap: var(--space-2); }
.week-stepper .btn { min-height: var(--tap-min); min-width: var(--tap-min); border-radius: var(--radius-pill); }

/* Status pills (pending requests / approvals) */
.status-pill { border-radius: var(--radius-pill); padding: 3px 12px; font-weight: 800; font-size: 0.78rem; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-awaiting { background: #fef3c7; color: #92400e; }

/* ---------- Approval review cards (D.1, mobile) ---------- */
.review-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-card);
    padding: var(--space-3);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-3);
}

.review-card .review-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.review-card .review-actions .btn { flex: 1; min-height: var(--tap-min); border-radius: var(--radius-pill); font-weight: 800; }

/* ---------- Approvals hub (To review / Approved) ---------- */
.approvals-tabs { border-bottom: 2px solid var(--c-border); gap: 4px; }
.approvals-tabs .nav-link { font-weight: 800; color: var(--c-text-muted); border: none; border-radius: 0; }
.approvals-tabs .nav-link.active { color: var(--c-text); border-bottom: 3px solid var(--c-kid-accent); background: transparent; }
.approvals-tabs .badge { margin-left: 4px; vertical-align: middle; }

.approval-section {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}

.approval-section-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: var(--space-2);
}
.approval-kid { font-weight: 900; font-size: 1.05rem; }

.approval-item {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 0; border-top: 1px solid var(--c-border);
}
.approval-item:first-of-type { border-top: none; }

.approval-item-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.approval-icon { font-size: 1.4rem; line-height: 1; }
.approval-title { font-weight: 800; }
.approval-subtitle { font-size: 0.82rem; color: var(--c-text-muted); }

.approval-item-side { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.approval-item-side .money { font-variant-numeric: tabular-nums; font-weight: 900; }
.approval-actions { display: flex; gap: 6px; }
.approval-actions .btn { min-height: var(--tap-min); border-radius: var(--radius-pill); font-weight: 800; }

@media (max-width: 560px) {
    .approval-item { flex-direction: column; align-items: stretch; }
    .approval-item-side { justify-content: space-between; }
    .approval-actions .btn { flex: 1; }
}

/* ---------- Deduction chips (Loss / Penalty) ---------- */
.deduction-chip.selected-activity { background: var(--c-deduction) !important; color: #fff !important; border-color: var(--c-deduction) !important; }

/* ---------- Medication adherence heatmap (Phase 3) ---------- */
.adherence-heatmap { border-collapse: separate; border-spacing: 4px; }
.adherence-heatmap th { font-size: 0.75rem; color: var(--c-text-muted); font-weight: 800; text-align: center; }
.adherence-heatmap td { text-align: center; }

.adherence-cell {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 0.85rem;
}

.adherence-cell.taken { background: #dcfce7; color: #166534; }
.adherence-cell.missed { background: #fee2e2; color: #991b1b; }
.adherence-cell.pending { background: #f1f5f9; color: #94a3b8; }
.adherence-cell.skipped { background: #fef3c7; color: #92400e; }

/* ---------- Split-a-Spend editor (Phase 4) ---------- */
.split-editor .split-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-card); margin-bottom: 8px;
}

.split-row .split-amount { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }
.split-row .to-ledger { font-size: 0.72rem; color: var(--c-deduction); font-weight: 800; }

.split-reconcile {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px; border-radius: var(--radius-card); font-weight: 800; margin-top: var(--space-3);
}

.split-reconcile.balanced { background: #dcfce7; color: #166534; }
.split-reconcile.off { background: #fee2e2; color: #991b1b; }

/* "shared by N" divisor badge on the Shared Spending report */
.share-dividend {
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--c-kid-accent);
    background: #ede9fe;
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-variant-numeric: tabular-nums;
}

/* Notes shown beside the expense title on the Shared Spending report */
.spend-note {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--c-text-muted);
}
.spend-note::before { content: "· "; }

@media (max-width: 768px) {
    .report-stats { grid-template-columns: repeat(2, 1fr); }
}
