/* ALEXPOCKET Personal Finance PRO — Phase 181–200. Scoped additions only. */
.ap-history-panel { overflow: hidden; }
.ap-history-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
  padding: 16px 18px;
  margin: 12px 0 18px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--surface-soft, #f8fafc);
}
.ap-history-range, .ap-history-total { display:flex; flex-direction:column; justify-content:center; gap:5px; min-width:0; }
.ap-history-range span, .ap-history-total span { color:var(--muted,#64748b); font-size:12px; font-weight:600; }
.ap-history-range strong { color:var(--text,#0f172a); font-size:15px; }
.ap-history-total strong { font-size:clamp(17px,2vw,23px); font-weight:750; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ap-history-total.income strong, .ap-history-day-income { color:#16a34a; }
.ap-history-total.expense strong, .ap-history-day-expense { color:#ef4444; }
.ap-history-count { align-self:center; color:var(--muted,#64748b); font-size:12px; white-space:nowrap; }
.ap-history-list { display:flex; flex-direction:column; gap:12px; }
.ap-history-day { border:1px solid var(--border,#e5e7eb); border-radius:15px; overflow:hidden; background:var(--surface,#fff); }
.ap-history-day-head { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:13px 16px; background:var(--surface-soft,#f8fafc); border-bottom:1px solid var(--border,#e5e7eb); }
.ap-history-day-head > div:first-child { display:flex; flex-direction:column; gap:3px; }
.ap-history-day-head strong { color:var(--text,#111827); font-size:17px; }
.ap-history-day-head span { color:var(--muted,#64748b); font-size:13px; }
.ap-history-day-totals { display:flex; align-items:center; gap:12px; font-size:15px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ap-history-day-entries { display:flex; flex-direction:column; }
.ap-history-entry { display:flex; flex-direction:column; border-bottom:1px solid var(--border,#edf0f3); }
.ap-history-entry:last-child { border-bottom:0; }
.ap-history-entry-main {
  width:100%; min-width:0; min-height:82px; display:grid;
  grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:13px;
  padding:12px 16px; border:0; border-radius:0; background:transparent;
  color:var(--text,#111827); text-align:left; font:inherit; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.ap-history-entry-main:hover { background:var(--surface-soft,#f8fafc); }
.ap-history-entry-main:focus-visible { outline:3px solid var(--primary,#0284c7); outline-offset:-3px; }
.ap-history-entry-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:12px; background:#e0f2fe; color:#0284c7; overflow:hidden; }
.ap-history-entry-icon .ap-history-category-icon { width:100%; height:100%; display:grid; place-items:center; }
.ap-history-entry-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.ap-history-entry-copy > strong { font-size:16px; font-weight:700; color:var(--text,#111827); }
.ap-history-entry-description { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted,#64748b); font-size:14px; }
.ap-history-entry-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted,#64748b); font-size:11px; }
.ap-history-entry-amount { color:var(--text,#111827); font-size:17px; font-weight:750; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ap-history-entry-amount.income { color:#16a34a; }
.ap-history-entry-amount.expense { color:#ef4444; }
.ap-history-entry-tools { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:6px; padding:0 14px 10px 74px; }
.ap-history-entry-tools .row-actions { min-width:34px; min-height:32px; }
.ap-history-load-more { display:flex; flex-direction:column; align-items:center; gap:8px; padding:18px 0 4px; }
.ap-history-load-more span, .ap-history-footnote { color:var(--muted,#64748b); font-size:12px; text-align:center; padding:12px; }
.ap-history-detail-total { font-size:28px; font-weight:800; font-variant-numeric:tabular-nums; }
.ap-history-detail-total.income { color:#16a34a; }
.ap-history-detail-total.expense { color:#ef4444; }
.ap-history-detail dl { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.ap-history-detail dl > div { padding:10px; border-radius:10px; background:var(--surface-soft,#f8fafc); min-width:0; }
.ap-history-detail dt { color:var(--muted,#64748b); font-size:11px; }
.ap-history-detail dd { margin:4px 0 0; color:var(--text,#111827); font-size:13px; overflow-wrap:anywhere; }
.ap-greeting-profile-link { border:0; padding:0; background:transparent; color:var(--primary,#0284c7); font:inherit; font-weight:750; cursor:pointer; text-align:left; }
.ap-greeting-profile-link:focus-visible { outline:2px solid currentColor; outline-offset:3px; border-radius:3px; }
.ap-private-workspace-warning, .ap-shared-workspace-notice { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:0 0 14px; padding:12px 14px; border:1px solid #f2d5a0; border-radius:12px; background:#fffbeb; }
.ap-private-workspace-warning > div, .ap-shared-workspace-notice > div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.ap-private-workspace-warning strong, .ap-shared-workspace-notice strong { color:var(--text,#111827); font-size:13px; }
.ap-private-workspace-warning span, .ap-shared-workspace-notice span { color:var(--muted,#64748b); font-size:12px; }
@media (max-width:760px) {
  .ap-history-summary { grid-template-columns:1fr 1fr; gap:10px; padding:13px; }
  .ap-history-range { grid-column:1 / -1; padding-bottom:8px; border-bottom:1px solid var(--border,#e5e7eb); }
  .ap-history-count { grid-column:1 / -1; justify-self:start; }
  .ap-history-day-head { padding:11px 13px; }
  .ap-history-day-head strong { font-size:16px; }
  .ap-history-day-totals { flex-direction:column; align-items:flex-end; gap:2px; font-size:13px; }
  .ap-history-entry-main { min-height:76px; grid-template-columns:42px minmax(0,1fr) auto; gap:10px; padding:10px 11px; }
  .ap-history-entry-icon { width:40px; height:40px; border-radius:10px; }
  .ap-history-entry-copy > strong { font-size:14px; }
  .ap-history-entry-description { font-size:13px; }
  .ap-history-entry-copy small { font-size:10px; }
  .ap-history-entry-amount { font-size:14px; }
  .ap-history-entry-tools { padding-left:62px; padding-right:10px; }
  .ap-history-detail dl { grid-template-columns:1fr; }
  .ap-private-workspace-warning, .ap-shared-workspace-notice { align-items:flex-start; flex-direction:column; }
}
