/* Compact dashboard cards. Dialogs retain their detailed layouts. */
.dashboard-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.dashboard-row > .panel {
  box-sizing: border-box;
  min-width: 0;
  height: 365px;
  min-height: 365px;
  overflow: hidden;
}
.news-panel .news-list { flex: 1; }
.news-panel .panel-title { align-items: center; }
.news-expand { flex: 0 0 auto; display: grid; place-items: center; width: 33px; height: 33px; padding: 6px; border: 1px solid #c9deef; border-radius: 10px; background: linear-gradient(145deg,#fff,#e7f3fc); color: #235b94; cursor: pointer; }
.news-expand svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.news-expand:is(:hover,:focus-visible) { border-color:#67b8d7; outline:2px solid #1f639e; outline-offset:2px; }
.news-list .news-link { width:100%; padding:2px 0; border:0; background:none; color:#123d70; text-align:right; font:inherit; font-weight:700; line-height:1.55; cursor:pointer; }
.news-list .news-link:hover { color:#175eaa; text-decoration:underline; text-underline-offset:3px; }
.news-list .news-link:focus-visible { outline:2px solid #1f639e; outline-offset:2px; border-radius:3px; }

.receipt-panel .receipt-dashboard { display:flex; flex-direction:column; flex:1; min-height:0; }
.receipt-panel .receipt-periods { margin-top:7px; padding:2px; }
.receipt-panel .receipt-period-glider { inset-block:2px; right:2px; width:calc((100% - 4px)/3); }
.receipt-panel .receipt-periods button { min-height:28px; padding:2px 5px; }
.receipt-panel .receipt-metrics { margin:7px 0 5px; gap:5px; }
.receipt-panel .receipt-metrics > div { padding:4px 5px; }
.receipt-panel .receipt-metrics dt { font-size:9px; line-height:1.5; }
.receipt-panel .receipt-metrics dd { margin:0; font-size:15px; line-height:1.35; }
.receipt-panel .receipt-metrics small { font-size:8px; line-height:1.45; }
.receipt-panel .receipt-meta { font-size:8px; }
.receipt-panel .bar-chart { --prism-height:128px; --bar-label-space:36px; padding:6px 0 0; }
.receipt-panel .bars { gap:4px; padding-inline:5px; }
.receipt-panel .bar-label { margin-top:5px; font-size:9px; }
.receipt-panel .receipt-footer { margin-top:auto; padding-top:5px; }
.receipt-panel .receipt-footer .primary { min-height:30px; }

.budget-ring-panel .budget-ring-dashboard { display:flex; flex-direction:column; flex:1; min-height:0; }
.budget-ring-panel .budget-ring-meta { margin-top:5px; }
.budget-ring-panel .budget-ring-layout { grid-template-columns:150px minmax(0,1fr); align-items:center; gap:6px; direction:ltr; flex:1; }
.budget-ring-panel .budget-ring-layout > * { direction:rtl; }
.budget-ring-panel .budget-ring-scene { width:150px; }
.budget-ring-panel .budget-ring-center strong { font-size:23px; }
.budget-ring-panel .budget-ring-figure figcaption { font-size:9px; line-height:1.6; margin:0 2px; }
.budget-ring-panel .budget-ring-total { padding:4px 1px; gap:3px; }
.budget-ring-panel .budget-ring-total > span { font-size:10px; }
.budget-ring-panel .budget-ring-total strong { font-size:17px; }
.budget-ring-panel .budget-ring-total small { font-size:9px; }
.budget-ring-panel .budget-ring-legend { gap:3px; margin-top:5px; }
.budget-ring-panel .budget-ring-option { min-height:31px; padding:4px 5px; gap:5px; grid-template-columns:8px minmax(0,1fr) auto; }
.budget-ring-panel .budget-ring-option > span { font-size:10px; }
.budget-ring-panel .budget-ring-option strong { font-size:14px; }
.budget-ring-panel .budget-ring-option small { display:none; }
.budget-ring-panel .budget-ring-insight { margin:4px 1px 0; min-height:0; font-size:9px; line-height:1.6; }
.budget-ring-panel .budget-ring-footer { margin-top:auto; padding-top:5px; }
.budget-ring-panel .budget-ring-footer .primary { min-height:30px; }

/* Enlarge the ring first, then separate its two accurate budget segments. */
.budget-ring-remaining { pointer-events:stroke; }
.budget-ring-achieved,.budget-ring-remaining { transform-box:fill-box; transform-origin:center; transition:transform 440ms cubic-bezier(.2,.75,.2,1),filter 240ms ease; }
.budget-ring-track { transition:opacity 260ms ease; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .budget-ring-scene:hover .budget-ring-object { transform:perspective(700px) rotateX(var(--ring-x,0deg)) rotateY(var(--ring-y,0deg)) scale(1.1); }
  .budget-ring-scene:hover .budget-ring-track { opacity:0; transition-delay:250ms; }
  .budget-ring-scene:hover .budget-ring-achieved { transform:translate(-6px,-3px); transition-delay:300ms; }
  .budget-ring-scene:hover .budget-ring-remaining { transform:translate(9px,6px); transition-delay:300ms; }
}

.news-dialog { direction:rtl; width:min(540px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); overflow:auto; margin:auto; padding:20px 22px; border:1px solid #fff; border-radius:18px; background:linear-gradient(145deg,#f7fcff,#e4f2fc); box-shadow:0 28px 90px #092b606b; color:#123d70; font-family:var(--plus1-text); }
.news-dialog::backdrop { background:#0b2c5966; backdrop-filter:blur(8px); }
.news-dialog-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; border-bottom:1px solid #b6d2e459; padding-bottom:10px; }
.news-dialog-header h2 { margin:0; font:400 23px/1.6 var(--plus1-title); }
.news-dialog-close { flex:0 0 auto; width:35px; height:35px; border:1px solid #c9deef; border-radius:50%; background:#fff; color:#235b94; font:26px/1 sans-serif; cursor:pointer; }
.news-dialog-close:focus-visible { outline:2px solid #1f639e; outline-offset:2px; }
.news-dialog time { display:block; margin-top:12px; color:#5c7892; font:12px var(--plus1-number); }
.news-dialog p { margin:14px 0 0; font-size:14px; line-height:1.9; }
.news-dialog-list { list-style:none; padding:5px 0; margin:0; }
.news-dialog-list li { border-bottom:1px solid #b6d2e459; }
.news-dialog-list button { width:100%; padding:11px 0; border:0; background:none; color:#123d70; font:inherit; text-align:right; cursor:pointer; }
.news-dialog-list button:hover,.news-dialog-list button:focus-visible { color:#175eaa; text-decoration:underline; }
.news-dialog-list time { margin-top:2px; }
@media (max-width:1100px) {
  .dashboard-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-row > .summary-panel { grid-column:1/-1; }
  .budget-ring-panel .budget-ring-layout { grid-template-columns:175px minmax(0,1fr); }
  .budget-ring-panel .budget-ring-scene { width:175px; }
}
@media (max-width:720px) {
  .dashboard-row { grid-template-columns:minmax(0,1fr); }
  .dashboard-row > .summary-panel { grid-column:auto; }
  .budget-ring-panel .budget-ring-layout { grid-template-columns:145px minmax(0,1fr); }
  .budget-ring-panel .budget-ring-scene { width:145px; }
  .budget-ring-panel .budget-ring-center strong { font-size:19px; }
}
@media (max-width:390px) {
  .dashboard-row > .panel { height:380px; min-height:380px; }
  .budget-ring-panel .budget-ring-layout { grid-template-columns:125px minmax(0,1fr); }
  .budget-ring-panel .budget-ring-scene { width:125px; }
  .budget-ring-panel .budget-ring-center strong { font-size:17px; }
}
@media (max-width:350px) {
  .dashboard-row > .panel { height:auto; min-height:380px; overflow:visible; }
}
@media (prefers-reduced-motion:reduce) {
  .budget-ring-achieved,.budget-ring-remaining,.budget-ring-track { transition:none !important; }
}
