.tl-demo { margin: 1em 0; border: 1px dashed #c3ccd6; border-radius: 8px; padding: 12px; background: #f3f5f6; color: #29333d; font-family: 'Hanken Grotesk', Inter, system-ui, sans-serif; font-size: 13px; }
.tl-demo * { box-sizing: border-box; }
.tl-demo .tl-cap { font-size: 11px; color: #737f8c; margin: 0 0 8px; }
.tl-demo .tl-legend { margin: 10px 0 0; font-size: 11px; color: #47596b; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tl-demo .tl-legend b { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; background: #ff5722; color: #fff; font-size: 10px; margin-right: 4px; }
.tl-demo table { border: none; margin: 0; display: table; width: 100%; font-size: inherit; }
.tl-demo th, .tl-demo td { text-align: left; }

/* 1. .pt-table (copy of theme/table.css, scoped) */
.tl-demo .pt-table-wrap { border: 1px solid #e5e7eb; width: 100%; background: #fff; overflow: auto; max-height: 230px; box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); }
.tl-demo .pt-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.tl-demo .pt-table th { padding: 8px 12px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; user-select: none; position: sticky; top: 0; z-index: 1; }
.tl-demo .pt-table th:last-child, .tl-demo .pt-table td:last-child { border-right: none; }
.tl-demo .pt-table td { padding: 8px 12px; vertical-align: middle; border-bottom: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; color: #29333d; background: transparent; }
.tl-demo .pt-table tbody tr:nth-child(even) { background: #f9fafb; }
.tl-demo .pt-table tbody tr:nth-child(odd) { background: #fff; }
.tl-demo .pt-table tbody tr:hover { background: #f3f4f6; }
.tl-demo .pt-table tbody tr.selected { background: #eff6ff !important; }
.tl-demo .pt-table tbody tr:last-child td { border-bottom: none; }
.tl-demo .pt-checkbox { width: 16px; height: 16px; accent-color: #2563eb; cursor: pointer; margin: 0; opacity: 0; transition: opacity .15s ease; }
.tl-demo .pt-table tbody tr:hover .pt-checkbox, .tl-demo .pt-table tbody tr.selected .pt-checkbox { opacity: 1; }
.tl-demo .pt-th-inner { display: inline-flex; align-items: center; gap: 6px; }
.tl-demo .mono { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; font-size: 12px; }
.tl-demo .pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid; }

/* 2. ui/table.jsx : wide table, grab to scroll */
.tl-demo .tl-grab { position: relative; width: 100%; overflow: auto; overscroll-behavior-x: contain; cursor: grab; background: #fff; border: 1px solid #dfe3e7; border-radius: 8px; }
.tl-demo .tl-grab.dragging { cursor: grabbing; user-select: none; }
.tl-demo .tl-grab table { width: 100%; min-width: 980px; border-collapse: collapse; caption-side: bottom; }
.tl-demo .tl-grab th { height: 44px; padding: 0 16px; font-weight: 500; font-size: 13px; color: #737f8c; border-bottom: 1px solid #dfe3e7; white-space: nowrap; }
.tl-demo .tl-grab td { padding: 12px 16px; border-bottom: 1px solid #ebedf0; white-space: nowrap; color: #29333d; }
.tl-demo .tl-grab tr:hover td { background: #f3f5f6; }
.tl-demo .tl-grab tr:last-child td { border-bottom: none; }
.tl-demo .sw { display: inline-block; width: 28px; height: 16px; border-radius: 8px; background: #dfe3e7; position: relative; vertical-align: middle; }
.tl-demo .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.tl-demo .sw.on { background: #0961aa; }
.tl-demo .sw.on::after { left: 14px; }

/* 3. campaign table (inline styles with the C colours) */
.tl-demo .tl-camp { background: #fff; border: 1px solid #dfe3e7; border-radius: 8px; overflow: hidden; }
.tl-demo .tl-tabs { display: flex; gap: 18px; padding: 10px 14px 0; border-bottom: 1px solid #ebedf0; }
.tl-demo .tl-tabs span { padding: 6px 0 9px; font-size: 12px; font-weight: 600; color: #737f8c; border-bottom: 2px solid transparent; }
.tl-demo .tl-tabs span.on { color: #0961aa; border-bottom-color: #0961aa; }
.tl-demo .tl-tabs em { font-style: normal; font-size: 10px; background: #f3f5f6; border-radius: 8px; padding: 1px 6px; margin-left: 4px; color: #737f8c; }
.tl-demo .tl-camp th { background: #f3f5f6; border-bottom: 1px solid #ebedf0; padding: 10px 14px; font-size: 10px; font-weight: 700; color: #949ea8; text-transform: uppercase; letter-spacing: .05em; }
.tl-demo .tl-camp td { padding: 12px 14px; border-bottom: 1px solid #ebedf0; vertical-align: top; }
.tl-demo .tl-camp tr:last-child td { border-bottom: none; }
.tl-demo .tl-camp .dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; }
.tl-demo .tl-camp .sub { display: block; font-size: 11px; color: #737f8c; margin-top: 2px; }

/* 4. tableTheme (style objects) */
.tl-demo .tl-theme { border: 1px solid #dfe3e7; border-radius: 8px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tl-demo .tl-theme th { padding: 12px 16px; background: #f3f5f6; border-bottom: 1px solid #dfe3e7; border-right: 1px solid #dfe3e7; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #737f8c; user-select: none; }
.tl-demo .tl-theme td { padding: 16px; vertical-align: middle; border-bottom: 1px solid #dfe3e7; border-right: 1px solid #dfe3e7; color: #29333d; }
.tl-demo .tl-theme th:last-child, .tl-demo .tl-theme td:last-child { border-right: none; }
.tl-demo .tl-theme tr:last-child td { border-bottom: none; }
.tl-demo .tl-theme tr.sel td { background: #ecf6fe; }
.tl-demo .tl-theme input[type=checkbox] { width: 16px; height: 16px; accent-color: #0961aa; margin: 0; }

/* displays: a list of cards, not a table */
.tl-demo .tl-cards { background: #fff; border: 1px solid #dfe3e7; border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.tl-demo .tl-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #ebedf0; border-radius: 8px; }
.tl-demo .tl-card .ok { width: 8px; height: 8px; border-radius: 4px; background: #28af60; }
.tl-demo .tl-card .off { width: 8px; height: 8px; border-radius: 4px; background: #9da6af; }
.tl-demo .tl-card small { color: #737f8c; }

.tl-sw td i{display:inline-block;width:1.6em;height:1.1em;border-radius:3px;border:1px solid rgba(128,128,128,.5);vertical-align:middle;margin-right:.5em}
