:root {
  --bg: #f3f6fa;
  --ink: #111827;
  --muted: #64748b;
  --line: #d8e0ea;
  --panel: #ffffff;
  --blue: #2563eb;
  --blue-soft: #eaf2ff;
  --green: #15845b;
  --green-soft: #e7f7ef;
  --amber: #a36b00;
  --amber-soft: #fff4dc;
  --red: #c73535;
  --red-soft: #fdeaea;
  --nav: #101827;
  --nav-soft: #172033;
  --nav-line: rgba(255, 255, 255, 0.09);
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-panel: 0 10px 32px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Malgun Gothic", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(243, 246, 250, 0) 280px),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
}

.subtext,
.panel-heading p,
.phase-list li span {
  color: var(--muted);
}

.button,
button[type="submit"],
.form-actions button,
.small-button {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: white;
  padding: 11px 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.button.secondary,
.form-actions .secondary {
  background: #eef2f6;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button.danger {
  background: var(--red-soft);
  color: var(--red);
}

.small-button {
  padding: 7px 10px;
  font-size: 13px;
  margin-right: 4px;
}

.icon-button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  margin-right: 8px;
}

.danger-button {
  background: var(--red-soft);
  color: var(--red);
}

.secondary-small {
  background: #eef2f6;
  color: var(--ink);
}

.success-button {
  background: var(--green);
  color: white;
}

.table-input {
  width: 100%;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
}

.source-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.live-source-layout {
  display: grid;
  gap: 14px;
}

.live-source-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.live-source-card.backup {
  border-color: #d8eadf;
  background: #f7fcf8;
}

.live-source-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.live-source-heading > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-weight: 900;
}

.live-source-card.backup .live-source-heading > span {
  background: var(--green);
}

.live-source-heading strong,
.live-source-heading small {
  display: block;
}

.live-source-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.live-advanced {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.live-advanced summary {
  cursor: pointer;
  color: #334155;
  font-weight: 800;
}

.live-advanced .form-grid {
  margin-top: 12px;
}

.interpretation-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
}

.audio-track-list {
  display: grid;
  gap: 10px;
}

.audio-track-row {
  display: grid;
  grid-template-columns: 34px minmax(160px, 1fr) 120px minmax(260px, 1.35fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: white;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.audio-track-row label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.audio-track-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
}

.audio-track-row input[type="file"] {
  padding: 7px 10px;
}

.field-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.track-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.audio-track-row .remove-audio-track {
  align-self: end;
  min-height: 40px;
  margin-right: 0;
  white-space: nowrap;
}

.compact-empty {
  padding: 18px;
}

.hint-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-view {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef3f8 100%);
}

.login-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
}

.otp-dialog {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.wide-dialog {
  width: min(640px, calc(100% - 32px));
}

#sourceModal .wide-dialog {
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#sourceModal #sourceForm {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-color: var(--blue) #e7edf4;
  scrollbar-width: thin;
}

#sourceModal #sourceForm::-webkit-scrollbar {
  width: 10px;
}

#sourceModal #sourceForm::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e7edf4;
}

#sourceModal #sourceForm::-webkit-scrollbar-thumb {
  border: 2px solid #e7edf4;
  border-radius: 999px;
  background: var(--blue);
}

#sourceModal .recording-file-list .table-wrap {
  max-height: min(34vh, 360px);
  overflow: auto;
}

#sourceModal .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 10px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--panel) 28%);
}

#hlsBuilderModal .wide-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#hlsBuilderModal #hlsBuilderForm {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-color: var(--blue) #e7edf4;
  scrollbar-width: thin;
}

#hlsBuilderModal #hlsBuilderForm::-webkit-scrollbar {
  width: 10px;
}

#hlsBuilderModal #hlsBuilderForm::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e7edf4;
}

#hlsBuilderModal #hlsBuilderForm::-webkit-scrollbar-thumb {
  border: 2px solid #e7edf4;
  border-radius: 999px;
  background: var(--blue);
}

#hlsBuilderModal .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 10px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--panel) 28%);
}

#audioModal .wide-dialog {
  width: min(940px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#audioModal .interpretation-panel {
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

#audioModal #audioManageForm {
  min-height: 0;
}

#audioModal .audio-track-list {
  max-height: min(52vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-color: var(--blue) #e7edf4;
  scrollbar-width: thin;
}

#audioModal .audio-track-list::-webkit-scrollbar {
  width: 10px;
}

#audioModal .audio-track-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e7edf4;
}

#audioModal .audio-track-list::-webkit-scrollbar-thumb {
  border: 2px solid #e7edf4;
  border-radius: 999px;
  background: var(--blue);
}

#audioModal .audio-track-list::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 12px;
  margin-top: -12px;
  background: linear-gradient(to bottom, rgba(248, 251, 255, 0), #f8fbff);
  pointer-events: none;
}

#audioModal .audio-track-row {
  grid-template-columns: 34px minmax(140px, 1fr) 120px minmax(220px, 1.3fr) auto;
}

#audioModal .audio-file-field input[type="file"] {
  max-width: 100%;
}

#audioModal .form-actions {
  margin-top: 10px;
}

#securityModal .wide-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#securityModal #securityForm {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-color: var(--blue) #e7edf4;
  scrollbar-width: thin;
}

#securityModal #securityForm::-webkit-scrollbar {
  width: 10px;
}

#securityModal #securityForm::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e7edf4;
}

#securityModal #securityForm::-webkit-scrollbar-thumb {
  border: 2px solid #e7edf4;
  border-radius: 999px;
  background: var(--blue);
}

#securityModal .form-actions {
  position: sticky;
  bottom: 0;
  margin-top: 10px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--panel) 28%);
}

.play-history-dialog {
  display: flex;
  flex-direction: column;
  width: min(860px, calc(100% - 32px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
}

.place-devices-dialog {
  display: flex;
  flex-direction: column;
  width: min(940px, calc(100% - 32px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
}

.modal-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-titlebar .panel-heading {
  margin-bottom: 12px;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.icon-close:hover {
  background: var(--red-soft);
  color: var(--red);
}

.play-history-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.play-history-table {
  max-height: min(420px, calc(100vh - 290px));
  overflow: auto;
}

.place-devices-table {
  max-height: min(420px, calc(100vh - 290px));
  overflow: auto;
}

.play-history-table thead th,
.place-devices-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: white;
}

.count-link {
  border: 1px solid var(--blue-soft);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
}

.count-link:hover {
  border-color: var(--blue);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  padding: 8px 12px;
  font-weight: 700;
}

.inline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}

.inline-toolbar strong {
  color: var(--ink);
}

.inline-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.toolbar-controls {
  display: flex;
  gap: 8px;
}

.toolbar-controls select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.otp-inputs input {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.admin-shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(16, 24, 39, 0) 220px),
    var(--nav);
  color: white;
  padding: 24px 18px;
  border-right: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 4px 4px 18px;
  border-bottom: 1px solid var(--nav-line);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: #9fb0c8;
  font-size: 12px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
}

.nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.nav button {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  padding: 12px 12px 12px 34px;
  text-align: left;
  font-weight: 800;
  letter-spacing: 0;
}

.nav button::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #64748b;
  transform: translateY(-50%);
}

.nav button::after {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.nav button.active,
.nav button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.nav button.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.nav button.active::before,
.nav button:hover::before {
  background: #38bdf8;
}

.nav button.active::after {
  background: #38bdf8;
}

.member-mode .sidebar-footer small {
  display: none;
}

.member-mode [data-view-panel="dashboard"] .portal-hero,
.member-mode [data-view-panel="dashboard"] .agent-download-panel,
.member-mode [data-view-panel="dashboard"] .dashboard-chart-panel,
.member-mode [data-view-panel="dashboard"] .table-wrap {
  display: none;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--nav-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.sidebar-footer strong,
.sidebar-footer small {
  display: block;
}

.sidebar-footer strong {
  font-size: 13px;
}

.sidebar-footer small {
  margin-top: 3px;
  color: #9fb0c8;
  font-size: 12px;
}

.admin-main {
  padding: 30px 34px 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(216, 224, 234, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(14px);
}

.top-actions {
  display: flex;
  gap: 10px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.portal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(20, 184, 166, 0.08)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.portal-hero h2 {
  margin-bottom: 8px;
  font-size: 25px;
}

.portal-hero p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.portal-service-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
}

.portal-service-meta span {
  border: 1px solid #dbe7f4;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.metrics,
.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-grid.summary-only {
  grid-template-columns: 1fr;
}

.agent-download-panel {
  margin-bottom: 20px;
}

.agent-download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agent-download-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.agent-download-grid strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.agent-download-grid span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  word-break: break-word;
}

.agent-download-note {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
}

.obs-state {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.obs-monitor-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.obs-monitor-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.obs-monitor-summary strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.obs-monitor-summary span {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.obs-actions {
  max-width: 280px;
}

.obs-actions .small-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.multiview-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: calc(100vh - 104px);
  margin: -10px;
  padding: 12px;
  background: #020617;
  color: #f8fafc;
}

.multiview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.multiview-topbar h2 {
  margin: 0;
  color: #fff;
}

.multiview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.stream-multiview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0;
  min-height: 0;
  background: #000;
}

.stream-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.stream-tile iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.stream-tile-label {
  position: absolute;
  z-index: 1;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.68);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}

.stream-tile-actions {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.stream-tile:hover .stream-tile-actions,
.stream-tile:focus-within .stream-tile-actions {
  opacity: 1;
}

.stream-tile-actions button,
.multiview-focus-toolbar button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.stream-tile-actions button:hover,
.multiview-focus-toolbar button:hover {
  background: rgba(34, 197, 94, 0.92);
}

.multiview-focus {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.86);
}

.multiview-focus-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(96vw, 1600px);
  height: min(92vh, 980px);
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.multiview-focus-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  background: #020617;
  color: #fff;
}

.multiview-focus-toolbar div {
  display: flex;
  gap: 8px;
}

.multiview-focus iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.stream-tile.placeholder,
.multiview-empty {
  display: grid;
  place-items: center;
  color: #94a3b8;
  background: #020617;
}

.stream-tile.placeholder div,
.multiview-empty {
  text-align: center;
  gap: 6px;
}

.stream-tile.placeholder strong {
  display: block;
  color: #334155;
  font-size: 42px;
}

.multiview-empty {
  grid-column: 1 / -1;
  min-height: 360px;
  padding: 24px;
}

.multiview-empty strong {
  display: block;
  color: #fff;
  margin-bottom: 8px;
}

.danger-text {
  color: #b91c1c;
}

.operation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.operation-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.operation-summary strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.operation-summary span {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.dashboard-chart-panel {
  margin-bottom: 20px;
}

.dashboard-chart-wrap {
  min-height: 360px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.dashboard-line-chart {
  display: block;
  min-width: 920px;
  width: 100%;
  height: 360px;
}

.dashboard-line-chart line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.dashboard-line-chart text {
  fill: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-line-chart .x-label {
  fill: #475569;
}

.dashboard-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.dashboard-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-chart-legend i {
  width: 18px;
  height: 4px;
  border-radius: 999px;
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.rank-list strong {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
}

.rank-list span {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.rank-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.play-count-button {
  border: 1px solid var(--blue-soft);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 10px;
}

.play-count-button:hover {
  border-color: var(--blue);
}

.password-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.password-inline strong {
  color: var(--ink);
}

.remembered-place {
  display: grid;
  gap: 8px;
  margin: 18px 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.52);
}

.remembered-place span {
  color: #94a3b8;
  font-size: 13px;
}

.remembered-place strong {
  color: #f8fafc;
  font-size: 18px;
}

.text-button {
  width: fit-content;
  border: 0;
  padding: 0;
  color: #93c5fd;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  color: #bfdbfe;
}

.mini-copy {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
}

.mini-copy:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.refresh-stamp {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.compact-metrics {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.session-card-list {
  display: grid;
  gap: 10px;
}

.session-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 13px 14px;
}

.session-card > div {
  min-width: 0;
}

.session-card strong,
.session-card span {
  display: block;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.session-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.session-card .status {
  display: inline-flex;
  margin-bottom: 7px;
}

.session-card-actions {
  justify-self: end;
}

.metrics article,
.health-grid article,
.panel,
.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
}

.metrics article,
.health-grid article {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px;
  overflow: hidden;
}

.metrics article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.metrics article strong,
.health-grid article strong {
  color: #64748b;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.metrics article span:not(.status),
.health-grid article span:not(.status) {
  color: #0f172a;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

.health-card {
  gap: 14px;
}

.health-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.health-card span:not(.status) {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.health-card-wide {
  grid-column: 1 / -1;
}

.split-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.load-test-form {
  grid-template-columns: minmax(260px, 1fr) 150px 150px 170px auto;
  align-items: end;
  margin-bottom: 16px;
}

.load-test-actions {
  display: flex;
  gap: 8px;
}

.load-test-actions .secondary {
  border: 0;
  border-radius: 6px;
  background: #eef2f6;
  color: var(--ink);
  padding: 11px 16px;
  font-weight: 700;
}

.load-test-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.load-test-status article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
}

.load-test-status strong,
.load-test-status span {
  display: block;
}

.load-test-status strong {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.load-test-status span {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.load-test-report {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 16px;
  padding: 14px;
}

.load-test-report > strong,
.load-report-title strong,
.load-report-grid strong {
  display: block;
}

.load-test-report > span,
.load-report-title span:not(.status),
.load-report-grid strong,
.load-test-report p {
  color: var(--muted);
}

.load-report-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.load-report-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.load-report-grid.expected-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.load-report-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.load-report-grid strong {
  font-size: 12px;
  margin-bottom: 5px;
}

.load-report-grid span {
  color: var(--ink);
  font-weight: 800;
}

.load-test-report p {
  margin: 0;
  line-height: 1.5;
}

.status {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.status.ok {
  color: var(--green);
  background: var(--green-soft);
}

.status.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.status.danger {
  color: var(--red);
  background: var(--red-soft);
}

.status.pending {
  color: var(--muted);
  background: #eef2f7;
}

.status.security-warn,
.security-event-row.security-warn .status {
  color: var(--green);
  background: var(--green-soft);
}

.status.security-critical,
.security-event-row.security-critical .status {
  color: var(--amber);
  background: var(--amber-soft);
}

.status.security-fatal,
.security-event-row.security-fatal .status {
  color: var(--red);
  background: var(--red-soft);
}

.security-event-row.security-critical {
  background: #fffbeb;
}

.security-event-row.security-fatal {
  background: #fff5f5;
}

.metrics article.security-warn {
  border-color: rgba(23, 132, 91, 0.18);
  background: var(--green-soft);
}

.metrics article.security-critical {
  border-color: rgba(181, 118, 20, 0.22);
  background: var(--amber-soft);
}

.metrics article.security-fatal {
  border-color: rgba(183, 54, 54, 0.2);
  background: var(--red-soft);
}

.status-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.status-guide span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 12px;
}

.status-guide strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 3px;
}

.device-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.device-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 13px 14px;
}

.device-summary strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.device-summary span {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.panel {
  padding: 22px;
}

.panel + .panel {
  margin-top: 16px;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading p {
  margin-bottom: 0;
}

.phase-list {
  display: grid;
  gap: 12px;
  padding-left: 20px;
}

.phase-list li span {
  display: block;
  margin-top: 3px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.create-link-form {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 14px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fbfdff;
  padding: 18px;
}

.form-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f6;
}

.form-section-heading span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.form-section-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.form-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.compact {
  max-width: 900px;
}

.form-grid label,
.option-grid {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.form-grid label {
  min-width: 0;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 11px;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(31, 111, 235, 0.14);
}

.form-grid input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.form-grid .wide,
.form-actions.wide {
  grid-column: 1 / -1;
}

.option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
  margin: 0;
}

.option-grid legend {
  padding: 0 6px;
}

.option-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  min-height: 34px;
}

.option-grid input {
  width: auto;
  min-height: auto;
}

.inline-check {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.create-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  bottom: 0;
  z-index: 5;
  border: 1px solid #cad6e4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px 16px;
  box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.create-submit-bar div {
  display: grid;
  gap: 3px;
}

.create-submit-bar strong {
  color: var(--ink);
}

.create-submit-bar span {
  color: var(--muted);
  font-size: 13px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.message {
  color: var(--red);
  min-height: 20px;
  margin: 12px 0 0;
}

.upload-status-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.upload-status-heading,
.upload-step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.upload-status-heading div {
  display: grid;
  gap: 4px;
}

.upload-status-heading strong,
.upload-step-header strong {
  color: var(--ink);
}

.upload-status-heading span:not(.status),
.upload-step p {
  color: var(--muted);
  font-size: 13px;
}

.upload-step-list {
  display: grid;
  gap: 10px;
}

.upload-step {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.upload-step p {
  margin: 0;
  overflow-wrap: anywhere;
}

.upload-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 160ms ease;
}

.upload-floating-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 1200;
  display: none;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(216, 224, 234, 0.24);
  border-radius: 8px;
  background: #101827;
  color: white;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.upload-floating-panel.active {
  display: grid;
}

.upload-floating-panel.collapsed {
  width: min(260px, calc(100vw - 32px));
  padding: 10px 12px;
}

.upload-floating-panel.collapsed .upload-floating-body {
  display: none;
}

.upload-floating-panel.ok {
  border-color: rgba(21, 132, 91, 0.6);
}

.upload-floating-panel.danger {
  border-color: rgba(199, 53, 53, 0.72);
}

.upload-floating-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.upload-floating-heading strong {
  font-size: 14px;
}

.upload-floating-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.upload-floating-toggle,
.upload-floating-cancel {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
}

.upload-floating-cancel {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(185, 28, 28, 0.42);
}

.upload-floating-body {
  display: grid;
  gap: 8px;
}

.upload-floating-panel p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.upload-floating-panel span:not(.status) {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.upload-floating-panel .upload-progress {
  background: rgba(255, 255, 255, 0.18);
}

.job-progress {
  display: grid;
  min-width: 130px;
  gap: 6px;
}

.job-progress span {
  color: var(--muted);
  font-size: 12px;
}

details code {
  display: block;
  max-width: 360px;
  max-height: 120px;
  overflow: auto;
  margin-top: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
}

.compact-table table {
  min-width: 680px;
}

.recording-file-list {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.recording-file-list.all-files .table-wrap {
  max-height: min(52vh, 520px);
  overflow: auto;
}

#vodConvertModal .recording-file-list .table-wrap {
  max-height: min(46vh, 460px);
  overflow: auto;
}

.recording-file-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.recording-file-heading span {
  color: var(--muted);
  font-size: 12px;
}

.hls-builder-history .recording-file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
}

.hls-builder-history .recording-file-card > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hls-builder-history .recording-file-card span,
.hls-builder-history .recording-file-card code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.hls-builder-history .recording-file-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

[data-view-panel="devices"] table {
  table-layout: fixed;
  min-width: 1180px;
}

[data-view-panel="devices"] th:nth-child(1),
#devicesTableBody td:nth-child(1) {
  width: 16%;
}

[data-view-panel="devices"] th:nth-child(2),
#devicesTableBody td:nth-child(2) {
  width: 14%;
}

[data-view-panel="devices"] th:nth-child(3),
#devicesTableBody td:nth-child(3) {
  width: 15%;
}

[data-view-panel="devices"] th:nth-child(4),
#devicesTableBody td:nth-child(4) {
  width: 7%;
}

[data-view-panel="devices"] th:nth-child(5),
#devicesTableBody td:nth-child(5) {
  width: 11%;
}

[data-view-panel="devices"] th:nth-child(6),
#devicesTableBody td:nth-child(6) {
  width: 10%;
}

[data-view-panel="devices"] th:nth-child(7),
#devicesTableBody td:nth-child(7) {
  width: 8%;
}

[data-view-panel="devices"] th:nth-child(8),
#devicesTableBody td:nth-child(8) {
  width: 10%;
}

[data-view-panel="devices"] th:nth-child(9),
#devicesTableBody td:nth-child(9) {
  width: 9%;
}

[data-view-panel="members"] table {
  table-layout: fixed;
  min-width: 1240px;
}

[data-view-panel="members"] th:nth-child(1),
#membersTableBody td:nth-child(1) {
  width: 15%;
}

[data-view-panel="members"] th:nth-child(2),
#membersTableBody td:nth-child(2) {
  width: 16%;
}

[data-view-panel="members"] th:nth-child(3),
#membersTableBody td:nth-child(3) {
  width: 15%;
}

[data-view-panel="members"] th:nth-child(4),
#membersTableBody td:nth-child(4) {
  width: 18%;
}

[data-view-panel="members"] th:nth-child(5),
#membersTableBody td:nth-child(5) {
  width: 11%;
}

[data-view-panel="members"] th:nth-child(6),
#membersTableBody td:nth-child(6) {
  width: 8%;
}

[data-view-panel="members"] th:nth-child(7),
#membersTableBody td:nth-child(7) {
  width: 10%;
}

[data-view-panel="members"] th:nth-child(8),
#membersTableBody td:nth-child(8) {
  width: 7%;
}

[data-view-panel="links"] table {
  table-layout: fixed;
}

[data-view-panel="links"] th:nth-child(1),
#linksTableBody td:nth-child(1) {
  width: 36%;
}

[data-view-panel="links"] th:nth-child(2),
#linksTableBody td:nth-child(2) {
  width: 10%;
}

[data-view-panel="links"] th:nth-child(3),
#linksTableBody td:nth-child(3) {
  width: 11%;
}

[data-view-panel="links"] th:nth-child(4),
#linksTableBody td:nth-child(4) {
  width: 22%;
}

[data-view-panel="links"] th:nth-child(5),
#linksTableBody td:nth-child(5) {
  width: 21%;
}

.link-title-main {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.media-status-line {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.media-status-line .status {
  justify-self: start;
}

.link-group-row td {
  background: #fbfcfe;
}

.link-group-row {
  cursor: pointer;
}

.link-group-row.expanded td {
  background: var(--blue-soft);
}

.link-detail-row td {
  background: #ffffff;
  padding: 0;
}

.link-detail-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.link-detail-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: white;
  padding: 14px 16px;
}

.link-detail-item span,
.link-detail-item code {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.cell-subtext {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.cell-main {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fingerprint-code,
.mono-text {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.fingerprint-code {
  display: inline-block;
  max-width: 100%;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  padding: 5px 7px;
  overflow-wrap: anywhere;
}

.device-row td {
  vertical-align: middle;
}

.agent-state-cell .status {
  display: inline-block;
  min-width: 60px;
  text-align: center;
}

.device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.device-actions .small-button {
  margin-right: 0;
  min-width: 52px;
  padding: 7px 9px;
  white-space: nowrap;
}

.link-detail-item code {
  max-width: 760px;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.link-detail-actions {
  white-space: nowrap;
}

.link-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.link-row-actions .small-button {
  margin-right: 0;
  min-width: 72px;
  text-align: center;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 34px;
  text-align: center;
}

.result-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  margin-top: 16px;
  padding: 14px;
}

.result-box.error {
  color: var(--red);
  background: var(--red-soft);
}

.link-output {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.link-output span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.link-output a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.player-page {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.1), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(14, 165, 233, 0.08), transparent 24%),
    linear-gradient(180deg, #f8fff9 0%, #eef9f2 52%, #f8fafc 100%);
}

.player-page.church-viewer-theme {
  --player-green: #009651;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 150, 81, 0.13), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(14, 165, 233, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fff9 0%, #eef9f2 52%, #f8fafc 100%);
}

.watch-layout {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-panel {
  width: min(440px, 100%);
  padding: 26px;
  color: var(--ink);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.12);
}

.church-viewer-theme .auth-panel {
  border-color: rgba(0, 150, 81, 0.14);
}

.auth-panel input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  margin-bottom: 12px;
  font-size: 16px;
}

.auth-panel button {
  width: 100%;
}

.agent-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  margin-top: 16px;
  padding: 16px;
}

.agent-panel strong {
  color: var(--ink);
  font-size: 18px;
}

.agent-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.agent-steps {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 4px 0;
  padding: 0;
}

.agent-steps li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px 10px 34px;
}

.agent-steps li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  transform: translateY(-50%);
}

.agent-steps li.active {
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--blue);
  background: #eff6ff;
}

.agent-steps li.active::before {
  background: var(--blue);
}

.agent-steps li.complete {
  color: var(--green);
  background: #f0fdf4;
}

.agent-steps li.complete::before {
  background: var(--green);
}

.agent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agent-actions .button,
.agent-actions button {
  display: grid;
  place-items: center;
  min-height: 42px;
  text-align: center;
}

.secure-player {
  position: relative;
  width: min(1240px, 100%);
}

.viewer-side-art {
  pointer-events: none;
  position: fixed;
  top: 50%;
  z-index: 0;
  display: none;
  justify-items: center;
  width: clamp(150px, 13vw, 240px);
  opacity: 0.96;
  transform: translateY(-50%);
}

.church-viewer-theme .viewer-side-art {
  display: grid;
}

.viewer-side-art img {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.16));
}

.viewer-side-art-left {
  left: max(18px, calc((100vw - 1240px) / 2 - 284px));
}

.viewer-side-art-right {
  right: max(18px, calc((100vw - 1240px) / 2 - 284px));
}

.player-header,
.video-wrap {
  position: relative;
  z-index: 1;
}

.player-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.player-header h1 {
  color: #0f2f23;
  font-size: 24px;
}

.player-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.player-badges span {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.07);
  color: #1e3a8a;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
}

.church-viewer-theme .player-badges span {
  border-color: rgba(0, 150, 81, 0.18);
  background: rgba(0, 150, 81, 0.08);
  color: #046238;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  background: black;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.church-viewer-theme .video-wrap {
  border-color: rgba(0, 150, 81, 0.2);
}

.video-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  box-shadow: none;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.recovery-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: black;
}

.freeze-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.watermark {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.28;
  background: transparent;
  mix-blend-mode: screen;
}

.watermark::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-28deg);
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.32);
}

.security-notice {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 22px;
  width: min(560px, calc(100% - 36px));
  border: 1px solid rgba(252, 211, 77, 0.72);
  border-radius: 8px;
  background: rgba(120, 53, 15, 0.94);
  color: #fff7ed;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.security-notice.is-blocking {
  border-color: rgba(248, 113, 113, 0.82);
  background: rgba(127, 29, 29, 0.96);
}

.waiting {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: grid;
  gap: 8px;
  place-items: center;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  font-weight: 700;
  text-align: center;
}

.waiting.live-buffering {
  background: rgba(0, 0, 0, 0.22);
  grid-template-rows: auto auto auto;
  gap: 10px;
}

.waiting.live-buffering::before {
  content: "";
  width: 72px;
  height: 72px;
  border: 5px solid rgba(255, 255, 255, 0.22);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  animation: player-spin 0.82s linear infinite;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
  grid-row: 1;
}

.waiting.live-buffering::after {
  content: "";
  display: none;
}

.waiting.live-buffering[data-stage="countdown"]::after {
  content: attr(data-countdown);
  display: block;
  position: absolute;
  top: 22px;
  left: 50%;
  min-width: 116px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.waiting.live-buffering strong,
.waiting.live-buffering span {
  display: block;
}

.waiting.live-buffering[data-stage="buffering"] strong,
.waiting.live-buffering[data-stage="buffering"] span {
  display: none;
}

.waiting.live-buffering[data-stage="countdown"]::before {
  display: none;
}

.waiting.live-buffering[data-stage="recovering"],
.waiting.live-buffering[data-stage="countdown"] {
  background: rgba(0, 0, 0, 0.48);
}

.waiting.live-buffering[data-stage="countdown"] {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.18));
}

.waiting.live-buffering[data-stage="recovering"] strong,
.waiting.live-buffering[data-stage="countdown"] strong {
  font-size: clamp(22px, 3vw, 34px);
}

.waiting.live-buffering[data-stage="recovering"] span,
.waiting.live-buffering[data-stage="countdown"] span {
  color: #e2e8f0;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 600;
}

.waiting span {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
}

@keyframes player-spin {
  to {
    transform: rotate(360deg);
  }
}

.center-play {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
  color: white;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.church-viewer-theme .center-play {
  background: rgba(0, 150, 81, 0.9);
}

.player-brand-strip {
  position: absolute;
  z-index: 4;
  left: 18px;
  bottom: 76px;
  display: none;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 150, 81, 0.88);
  color: white;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.church-viewer-theme .player-brand-strip {
  display: inline-flex;
}

.player-controls {
  position: absolute;
  z-index: 4;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: auto auto minmax(140px, 1fr) auto 100px auto auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.88);
  padding: 10px;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(0, 61, 34, 0.22);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.church-viewer-theme .player-controls {
  background: rgba(0, 150, 81, 0.9);
}

.video-wrap.fullscreen-active.controls-hidden {
  cursor: none;
}

.video-wrap.fullscreen-active.controls-hidden .player-controls,
.video-wrap.fullscreen-active.controls-hidden .player-brand-strip {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.26);
}

.control-symbol {
  display: block;
  width: 18px;
  height: 18px;
}

.center-play .control-symbol {
  width: 28px;
  height: 28px;
}

.play-symbol {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid currentColor;
}

.center-play .play-symbol {
  margin-left: 5px;
  border-top-width: 14px;
  border-bottom-width: 14px;
  border-left-width: 23px;
}

.pause-symbol {
  position: relative;
}

.pause-symbol::before,
.pause-symbol::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 5px;
  border-radius: 2px;
  background: currentColor;
}

.pause-symbol::before {
  left: 3px;
}

.pause-symbol::after {
  right: 3px;
}

.time-readout {
  display: flex;
  gap: 5px;
  color: white;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.seek-bar,
.volume-bar {
  accent-color: #dbeafe;
}

.church-viewer-theme .seek-bar,
.church-viewer-theme .volume-bar {
  accent-color: #c8f7dd;
}

.seek-bar {
  width: 100%;
}

.volume-bar {
  width: 100px;
}

.quality-select {
  min-width: 86px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 13px;
  padding: 0 8px;
}

.audio-select {
  min-width: 104px;
}

.quality-select option {
  color: #0f172a;
}

.embed-mode .watch-layout {
  min-height: 100vh;
  padding: 0;
}

.embed-mode .secure-player {
  width: 100%;
  height: 100vh;
}

.embed-mode .viewer-side-art,
.monitor-mode .viewer-side-art {
  display: none;
}

.embed-mode .player-header {
  display: none;
}

.embed-mode .video-wrap {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  box-shadow: none;
}

.multiview-mode .watch-layout {
  min-height: 100vh;
  padding: 0;
  background: #000;
}

.multiview-mode .secure-player {
  width: 100%;
  height: 100vh;
  background: #000;
}

.multiview-mode .auth-panel,
.multiview-mode .player-header,
.multiview-mode .player-brand-strip,
.multiview-mode .player-controls,
.multiview-mode .viewer-side-art,
.multiview-mode .center-play {
  display: none !important;
}

.multiview-mode .video-wrap {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  box-shadow: none;
}

.embed-mode .auth-panel {
  width: min(420px, calc(100% - 32px));
}

.switch-grid {
  gap: 10px;
}

.switch-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  font-weight: 700;
  gap: 10px;
  grid-template-columns: 44px 1fr;
  min-height: 48px;
  padding: 10px 12px;
}

.switch-row input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.switch-track {
  background: #cbd5e1;
  border-radius: 999px;
  height: 24px;
  position: relative;
  transition: background 0.2s ease;
  width: 44px;
}

.switch-track::after {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  content: "";
  height: 20px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 0.2s ease;
  width: 20px;
}

.switch-row input:checked + .switch-track {
  background: #2563eb;
}

.switch-row input:checked + .switch-track::after {
  transform: translateX(20px);
}

.player-page,
.player-page video,
.player-page .video-wrap,
.player-page .secure-player {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 920px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding: 18px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-footer {
    margin-top: 16px;
  }

  .admin-main {
    padding: 22px 18px 34px;
  }

  .portal-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-service-meta {
    justify-content: flex-start;
    min-width: 0;
  }

  .metrics,
  .health-grid,
  .load-test-form,
  .load-test-status,
  .load-report-grid,
  .dashboard-grid,
  .operation-summary,
  .form-grid.two-columns,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .top-actions,
  .inline-toolbar,
  .split-heading,
  .create-submit-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-controls {
    width: 100%;
    flex-direction: column;
  }

  .toolbar-controls select {
    width: 100%;
  }

  .session-card {
    grid-template-columns: 1fr;
  }

  .session-card-actions {
    justify-self: stretch;
  }

  .session-card-actions .small-button {
    width: 100%;
  }

  .create-submit-bar {
    position: static;
  }

  .create-submit-bar button {
    width: 100%;
  }

  .player-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-controls {
    grid-template-columns: auto auto minmax(90px, 1fr) auto minmax(76px, auto) minmax(96px, auto) auto;
    gap: 8px;
  }

  .volume-bar {
    display: none;
  }

  .quality-select {
    min-width: 76px;
  }

  .audio-select {
    min-width: 96px;
    max-width: 34vw;
  }

  .audio-track-row {
    grid-template-columns: 34px 1fr;
  }

  .audio-track-row .audio-file-field,
  .audio-track-row .remove-audio-track {
    grid-column: 1 / -1;
  }
}

.menu-permission-backdrop {
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.menu-permission-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.menu-permission-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--border);
}

.menu-permission-header h2 {
  margin: 0;
  font-size: 20px;
}

.menu-permission-header p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

.icon-close-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.menu-switch-list {
  display: grid;
  gap: 0;
  padding: 8px 22px;
}

.menu-switch-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.menu-switch-item:last-child {
  border-bottom: 0;
}

.menu-switch-item strong,
.menu-switch-item small {
  display: block;
}

.menu-switch-item small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.menu-switch-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-switch-item i {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}

.menu-switch-item i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .24);
  transition: transform .18s ease;
}

.menu-switch-item input:checked + i {
  background: #16a34a;
}

.menu-switch-item input:checked + i::after {
  transform: translateX(22px);
}

.menu-permission-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
}

.secure-member-policy {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-muted);
}

.secure-member-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.secure-member-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.secure-member-header strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.secure-member-header span,
.org-list-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.compact-switch {
  grid-template-columns: 38px auto;
  min-height: 38px;
  padding: 7px 9px;
  white-space: nowrap;
}

.compact-switch .switch-track {
  width: 38px;
  height: 22px;
}

.compact-switch .switch-track::after {
  width: 18px;
  height: 18px;
}

.compact-switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.org-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.church-checkbox-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.org-check-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.org-check-branch {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.org-check-item.is-disabled {
  opacity: 0.62;
}

.org-check-item input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.org-check-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-legacy-place-policy].hidden {
  display: none;
}

@media (max-width: 560px) {
  .player-brand-strip {
    left: 12px;
    bottom: 94px;
    min-height: 28px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .player-controls {
    grid-template-columns: auto minmax(48px, 1fr) auto minmax(92px, 38vw) auto;
  }

  .time-readout,
  .quality-select {
    display: none;
  }

  .audio-select {
    display: block;
    min-width: 92px;
    max-width: 38vw;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions button {
    flex: 1;
  }

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

  .portal-hero {
    padding: 20px;
  }

  .portal-hero h2 {
    font-size: 22px;
  }

  #audioModal .audio-track-row {
    grid-template-columns: 34px 1fr;
  }

  #audioModal .audio-file-field,
  #audioModal .remove-audio-track {
    grid-column: 1 / -1;
  }

  #audioModal .wide-dialog {
    max-height: calc(100vh - 24px);
  }

  #audioModal .audio-track-list {
    max-height: 46vh;
  }

  #securityModal .wide-dialog {
    max-height: calc(100vh - 24px);
  }
}

@media (max-width: 1540px), (max-height: 720px) {
  .viewer-side-art,
  .church-viewer-theme .viewer-side-art {
    display: none;
  }
}
