/* Tech portal (2026 redesign) — page chrome on top of admin layout + the CINTI UI kit (cu-*).
 * Light mode: dark, saturated text only (hard rule — no pale text). */
.tp-content { padding: 22px 24px 40px; overflow-y: auto; height: 100%; box-sizing: border-box; }
.tp-content > * { max-width: 1240px; }

/* top-bar connection pill */
.tp-conn { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; }
.tp-pill { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--g-line); background: var(--g-card); color: var(--g-text); cursor: pointer; white-space: nowrap; }
.tp-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g-muted); flex: none; }
.tp-pill.s-ok .dot { background: var(--g-ok); box-shadow: 0 0 0 3px var(--g-ok-bg); }
.tp-pill.s-warn .dot { background: var(--g-warn); box-shadow: 0 0 0 3px var(--g-warn-bg); }
.tp-pill.s-bad .dot { background: var(--g-bad); box-shadow: 0 0 0 3px var(--g-bad-bg); }
.tp-pill.s-off .dot { background: var(--g-muted); }

/* dashboard tiles — the shared data-cinti-tiles grid, restyled to the kit */
.tp-tiles.cinti-tiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tp-tiles .cinti-tile { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 14px; box-shadow: var(--g-shadow); padding: 0; overflow: hidden; color: var(--g-text); }
.tp-tiles .cinti-tile-head { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--g-line); }
.tp-tiles .cinti-tile-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; color: var(--g-accent); background: var(--g-accent-bg); }
.tp-tiles .cinti-tile-title { font-size: 13.5px; font-weight: 750; text-transform: none; letter-spacing: 0; color: var(--g-text); }
.tp-tiles .cinti-tile-status { font-size: 10.5px; font-weight: 700; color: var(--g-muted); opacity: 1; }
.tp-tiles .cinti-tile-body { padding: 12px 16px; }
.tp-tiles .cinti-tile-foot { padding: 0 16px 12px; font-size: 11px; color: var(--g-muted); }
.tp-tiles .cinti-tile-foot button, .tp-tiles .cinti-tile-foot a { font: inherit; font-weight: 700; color: var(--g-accent); background: none; border: 0; cursor: pointer; padding: 0; }
.tp-tiles .cinti-stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--g-text); }
.tp-tiles .cinti-stat-label, .tp-tiles .cinti-tile-empty, .tp-tiles .cinti-tile-loading, .tp-tiles .cinti-tile-todo-msg { color: var(--g-muted); font-size: 12px; }
.tp-tiles .cinti-tile-table { font-size: 12.5px; }
.tp-tiles .cinti-tile-table th { font-size: 10.5px; font-weight: 800; color: var(--g-muted); border-bottom: 1px solid var(--g-line); }
.tp-tiles .cinti-tile-table td { color: var(--g-text); border-bottom: 1px solid var(--g-line); }
.tp-tiles .cinti-tile-table tr:last-child td { border-bottom: 0; }
.tp-tiles .cinti-badge { font-size: 10.5px; font-weight: 750; padding: 2px 8px; color: var(--g-accent); background: var(--g-accent-bg); }
.tp-tiles .cinti-badge.ok { color: var(--g-ok); background: var(--g-ok-bg); }
.tp-tiles .cinti-badge.bad { color: var(--g-bad); background: var(--g-bad-bg); }

/* quick links to the classic tech views */
.tp-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tp-link { display: flex; align-items: center; gap: 12px; padding: 13px 15px; text-decoration: none; color: var(--g-text); }
.tp-link .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tp-link b { display: block; font-size: 13.5px; } .tp-link span.d { font-size: 12px; color: var(--g-muted); font-weight: 600; }

/* documentation */
.tp-org-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tp-org-pick label { font-size: 12.5px; font-weight: 700; color: var(--g-muted); }
.tp-org-pick .cu-in { max-width: 380px; }
.tp-choose { padding: 34px 18px; text-align: center; color: var(--g-muted); font-size: 13px; font-weight: 600; }
.tp-row-name { font-weight: 700; color: var(--g-text); }
.tp-sub { font-size: 12px; color: var(--g-muted); font-weight: 600; }
.tp-mono { font-family: var(--cinti-font-mono, ui-monospace, Menlo, monospace); font-size: 12px; }
.cu-table tr.click { cursor: pointer; } .cu-table tr.click:hover td { background: var(--g-card2); }
.tp-doc-frame { width: 100%; min-height: 360px; border: 1px solid var(--g-line); border-radius: 10px; background: #fff; }
.tp-sec-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--g-muted); margin: 14px 0 6px; }
.tp-fields { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 8px 14px; font-size: 13px; }
.tp-fields dt { color: var(--g-muted); font-weight: 700; } .tp-fields dd { margin: 0; color: var(--g-text); word-break: break-word; }
.tp-meta-note { display: flex; gap: 10px; align-items: flex-start; }

/* settings */
.tp-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tp-set-card { padding: 14px 16px; }
.tp-set-card.warn { border-color: var(--g-warn); }
.tp-set-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tp-set-top h4 { margin: 0; font-size: 14px; font-weight: 750; flex: 1; color: var(--g-text); }
.tp-switch { position: relative; width: 40px; height: 22px; flex: none; }
.tp-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.tp-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--g-line); transition: background .15s; cursor: pointer; }
.tp-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tp-switch input:checked + span { background: var(--g-accent); }
.tp-switch input:checked + span::after { transform: translateX(18px); }
.tp-switch input:focus-visible + span { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.tp-switch input:disabled + span { opacity: .5; cursor: default; }
.tp-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-role { font: inherit; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--g-line); background: var(--g-card2); color: var(--g-muted); cursor: pointer; }
.tp-role.on { background: var(--g-accent-bg); color: var(--g-accent); border-color: var(--g-accent); }
.tp-role:disabled { cursor: default; }
.tp-pickbox { border: 1px solid var(--g-line); border-radius: 12px; overflow: hidden; }
.tp-pickbar { display: flex; gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid var(--g-line); background: var(--g-card2); flex-wrap: wrap; }
.tp-pickbar .cu-in { flex: 1; min-width: 180px; }
.tp-picklist { max-height: 300px; overflow-y: auto; }
.tp-pickrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--g-line); font-size: 13px; color: var(--g-text); cursor: pointer; }
.tp-pickrow:last-child { border-bottom: 0; } .tp-pickrow:hover { background: var(--g-card2); }
.tp-seg { display: inline-flex; border: 1px solid var(--g-line); border-radius: 10px; overflow: hidden; }
.tp-seg button { font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border: 0; background: var(--g-card); color: var(--g-muted); cursor: pointer; }
.tp-seg button.on { background: var(--g-accent-bg); color: var(--g-accent); }
.tp-savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-top: 18px; border-radius: 14px;
  background: var(--g-solid); border: 1px solid var(--g-line); box-shadow: var(--g-shadow); z-index: 2; }

/* agent panel chat */
.tp-chat-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; line-height: 1.55; }
.tp-chat-status { font-size: 10.5px; color: var(--dim); padding: 0 12px 4px; min-height: 14px; }
.tp-chat-box { border-top: 1px solid var(--panel-border); padding: 10px 12px; display: flex; gap: 6px; }
.tp-chat-box textarea { flex: 1; background: var(--input-bg, rgba(0,0,0,.2)); border: 1px solid var(--panel-border); border-radius: 8px; padding: 8px; color: var(--text); font: inherit; font-size: 12.5px; resize: none; }
.tp-chat-box button { background: var(--g-accent); color: var(--g-accent-ink); border: 0; padding: 0 14px; border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.tp-chat-box button:disabled { opacity: .55; cursor: default; }
.tp-msg { max-width: 92%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; color: var(--g-text); }
.tp-msg.u { align-self: flex-end; background: var(--g-accent-bg); border: 1px solid var(--g-accent); }
.tp-msg.a { align-self: flex-start; background: var(--g-card2); border: 1px solid var(--g-line); }
.tp-msg-meta { font-size: 10px; color: var(--g-muted); margin-top: 3px; }
