:root {
  --bg: #0b0d10;
  --panel: #14171c;
  --panel-2: #1b1f26;
  --border: #262b33;
  --text: #e6e8eb;
  --text-dim: #8b929c;
  --accent: #4f8cff;
  --accent-dim: #2c4a85;
  --danger: #e5484d;
  --ok: #30a46c;
  --warn: #e2a336;
  --tor-purple: #8b5cf6;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.brand { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }

.topbar nav { display: flex; align-items: center; gap: 20px; }
.topbar nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}
.topbar nav a:hover { color: var(--text); }

main { padding: 32px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-head h1 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 12px; }

.btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.tor-active { background: var(--tor-purple); border-color: var(--tor-purple); color: #fff; }
.btn.tor-active:hover { background: var(--tor-purple); opacity: 0.85; }

.table-toolbar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}
.system-stats {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(20, 23, 28, 0.55);
}
.system-stats-title,
.uploader-stats-title {
  min-width: 102px;
  padding: 3px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.system-stats-title span,
.uploader-stats-title span { font-size: 11px; font-weight: 650; white-space: nowrap; }
.stat-card {
  min-width: 68px;
  height: 38px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  align-items: baseline;
  column-gap: 5px;
}
.stat-card span { color: var(--text-dim); font-size: 9px; text-transform: uppercase; }
.stat-card small { display: none; }
.stat-card strong { font-size: 12px; white-space: nowrap; }
.stat-card strong.ok { color: var(--ok); }
.stat-card strong.bad { color: var(--danger); }
.stat-card strong.warn { color: var(--warn); }
@media (max-width: 1350px) { .table-toolbar { flex-wrap: wrap; } .system-stats { width: 100%; margin-left: 0; flex-wrap: wrap; } }
.uploader-stats {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
}
.uploader-stats + .system-stats { margin-left: 8px; }
.uploader-stats-title {
  min-width: 116px;
}
.uploader-stats-title small { color: var(--text-dim); font-size: 9px; margin-top: 2px; }
@media (max-width: 720px) {
  main { padding: 20px 14px; }
  .uploader-stats { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .uploader-stats-title { width: 100%; }
}
.agents-pagination {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  flex: 0 0 auto;
}
.agents-pagination span { color: var(--text-dim); font-size: 12px; min-width: 104px; text-align: center; }
.agents-table-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}
.hidden-agents-trigger { position:relative; gap:6px; }
.hidden-agents-trigger span { min-width:16px; height:16px; padding:0 4px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:rgba(111,145,255,.14); color:#aebfff; font-size:10px; line-height:1; }
.hidden-agents-dialog { width:min(640px,calc(100vw - 28px)); min-height:220px; padding:0; overflow:hidden; }
.hidden-agents-dialog .dialog-head { padding:18px 20px 15px; }
.hidden-agents-list { min-height:110px; max-height:55vh; padding:8px 16px; overflow:auto; }
.hidden-agent-item { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 4px; border-bottom:1px solid rgba(126,145,171,.12); }
.hidden-agent-item:last-child { border-bottom:0; }
.hidden-agent-item strong,.hidden-agent-item small { display:block; }
.hidden-agent-item strong { color:var(--text); font-size:13px; }
.hidden-agent-item small { margin-top:4px; color:var(--text-dim); font-size:11px; }
@media (max-width:600px) { .hidden-agent-item{align-items:flex-start;flex-direction:column}.hidden-agent-item .btn{align-self:flex-start} }
.system-stats-line {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: auto;
}
.system-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.system-stat svg { width: 13px; height: 13px; opacity: .7; }
.system-stat em { font-style: normal; text-transform: uppercase; font-size: 9px; letter-spacing: .04em; }
.system-stat strong { color: var(--text); font-size: 11px; font-weight: 650; }
.system-stat strong.ok { color: var(--ok); }
.system-stat strong.warn { color: var(--warn); }
.system-stat strong.bad { color: var(--danger); }
.system-stat small { display: none; }
.topbar-stats { margin-left: 0; gap: 14px; }
.topbar-stats .system-stat { gap: 4px; }
.topbar-stats .system-stat svg { width: 12px; height: 12px; }
.agents-toolbar { margin: 14px 0 10px; }
.screenshots-toolbar-btn { margin-left: 4px; }
@media (max-width: 1000px) {
  .agents-table-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 850px) {
  .topbar { align-items: flex-start; gap: 12px; }
  .topbar nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
  .topbar-stats { order: 3; width: 100%; justify-content: flex-end; gap: 10px; overflow-x: auto; }
}
.search-input {
  flex: 1;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 13px;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-input::placeholder { color: var(--text-dim); }
.status-select {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.status-select:focus { outline: none; border-color: var(--accent); }
.build-name-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); margin-bottom: 10px; }
.builds-section { margin-top: 24px; }
.builds-section h2 { font-size: 16px; margin: 0 0 12px; }
.builds-table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 13px; }
.builds-table th, .builds-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.builds-table th { color: var(--text-dim); font-size: 11px; text-transform: uppercase; }
.builds-table tr:last-child td { border-bottom: 0; }
.builds-table a { color: var(--accent); text-decoration: none; margin-right: 6px; }
.builds-table .empty { text-align: center; color: var(--text-dim); padding: 28px; }
.ok-text { color: var(--ok); }
.copy-row { display: flex; gap: 8px; min-width: 0; }
.copy-row input { flex: 1; min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); }
.stats-page { width: min(1100px, 100%); margin: 24px auto; }
.stats-title { margin-bottom: 28px; }
.stats-title span, .stats-title small { color: var(--text-dim); }
.stats-title h1 { font-size: 30px; margin: 5px 0; }
.build-stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.build-stat-cards > div, .build-stat-panels section { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); padding: 20px; }
.build-stat-cards span { display: block; color: var(--text-dim); font-size: 12px; margin-bottom: 10px; }
.build-stat-cards strong { font-size: 32px; }
.build-stat-cards strong.ok { color: var(--ok); }
.build-stat-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.build-stat-panels h2 { margin: 0 0 18px; font-size: 15px; }
.stat-row { display: grid; grid-template-columns: minmax(90px, 1fr) 3fr 36px; align-items: center; gap: 10px; margin: 11px 0; font-size: 12px; }
.stat-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-row > div { height: 7px; border-radius: 5px; background: var(--panel-2); overflow: hidden; }
.stat-row i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.stat-row strong { text-align: right; }
@media (max-width: 700px) { .build-stat-cards, .build-stat-panels { grid-template-columns: 1fr; } .copy-row input { min-width: 0; } }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.install-log-panel {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.install-log-panel summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-dim);
  list-style: none;
}
.install-log-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.install-log-panel summary::-webkit-details-marker { display: none; }
.install-log-panel[open] summary {
  border-bottom: 1px solid var(--border);
}
.install-log-panel .table-scroll {
  border: none;
  border-radius: 0 0 10px 10px;
  max-height: 320px;
  overflow-y: auto;
}

.agents-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 13px;
}
.agents-table col.col-seq { width: 36px; }
.agents-table col.col-preview { width: 84px; }
.agents-table col.col-status { width: 88px; }
.agents-table col.col-agent { width: 100px; }
.agents-table col.col-host { width: 130px; }
.agents-table col.col-ip { width: 116px; }
.agents-table col.col-country { width: 120px; }
.agents-table col.col-os { width: 220px; }
.agents-table col.col-seen { width: 120px; }
.agents-table col.col-comment { width: 180px; }
.agents-table col.col-actions { width: 72px; }
.agents-table th.col-actions-th { text-align: center; padding-left: 0; padding-right: 0; }
.agents-table th.col-actions-th svg { width: 14px; height: 14px; opacity: 0.6; }
.agents-table th {
  text-align: left;
  padding: 10px 16px;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.agents-table th svg { width: 12px; height: 12px; opacity: 0.6; flex-shrink: 0; }
.agents-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.agents-table tbody tr:last-child td { border-bottom: none; }
.agents-table th:last-child,
.agents-table td:last-child {
  position: sticky;
  right: 0;
  background: var(--panel);
  box-shadow: -6px 0 6px -6px rgba(0,0,0,0.4);
}
.agents-table th:last-child { background: var(--panel-2); }
.agents-table tbody tr:hover td:last-child { background: var(--panel-2); }
.agents-table .cell-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
.agents-table .cell-dim { color: var(--text-dim); }
.agents-table .cell-mono { font-family: "Consolas", "SFMono-Regular", monospace; font-size: 12px; }
.agents-table a { color: var(--accent); text-decoration: none; font-weight: 500; }
.agents-table a:hover { text-decoration: underline; }
.agents-table .empty { text-align: center; color: var(--text-dim); padding: 40px; }
.agents-table tbody tr { transition: background-color 0.1s ease; }
.agents-table tbody tr:hover { background: var(--panel-2); }
.comment-cell { padding-top: 5px !important; padding-bottom: 5px !important; }
.comment-edit {
  width: 100%;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 10px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.comment-edit span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.comment-edit:hover { color: var(--text); border-color: var(--border); background: var(--panel-2); }
.flag { width: 20px; height: 15px; margin-right: 6px; vertical-align: -2px; object-fit: cover; border-radius: 2px; }

.preview-thumb {
  width: 76px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #000;
  display: block;
}
img.preview-thumb {
  cursor: zoom-in;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
img.preview-thumb:hover { border-color: var(--accent); transform: scale(1.05); }
.preview-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: var(--panel-2);
}
.preview-thumb.placeholder svg { width: 24px; height: 24px; opacity: 0.4; }
.preview-thumb.placeholder.locked { color: var(--danger); }
.preview-thumb.placeholder.locked svg { opacity: 0.7; }
.preview-cell { position: relative; display: inline-block; }
.preview-refresh-btn {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
}
.preview-refresh-btn:hover { color: var(--accent); border-color: var(--accent); }
.preview-refresh-btn svg { width: 11px; height: 11px; }
.preview-refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
[data-action="cookies"].busy { pointer-events: none; opacity: 0.7; }
[data-action="cookies"].ready { background: var(--ok); border-color: var(--ok); color: #fff; }

#preview-dialog { width: auto; max-width: min(92vw, 1320px); padding: 10px; background: #000; }
#preview-dialog-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(88vw, 1280px);
  max-height: 82vh;
  border-radius: 6px;
}


.btn svg { width: 14px; height: 14px; vertical-align: -2px; }
.icon-label { display: inline-flex; align-items: center; gap: 8px; }
.btn.icon-btn { padding: 5px 6px; line-height: 0; }
.info-grid svg { width: 13px; height: 13px; opacity: 0.8; }

.row-menu { position: relative; display: inline-flex; gap: 6px; }
.row-menu-dropdown {
  position: fixed;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 190px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.row-menu-dropdown a,
.row-menu-dropdown .menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.row-menu-dropdown a:hover,
.row-menu-dropdown .menu-item:hover { background: var(--panel); }
.row-menu-dropdown .menu-item.danger { color: var(--danger); }
.row-menu-dropdown svg { width: 14px; height: 14px; flex-shrink: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-online { background: rgba(48,164,108,0.15); color: var(--ok); }
.status-offline { background: rgba(139,146,156,0.15); color: var(--text-dim); }
.status-pending { background: rgba(226,163,54,0.15); color: var(--warn); }
.status-removing { background: rgba(229,72,77,0.15); color: var(--danger); }

.ca-details { grid-column:1/-1; }
.ca-details > summary { display:flex; align-items:center; gap:8px; cursor:pointer; list-style:none; padding:4px 0; }
.ca-details > summary::-webkit-details-marker { display:none; }
.ca-details > summary::before { content:'▸'; color:var(--text-dim); font-size:10px; transition:transform .12s; display:inline-block; }
.ca-details[open] > summary::before { content:'▾'; }
.ca-list { display:flex; flex-direction:column; gap:4px; padding:6px 0 6px 14px; }
.ca-item { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--text-dim); flex-wrap:wrap; }
.ca-item code { font-family:"Consolas",monospace; font-size:10px; color:var(--accent); }
.ca-subj { color:var(--text); max-width:520px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ca-meta { color:var(--text-dim); }

.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
}
.login-card { align-items: center; text-align: center; }
.login-sub { color: var(--text-dim); font-size: 13px; margin: 4px 0 20px; }

.btn.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #3a6fd8);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79,140,255,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,140,255,0.45); }
.btn.cta:active { transform: translateY(0); }
.btn.cta:disabled { opacity: 0.6; cursor: wait; transform: none; }

.login-code {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 8px 0 16px;
  color: var(--accent);
}

.spinner {
  width: 22px;
  height: 22px;
  margin: 8px auto 0;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-error { color: var(--danger); font-size: 13px; margin-top: 14px; }

dialog {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 24px;
  width: 420px;
}
dialog::backdrop { background: rgba(0,0,0,0.6); }
@keyframes dialogIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
dialog[open] { animation: dialogIn 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
dialog[open]::backdrop { animation: backdropIn 0.18s ease-out; }
dialog label { display: block; font-size: 12px; color: var(--text-dim); margin: 12px 0 6px; }
dialog input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
dialog pre {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
}
#create-agent-dialog { width: 680px; max-width: calc(100vw - 24px); overflow-x: hidden; }
#create-agent-dialog h3 { display: flex; align-items: center; gap: 10px; margin-top: 0; }
#create-agent-dialog h3 svg { width: 22px; height: 22px; flex: 0 0 22px; }
#create-agent-dialog pre { max-height: 190px; overflow-y: auto; overflow-x: hidden; line-height: 1.45; }
#create-agent-dialog .dialog-actions { flex-wrap: wrap; }
@media (max-width: 560px) { #create-agent-dialog { padding: 18px; } .copy-row { flex-direction: column; } .copy-row .btn { width: 100%; } }

#processes-dialog { width: 640px; max-width: 90vw; }
.processes-wrap { max-height: 60vh; overflow:auto; }
.processes-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.processes-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  background: var(--panel);
}
.processes-table td { padding: 6px 10px; border-top: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.processes-table .empty { text-align: center; color: var(--text-dim); padding: 24px; }
.processes-table .proc-check { width: 34px; text-align: center; }
.processes-table .proc-pid { width: 56px; }
.processes-table .proc-name { width: 150px; }
.processes-table .proc-user { width: 130px; }
.proc-actions { justify-content: space-between; }
.proc-actions .btn { flex-shrink: 0; }
.processes-table th:last-child { width: 96px; }
.proc-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.proc-search { flex:1; padding:8px 10px; background:var(--panel-2); border:1px solid var(--border); border-radius:6px; color:var(--text); font-size:13px; }
.proc-search:focus { outline:none; border-color:var(--accent); }
.proc-count { color:var(--text-dim); font-size:11px; white-space:nowrap; }
.evnc-hard-label { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--text-dim); cursor:pointer; user-select:none; }
.evnc-hard-label input { width:14px; height:14px; accent-color:var(--accent); }
.btn-link { background:none; border:none; padding:0; color:var(--accent); cursor:pointer; font:inherit; text-decoration:underline dotted; }
.btn-link:hover { text-decoration:underline; }
#rdp-dialog { width: min(820px, 94vw); }
.rdp-summary { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.rdp-stat { display:flex; flex-direction:column; gap:4px; background:var(--panel-2); border:1px solid var(--border); border-radius:8px; padding:10px 14px; min-width:120px; }
.rdp-stat-wide { flex:1; min-width:200px; }
.rdp-stat-label { font-size:10px; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-dim); }
.rdp-stat-val { font-size:14px; font-weight:600; word-break:break-word; }
.rdp-stat-val.ok { color:var(--ok); }
.rdp-stat-val.off { color:var(--text-dim); }
.rdp-section-title { font-size:12px; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-dim); margin-bottom:8px; }
.rdp-wrap { max-height: min(340px, 50vh); overflow:auto; border:1px solid var(--border); border-radius:8px; }
.rdp-table td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

#files-dialog { width: 640px; max-width: 90vw; }
#agent-log-dialog { width: min(1000px, calc(100vw - 24px)); max-width: none; padding: 18px; }
#install-log-dialog { width: min(1100px, 94vw); }
.install-log-dialog { padding: 18px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.dialog-head h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 3px; }
.dialog-head h3 svg { width: 17px; height: 17px; }
.dialog-head small { color: var(--text-dim); font-size: 11px; }
.install-log-scroll { max-height: min(62vh, 580px); overflow-y: auto; }
.install-log-table { min-width: 850px; table-layout: auto; }
.install-log-dialog .dialog-actions { justify-content: space-between; margin-top: 14px; }
.comment-dialog { width: min(520px, calc(100vw - 24px)); }
.comment-dialog h3 { margin: 0 0 14px; }
.comment-dialog textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}
.comment-dialog textarea:focus { border-color: var(--accent); }
.comment-dialog-meta { display: flex; justify-content: flex-end; margin-top: 5px; color: var(--text-dim); font-size: 10px; }
.agent-log-scroll { max-height: min(68vh, 720px); overflow: auto; border: none; }
.agent-log-table { width: 100%; min-width: 560px; table-layout: fixed; }
.agent-log-time-col { width: 190px; }
.agent-log-action-col { width: 190px; }
.agent-log-table th:last-child,
.agent-log-table td:last-child { position: static; right: auto; box-shadow: none; }
.agent-log-table tbody tr:hover td:last-child { background: transparent; }
.agent-log-table td { vertical-align: top; }
.agent-log-table td:nth-child(2) { overflow-wrap: anywhere; }
.agent-log-message { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
@media (max-width: 700px) {
  #agent-log-dialog { padding: 14px; }
  .agent-log-time-col { width: 165px; }
  .agent-log-action-col { width: 150px; }
}
#python-dialog { width: 640px; max-width: 90vw; }
.module-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 640px;
  margin-bottom: 24px;
}
.module-form label {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}
.module-form label:first-child {
  margin-top: 0;
}
.module-form input[type="text"] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
}
.module-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.module-code-preview {
  max-width: 420px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}
.python-code-input {
  width: 100%;
  min-height: 260px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: "Cascadia Code", Consolas, monospace;
  resize: vertical;
}
.files-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.files-breadcrumb { font-size: 13px; color: var(--text-dim); overflow-wrap: anywhere; flex-shrink: 1; }
.files-search { flex: 0 1 200px; min-width: 100px; }
.files-breadcrumb a { color: var(--accent); text-decoration: none; }
.files-shortcut { font-weight: 600; }
.files-wrap { max-height: 50vh; overflow-y: auto; }
.files-wrap svg { width: 15px; height: 15px; opacity: 0.8; }
.files-wrap a.files-nav { color: var(--accent); text-decoration: none; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}
.info-grid div { display: flex; flex-direction: column; gap: 4px; }
.info-grid b { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.info-grid span { font-size: 14px; word-break: break-word; }
.info-grid span .btn-link { word-break: break-word; text-align: left; }

.action-panel { display: flex; gap: 12px; flex-wrap: wrap; }
.screenshot-switch, .retention-control { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.screenshot-switch input { display: none; }
.switch-track { width: 34px; height: 19px; padding: 2px; border-radius: 12px; background: var(--border); transition: background .15s; }
.switch-track span { display: block; width: 15px; height: 15px; border-radius: 50%; background: var(--text-dim); transition: transform .15s; }
.screenshot-switch input:checked + .switch-track { background: var(--ok); }
.screenshot-switch input:checked + .switch-track span { transform: translateX(15px); background: white; }
.retention-control input { width: 48px; padding: 5px; color: var(--text); background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
.screenshots-dialog { width: min(1100px, 94vw); }
.screenshots-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; height: min(500px, 65vh); overflow-y: auto; align-content: start; padding-right: 4px; }
.screenshot-item { padding: 0; border: 0; background: transparent; color: var(--text-dim); font-size: 11px; text-align: left; cursor: pointer; }
.screenshot-item strong, .screenshot-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screenshot-item strong { color: var(--text); font-size: 12px; margin-bottom: 3px; }
.screenshot-item img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border: 1px solid var(--border); border-radius: 7px; margin-bottom: 5px; cursor: zoom-in; }
.screenshot-viewer { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; padding: 54px 70px 72px; }
.screenshot-viewer[hidden] { display: none; }
.screenshot-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.screenshot-viewer-close, .screenshot-viewer-nav { position: absolute; border: 0; color: white; background: rgba(35,39,46,.8); cursor: pointer; border-radius: 50%; }
.screenshot-viewer-close { top: 14px; right: 18px; width: 42px; height: 42px; font-size: 30px; line-height: 36px; }
.screenshot-viewer-nav { top: 50%; width: 48px; height: 64px; margin-top: -32px; font-size: 46px; line-height: 54px; }
.screenshot-viewer-nav.prev { left: 14px; }
.screenshot-viewer-nav.next { right: 14px; }
.screenshot-viewer-nav:disabled { opacity: .25; cursor: default; }
.screenshot-viewer-meta { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; display: flex; justify-content: center; gap: 14px; color: white; font-size: 13px; }
.screenshot-viewer-meta span { color: var(--text-dim); }
@media (max-width: 620px) { .screenshot-viewer { padding: 52px 8px 78px; } .screenshot-viewer-nav { top: auto; bottom: 12px; } .screenshot-viewer-nav.prev { left: 12px; } .screenshot-viewer-nav.next { right: 12px; } }
@media (max-width: 900px) { .screenshots-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); } }
@media (max-width: 620px) { .screenshots-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); height: 65vh; } }

.vnc-panel { margin-top: 20px; }
#vnc-canvas {
  max-width: 100%;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: crosshair;
  outline: none;
  display: block;
}
#vnc-canvas[hidden],
#evnc-img[hidden],
.vnc-multi-grid[hidden] { display: none !important; }
.vnc-hint { color: var(--text-dim); font-size: 12px; margin-top: 8px; }
.stream-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 8px; color: var(--text-dim); font-size: 11px; }
.monitor-select { min-width: 210px; }
.monitor-count { color: var(--text-dim); font-size: 10px; white-space: nowrap; }

.evnc-frame-wrap, .vnc-frame-wrap { position: relative; overflow: auto; display: flex; justify-content: center; align-items: flex-start; width: 100%; }
.evnc-frame-wrap.is-zoomed, .vnc-frame-wrap.is-zoomed { justify-content: flex-start; }
.vnc-frame-wrap.is-zoomed #vnc-canvas { max-width: none; }
.vnc-multi-grid { flex: 0 0 auto; width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(var(--monitor-count, 1), minmax(0, 1fr)); gap: 18px; padding: 4px; transform-origin: top left; }
.vnc-monitor-card { min-width: 0; overflow: hidden; padding: 9px; border: 1px solid #34445a; border-radius: 10px; background: #111925; box-shadow: 0 8px 24px rgba(0,0,0,.32), 0 0 0 1px rgba(111,160,224,.07); }
.vnc-monitor-title { display: flex; align-items: center; min-height: 26px; margin: -9px -9px 9px; padding: 0 10px; border-bottom: 1px solid #34445a; background: #182334; color: #b9c8dc; font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.vnc-monitor-canvas { display: block; width: 100%; height: auto; background: #000; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; cursor: crosshair; }
.evnc-img {
  width: 100%;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: default;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.evnc-img:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, transparent);
  outline-offset: 2px;
}
.evnc-zoom-level {
  display: inline-block;
  min-width: 48px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.evnc-loading {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.evnc-ping {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--text-dim);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.evnc-frame-count { top: 42px; }
.evnc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.evnc-controls .terminal-input { flex: 1; min-width: 200px; }

.terminal-panel {
  margin-top: 20px;
  background: #0a0c0f;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.terminal-output {
  height: 360px;
  overflow-y: auto;
  padding: 14px 16px;
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #d6f5d6;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  background: var(--panel);
}
.terminal-prompt { color: var(--accent); font-family: monospace; }
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 13px;
}

:root {
  --bg: #090c12;
  --panel: #121720;
  --panel-2: #19212d;
  --border: #283241;
  --text: #edf2f8;
  --text-dim: #929eae;
  --accent: #6f91ff;
  --accent-dim: #344d8d;
  --danger: #f26678;
  --ok: #39c889;
  --warn: #eeb552;
  --tor-purple: #9b7cf6;
  color-scheme: dark;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% -20%, rgba(80, 111, 210, .11), transparent 38rem);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { color: #fff; background: rgba(111, 145, 255, .42); }

.topbar {
  background-color: rgba(18, 23, 32, .94);
  border-bottom-color: rgba(126, 145, 171, .17);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .13);
  backdrop-filter: blur(14px);
}

.brand { letter-spacing: -.01em; }

.topbar nav a,
.agents-table a,
.builds-table a,
.files-breadcrumb a,
.files-wrap a.files-nav {
  transition: color .16s ease, opacity .16s ease;
}

.topbar nav a:hover { color: #fff; }

.btn {
  background-image: linear-gradient(180deg, rgba(255,255,255,.025), rgba(0,0,0,.035));
  box-shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 3px 10px rgba(0,0,0,.08);
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.btn:hover {
  border-color: #6689f5;
  box-shadow: 0 1px 0 rgba(255,255,255,.045) inset, 0 5px 15px rgba(0,0,0,.15);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn.primary {
  background-image: linear-gradient(135deg, #7697ff, #5579ed);
  box-shadow: 0 6px 18px rgba(76, 108, 221, .22);
}

.btn.danger { background-color: rgba(242, 102, 120, .035); }
.btn.danger:hover { box-shadow: 0 6px 18px rgba(242, 102, 120, .16); }
.btn.tor-active { background-image: linear-gradient(135deg, #a589f8, #8060de); }

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(111, 145, 255, .82);
  outline-offset: 2px;
}

.search-input,
.status-select,
.build-name-input,
.copy-row input,
dialog input,
.module-form input[type="text"],
.python-code-input,
.retention-control input {
  box-shadow: 0 1px 0 rgba(255,255,255,.025) inset;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.search-input:focus,
.status-select:focus,
dialog input:focus,
.module-form input[type="text"]:focus,
.python-code-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 145, 255, .1);
}

.table-scroll,
.install-log-panel,
.info-grid,
.build-stat-cards > div,
.build-stat-panels section,
.login-card,
.terminal-panel {
  border-color: rgba(126, 145, 171, .17);
  box-shadow: 0 14px 36px rgba(0,0,0,.13), 0 1px 0 rgba(255,255,255,.018) inset;
}

.agents-table th,
.builds-table th {
  color: #8693a5;
  background-color: rgba(255,255,255,.012);
}

.agents-table td,
.builds-table td,
.processes-table td {
  border-color: rgba(126, 145, 171, .12);
}

.agents-table tbody tr,
.builds-table tbody tr {
  transition: background-color .14s ease;
}

.agents-table tbody tr:hover,
.builds-table tbody tr:hover {
  background-color: rgba(111, 145, 255, .045);
}

.agents-table tbody tr:hover td:last-child { background-color: #19212d; }

.preview-thumb,
.screenshot-item img,
#vnc-canvas,
.evnc-img {
  box-shadow: 0 6px 18px rgba(0,0,0,.17);
}

.badge { border: 1px solid rgba(255,255,255,.045); }
.badge::before { box-shadow: 0 0 7px currentColor; }

.row-menu-dropdown,
dialog,
.toast {
  border-color: rgba(126, 145, 171, .2);
  box-shadow: 0 18px 48px rgba(0,0,0,.34), 0 1px 0 rgba(255,255,255,.025) inset;
}

dialog::backdrop { background: rgba(2, 5, 10, .7); backdrop-filter: blur(3px); }

.switch-track,
.switch-track span { transition-duration: .2s; }

.login-card { background-color: rgba(18, 23, 32, .96); }

.terminal-output { color: #ccebd6; }
.terminal-prompt { text-shadow: 0 0 12px rgba(111,145,255,.45); }

* { scrollbar-color: #39475b transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #39475b; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #4a5b73; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.content-search-dialog { width: min(940px, calc(100vw - 28px)); max-width: none; padding: 0; overflow: hidden; }
.search-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; padding:22px 24px 17px; border-bottom:1px solid var(--border); }
.search-dialog-head h3 { margin:0 0 5px; font-size:20px; }
.search-dialog-head p { margin:0; color:var(--text-dim); font-size:13px; }
.dialog-x { border:0; background:transparent; color:var(--text-dim); font-size:28px; cursor:pointer; line-height:1; }
.content-search-form { padding:20px 24px 16px; }
.content-search-dialog .search-query-label { display:grid; gap:8px; margin:0; color:var(--text-dim); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.search-query-label input { width:100%; box-sizing:border-box; padding:13px 15px; font-size:15px; color:var(--text); background:var(--panel-2); border:1px solid var(--border); border-radius:9px; }
.search-options-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:15px; }
.search-options-grid fieldset { display:grid; align-content:start; grid-auto-rows:min-content; gap:3px; margin:0; padding:13px 15px 15px; border:1px solid var(--border); border-radius:9px; background:rgba(255,255,255,.012); }
.search-options-grid legend { padding:0 6px; color:var(--text); font-size:13px; font-weight:600; }
.content-search-dialog .search-options-grid label { display:flex; align-items:center; gap:9px; min-height:29px; margin:0; padding:3px 2px; color:var(--text-dim); font-size:13px; line-height:1.25; cursor:pointer; }
.content-search-dialog .search-options-grid label:hover { color:var(--text); }
.content-search-dialog .search-options-grid input[type="checkbox"],
.content-search-dialog .search-options-grid input[type="radio"] { flex:0 0 15px; width:15px; height:15px; margin:0; padding:0; border:0; accent-color:var(--accent); cursor:pointer; box-shadow:none; }
.search-run-row { display:flex; align-items:center; gap:9px; margin-top:16px; flex-wrap:wrap; }
.search-state { margin-left:auto; color:var(--text-dim); font-size:12px; }
.search-progress { padding:15px 24px; border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:rgba(111,145,255,.035); }
.search-progress-track { height:4px; overflow:hidden; border-radius:999px; background:var(--panel-2); }
.search-progress-track span { display:block; width:32%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),#8e73ff); animation:search-progress 1.2s ease-in-out infinite alternate; }
.search-progress-track span.paused { background:var(--warn); animation-duration:2.4s; }
@keyframes search-progress { from{transform:translateX(-70%)} to{transform:translateX(280%)} }
.search-metrics { display:flex; gap:22px; margin-top:11px; color:var(--text-dim); font-size:12px; font-variant-numeric:tabular-nums; }
.search-metrics b { color:var(--text); }
.search-current { margin-top:7px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:#718096; font-size:11px; }
.content-search-results { max-height:min(390px, 38vh); overflow:auto; padding:10px 14px 16px; }
.search-empty { padding:30px 12px; text-align:center; color:var(--text-dim); }
.search-result-item { display:grid; grid-template-columns:58px 1fr; gap:12px; padding:12px; border-bottom:1px solid rgba(126,145,171,.12); }
.search-result-kind { align-self:start; padding:4px 7px; border-radius:6px; color:#aabcf7; background:rgba(111,145,255,.1); font-size:10px; text-align:center; text-transform:uppercase; }
.search-result-main { min-width:0; }
.search-result-main strong,.search-result-main span { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.search-result-main strong { font-size:13px; }
.search-result-main span { margin-top:3px; color:#748196; font-size:11px; }
.search-result-main p { margin:7px 0 0; color:var(--text-dim); font-size:12px; line-height:1.45; }
@media (max-width:760px) { .search-options-grid{grid-template-columns:1fr}.search-state{width:100%;margin-left:0}.search-metrics{gap:10px;flex-wrap:wrap} }
.files-row-actions { display:inline-flex; align-items:center; justify-content:flex-end; gap:6px; }
.camera-dialog { width:min(960px,calc(100vw - 28px)); padding:0; overflow:hidden; }
.camera-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:18px 20px 14px; border-bottom:1px solid var(--border); }
.camera-head h3,.camera-head p { margin:0; }
.camera-head p { margin-top:5px; color:var(--text-dim); font-size:12px; }
.camera-stage { position:relative; display:flex; align-items:center; justify-content:center; min-height:360px; max-height:70vh; margin:16px; overflow:hidden; border:1px solid var(--border); border-radius:10px; background:#030508; }
.camera-stage img { display:none; max-width:100%; max-height:70vh; object-fit:contain; }
.camera-stage img.active { display:block; }
.camera-placeholder { color:var(--text-dim); font-size:13px; }
.camera-controls { display:flex; align-items:end; gap:10px; padding:0 16px 14px; flex-wrap:wrap; }
.camera-controls label { display:flex; align-items:center; gap:8px; color:var(--text-dim); font-size:12px; }
.camera-logs { max-height:180px; margin:0 16px 14px; overflow:auto; border:1px solid var(--border); border-radius:8px; background:rgba(3,5,8,.45); }
.camera-log-row { display:grid; grid-template-columns:145px 1fr; gap:10px; padding:8px 10px; border-bottom:1px solid rgba(126,145,171,.1); font-size:11px; }
.camera-log-row:last-child { border-bottom:0; }
.camera-log-row time { color:#748196; }
.camera-log-row span { color:var(--text-dim); overflow-wrap:anywhere; }
@media (max-width:760px) { .camera-stage{min-height:220px}.camera-controls{align-items:stretch}.camera-controls label{width:100%} }
