/* Core helpers shared by every module (loaded after app.css). */
.ct-stack { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ct-codes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ct-qr { background: #fff; border: 1px solid var(--line2); border-radius: 4px; padding: 8px; width: max-content; margin: 8px 0 12px; }
.ct-qr svg { display: block; width: 180px; height: 180px; }
.ct-ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .ct-field { flex: 1 1 200px; margin: 0; }
.ct-link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; }
.ct-link:hover { text-decoration: underline; }
.ct-amount { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ct-amount.in { color: var(--okFg); } .ct-amount.out { color: var(--text); }
.ct-captcha { display: flex; gap: 10px; align-items: flex-end; }
.ct-captcha img { border: 1px solid var(--line2); border-radius: 4px; height: 40px; }
@media (max-width: 900px) { .ct-g12 > [class*="ct-s"] { grid-column: span 12; } }

/* Narrow phones: keep the top bar inside the viewport. */
@media (max-width: 560px) {
    .ct-top-actions { gap: 4px; min-width: 0; }
    .ct-top-actions .ct-session { display: none; }
    .ct-top-actions .ct-topbtn .lbl { display: none; }
    .ct-top-actions .ct-topbtn { padding-left: 8px; padding-right: 8px; }
}

.ct-pill.neutral { background: #eaf2f9; color: #2f5f88; }

/* Screen-reader-only text; pages that hide the toolbar keep their h1 this way. */
.ct-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* A second line under the top-bar title (the dashboard's date and currency). */
.ct-top-title.has-note { line-height: 1.25; }
.ct-top-note { display: block; margin-top: 3px; font-size: 12px; color: #9fc0e4; overflow: hidden; text-overflow: ellipsis; }
.ct-top-note i { color: #f2c14e; margin-right: 4px; }
.ct-main > .ct-sr + .ct-content { padding-top: 12px; }

/* Grid and flex children may shrink below their content, so wide tables scroll inside their panel instead of
   widening the page on phones. */
.ct-content > *, .ct-stack > *, .ct-g12 > *, .ct-grid > *, .ct-panel > *, .ct-main > * { min-width: 0; }
.ct-tablewrap, .ct-scroll { max-width: 100%; position: relative; }
.ct-sr { left: 0; top: 0; }
@media (max-width: 560px) {
    .ct-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ct-tile .num, .ct-tile b.num { overflow-wrap: anywhere; }
}
.ct-content { padding-bottom: 56px; }
