/* Administration and sign-in use the same foundation as Live talk. */
.admin-page main { width: min(1280px, 100%); margin: 0 auto; padding: 36px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.page-heading .eyebrow { margin-bottom: 10px; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 36px); line-height: 1.25; font-weight: 550; letter-spacing: -1px; }
.page-heading p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; gap: 10px; flex-shrink: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.metric { position: relative; min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.metric-label { padding-right: 28px; font-size: 12px; color: var(--muted); }
.metric-value { font-size: 32px; line-height: 1.3; font-weight: 550; margin-top: 14px; letter-spacing: -1px; }
.metric-note { margin-top: 5px; color: var(--muted); font-size: 11px; }
.metric-icon { position: absolute; right: 18px; top: 19px; color: var(--accent); }
.panel { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; }
.panel-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 550; }
.panel-heading p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.count { padding: 2px 8px; border-radius: 6px; font-size: 11px; color: var(--accent); background: var(--accent-soft); }
.updated { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 0 24px 22px; }
.search-field { position: relative; display: flex; align-items: center; width: min(380px, 100%); }
.search-field svg { position: absolute; left: 13px; width: 17px; color: var(--muted); }
.search-field input { width: 100%; padding-left: 39px; font-size: 13px; }
.filters { display: flex; gap: 10px; }
.filters select { min-width: 130px; font-size: 13px; }
.table-content { min-height: 200px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 13px 24px; font-size: 11px; font-weight: 500; color: var(--muted); background: #ffffff03; border-block: 1px solid var(--border); white-space: nowrap; }
td { padding: 20px 24px; border-bottom: 1px solid var(--border); font-size: 13px; color: #c0c2d2; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff02; }
.person { display: flex; gap: 12px; align-items: center; }
.person>div { min-width: 0; }
.avatar { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; color: var(--accent); background: #b4a0ff15; font-size: 12px; }
.avatar.a1 { color: #9fddcd; background: #9fddcd12; }
.avatar.a2 { color: #e7c698; background: #e7c69812; }
.avatar.a3 { color: #ebafd2; background: #ebafd212; }
.avatar.a4 { color: #acd1a8; background: #acd1a812; }
.person-name { color: var(--text); font-weight: 550; overflow-wrap: anywhere; }
.subline { display: block; margin-top: 5px; color: var(--muted); overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font-size: 11px; background: #b4a0ff12; color: #c3b4e8; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.owner, .badge.active, .badge.completed { color: #a2d9bc; background: #63bd8c12; }
.badge.family, .badge.in-progress { color: #a9c8ff; background: #739de312; }
.badge.failed, .badge.terminated { color: var(--danger); background: #ff6e8b12; }
.badge.queued, .badge.paused, .badge.waiting { color: #e5c48f; background: #d4a55512; }
.table-action { min-height: 44px; padding: 8px; border: 0; border-radius: 7px; background: transparent; color: var(--accent); display: inline-flex; gap: 8px; align-items: center; font-size: 12px; }
.table-action:hover { background: var(--accent-soft); }
.table-action svg { width: 14px; height: 14px; }
.lock-note { font-size: 11px; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.pagination>div { display: flex; gap: 8px; }
.page-footnote { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 11px; margin: 18px 2px 0; }
.page-footnote svg { width: 15px; height: 19px; color: var(--accent); }
.tabs { display: flex; gap: 24px; padding: 0 24px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.tabs button { min-height: 44px; padding: 0 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.tabs button[aria-selected=true] { border-color: var(--accent); color: var(--accent); }
.instructions { max-width: 420px; min-width: 160px; overflow-wrap: anywhere; }
.empty { padding: 48px 24px; text-align: center; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 14px; color: var(--accent); background: var(--accent-soft); }
.empty h3 { margin: 0 0 9px; font-size: 16px; font-weight: 550; }
.empty p { max-width: 420px; margin: auto; font-size: 13px; color: var(--muted); }
.loading { padding: 64px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.loading::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 10px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; vertical-align: middle; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid #c1b2ff30; border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 30px 100px #0008; overflow-y: auto; }
dialog::backdrop { background: #05060bb3; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { font-size: 24px; letter-spacing: -.5px; margin: 5px 0 0; font-weight: 550; }
.dialog-description { font-size: 13px; color: var(--muted); margin: 16px 0 24px; }
form>label { display: block; margin: 18px 0 7px; font-size: 13px; color: #d1cde0; }
#user-form>input, #user-form>select { width: 100%; }
.field-help { font-size: 12px; line-height: 1.7; color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 26px; }
.spacer { flex: 1; }
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: calc(50% + var(--rail-width) / 2); transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; padding: 14px 22px; border: 1px solid #c1b2ff50; border-radius: 12px; color: var(--text); background: var(--surface-raised); box-shadow: 0 8px 30px #0005; font-size: 13px; z-index: 10; }
.identities-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.identities-section h3 { margin: 0; font-size: 16px; }
.identities-section h4 { margin: 20px 0 12px; font-size: 13px; font-weight: 550; }
#identity-list { padding: 8px 0; font-size: 13px; color: var(--muted); }
.identity-row { display: flex; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.identity-row>div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.identity-row small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.identity-row span { font-size: 13px; }
.identity-pagination, .identity-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.identity-pagination>div { display: flex; gap: 6px; }
.identity-fields { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; }
.identity-fields label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.identity-fields input, .identity-fields select { width: 100%; }
.identity-actions #identity-status { flex: 1; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 28px 20px; background: radial-gradient(ellipse at 50% 10%, #b4a0ff12, transparent 60%); }
.login-card { width: min(450px, 100%); padding: 36px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 24px 80px #0003; }
.login-card .brand { margin-bottom: 38px; }
.login-card .eyebrow { margin-bottom: 12px; }
.login-card>p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.login-card form { margin-top: 26px; }
.login-card input, .login-card select, .login-card button { width: 100%; }
.login-card .primary { margin-top: 16px; }
.login-card .login-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 11px; text-align: center; }
@media (max-width: 1050px) {
  .admin-page main { padding: 28px 24px; }
  .page-heading { align-items: flex-start; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .toolbar { flex-wrap: wrap; }
  .search-field { width: 100%; }
  .metric { padding: 18px; }
  .metric-icon { display: none; }
  .metric-label { padding-right: 0; }
  th, td { padding-inline: 18px; }
}
@media (max-width: 760px) {
  .admin-page main { padding: 26px 16px; }
  .page-heading { flex-direction: column; gap: 20px; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .metrics { gap: 8px; }
  .metric { padding: 14px 12px; border-radius: 11px; }
  .metric-label { font-size: 11px; min-height: 35px; line-height: 1.5; }
  .metric-value { margin-top: 5px; font-size: 27px; }
  .metric-note { display: none; }
  .panel-heading { padding: 20px 16px; align-items: flex-start; }
  .updated { max-width: 80px; font-size: 10px; text-align: right; flex-shrink: 1; }
  .toolbar { padding: 0 16px 18px; }
  .filters { width: 100%; flex-wrap: wrap; }
  .filters select { flex: 1; min-width: 0; font-size: 16px; }
  .search-field input { font-size: 16px; }
  .tabs { padding-inline: 16px; gap: 18px; }
  .tabs button { font-size: 12px; }
  .table-content { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: block; padding: 16px; border-top: 1px solid var(--border); }
  td, tbody tr:last-child td { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 7px 0; border: 0; text-align: right; }
  td::before { content: attr(data-label); max-width: 48%; color: var(--muted); font-size: 12px; text-align: left; flex-shrink: 0; }
  td:first-child { display: block; text-align: left; padding-bottom: 13px; }
  td:first-child::before { display: none; }
  .instructions { max-width: none; min-width: 0; }
  .pagination { padding: 14px 16px; flex-wrap: wrap; }
  .pagination .button { padding: 8px 10px; }
  .toast { left: 50%; }
  .main-footer>span:last-child { display: none; }
  dialog { padding: 22px; }
  .identity-fields { grid-template-columns: 1fr; }
  .identity-row { flex-wrap: wrap; }
  .login-card { padding: 28px 24px; }
}
