/* 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; }

/* Keyboard users can jump past the menus. */
.ct-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: var(--navy); padding: 8px 12px; border-radius: 4px; font-weight: 700; }
.ct-skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #f2a93b; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
/* Platform staff choose which tenant's data they are looking at. */
.ct-tenantpick select { min-height: 32px; border: 1px solid #34597e; background: #0a294e; color: #dbe9f7; border-radius: 4px; font-size: 12px; padding: 0 8px; max-width: 170px; }
@media (max-width: 760px) { .ct-tenantpick { display: none; } }
/* Required and optional markers on form boxes. */
.ct-field .opt { color: var(--muted); font-weight: 400; font-size: 11px; }
/* Timeline of who did what. */
.ct-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ct-timeline li { position: relative; padding: 0 0 12px 22px; border-left: 2px solid var(--line2); margin-left: 6px; }
.ct-timeline li:last-child { border-left-color: transparent; }
.ct-timeline li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.ct-timeline li.ok::before { border-color: var(--okFg); } .ct-timeline li.bad::before { border-color: var(--badFg); } .ct-timeline li.warn::before { border-color: #d99a06; }
.ct-timeline b { display: block; font-size: 13px; }
.ct-timeline small { color: var(--muted); }
/* Filter bars above lists. */
.ct-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.ct-filters .ct-field { margin: 0; min-width: 140px; flex: 0 1 180px; }
.ct-filters .grow { flex: 1 1 220px; }
.ct-count { color: var(--muted); font-size: 12px; margin-left: auto; align-self: center; }
.ct-sortlink { color: inherit; text-decoration: none; white-space: nowrap; }
.ct-sortlink:hover { text-decoration: underline; }
.ct-check label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.ct-check input { margin-top: 3px; }
