/* App-specific styles on top of the design kit. Square corners, no soft shadows. */
.app-grow { flex: 1; }
.login { min-height: 100vh; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login__box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 24px; }
.login__logo { align-self: flex-start; color: #fff; }
.login__form { display: flex; flex-direction: column; gap: 16px; }
.login .tb-field-error { color: #ff8a84; min-height: 18px; margin: 0; }
a.tb-btn { text-decoration: none; }
.app-seg { display: inline-flex; border: 1px solid #000; }
.app-seg a { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; font: 500 13px var(--tb-font); color: #000; text-decoration: none; background: #fff; }
.app-seg a + a { border-left: 1px solid #000; }
.app-seg a[aria-current="true"] { background: #000; color: #fff; }
.app-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.app-crumbs { font-size: 12px; color: var(--tb-muted-text); }
.app-recordbar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; border: 1px solid #000; padding: 10px 16px; }
.app-recordbar form { display: flex; gap: 8px; align-items: center; }
.app-cols { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1280px) { .app-cols { grid-template-columns: minmax(0, 1fr); } }
.app-stack { display: flex; flex-direction: column; gap: 24px; }
/* Wide tables scroll inside their own box, never widen the page: every grid or flex child may shrink below its content. */
.app-cols > *, .app-stack > *, .app-twocol > *, .app-stack .tb-card, .tb-content > * { min-width: 0; max-width: 100%; }
.tb-table-wrap { max-width: 100%; overflow-x: auto; }
.app-badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--tb-gray-100); align-items: center; }
.app-visitor { font-family: var(--tb-font-mono); font-size: 11px; word-break: break-all; display: block; }
.tb-table a { color: var(--tb-red-action); }
.app-note { font-size: 12px; color: var(--tb-muted-text); max-width: 760px; }
details.app-how > summary { cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: underline; }
details.app-how[open] { border: 1px solid #000; padding: 12px 16px; max-width: 760px; }
details.app-how p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; }
.app-error { border-left: 4px solid var(--tb-red); background: var(--tb-gray-50); padding: 14px 16px; }
.tb-filters select[multiple] { height: 72px; }
.tb-filters label.app-inline { display: inline-flex; gap: 6px; align-items: center; letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 12px; }
.tb-chip a { color: inherit; text-decoration: none; padding: 0 6px; }

.app-groupbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-align: left; color: inherit; }
tr[hidden] { display: none; }
.app-chart { display: block; max-width: 100%; height: auto; }
.app-chart-label { font: 12px var(--tb-font); fill: var(--tb-ink-2); }
.app-chart-value { font: 700 12px var(--tb-font); fill: #000; }
.app-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0 20px 16px; font-size: 12px; color: var(--tb-muted-text); }
.app-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.app-twocol { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 24px; }
.app-search { max-width: 280px; }
