/* This desktop view shares the dashboard's content width and outer spacing. */
.history-desktop,.history-desktop-subtitle,.history-desktop-footer { display:none; }
@media(min-width:701px) {
  body.desktop-interior.history-page { --desktop-content:1240px; }
  .desktop-interior.history-page .interior-workspace { padding-top:28px;padding-bottom:0; }
  .desktop-interior.history-page .app > .history-header { display:grid;grid-template-columns:1fr auto;grid-template-rows:38px 23px;gap:0 24px;min-height:61px;margin-bottom:24px; }
  .desktop-interior.history-page .history-header h1 { font-size:30px;line-height:38px;letter-spacing:-.9px;grid-column:1;grid-row:1; }
  .history-desktop-subtitle { display:block;grid-column:1;grid-row:2;font-size:14px;line-height:20px;color:var(--puente-color-text-secondary);margin:3px 0 0; }
  .desktop-interior.history-page .history-header .desktop-header-profile { grid-column:2;grid-row:1/3;gap:10px; }
  .history-page .desktop-header-profile .profile-name { font-size:15px;line-height:21px; }
  .history-page .desktop-header-profile .profile-copy { display:flex; }
  .history-page .desktop-header-profile .telegram-tag { font-size:11px;line-height:16px; }
  .desktop-interior.history-page .app > .history-main { display:none; }
  .history-desktop { display:block; }
  .desktop-interior.history-page .desktop-workspace::before { background-image:url('./backdrop-clock.svg');width:700px;height:700px;top:-255px;right:-200px;opacity:.075;animation:history-clock-drift 64s ease-in-out infinite; }
  .desktop-interior.history-page .desktop-workspace::after { background-image:url('./backdrop-receipt.svg');width:780px;height:780px;left:-280px;top:370px;opacity:.065;animation:history-receipt-drift 74s ease-in-out infinite; }
  @keyframes history-clock-drift { 0%,100% { transform:rotate(14deg); } 50% { transform:translate(-20px,28px) rotate(22deg); } }
  @keyframes history-receipt-drift { 0%,100% { transform:rotate(-22deg); } 50% { transform:translate(30px,-24px) rotate(-16deg); } }
  .ledger-summary { display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) minmax(0,1fr);gap:20px;margin-bottom:26px; }
  .ledger-summary-card { min-width:0;min-height:184px;border-radius:var(--puente-radius-card);padding:24px;background:white;position:relative; }
  .ledger-completed,.ledger-attention { display:flex;flex-direction:column; }
  .ledger-overview { display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--puente-color-brand-cobalt);color:white;padding:22px 24px;overflow:clip;isolation:isolate; }
  .ledger-overview::before { content:"";position:absolute;width:260px;height:260px;border:32px solid #FFFFFF08;border-radius:50%;right:-28px;top:-50px;z-index:-1; }
  .ledger-overview-copy { flex-shrink:0; }
  .ledger-month { display:flex;align-items:center;gap:7px;font-size:12px;line-height:18px;color:#EDF2FF; }
  .ledger-month .icon { width:16px;height:16px;stroke-width:2.3; }
  .ledger-overview-total { display:flex;align-items:baseline;gap:9px;margin-top:10px; }
  .ledger-overview-total strong { font-size:48px;line-height:54px;font-weight:550;letter-spacing:-1.8px; }
  .ledger-overview-total span { font-size:17px;line-height:24px;font-weight:500; }
  .ledger-overview p { margin:7px 0 0;color:#EDF2FF;font-size:13px;line-height:19px; }
  .ledger-overview > img,.ledger-overview-art { width:184px;max-width:46%;height:auto;flex-shrink:1; }
  .ledger-stat-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;line-height:22px;font-weight:550; }
  .ledger-stat-icon { display:grid;place-items:center;width:34px;height:34px;border-radius:11px;flex-shrink:0; }
  .ledger-stat-icon .icon { width:21px;height:21px;stroke-width:2.7; }
  .ledger-completed .ledger-stat-icon { background:var(--puente-color-status-successSurface);color:var(--puente-color-status-success); }
  .ledger-stat-number { display:block;margin:8px 0 9px;font-size:38px;line-height:43px;font-weight:550;letter-spacing:-1.2px; }
  .ledger-stat-action { display:flex;align-items:center;gap:7px;color:var(--puente-color-brand-cobalt);font-size:12px;line-height:20px;min-height:24px;font-weight:550;margin-top:auto;align-self:flex-start; }
  .ledger-stat-action .icon { width:14px;height:14px; }
  .ledger-stat-action:hover { text-decoration:underline;text-underline-offset:4px; }
  .ledger-attention { background:var(--puente-color-surface-promoPeach);color:var(--puente-color-text-onPromoPeach); }
  .ledger-attention .ledger-stat-icon { color:var(--puente-color-text-onPromoPeach);background:#FFFFFF70; }
  .ledger-attention-filters { display:flex;gap:7px;flex-wrap:wrap;margin-top:auto; }
  .ledger-attention-filters button { display:flex;align-items:center;gap:5px;font-size:11px;line-height:18px;padding:3px 8px;border-radius:7px;background:#FFFFFF80;white-space:nowrap; }
  .ledger-attention-filters button:hover { background:white; }
  .ledger-attention-filters button::before { content:"";width:4px;height:4px;border-radius:50%;background:currentColor; }
  .ledger-attention-filters button:last-child { color:var(--puente-color-status-error); }
  .ledger-panel { background:white;border-radius:var(--puente-radius-card);overflow:hidden; }
  .ledger-panel-top { padding:22px 24px 20px; }
  .ledger-panel-heading { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px; }
  .ledger-panel-heading h2 { display:flex;align-items:center;gap:10px;font-size:21px;line-height:28px;font-weight:600;letter-spacing:-.55px;margin:0; }
  .ledger-total-badge { font-size:12px;line-height:20px;letter-spacing:0;font-weight:550;color:var(--puente-color-text-secondary);background:var(--puente-color-surface-canvas);padding:2px 8px;border-radius:7px; }
  .ledger-reset { font-size:12px;line-height:20px;min-height:28px;color:var(--puente-color-brand-cobalt); }
  .ledger-toolbar { display:flex;align-items:center;gap:16px; }
  .ledger-search { display:flex;align-items:center;gap:10px;min-width:150px;max-width:390px;flex:1;padding:0 13px;background:var(--puente-color-surface-canvas);border:1px solid transparent;border-radius:var(--puente-radius-control);height:44px; }
  .ledger-search:focus-within { border-color:#A2B3FA;box-shadow:0 0 0 3px #4564DE0C; }
  .ledger-search > .icon { width:19px;height:19px;flex-shrink:0;color:#8692AC;stroke-width:2.2; }
  .ledger-search input { min-width:0;width:100%;border:0;background:none;outline:none;color:var(--puente-color-text-primary);font-size:13px;line-height:20px;padding:0; }
  .ledger-search input::placeholder { color:var(--puente-color-text-secondary);opacity:1; }
  .ledger-tabs { display:flex;align-items:center;gap:3px;padding:4px;border-radius:13px;background:var(--puente-color-surface-canvas);margin-left:auto; }
  .ledger-tabs button { font-size:13px;line-height:20px;font-weight:550;padding:8px 17px;border-radius:10px;color:var(--puente-color-text-secondary);min-height:36px;white-space:nowrap; }
  .ledger-tabs button[aria-selected=true] { color:white;background:var(--puente-color-brand-cobalt); }
  .ledger-tabs button:not([aria-selected=true]):hover { color:var(--puente-color-brand-cobalt); }
  .ledger-filter { display:flex;align-items:center;gap:7px;min-height:44px;border:1px solid var(--puente-color-border-subtle);border-radius:13px;padding:10px 14px;color:var(--puente-color-brand-cobalt);font-size:13px;line-height:20px;font-weight:550;white-space:nowrap; }
  .ledger-filter .icon { width:19px;height:19px;stroke-width:2.3; }
  .ledger-filter:hover,.ledger-filter[data-active=true] { background:var(--puente-color-surface-action);border-color:transparent; }
  .ledger-columns,.ledger-row { display:grid;grid-template-columns:minmax(240px,1fr) 110px 140px 180px 16px;gap:20px;align-items:center;padding-inline:24px; }
  .ledger-columns { min-height:42px;background:#F5F7FC;border-block:1px solid var(--puente-color-border-subtle);font-size:11px;line-height:18px;font-weight:550;letter-spacing:.25px;color:var(--puente-color-text-secondary); }
  .ledger-columns > :nth-child(4) { text-align:right; }
  .ledger-day-heading { display:flex;align-items:center;gap:12px;min-height:42px;padding:10px 24px;background:#FBFCFE;border-bottom:1px solid var(--puente-color-border-subtle); }
  .ledger-day-heading h3 { margin:0;font-size:12px;line-height:20px;font-weight:550;color:#65718C; }
  .ledger-day-heading > span { color:#9199AC;font-size:11px;line-height:18px; }
  .ledger-row { min-height:88px;border-bottom:1px solid var(--puente-color-border-subtle);color:inherit;transition:background .18s; }
  .ledger-row:hover { background:#F5F8FF; }
  .ledger-row-main { display:flex;align-items:center;gap:15px;min-width:0; }
  .ledger-row-main > img { width:52px;height:52px;flex-shrink:0;transition:transform .2s; }
  .ledger-row-title { display:block;font-size:17px;line-height:24px;font-weight:600;letter-spacing:-.3px; }
  .ledger-row-meta { display:block;font-size:14px;line-height:21px;color:var(--puente-color-text-secondary);margin-top:3px; }
  .ledger-row:hover .ledger-row-title { color:var(--puente-color-brand-cobalt); }
  .ledger-row:hover .ledger-row-main > img { transform:rotate(-5deg); }
  .ledger-row-asset { display:flex;align-items:center;gap:8px;min-width:0; }
  .ledger-row-asset img,.ledger-peso { width:25px;height:25px;flex-shrink:0; }
  .ledger-peso { display:grid;place-items:center;border-radius:50%;color:var(--puente-color-brand-cobalt);background:var(--puente-color-surface-action);font-size:17px;font-weight:550; }
  .ledger-row-asset strong { font-size:14px;line-height:20px;font-weight:550; }
  .ledger-status { display:flex;align-items:center;gap:6px;width:max-content;border-radius:7px;padding:4px 8px;font:var(--puente-font-feedback);color:var(--puente-color-status-success);background:var(--puente-color-status-successSurface); }
  .ledger-status::before { content:"";width:4px;height:4px;background:currentColor;border-radius:50%; }
  .ledger-status.pending { color:var(--puente-color-status-warning);background:var(--puente-color-status-warningSurface); }
  .ledger-status.failed { color:var(--puente-color-status-error);background:var(--puente-color-status-errorSurface); }
  .ledger-row-money { text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums; }
  .ledger-row-money strong { display:block;font-size:19px;line-height:25px;font-weight:550;letter-spacing:-.4px; }
  .ledger-row-money small { display:block;font-size:11px;line-height:18px;margin-top:3px;color:var(--puente-color-text-secondary); }
  .ledger-row-money.is-failed strong { color:var(--puente-color-text-secondary);text-decoration:line-through;text-decoration-thickness:1px; }
  .ledger-row > .icon { width:13px;height:13px;color:#A0A8B7;stroke-width:2; }
  .desktop-page .ledger-row:focus-visible { outline-offset:-4px; }
  .ledger-pagination { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;min-height:68px; }
  .ledger-pagination > span { color:var(--puente-color-text-secondary);font-size:12px;line-height:20px; }
  .ledger-page-buttons { display:flex;align-items:center;gap:6px; }
  .ledger-page-buttons button { display:grid;place-items:center;min-width:34px;height:34px;border-radius:10px;font-size:12px;font-weight:550;color:var(--puente-color-text-secondary); }
  .ledger-page-buttons button[aria-current=page] { background:var(--puente-color-surface-action);color:var(--puente-color-brand-cobalt); }
  .ledger-page-buttons button:not(:disabled):hover { background:var(--puente-color-surface-canvas); }
  .ledger-page-buttons button:disabled { opacity:.3;cursor:default; }
  .ledger-page-buttons .icon { width:15px;height:15px; }
  .ledger-empty { padding:48px 24px;text-align:center; }
  .ledger-empty > img { width:100px;height:90px;object-fit:contain; }
  .ledger-empty h3 { font-size:20px;line-height:28px;letter-spacing:-.4px;margin:10px 0 6px;font-weight:600; }
  .ledger-empty p { font-size:14px;color:var(--puente-color-text-secondary);margin:0 0 12px; }
  .ledger-empty button { font-size:13px;color:var(--puente-color-brand-cobalt);min-height:36px; }
  .history-desktop-footer { display:flex;min-height:66px; }
  .history-desktop-footer > span { font-size:19px;color:#8A91A2; }
  .history-desktop-footer p { font-size:11px; }
}
@media(min-width:1600px) {
  .desktop-interior.history-page .interior-workspace { padding-top:36px; }
  .desktop-interior.history-page .app > .history-header { margin-bottom:28px; }
  .ledger-summary { gap:28px;margin-bottom:28px; }
}
@media(min-width:701px) and (max-width:1279px) {
  .ledger-summary { gap:16px; }
  .ledger-summary-card { padding:20px; }
  .ledger-overview-total strong { font-size:44px; }
  .ledger-overview-total span { font-size:15px; }
  .ledger-overview > img,.ledger-overview-art { max-width:42%; }
  .ledger-columns,.ledger-row { grid-template-columns:minmax(210px,1fr) 90px 112px 150px 12px;gap:12px;padding-inline:22px; }
  .ledger-toolbar { gap:10px; }
  .ledger-tabs button { padding-inline:12px; }
  .ledger-attention-filters { gap:5px; }
  .ledger-attention-filters button { font-size:10px;padding-inline:6px; }
}
@media(min-width:701px) and (max-width:1000px) {
  .ledger-summary { grid-template-columns:1fr 1fr; }
  .ledger-overview { grid-column:1/-1;min-height:160px;padding:20px 28px; }
  .ledger-overview > img,.ledger-overview-art { width:170px;max-width:40%;height:135px; }
  .ledger-summary-card:not(.ledger-overview) { min-height:166px; }
  .ledger-panel-top { padding:20px; }
  .ledger-toolbar { flex-wrap:wrap; }
  .ledger-search { flex-basis:100%;max-width:none; }
  .ledger-tabs { margin-left:0;flex:1; }
  .ledger-tabs button { flex:1; }
  .ledger-columns,.ledger-row { grid-template-columns:minmax(190px,1fr) 100px 145px 12px;padding-inline:20px; }
  .ledger-row-asset,.ledger-columns > :nth-child(2) { display:none; }
  .ledger-columns > :nth-child(4) { text-align:right; }
  .ledger-row-main { gap:11px; }
  .ledger-row-main > img { width:44px;height:44px; }
  .ledger-row-title { font-size:15px; }
  .ledger-row-meta { font-size:12px; }
  .ledger-row-money strong { font-size:17px; }
  .history-page .desktop-header-profile .profile-copy { display:none; }
}
@media(min-width:701px) and (max-width:780px) {
  .desktop-interior.history-page .interior-workspace { padding-inline:22px; }
  .desktop-interior.history-page .history-header h1 { font-size:27px; }
  .ledger-columns,.ledger-row { grid-template-columns:minmax(180px,1fr) 90px 130px 10px;gap:8px; }
  .ledger-row-money strong { font-size:16px; }
  .ledger-status {padding:3px 6px; }
}
@media(prefers-reduced-motion:reduce) {
  .desktop-interior.history-page .desktop-workspace::before,.desktop-interior.history-page .desktop-workspace::after { animation:none; }
  .ledger-row:hover .ledger-row-main > img { transform:none; }
}

.ledger-overview-art [data-motion-part] { transform-box:fill-box;transform-origin:center; }
.ledger-overview-art [data-motion-part=hand] { transform-box:view-box;transform-origin:168px 126px; }
