html, body { margin:0; padding:0; font-family: Arial, sans-serif; background:#0f1115; color:#e7e7e7; }
a { color:#8ab4ff; text-decoration:none; }
a:hover { text-decoration:underline; }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; background:#151a22; border-bottom:1px solid #2a3242; }
.brand { font-weight:bold; }
.nav { display:flex; gap:12px; align-items:center; }
.container { max-width:1024px; margin:0 auto; padding:16px; }
.card { background:#151a22; border:1px solid #2a3242; border-radius:10px; padding:14px; margin:12px 0; }
.row { display:flex; gap:12px; align-items:center; margin:10px 0; flex-wrap:wrap; }
.label { width:160px; color:#b8c0d0; }
.input { background:#0f1115; border:1px solid #2a3242; color:#e7e7e7; padding:10px 12px; border-radius:8px; min-width:260px; }
.btn { background:#2a63ff; color:white; border:none; padding:10px 14px; border-radius:8px; cursor:pointer; }
.btn:hover { opacity:0.9; }
.linkbtn { background:transparent; border:none; color:#8ab4ff; cursor:pointer; padding:0; }
.muted { color:#b8c0d0; }
.big { font-size:20px; font-weight:bold; }
.list { margin:8px 0 0 18px; }
.avatarWrap { width:80px; height:80px; border-radius:10px; overflow:hidden; border:1px solid #2a3242; }
.avatar { width:80px; height:80px; object-fit:cover; display:block; }
.dropzone { border:2px dashed #2a3242; border-radius:10px; padding:18px; text-align:center; color:#b8c0d0; }
.dropzone.dragover { border-color:#8ab4ff; color:#e7e7e7; }
.table { width:100%; border-collapse:collapse; }
.table th, .table td { border-bottom:1px solid #2a3242; padding:8px; text-align:left; }
.badge { display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid #2a3242; font-size:12px; }

.inputWide { min-width: 520px; width: 100%; }
.miniInput { min-width: 180px; }
.dragHandle { cursor: grab; width: 36px; text-align: center; color: #8ab4ff; }
.channelRow.dragging { opacity: 0.45; }
.channelRow.dragOver { outline: 2px dashed #8ab4ff; }
.iconBadge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid #2a3242; border-radius: 8px; }
.pager { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.activePage { outline: 2px solid #8ab4ff; }
.deviceCard { border: 1px solid #2a3242; border-radius: 10px; padding: 12px; margin: 10px 0; background: #10151d; }
.contextMenu { position: absolute; z-index: 9999; min-width: 220px; background: #151a22; border: 1px solid #2a3242; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); padding: 6px; }
.contextMenu.hidden { display: none; }
.contextMenu.contextMenuCompact { min-width: 120px; }
.contextMenuItem { width: 100%; text-align: left; background: transparent; border: none; color: #e7e7e7; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.contextMenuItem:hover { background: #1f2632; }
.mono { font-family: Consolas, Monaco, monospace; word-break: break-all; }

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modalOverlay.hidden {
  display: none;
}

.modalCard {
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  overflow: auto;
  background: #151a22;
  border: 1px solid #2a3242;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modalList {
  border: 1px solid #2a3242;
  border-radius: 10px;
  padding: 8px;
  background: #10151d;
  margin: 12px 0;
}

.modalUserRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid #2a3242;
}

.modalUserRow:last-child {
  border-bottom: none;
}


/* Room users / roles editor: header and footer stay visible while the body scrolls. */
.channelAclModalCard {
  width: min(96vw, 1040px);
  max-width: 1040px;
  height: min(92vh, 900px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.channelAclModalHeader {
  flex: 0 0 auto;
  padding: 16px;
  border-bottom: 1px solid #2a3242;
  background: #151a22;
  z-index: 2;
}

.channelAclTitleRow {
  margin-bottom: 0;
}

.channelAclHeaderActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.channelAclSearchInput {
  width: min(42vw, 360px);
  min-width: 220px;
}

.channelAclModalBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.channelAclModalFooter {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 12px 16px;
  border-top: 1px solid #2a3242;
  background: #151a22;
  z-index: 2;
}

.channelAclModalFooter #channelAclResult {
  flex: 1 1 auto;
}

.channelAclModalInfo {
  margin-bottom: 10px;
}

.channelAclPermissionsOverlay {
  z-index: 10020;
}

.channelAclPermissionsModalCard {
  width: min(92vw, 980px);
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
}

.roomRolePermissionsHint {
  margin-top: 5px;
}

.roomRolePermissions {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.roomRolePermissionGroup {
  border: 1px solid #30394b;
  border-radius: 9px;
  overflow: hidden;
  background: #151a22;
}

.roomRolePermissionTitle {
  padding: 9px 12px;
  font-weight: 700;
  border-bottom: 1px solid #30394b;
}

.roomRolePermissionGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 11px 12px;
}

.roomRolePermissionItem {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.channelAclUsersList {
  margin-bottom: 0;
}

.channelAclUserRow {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(150px, 190px);
  align-items: center;
  gap: 12px;
}

.channelAclUserIdentity {
  min-width: 0;
}

.channelAclRoleSelect {
  width: 100%;
  min-width: 0;
}

.channelAclUserRow.isPrivileged {
  background: rgba(50, 118, 190, 0.14);
}

.channelAclUserRow.isRoot {
  background: rgba(196, 130, 34, 0.18);
}

.channelAclUserRow.filteredOut {
  display: none;
}

@media (max-width: 720px) {
  .channelAclModalCard {
    width: 100%;
    height: 94vh;
    max-height: 94vh;
  }

  .channelAclTitleRow {
    align-items: stretch;
    flex-direction: column;
  }

  .channelAclHeaderActions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .channelAclHeaderActions .btn {
    flex: 0 0 auto;
  }

  .channelAclSearchInput {
    flex: 1 1 220px;
    width: auto;
    min-width: 0;
  }

  .roomRolePermissionGrid {
    grid-template-columns: 1fr;
  }

  .channelAclUserRow {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .channelAclRoleSelect {
    grid-column: 2;
  }

  .channelAclModalFooter {
    align-items: stretch;
    flex-direction: column;
  }

  .channelAclModalFooter .btn {
    width: 100%;
  }
}

.channelTypeBadge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #2a3242;
}

.channelTypeBadge.open {
  color: #9fd38d;
  border-color: #355b30;
}

.channelTypeBadge.users {
  color: #ffd166;
  border-color: #6a5320;
}

.channelTypeBadge.password {
  color: #8ab4ff;
  border-color: #2a63ff;
}
.changelogInput { min-height: 160px; resize: vertical; white-space: pre-wrap; }
.releaseNotesPreview { white-space: pre-wrap; max-width: 420px; max-height: 180px; overflow: auto; background: #0f1115; border: 1px solid #2a3242; border-radius: 8px; padding: 8px; color: #d8dee9; }
.btnOk { background: #2e7d32; }
.banInfo { color: #ffb4a2; font-size: 12px; }

.banModalCard { max-width: 620px; }
.modalColumnRow { align-items: stretch; flex-direction: column; gap: 8px; }
.banReasonInput { min-height: 120px; resize: vertical; white-space: pre-wrap; }
.banPresetRow { display: flex; gap: 8px; flex-wrap: wrap; }
.banPresetBtn { padding: 8px 10px; background: #1f2632; border: 1px solid #2a3242; }
.banPresetBtn.active { outline: 2px solid #8ab4ff; background: #2a63ff; }
.banForeverBtn { background: #5b1f1f; border-color: #7a2b2b; }
.banHint { font-size: 12px; margin-top: 6px; }
.modalActions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.btnSecondary { background: #263241; }
.modalError { color: #ffb4a2; }


.proBadge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(31, 170, 89, 0.18);
  color: #1faa59;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.proModalCard {
  max-width: 720px;
}

.proFunctionsBox {
  max-height: 60vh;
  overflow: auto;
  padding-right: 4px;
}

.proFunctionGroup {
  margin-top: 12px;
  font-weight: 700;
  color: #e7e7e7;
}

.proFunctionRow {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.proFunctionTitle {
  color: #e7e7e7;
}

.proFunctionMeta {
  font-size: 12px;
  color: #b8c0d0;
  margin-top: 2px;
}

.proFunctionSelect {
  width: 100%;
}

.diagModalCard {
  width: min(96vw, 1400px);
  height: min(86vh, 920px);
  max-width: 96vw;
  max-height: 92vh;
  resize: both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: min(720px, 96vw);
  min-height: min(420px, 86vh);
}
.diagModalCard .modalHeader { flex: 0 0 auto; }
.diagToolbar { flex: 0 0 auto; }
.diagGrid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(420px, 1fr);
  gap: 14px;
  align-items: stretch;
}
.diagPane { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.diagPaneTitle { flex: 0 0 auto; margin-bottom: 6px; }
.diagFilesPane { min-width: 0; }
.diagViewerPane { min-width: 0; }
.diagFileList {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #10151d;
  padding: 8px;
}
.diagFileItem { display: block; width: 100%; text-align: left; color: #e7e7e7; background: transparent; border: none; border-bottom: 1px solid #2a3242; padding: 9px 8px; cursor: pointer; border-radius: 6px; }
.diagFileItem:hover, .diagFileItem.active { background: #1f2632; }
.diagViewer {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #090c10;
  border: 1px solid #2a3242;
  border-radius: 10px;
  padding: 10px;
  color: #d8dee9;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}
.diagDownloadRow { flex: 0 0 auto; margin-bottom: 0; }
.diagDownloadLink { text-decoration: none; display: inline-block; }
.diagDownloadLink.hidden { display: none; }
@media (max-width: 820px) {
  .diagModalCard { resize: vertical; }
  .diagGrid { grid-template-columns: 1fr; overflow: hidden; }
}

/* Admin layout: card grows with content but never wider than the viewport. */
* { box-sizing: border-box; }
body { overflow-x: hidden; }
.container {
  width: min(1600px, calc(100vw - 32px));
  max-width: none;
  box-sizing: border-box;
}
.adminContainer { width: min(1600px, calc(100vw - 32px)); }
.card {
  max-width: 100%;
  overflow-x: auto;
}
.table {
  min-width: 980px;
}
.nav { flex-wrap: wrap; }
.faviconPreviewWrap {
  width: 72px;
  height: 72px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #10151d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.faviconPreview {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}
.hidden { display: none !important; }
@media (max-width: 700px) {
  .container,
  .adminContainer {
    width: calc(100vw - 16px);
    padding-left: 8px;
    padding-right: 8px;
  }
  .input,
  .inputWide,
  .miniInput {
    min-width: min(260px, 100%);
    width: 100%;
  }
}

/* Public homepage */
.homeContainer { padding-top: 22px; }
.homeContent { display: block; }
.homeActionsTop {
  margin-bottom: 18px;
  padding: 16px;
  border-color: rgba(138,180,255,0.24);
  background:
    radial-gradient(circle at top left, rgba(67,209,122,0.16), transparent 32%),
    linear-gradient(135deg, #111a26, #0a1118);
}
.homeActionButtons { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.homeCta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(138,180,255,0.26);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
}
.homeCta:hover { text-decoration: none; transform: translateY(-1px); }
.homeCtaPrimary { background: linear-gradient(135deg, #25b76b, #167a47); border-color: rgba(67,209,122,0.55); }
.homeCtaSecondary { background: linear-gradient(135deg, #1b365d, #142437); border-color: rgba(138,180,255,0.42); }
.homeCtaIcon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  font-size: 18px;
  font-weight: 900;
}
.homeCtaText { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.18; }
.homeCtaText b { font-size: 16px; }
.homeCtaText small { margin-top: 3px; color: rgba(255,255,255,0.76); font-size: 12px; }
.homeActionMeta { margin-top: 10px; display: grid; gap: 4px; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(138, 180, 255, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(42, 99, 255, 0.28), transparent 34%),
    linear-gradient(135deg, #101722, #071015 70%);
  box-shadow: 0 24px 70px rgba(0,0,0,0.30);
}
.home-hero h1 { margin: 0 0 14px; font-size: clamp(30px, 5vw, 56px); line-height: 1.04; }
.home-hero p { font-size: 18px; line-height: 1.55; color: #d8dee9; }
.home-hero-card { display: flex; justify-content: center; }
.home-hero-screenshot { width: min(260px, 100%); max-height: 560px; object-fit: contain; border-radius: 26px; border: 1px solid rgba(138,180,255,0.28); box-shadow: 0 28px 60px rgba(0,0,0,0.35); background: #071015; }
.home-phone-mock {
  width: min(320px, 100%);
  min-height: 420px;
  border: 1px solid rgba(138, 180, 255, 0.28);
  border-radius: 34px;
  padding: 22px;
  background: linear-gradient(180deg, #172230, #071015);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,0.03), 0 28px 60px rgba(0,0,0,0.35);
}
.home-phone-top { color: #8ab4ff; font-weight: 800; letter-spacing: 0.04em; text-align: center; margin: 10px 0 34px; }
.home-phone-meter { height: 18px; border-radius: 999px; background: linear-gradient(90deg, #2e7d32 0 45%, #ffd166 45% 76%, #ff5f57 76% 100%); margin-bottom: 28px; }
.home-phone-talk { border: 1px solid rgba(138,180,255,0.28); border-radius: 18px; padding: 18px; text-align: center; color: #e7e7e7; background: rgba(138,180,255,0.10); }
.home-phone-ptt { margin: 38px auto 0; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, #43d17a, #166b37); display:flex; align-items:center; justify-content:center; font-weight:900; font-size:28px; box-shadow:0 0 40px rgba(67,209,122,0.28); }
.home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.home-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-feature { padding: 18px; border: 1px solid #2a3242; border-radius: 18px; background: #151a22; }
.home-feature h3 { margin: 0 0 8px; color: #ffffff; }
.home-feature p { margin: 0; color: #cdd5df; line-height: 1.45; }
.homeActions { display: block; }
.homeDownloadBtn { text-decoration: none; }
.disabledLink { opacity: 0.45; pointer-events: none; }
.shareButtons { display: none; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(138,180,255,0.14); }
.shareButtons[hidden] { display: none !important; }
.shareButtons.shareButtonsOpen:not([hidden]) { display: flex; }
.shareNativeBtn[hidden] { display: none !important; }
.shareBtn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 8px 12px; border: 1px solid #2a3242; border-radius: 999px; color: #e7e7e7; background: #10151d; cursor: pointer; text-decoration: none; }
.shareBtn:hover { background: #1f2632; text-decoration: none; }
.siteFooter { margin-top: 28px; border-top: 1px solid #2a3242; background: #090d12; color: #b8c0d0; }
.homeFooterContent { padding-top: 20px; padding-bottom: 20px; font-size: 14px; line-height: 1.55; }
.home-editor-image, .homeContent img, .homePagePreview img { max-width: 100%; border-radius: 14px; border: 1px solid #2a3242; display: block; margin: 10px 0; }
.home-text-block, .home-image-block { margin-top: 16px; padding: 22px; border: 1px solid rgba(138,180,255,0.18); border-radius: 20px; background: #111822; }
.home-text-block h2, .home-image-block h2 { margin-top: 0; }
.home-image-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 0.75fr); gap: 18px; align-items: center; }
.home-image-placeholder { min-height: 150px; border: 1px dashed rgba(138,180,255,0.45); border-radius: 16px; display:flex; align-items:center; justify-content:center; color:#9fb0c8; background:rgba(138,180,255,0.06); text-align:center; padding:16px; }
.homeEditorHint { margin: -2px 0 10px; line-height: 1.45; }
.homeRichEditor [data-home-block], .homeRichEditor .home-feature, .homeRichEditor .home-text-block, .homeRichEditor .home-image-block { position: relative; }
.homeRichEditor .home-editor-selected { outline: 2px solid rgba(138,180,255,0.90); outline-offset: 4px; }
.homeRichEditor .home-editor-selected-image { outline: 3px solid #ffd166; outline-offset: 3px; }
.editorBtnDanger { background: #3a1e26; border-color: #8b3d50; color: #ffd7df; }
.shareImagePreviewWrap { min-width: 260px; min-height: 150px; border: 1px solid #2a3242; border-radius: 16px; background: #10151d; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.shareImagePreview { width: 260px; height: 150px; object-fit: cover; display:block; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; padding: 22px; }
  .home-grid, .home-grid-3, .home-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .homeActionButtons { display: grid; grid-template-columns: 1fr; }
  .homeCta { width: 100%; box-sizing: border-box; }
  .home-grid, .home-grid-2, .home-grid-3, .home-grid-4 { grid-template-columns: 1fr; }
  .home-phone-mock { min-height: 320px; }
  .home-image-block { grid-template-columns: 1fr; }
}

/* Admin homepage rich editor */
.homeEditorToolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #10151d;
}
.editorBtn,
.editorColorBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #1f2632;
  color: #e7e7e7;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}
.editorColorBtn input { width: 28px; height: 22px; border: 0; padding: 0; background: transparent; }
.homeRichEditor {
  min-height: 260px;
  padding: 16px;
  border: 1px solid #2a3242;
  border-radius: 14px;
  background: #090d12;
  color: #e7e7e7;
  outline: none;
  line-height: 1.55;
  overflow: auto;
}
.homeRichEditor:focus { border-color: #8ab4ff; box-shadow: 0 0 0 2px rgba(138,180,255,0.15); }
.homeFooterEditor { min-height: 110px; }
.homePagePreview {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #2a3242;
  border-radius: 14px;
  background: #070b10;
}
.previewFooter { border-radius: 14px; padding: 12px; }
.siteTabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.siteTabBtn.active { outline: 2px solid #8ab4ff; background: #2a63ff; }

/* SVXLink room integration modal */
.svxModalCard { max-width: 980px; }
.svxHint {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #10151d;
  line-height: 1.45;
}
.svxToggleLabel { display: flex; align-items: center; gap: 8px; }
.svxFormGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.svxFormGrid label { display: flex; flex-direction: column; gap: 6px; }
.svxFormGrid .input { min-width: 0; width: 100%; box-sizing: border-box; }
.svxFormGrid .wideField { grid-column: 1 / -1; }
.svxFormGrid textarea.input { resize: vertical; min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.svxHelpEditorBlock { display: flex; flex-direction: column; gap: 7px; }
.svxHelpToolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.svxHelpToolbar .btn { min-height: 34px; }
.svxHelpEditor {
  min-height: 130px;
  max-height: 320px;
  overflow: auto;
  line-height: 1.45;
  white-space: pre-wrap;
  font-family: inherit;
}
.svxHelpEditor:empty::before { content: attr(data-placeholder); color: #7d8798; pointer-events: none; }
.svxHelpEditor img { max-width: min(100%, 420px); height: auto; display: block; margin: 8px 0; border-radius: 8px; }
.svxHelpAutoRow { align-items: center; flex-wrap: wrap; gap: 10px; }
.svxUsersRow { align-items: stretch; gap: 8px; }
.svxUsersRow .input { flex: 1; }
.svxUsersPanel {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
}
.svxUsersHint { margin-bottom: 8px; }
.svxUsersSearchRow {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(90px, auto);
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.svxUsersSearchPreview {
  min-height: 20px;
  margin-bottom: 6px;
}
.svxUsersSearchPreview mark {
  border-radius: 3px;
  padding: 0 2px;
}
.svxUserColumns,
.svxUserItem {
  display: grid;
  grid-template-columns: 28px minmax(190px, 1fr) minmax(190px, 1fr) 62px;
  gap: 8px;
  align-items: center;
  min-width: 640px;
}
.svxUserColumns {
  padding: 0 8px 4px;
  font-size: 12px;
}
.svxUsersList {
  max-height: 300px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.svxUserItem {
  padding: 6px 8px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.12);
  border: 1px solid transparent;
}
.svxUserItem.searchMatch {
  border-color: rgba(138,180,255,0.42);
}
.svxUserItem.searchCurrent {
  outline: 2px solid #8ab4ff;
  background: rgba(42,99,255,0.12);
}
.svxUserCheck {
  margin: 0;
  justify-self: center;
}
.svxUserFieldCell {
  position: relative;
  min-width: 0;
}
.svxUserFieldCell .input {
  width: 100%;
  min-width: 0;
}
.svxUserCallsignWrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.svxUserCallsignWrap .svxUserCallsignInput {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.svxUserPttLoginAlias {
  flex: 0 1 42%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a5d6a7;
  font-size: 11px;
  line-height: 1;
}
.svxUserPasswordWrap {
  position: relative;
  min-width: 0;
}
.svxUserPasswordWrap .svxUserAuthKeyInput {
  padding-right: 38px;
}
.svxUserPasswordToggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.svxUserPasswordToggle:hover,
.svxUserPasswordToggle:focus-visible {
  background: rgba(255,255,255,0.10);
  outline: none;
}
.svxUserPasswordToggle svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  pointer-events: none;
}
.svxUserPasswordToggle .svxEyeClosed { display: none; }
.svxUserPasswordToggle.isVisible .svxEyeOpen { display: none; }
.svxUserPasswordToggle.isVisible .svxEyeClosed { display: block; }
.svxUserSaveStatus {
  position: absolute;
  right: 8px;
  bottom: -15px;
  z-index: 1;
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
}
.svxUserSaveStatus.error {
  color: #ff8a80;
}
.svxUserId {
  white-space: nowrap;
  text-align: right;
}
.channelTypeBadge.svxEnabled {
  color: #9fd38d;
  border-color: #355b30;
  background: rgba(67, 209, 122, 0.08);
}
@media (max-width: 720px) {
  .svxFormGrid { grid-template-columns: 1fr; }
}

.footerTools {
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
}
.footerToolBtn {
  font-size: 14px;
  text-decoration: underline;
}
.modalCloseBtn {
  font-size: 24px;
  line-height: 1;
  padding: 6px 10px;
}
.nodeInfoModalCard {
  width: min(96vw, 1180px);
  height: min(88vh, 860px);
  max-width: 96vw;
  max-height: 92vh;
  min-width: min(640px, 96vw);
  min-height: min(440px, 86vh);
  resize: both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.nodeInfoModalCard .modalHeader {
  flex: 0 0 auto;
}
.nodeInfoModalBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.nodeInfoGrid {
  display: grid;
  grid-template-columns: minmax(300px, 42%) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}
.nodeInfoFormPane,
.nodeInfoResultPane {
  min-width: 0;
}
.nodeInfoFieldGroup {
  margin-top: 14px;
  border-top: 1px solid #2a3242;
  padding-top: 10px;
}
.nodeAvatarPreviewWrap {
  position: relative;
  width: 96px;
  height: 96px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  overflow: hidden;
  background: #10151d;
}
.nodeAvatarPreview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: none;
}
.nodeAvatarPreview.ready {
  display: block;
}
.nodeAvatarPlaceholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8c0d0;
  font-size: 12px;
}
.nodeAvatarPreview.ready + .nodeAvatarPlaceholder {
  display: none;
}
.nodeInfoTwoCols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nodeInfoTwoCols .input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.nodeInfoJsonOutput {
  width: 100%;
  min-height: 430px;
  resize: vertical;
  box-sizing: border-box;
  font-family: Consolas, Monaco, monospace;
  white-space: pre;
}
.nodeInfoAvatarLineBox {
  margin-top: 14px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  padding: 10px;
  background: #10151d;
}
.nodeInfoAvatarLine {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0;
  color: #d8dee9;
}
.nodeInfoActions {
  justify-content: flex-start;
}
@media (max-width: 820px) {
  .nodeInfoModalCard {
    min-width: min(320px, 96vw);
  }
  .nodeInfoGrid {
    grid-template-columns: 1fr;
  }
  .nodeInfoTwoCols {
    grid-template-columns: 1fr;
  }
}

/* Public legal pages and permanent footer links. */
.footerTools {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footerToolSeparator {
  color: #6f7b8e;
}
.footerLegalLink {
  color: #b8c0d0;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footerLegalLink:hover,
.footerLegalLink:focus-visible {
  color: #ffffff;
}
.legalBrand {
  color: #e7e7e7;
  text-decoration: none;
}
.legalBrand:hover {
  text-decoration: none;
}
.legalPage {
  max-width: 900px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.legalCard {
  padding: 24px;
  line-height: 1.65;
}
.legalCard h1 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: clamp(28px, 5vw, 40px);
}
.legalCard h2 {
  margin-top: 28px;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 21px;
}
.legalCard p,
.legalCard li {
  color: #d4d9e1;
}
.legalCard ul {
  padding-left: 24px;
}
.legalCard li + li {
  margin-top: 7px;
}
.legalUpdated {
  margin-top: 0;
  color: #9fb0c8 !important;
}
.legalFooter {
  margin-top: 36px;
}
.footerLegalLinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 16px;
  font-size: 14px;
  text-align: center;
  flex-wrap: wrap;
}
.footerLegalLinks a {
  color: #b8c0d0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footerLegalLinks a:hover,
.footerLegalLinks a[aria-current="page"] {
  color: #ffffff;
}
@media (max-width: 560px) {
  .footerTools {
    gap: 7px;
  }
  .footerToolSeparator {
    display: none;
  }
  .footerToolBtn,
  .footerLegalLink {
    width: 100%;
    text-align: center;
  }
  .legalCard {
    padding: 18px;
  }
  .legalCard h2 {
    font-size: 19px;
  }
  .footerLegalLinks {
    gap: 7px;
  }
}


/* Personal SVX Link settings */
.homeCtaSvx {
  background: linear-gradient(135deg, #6a35c7, #38206f);
  border-color: rgba(190, 145, 255, 0.55);
}
.homeCtaSvx .homeCtaIcon { font-size: 12px; letter-spacing: 0.04em; }
.svxLinkModalCard {
  width: min(900px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  min-width: 520px;
  min-height: 430px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  resize: both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.svxLinkHeader { flex: 0 0 auto; }
.svxLinkHeader h1,
.svxLinkHeader h2 { margin: 0 0 6px; }
.svxLinkBody {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.svxLinkRoomChooser {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #34405a;
  border-radius: 12px;
  background: #101722;
}
.svxLinkRoomSelect { width: 100%; min-width: 0; }
.svxLinkDefaultsHint {
  margin: 10px 2px 0;
  padding: 9px 11px;
  border-left: 3px solid #8ab4ff;
  background: rgba(138, 180, 255, 0.08);
  line-height: 1.4;
}
.svxLinkSection {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #10151d;
}
.svxLinkSection h3 { margin: 0 0 12px; }
.svxLinkGrid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
}
.svxLinkGrid > label { color: #b8c0d0; }
.svxLinkGrid .input { min-width: 0; width: 100%; box-sizing: border-box; }
.svxLinkTextarea { resize: vertical; min-height: 78px; font-family: inherit; }
.svxLinkActions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 0 4px;
}
.svxLinkPage { max-width: 920px; }
.svxLinkPageCard { margin-top: 18px; }
.svxLinkPage .svxLinkBody { overflow: visible; padding-right: 0; }

@media (max-width: 700px) {
  .svxLinkModalCard { display: none; }
  .svxLinkPage { width: calc(100vw - 16px); padding-left: 8px; padding-right: 8px; }
  .svxLinkPageCard { padding: 12px; }
  .svxLinkRoomChooser,
  .svxLinkGrid { grid-template-columns: 1fr; }
  .svxLinkRoomChooser { position: static; }
  .svxLinkSection { padding: 12px; }
}

/* =========================
   Website language selector
   ========================= */
.siteLanguageControl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  color: inherit;
  white-space: nowrap;
}

.siteLanguageIcon {
  line-height: 1;
}

.siteLanguageSelect {
  min-width: 112px;
  height: 34px;
  padding: 4px 26px 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.siteLanguageSelect option {
  color: #111;
  background: #fff;
}

@media (max-width: 760px) {
  .siteLanguageControl {
    width: 100%;
    justify-content: flex-end;
    margin: 6px 0 0;
  }

  .siteLanguageSelect {
    min-width: 136px;
  }
}

/* =========================
   Public help and update log
   ========================= */
.homeCtaHelp {
  background: linear-gradient(135deg, #5d3b8c, #302148);
  border-color: rgba(190, 145, 255, 0.50);
}
.footerTools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  padding-top: 0;
  padding-bottom: 18px;
  font-size: 14px;
}
.footerToolBtn,
.footerLegalLink { font: inherit; }
.footerToolSeparator { color: #566174; }
.updateLogModalCard { max-width: 820px; }
.updateLogStatus { margin: 4px 0 12px; }
.updateLogList { display: grid; gap: 12px; }
.updateLogEntry,
.updateLogItem {
  padding: 14px;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #10151d;
}
.updateLogEntryHeader,
.updateLogItemHeader {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.updateLogEntryTitle,
.updateLogItemHeader h3 { margin: 0; font-size: 18px; }
.updateLogEntryDate,
.updateLogItemHeader .muted { color: #9fa9b8; font-size: 13px; }
.updateLogEntryNotes,
.updateLogNotes { margin: 0; line-height: 1.55; white-space: pre-wrap; }

.helpPageContainer { max-width: 1260px; padding-top: 22px; }
.helpPageHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(93,59,140,0.30), transparent 42%),
    linear-gradient(135deg, #151a22, #101722);
}
.helpPageEyebrow {
  color: #a9c7ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.helpPageHeader h1 { margin: 5px 0 8px; font-size: clamp(28px, 4vw, 44px); }
.helpPageIntro { max-width: 780px; margin: 0; color: #cbd4e0; font-size: 17px; line-height: 1.55; }
.helpPdfButtons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.helpPdfButton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: #263241;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.helpPdfButton:hover { background: #34445a; text-decoration: none; }
.helpPageLayout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.helpSidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}
.helpSidebar .input { min-width: 0; width: 100%; box-sizing: border-box; margin-top: 7px; }
.helpSearchClear { width: 100%; margin-top: 8px; }
.helpSidebarTitle { margin: 18px 0 8px; font-size: 17px; }
.helpSectionNav { display: grid; gap: 3px; }
.helpSectionLink,
.helpSectionNavLink {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  color: #cbd5e4;
  line-height: 1.3;
}
.helpSectionLink:hover,
.helpSectionNavLink:hover { background: #1f2936; text-decoration: none; }
.helpSectionLink.level3,
.helpSectionNavLinkSub { padding-left: 22px; color: #aeb9c9; font-size: 13px; }
.helpPageContent,
.helpArticle { line-height: 1.65; min-width: 0; }
.helpPageContent h2,
.helpArticle h2 {
  scroll-margin-top: 20px;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a3242;
  color: #fff;
}
.helpPageContent h2:first-child,
.helpArticle h2:first-child { margin-top: 0; }
.helpPageContent h3,
.helpArticle h3 { scroll-margin-top: 20px; margin: 24px 0 8px; color: #e3eaff; }
.helpPageContent p,
.helpArticle p { margin: 8px 0 13px; }
.helpPageContent ul,
.helpPageContent ol,
.helpArticle ul,
.helpArticle ol { padding-left: 26px; }
.helpPageContent table,
.helpArticle table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 14px 0;
}
.helpPageContent th,
.helpPageContent td,
.helpArticle th,
.helpArticle td {
  min-width: 120px;
  padding: 9px 10px;
  border: 1px solid #384254;
  text-align: left;
  vertical-align: top;
}
.helpPageContent th,
.helpArticle th { background: #1b2430; }
.helpPageContent code,
.helpArticle code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #090d12;
  font-family: Consolas, Monaco, monospace;
}
.helpFigure { margin: 18px auto; text-align: center; }
.helpFigure img,
.helpPageContent img,
.helpArticle img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #fff;
}
.helpFigure figcaption { margin-top: 7px; color: #9fa9b8; font-size: 13px; }
.helpLead { color: #cbd4e0; font-size: 16px; }
.helpSearchMark,
.helpSearchMatch { background: #7f6816; color: #fff4ad; border-radius: 3px; padding: 0 1px; }
.helpSearchMarkCurrent { outline: 2px solid #ffd166; }
.helpRichEditor { min-height: 520px; }
.helpPdfAdminGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.helpPdfAdminCard {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #10151d;
}
.helpPdfAdminCard h3 { margin: 0; }
.helpPdfAdminCard .input { min-width: 0; width: 100%; box-sizing: border-box; }

@media (max-width: 900px) {
  .helpPageHeader { flex-direction: column; }
  .helpPdfButtons { justify-content: flex-start; }
  .helpPageLayout { grid-template-columns: 1fr; }
  .helpSidebar { position: static; max-height: none; }
  .helpPdfAdminGrid { grid-template-columns: 1fr; }
}
.helpGuideFigure { margin: 20px auto; text-align: center; }
.helpGuideFigure img { max-height: 620px; object-fit: contain; }
.helpTableWrap { width: 100%; overflow-x: auto; margin: 14px 0; }
.helpTableWrap table { margin: 0; }
.helpCaption { margin-top: -10px !important; color: #9fa9b8; text-align: center; font-size: 13px; }

/* Virtual AI users admin */
.virtualUsersPage { max-width: 1320px; }
.virtualUsersHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.virtualUsersHeader h1 { margin-bottom: 8px; }
.virtualUsersLead { max-width: 860px; margin: 0; line-height: 1.55; }
.virtualBackButton { display: inline-block; margin-bottom: 8px; }
.virtualEditorTopActions { justify-content: flex-end; }
.virtualRuntimeGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.virtualRuntimeGrid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #10151d;
}
.virtualRuntimeGrid span,
.virtualRuntimeGrid strong,
.virtualRuntimeGrid code { display: block; }
.virtualRuntimeGrid strong { margin-top: 6px; color: #fff; }
.virtualRuntimeGrid code { margin-top: 6px; overflow-wrap: anywhere; }
.virtualUsersTable td { vertical-align: top; }
.virtualActions { display: flex; gap: 7px; flex-wrap: wrap; }
.virtualRuntimeMessage { max-width: 300px; margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
.virtualStatusBadge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #465166;
  border-radius: 999px;
  background: #1b2430;
  font-size: 12px;
  font-weight: 700;
}
.virtualStatusBadge.status-running { border-color: #2f8f57; background: rgba(35, 126, 74, 0.2); color: #9cf0ba; }
.virtualStatusBadge.status-crashed,
.virtualStatusBadge.status-error,
.virtualStatusBadge.status-start_failed { border-color: #a64444; background: rgba(166, 68, 68, 0.18); color: #ffb0b0; }
.virtualStatusBadge.status-starting { border-color: #9a7c34; color: #ffe09a; }
.virtualEditorGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.virtualEditorSection { margin: 0; min-width: 0; }
.virtualEditorSection h2 { margin-top: 0; }
.virtualFormGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.virtualField { display: grid; gap: 6px; min-width: 0; margin-bottom: 12px; color: #cbd4e0; }
.virtualField > span { font-size: 13px; font-weight: 700; }
.virtualField .input { width: 100%; min-width: 0; box-sizing: border-box; }
.virtualTextarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.virtualCodeTextarea { resize: vertical; min-height: 130px; font-family: Consolas, Monaco, monospace; line-height: 1.45; }
.virtualToggleList { display: grid; gap: 10px; margin: 10px 0 16px; }
.virtualToggleRow { margin-top: 8px; }
.virtualCheck { display: inline-flex; align-items: flex-start; gap: 8px; color: #d7dfeb; line-height: 1.35; }
.virtualCheck input { margin-top: 3px; }
.virtualRuntimeState {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #394458;
  border-radius: 9px;
  overflow-wrap: anywhere;
}
.virtualVoiceAudio { width: 100%; margin-top: 12px; }
.virtualHint { margin: 10px 0 0; line-height: 1.5; }
.virtualHint code { background: #090d12; padding: 2px 5px; border-radius: 5px; }
.virtualMemoriesBox { display: grid; gap: 10px; margin: 14px 0; }
.virtualMemoryItem { padding: 12px; border: 1px solid #2a3242; border-radius: 10px; background: #10151d; }
.virtualMemoryCategory { margin-left: 8px; padding: 2px 6px; border-radius: 6px; background: #273245; color: #bcd2f4; font-size: 11px; }
.virtualMemoryContent { margin: 8px 0; white-space: pre-wrap; line-height: 1.45; }
.virtualMemoryMeta { margin-bottom: 6px; font-size: 12px; }
.virtualAdvancedSection { grid-column: 1 / -1; }
.virtualEditorFooter { margin-top: 16px; }
.btnDanger { background: #762f36; border-color: #a74650; }
.btnDanger:hover { background: #8e3942; }

@media (max-width: 1000px) {
  .virtualRuntimeGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .virtualEditorGrid { grid-template-columns: 1fr; }
  .virtualAdvancedSection { grid-column: auto; }
}
@media (max-width: 680px) {
  .virtualUsersHeader { flex-direction: column; }
  .virtualEditorTopActions { justify-content: flex-start; }
  .virtualRuntimeGrid,
  .virtualFormGrid { grid-template-columns: 1fr; }
}

/* Virtual AI user: voice reading and full PTT conversation simulator. */
.virtualTestBlock {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2a3242;
}
.virtualTestBlock h3 { margin: 0 0 12px; }
.virtualPttTestGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.virtualPttParticipant {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #10151d;
}
.virtualPttParticipantTitle {
  min-height: 24px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.virtualSignalRow { display: flex; gap: 18px; align-items: center; }
.virtualSignal {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: #cbd4e0;
  font-weight: 800;
  letter-spacing: .04em;
}
.virtualLamp {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #27303d;
  border: 1px solid #4b5667;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, .85);
  transition: background .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.virtualLamp.lampRx.isActive {
  background: #35d06f;
  border-color: #77f5a2;
  box-shadow: 0 0 11px rgba(53, 208, 111, .95);
}
.virtualLamp.lampTx.isActive {
  background: #ef4343;
  border-color: #ff9696;
  box-shadow: 0 0 11px rgba(239, 67, 67, .95);
}
.virtualPttButton {
  min-height: 58px;
  border: 2px solid #59677c;
  border-radius: 12px;
  background: linear-gradient(180deg, #263348, #182131);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  box-shadow: 0 5px 0 #090d13;
  transform: translateY(0);
  transition: transform .08s ease, box-shadow .08s ease, border-color .12s ease, background .12s ease;
}
.virtualPttButton:focus-visible { outline: 2px solid #7fb6ff; outline-offset: 3px; }
.virtualPttButton.isPressed {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #090d13;
  border-color: #f06b6b;
  background: linear-gradient(180deg, #8b2d35, #5e1d25);
}
.virtualPttButtonBot { cursor: default; opacity: 1; }
.virtualPttButtonBot:disabled { color: #fff; opacity: 1; }
.virtualPttButton:disabled:not(.virtualPttButtonBot) {
  cursor: wait;
  opacity: .55;
}
.virtualConversationStatus {
  min-height: 22px;
  margin: 14px 0 10px;
  line-height: 1.45;
}
.virtualConversationTranscript {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #0b1017;
}
.virtualConversationTurn {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.virtualConversationTurn.turn-admin {
  justify-self: start;
  background: #203249;
  border: 1px solid #35557a;
}
.virtualConversationTurn.turn-bot {
  justify-self: end;
  background: #253b2d;
  border: 1px solid #3f6d4c;
}
.virtualConversationTurn.isDraft {
  opacity: .72;
  font-style: italic;
}
.virtualConversationTurnTitle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
}
.virtualConversationLanguage {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .09);
  color: #cbd4e0;
  font-size: 11px;
}

@media (max-width: 700px) {
  .virtualPttTestGrid { grid-template-columns: 1fr; }
  .virtualConversationTurn { max-width: 100%; }
}

/* Virtual AI user: per-bot knowledge base. */
.virtualKnowledgeUpload,
.virtualKnowledgeSearch {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2a3242;
}
.virtualKnowledgeDocuments,
.virtualKnowledgeSearchResults {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.virtualKnowledgeDocument,
.virtualKnowledgeResult {
  padding: 12px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #10151d;
}
.virtualKnowledgeDocumentHeader {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}
.virtualKnowledgeDocumentTitle,
.virtualKnowledgeResultTitle {
  color: #fff;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.virtualKnowledgeDocumentMeta,
.virtualKnowledgeResultMeta {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}
.virtualKnowledgeDocumentActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.virtualKnowledgeResultText {
  margin-top: 8px;
  white-space: pre-wrap;
  line-height: 1.45;
}
.virtualKnowledgeDisabled {
  opacity: .58;
}

/* Virtual AI user: avatar and supervised reply training. */
.virtualAvatarEditor {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #10151d;
}
.virtualAvatarPreview {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid #465166;
  background: #090d12;
}
.virtualAvatarControls { display: grid; gap: 10px; min-width: 0; }
.virtualTrainingModeToggle { margin: 12px 0 0; }
.virtualTrainingReview,
.virtualLearnedAnswersBlock {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #2a3242;
  border-radius: 12px;
  background: #10151d;
}
.virtualTrainingReview h4,
.virtualLearnedAnswersHeader h4 { margin: 0; }
.virtualTrainingSources {
  margin: 4px 0 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.virtualLearnedAnswersHeader {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.virtualLearnedAnswers { display: grid; gap: 10px; }
.virtualLearnedAnswer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #2f3a4b;
  border-radius: 10px;
  background: #0b1017;
}
.virtualLearnedAnswer.isDisabled { opacity: .58; }
.virtualLearnedAnswerQuestion,
.virtualLearnedAnswerText { line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .virtualAvatarEditor { grid-template-columns: 1fr; }
  .virtualAvatarPreview { width: 96px; height: 96px; }
}

/* Virtual AI user: learned-answer management page. */
.virtualTrainingRecent {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #355b30;
  border-radius: 10px;
  background: #0f1a12;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.virtualTrainingRecentTitle { color: #9fd38d; font-weight: 800; }
.virtualTrainingOpenRow { margin-top: 16px; }
.virtualTrainingPage {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.virtualTrainingTableHeader { justify-content: space-between; align-items: flex-start; }
.virtualTrainingTableWrap {
  width: 100%;
  overflow: visible;
  border: 1px solid #2a3242;
  border-radius: 10px;
  margin-top: 12px;
}
.virtualTrainingTable {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: clamp(10px, .82vw, 14px);
}
.virtualTrainingTable th { position: sticky; top: 0; background: #151a22; z-index: 1; }
.virtualTrainingTable th,
.virtualTrainingTable td {
  min-width: 0;
  padding: clamp(5px, .55vw, 9px);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.virtualTrainingTable td { vertical-align: top; }
.virtualTrainingTable th:nth-child(1) { width: 8%; }
.virtualTrainingTable th:nth-child(2) { width: 13%; }
.virtualTrainingTable th:nth-child(3) { width: 14%; }
.virtualTrainingTable th:nth-child(4) { width: 16%; }
.virtualTrainingTable th:nth-child(5) { width: 20%; }
.virtualTrainingTable th:nth-child(6) { width: 17%; }
.virtualTrainingTable th:nth-child(7) { width: 12%; }
.virtualTrainingRow.isDisabled { opacity: .58; }
.virtualTrainingRow.isStale { background: rgba(255, 209, 102, .045); }
.virtualTrainingRow.isHistory { background: rgba(90, 160, 255, .035); }
.virtualTrainingStatusBadge { font-weight: 700; }
.virtualTrainingRow.isActive .virtualTrainingStatusBadge { color: #9fd38d; border-color: #355b30; }
.virtualTrainingRow.isStale .virtualTrainingStatusBadge { color: #ffd166; border-color: #6a5320; }
.virtualTrainingRow.isHistory .virtualTrainingStatusBadge { color: #9ec5ff; border-color: #35547a; }
.virtualTrainingRow.isDisabled .virtualTrainingStatusBadge { color: #b8c0d0; }
.virtualTrainingCellMeta { margin-top: 6px; font-size: 12px; line-height: 1.4; }
.virtualTrainingQuestionCell,
.virtualTrainingAnswerCell { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.virtualTrainingAnswerCell { max-height: none; overflow: visible; }
.virtualTrainingVariantList {
  margin: 0;
  padding-left: 20px;
  max-height: none;
  overflow: visible;
  line-height: 1.4;
}
.virtualTrainingVariantList li { margin-bottom: 6px; overflow-wrap: anywhere; }
.virtualTrainingActions { display: grid; gap: 8px; }
.virtualTrainingActions .btn {
  width: 100%;
  min-width: 0;
  padding: clamp(6px, .55vw, 10px) clamp(5px, .7vw, 12px);
  white-space: normal;
}
.virtualTrainingAudio {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
}
.virtualTrainingSourceCell { overflow-wrap: anywhere; }
.virtualTrainingMatchRow { align-items: stretch; }
.virtualTrainingMatchRow .input { flex: 1 1 520px; }
.virtualTrainingMatchSuccess { color: #9fd38d; margin-bottom: 8px; }
.virtualTrainingMatchFailure { color: #ffb4a2; margin-bottom: 8px; }
.virtualTrainingEditModalCard { max-width: 900px; }
.virtualTrainingEditMeta { margin-top: 12px; line-height: 1.45; }
.virtualTrainingEditEnabled { align-self: end; margin-bottom: 10px; }

@media (max-width: 760px) {
  .virtualTrainingPage { padding: 10px; }
  .virtualTrainingEditModalCard { max-height: 94vh; }

  .virtualTrainingTableWrap {
    border: 0;
  }

  .virtualTrainingTable,
  .virtualTrainingTable tbody,
  .virtualTrainingTable tr,
  .virtualTrainingTable td {
    display: block;
    width: 100%;
  }

  .virtualTrainingTable thead {
    display: none;
  }

  .virtualTrainingTable {
    font-size: 13px;
  }

  .virtualTrainingTable tr {
    box-sizing: border-box;
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #2a3242;
    border-radius: 10px;
    background: #151a22;
  }

  .virtualTrainingTable td {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(105px, 30%) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid #2a3242;
  }

  .virtualTrainingTable td:last-child {
    border-bottom: 0;
  }

  .virtualTrainingTable td::before {
    color: #b8c0d0;
    font-weight: 700;
  }

  .virtualTrainingTable td:nth-child(1)::before { content: "Статус"; }
  .virtualTrainingTable td:nth-child(2)::before { content: "Пользователь / источник"; }
  .virtualTrainingTable td:nth-child(3)::before { content: "Основной вопрос"; }
  .virtualTrainingTable td:nth-child(4)::before { content: "Все варианты вопросов"; }
  .virtualTrainingTable td:nth-child(5)::before { content: "Ответ"; }
  .virtualTrainingTable td:nth-child(6)::before { content: "Аудио и использование"; }
  .virtualTrainingTable td:nth-child(7)::before { content: "Действия"; }
}

/* Virtual AI user: faster-whisper fields and memory/limits modal. */
.virtualMemoryModalCard {
  width: min(1180px, calc(100vw - 32px));
  max-width: 1180px;
  max-height: 92vh;
  overflow: auto;
}
.virtualMemorySettingsWrap {
  margin-top: 16px;
}
.virtualMemorySettingsTable {
  min-width: 760px;
}
.virtualMemorySettingsTable th,
.virtualMemorySettingsTable td {
  vertical-align: middle;
}
.virtualMemorySettingsTable td:first-child {
  min-width: 190px;
  font-weight: 700;
}
.virtualMemorySettingsTable td:nth-child(2) {
  min-width: 190px;
}
.virtualMemorySettingsTable .miniInput {
  width: 150px;
  max-width: 100%;
}
.virtualMemoryListHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.virtualMemoryListHeader h3 {
  margin: 0;
}
.virtualMemoryTable {
  min-width: 980px;
}
.virtualMemoryTable td {
  vertical-align: top;
}
.virtualMemoryTable .virtualMemoryCategory {
  display: inline-block;
  margin-left: 0;
}
.virtualMemoryTable .virtualMemoryContent {
  min-width: 320px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .virtualMemoryModalCard {
    width: calc(100vw - 16px);
    max-height: 96vh;
    padding: 14px;
  }
  .virtualMemoryListHeader {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Room creation requests */
@keyframes roomRequestNavPulse {
  0%, 100% { background: rgba(255, 72, 72, 0.18); box-shadow: 0 0 0 rgba(255, 72, 72, 0); }
  50% { background: rgba(255, 72, 72, 0.72); box-shadow: 0 0 18px rgba(255, 72, 72, 0.75); color: #fff; }
}
.nav a.adminNavAlert {
  border-radius: 8px;
  animation: roomRequestNavPulse 1.05s ease-in-out infinite;
}
.roomRequestsHeader, .roomRequestCardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.roomRequestsList { display: grid; gap: 16px; margin-top: 14px; }
.roomRequestCard h2 { margin: 0 0 4px; }
.roomRequestGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 16px;
  margin-top: 16px;
}
.roomRequestDetail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.roomRequestDetail span, .roomRequestGoal span { color: #9aa6b5; font-size: 13px; }
.roomRequestDetail strong { overflow-wrap: anywhere; }
.roomRequestSecret { color: #ffd27a; font-family: Consolas, Monaco, monospace; }
.roomRequestGoal { margin-top: 16px; }
.roomRequestGoal p { white-space: normal; overflow-wrap: anywhere; margin: 6px 0 0; }
.virtualGreetingRecordRow { align-items: center; margin-top: 8px; }

/* ===== User profile shared by website and Android ===== */
.profileHint {
  margin-bottom: 14px;
}

.profileGrid {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
}

.profileGrid .label {
  margin: 0;
}

.profileAboutLabel {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
}

.profileAboutTextarea {
  width: 100%;
  min-height: 108px;
  max-height: 520px;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.45;
}

.profileAboutMeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

#profileSvxLinkBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 700px) {
  .profileGrid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .profileGrid .input {
    margin-bottom: 8px;
  }
}

/* Admin users: search, IP history and separate SVX-page administrators. */
.adminCardTitleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.adminCardTitleRow h2 { margin: 0; }
.adminCardTitleActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.usersSearchInput { min-width: 240px; }
.ipModalCard { width: min(760px, calc(100vw - 32px)); }
.ipHistoryList, .ipChoiceList {
  display: grid;
  gap: 8px;
  max-height: 55vh;
  overflow: auto;
  padding: 4px;
}
.ipHistoryRow, .ipChoiceRow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ipHistoryRow {
  padding: 4px 0;
  border: 0;
  background: transparent;
}
.ipChoiceRow {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
}
.ipChoiceRow input { flex: 0 0 auto; }
.ipFlag { font-size: 22px; line-height: 1; cursor: help; }
.ipStatusMarker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 1px 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.ipStatusMarker.ipStatusLatest {
  background: rgba(54, 143, 255, .30);
}
.ipStatusMarker.ipStatusMostUsed {
  background: rgba(255, 178, 46, .30);
}
.ipStatusMarker.ipStatusLatest.ipStatusMostUsed {
  background: linear-gradient(
    to bottom,
    rgba(54, 143, 255, .30) 0 50%,
    rgba(255, 178, 46, .30) 50% 100%
  );
}
.ipHistoryRow[data-ip], .svxIpLine[data-ip] { cursor: context-menu; }
.ipSeenMeta { margin-left: auto; font-size: 12px; }
.svxAccessAdminsCard { width: min(1100px, calc(100vw - 32px)); }
.svxAccessAdminCreate {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr) auto;
  gap: 10px;
  margin: 14px 0;
}
.btnDanger { background: #9c2630; border-color: #bd3945; }
@media (max-width: 760px) {
  .adminCardTitleActions, .adminCardTitleActions .btn, .usersSearchInput { width: 100%; }
  .svxAccessAdminCreate { grid-template-columns: 1fr; }
  .ipSeenMeta { margin-left: 0; width: 100%; }
  .ipHistoryRow, .ipChoiceRow { flex-wrap: wrap; }
}

/* Separate SVX personal-node administration page. */
.svxAdminLoginShell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-x: hidden;
}
.svxAdminLoginCard {
  width: min(420px, 100%);
  margin: 0;
}
.svxAdminLoginCard .inputWide {
  width: 100%;
  min-width: 0;
}
.svxAdminLoginForm { display: grid; gap: 14px; }
.svxAdminLoginForm label { display: grid; gap: 6px; }
.svxAdminLoginForm .btn { width: 100%; }
.svxAdminShell { width: min(1600px, calc(100% - 32px)); margin: 24px auto; }
.svxAdminHeader { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.svxAdminHeader h1 { margin-bottom: 4px; }
.svxRoomTabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.svxRoomTab.active { outline: 2px solid rgba(84, 183, 255, .9); }
.svxUsersToolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.svxUsersSearchInput { flex: 1 1 320px; min-width: 240px; max-width: 560px; }
.svxUsersCount { margin-left: auto; }
.svxUsersPager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.svxPagerEllipsis { padding: 0 2px; }
.svxPagerInfo { margin-left: 6px; }
.svxUsersTableWrap { overflow-x: auto; }
.svxUsersAdminTable { min-width: 1100px; }
.svxUsersAdminTable td { vertical-align: top; }
.svxUsersAdminTable .svxCallsign { min-width: 160px; }
.svxUsersAdminTable .svxPassword { min-width: 210px; }
.svxIpList { display: grid; gap: 6px; min-width: 190px; }
.svxIpLine { display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 2px 0; border: 0; border-radius: 0; }
.svxActionCell { min-width: 270px; }
.svxBlockedRow { background: rgba(180, 42, 54, .1); }

@media (max-width: 760px) {
  .svxUsersToolbar .btn, .svxUsersSearchInput { width: 100%; max-width: none; }
  .svxUsersCount { width: 100%; margin-left: 0; }
  .svxPagerInfo { width: 100%; margin-left: 0; text-align: center; }
}


/* Remote Radio room configuration. */
.remoteRadioModalCard { width: min(1050px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.remoteRadioStatusRow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0 16px; }
.remoteRadioStatus { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; padding: 4px 10px; border-radius: 999px; font-weight: 800; letter-spacing: .04em; }
.remoteRadioStatus.online { background: rgba(43, 165, 92, .22); color: #69e49a; border: 1px solid rgba(105, 228, 154, .55); }
.remoteRadioStatus.offline { background: rgba(145, 151, 163, .16); color: #aeb5c0; border: 1px solid rgba(174, 181, 192, .35); }
.remoteRadioFormGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.remoteRadioFormGrid label { display: grid; gap: 6px; }
.remoteRadioFormGrid .wideField { grid-column: 1 / -1; }
.remoteRadioRuntimeInfo { display: flex; gap: 28px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.remoteRadioActions { margin: 16px 0; }
.remoteRadioAuditBlock { margin: 16px 0; }
.remoteRadioAuditTitle { margin-bottom: 8px; }
.remoteRadioAudit { max-height: 250px; overflow: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.remoteRadioAuditRow { display: grid; grid-template-columns: 160px minmax(150px, .7fr) minmax(240px, 1.3fr); gap: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.remoteRadioAuditRow:last-child { border-bottom: 0; }
.remoteRadioAuditError { color: #ff8f98; }
@media (max-width: 760px) {
  .remoteRadioFormGrid { grid-template-columns: 1fr; }
  .remoteRadioFormGrid .wideField { grid-column: auto; }
  .remoteRadioAuditRow { grid-template-columns: 1fr; gap: 3px; }
}

/* Remote Radio access roles and per-role permission matrix. */
.remoteRadioAccessModalCard { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.remoteRadioPermissionsModalCard { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.remoteRadioUsersBox { display: grid; gap: 8px; margin: 12px 0; max-height: min(62vh, 620px); overflow: auto; }
.remoteRadioUserRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 300px); align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.remoteRadioProtected { display: inline-block; margin-left: 8px; color: #ffc76b; font-weight: 700; }
.remoteRadioEmpty { padding: 20px; text-align: center; }
.remoteRadioRolePicker { display: grid; gap: 6px; max-width: 420px; margin: 12px 0; }
.remoteRadioPermissionsBox { display: grid; gap: 8px; margin: 12px 0; }
.remoteRadioPermissionRow { display: grid; grid-template-columns: minmax(0, 1fr) 160px; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.remoteRadioPermissionCheck input { justify-self: end; width: 22px; height: 22px; }
@media (max-width: 680px) {
  .remoteRadioUserRow, .remoteRadioPermissionRow { grid-template-columns: 1fr; }
  .remoteRadioPermissionCheck input { justify-self: start; }
}
