/* Shared typography, colors, controls and cards come from portal-assets/style.css. */
:root { --accent: var(--green); --accent-dark: #11553e; --danger: #a24037; --bg: #f4f7f3; --surface: #fff; --text: var(--ink); }
.header-actions { display: flex; flex-wrap: wrap; gap: 16px; font-size: 11px; }
.access-card { margin-bottom: 16px; }
.access-card label { margin-top: 0; }
.api-key-controls { display: flex; gap: 10px; }
.api-key-controls input { flex: 1; min-width: 0; }
.api-key-controls button { flex-shrink: 0; margin: 0; }
.access-card .hint { margin-bottom: 0; }
.banner { color: var(--danger); font-size: 12px; margin-bottom: 0; }
.admin-tabs { display: flex; gap: 5px; padding: 4px; margin-block: 0 16px; border: 1px solid var(--border); border-radius: 10px; background: #eaf0e9; }
.admin-tabs button { flex: 1; margin: 0; border-color: transparent; background: transparent; color: var(--muted); min-height: 38px; }
.admin-tabs button[aria-selected="true"] { background: #fff; color: var(--green); box-shadow: 0 1px 4px #173c330a; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h2, #invitationsPanel h2 { margin: 0; font-size: 16px; }
.global-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar button, .actions button { margin: 0; min-height: 36px; padding: 6px 11px; font-size: 12px; }
.sessions-table-wrap { border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 12px; border-bottom: 1px solid var(--border); font-size: 12px; }
thead th { background: #f6f8f4; color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
tbody tr:last-child td { border: 0; }
.session-id { direction: ltr; unicode-bidi: plaintext; overflow-wrap: anywhere; max-width: 200px; font: 12px/1.9 ui-monospace, monospace; }
.actions { border: 0; margin: 0; justify-content: flex-start; gap: 5px; }
.badge { font-size: 11px; white-space: nowrap; }
.badge::before { display: none; }
.badge-connected { background: #e6f2e9; color: var(--green); }
.badge-pending { background: #fff3db; color: #896928; }
.empty { padding: 24px 16px; margin: 0; font-size: 12px; text-align: center; }
.bulk-actions { margin-top: 16px; }
#invitationsPanel form { margin-top: 14px; }
#result textarea { margin-top: 9px; }
.modal-overlay { position: fixed; inset: 0; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; overscroll-behavior: contain; padding: 16px; z-index: 100; background: #173c3266; backdrop-filter: blur(3px); }
.modal { display: flex; flex-direction: column; margin-block: auto; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); min-height: 0; flex-shrink: 0; background: white; border: 1px solid var(--border); border-radius: 16px; max-width: 440px; width: 100%; box-shadow: 0 18px 60px #173c3324; }
.modal-header { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.close-btn { background: transparent; color: var(--muted); border: 0; font-size: 24px; min-height: 32px; margin: 0; padding: 0 8px; }
.close-btn:hover { background: #f1f5ef; color: var(--ink); }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: grid; gap: 12px; justify-items: center; }
.start-form, .pairing-form { display: flex; width: 100%; gap: 8px; flex-wrap: wrap; }
.start-form input, .pairing-form input { flex: 1; min-width: 150px; }
.start-form button, .pairing-form button { margin: 0; }
#qrImage, .qr-placeholder { width: 224px; height: 224px; max-width: 100%; image-rendering: pixelated; }
.qr-placeholder { display: grid; place-items: center; border-radius: 10px; background: #f1f5ef; color: var(--muted); font-size: 13px; }
.qr-success { color: var(--green); font-size: 19px; font-weight: 700; padding: 24px 0; }
.pairing-form { margin-top: 10px; }
.pairing-code { font-size: 26px; font-weight: 700; direction: ltr; text-align: center; letter-spacing: .15em; }
#detailsList { width: 100%; margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 12px; }
#detailsList dt { color: var(--muted); }
#detailsList dd { margin: 0; overflow-wrap: anywhere; }
.field-error { color: var(--danger); font-size: 12px; margin: 0; }
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; z-index: 200; width: min(90%, 360px); }
.toast { background: var(--ink); color: white; padding: 10px 16px; border-radius: 10px; font-size: 12px; box-shadow: 0 6px 24px #173c3320; overflow-wrap: anywhere; }
.toast-error { background: var(--danger); }
.hidden { display: none !important; }
@media (max-width: 640px) {
  .api-key-controls { flex-wrap: wrap; }
  .api-key-controls button { width: 100%; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px; gap: 9px; border-bottom: 1px solid var(--border); }
  td { padding: 0; border: 0; }
  td.actions-cell { grid-column: 1 / -1; }
  .session-id { max-width: none; }
  .modal-overlay { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); }
  .modal-body { padding: 14px; }
  #detailsList { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #detailsList dd { margin-bottom: 8px; }
}

[hidden] { display: none !important; }
