
:root{
  --ink:#171717; --ink-2:#2B2B2B; --gold:#C1964E; --gold-2:#D6A017; --ivory:#F7F4ED; --surface:#FFFFFF; --line:#E4DED2; --line-strong:#D0C7B7; --muted:#6E6E68; --soft:#FAF9F6;
  --success:#27814B; --success-bg:#EAF7EE; --danger:#C93D36; --danger-bg:#FFF0EE; --warn:#B97812; --warn-bg:#FFF5DC; --info:#387DDB; --info-bg:#ECF4FF;
  --shadow:0 14px 35px rgba(32,28,20,.10); --shadow-sm:0 5px 16px rgba(32,28,20,.08); --radius:18px; --radius-sm:12px; --nav:260px;
}
*{box-sizing:border-box} body{margin:0;background:var(--ivory);color:var(--ink);font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;font-size:14px;line-height:1.35} a{color:inherit;text-decoration:none} .sprite{display:none}
.shell{min-height:100vh;display:grid;grid-template-columns:var(--nav) 1fr;background:linear-gradient(180deg,#FCFBF8 0%,var(--ivory) 100%)}
.sidebar{background:#161616;color:#fff;padding:24px 18px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:22px}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:21px}.brand img{height:34px;width:auto;object-fit:contain}.brand span:last-child{color:var(--gold)}
.nav-section{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#9D9D94;margin:8px 10px}.nav{display:flex;flex-direction:column;gap:5px}.nav a{height:38px;display:flex;align-items:center;gap:10px;padding:0 11px;border-radius:11px;color:#E8E4DC}.nav a svg{width:18px;height:18px}.nav a.active,.nav a:hover{background:rgba(193,150,78,.16);color:#fff}.nav a.active{box-shadow:inset 3px 0 0 var(--gold)}.sidebar-foot{margin-top:auto;color:#8C8A84;font-size:12px}.role-switch{display:flex;gap:8px}.pill{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);font-weight:700;font-size:12px}.pill.active{color:#fff;background:var(--ink);border-color:var(--ink)}.pill.gold{background:#F8F0DF;border-color:#E7D1A5;color:#8A5C0C}.pill.success{background:var(--success-bg);color:var(--success);border-color:#C8E9D1}.pill.danger{background:var(--danger-bg);color:var(--danger);border-color:#F1B9B5}.pill.warn{background:var(--warn-bg);color:var(--warn);border-color:#F0D193}.pill.info{background:var(--info-bg);color:var(--info);border-color:#C7DEF9}.pill.mono{font-family:ui-monospace, SFMono-Regular, Menlo, monospace}
.main{padding:22px 26px 42px;min-width:0}.topbar{height:62px;display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.crumb{color:var(--muted);font-size:13px}.user{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#fff;font-weight:800}
h1{font-size:34px;line-height:1.05;margin:0 0 8px;letter-spacing:-.035em} h2{font-size:22px;margin:0 0 16px;letter-spacing:-.02em} h3{font-size:16px;margin:0 0 12px}.muted{color:var(--muted)}.small{font-size:12px}.grid{display:grid;gap:16px}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.page-head{display:flex;align-items:flex-start;justify-content:space-between;margin:4px 0 18px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn{height:38px;border:1px solid var(--line-strong);border-radius:11px;background:#fff;padding:0 14px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 1px 0 rgba(0,0,0,.02);cursor:pointer}.btn svg{width:17px;height:17px}.btn.primary{background:linear-gradient(180deg,#D8A54D,#C1964E);color:#fff;border-color:#B18740}.btn.ink{background:var(--ink);border-color:var(--ink);color:#fff}.btn.danger{color:var(--danger);border-color:#E7B3AE;background:#fff}.btn.icon{width:38px;padding:0}.btn.active{background:#F9F0DE;color:#8A5C0C;border-color:#DEBD78}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}.card.pad{padding:18px}.panel{background:rgba(255,255,255,.72);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}.panel.pad{padding:22px}.split{display:grid;grid-template-columns:1fr 360px;gap:16px}.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.input,.select{height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 12px;color:var(--ink);min-width:0}.input::placeholder{color:#AAA49A}.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:11px;height:40px;padding:0 12px;background:#fff;min-width:260px}.search svg{width:17px;color:#999}.search input{border:0;outline:0;width:100%;font:inherit;background:transparent}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.stat{padding:15px;background:#fff;border:1px solid var(--line);border-radius:14px}.stat .label{color:var(--muted);font-size:12px}.stat .num{font-size:28px;font-weight:850;letter-spacing:-.04em}.stat .delta{font-size:12px;color:var(--success);font-weight:700}.server-card{display:grid;grid-template-columns:1fr 80px 80px 90px 95px;gap:12px;align-items:center;padding:12px;border-bottom:1px solid var(--line)}.server-card:last-child{border-bottom:0}.meter{height:7px;background:#EFECE4;border-radius:99px;overflow:hidden}.meter span{display:block;height:100%;background:var(--success);border-radius:99px}.meter.warn span{background:var(--warn)}.meter.danger span{background:var(--danger)}
.camera-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.camera-card{overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-sm);position:relative}.preview{height:160px;background:#111;position:relative;overflow:hidden}.preview img{width:100%;height:100%;object-fit:cover;display:block}.preview .live{position:absolute;top:10px;left:10px}.preview .state{position:absolute;inset:0;display:grid;place-items:center;color:#fff;background:rgba(0,0,0,.45);font-weight:800}.camera-body{padding:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.camera-title{font-weight:850}.camera-meta{font-size:12px;color:var(--muted)}.star-btn{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--muted);display:grid;place-items:center}.star-btn.active{color:var(--gold);background:#FFF8E8;border-color:#E5C991}.star-btn svg{width:18px;height:18px}
.table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}.table th{text-align:left;font-size:11px;color:#77716A;text-transform:uppercase;letter-spacing:.055em;background:#FAF8F4;padding:12px;border-bottom:1px solid var(--line)}.table td{padding:12px;border-bottom:1px solid var(--line);vertical-align:middle}.table tr:last-child td{border-bottom:0}.row-actions{display:flex;gap:7px}.mini-icon{width:28px;height:28px;border:1px solid var(--line);border-radius:8px;background:#fff;display:grid;place-items:center}.mini-icon svg{width:15px;height:15px}.kv{display:flex;gap:6px;flex-wrap:wrap}.kv code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#F6F3ED;border:1px solid var(--line);border-radius:7px;padding:3px 6px;font-size:12px;color:#4A4640}
.map-canvas{height:540px;border-radius:16px;border:1px solid var(--line);overflow:hidden;position:relative;background:#F2EFE8;background-image:linear-gradient(30deg, rgba(203,198,187,.5) 12%, transparent 12.5%, transparent 87%, rgba(203,198,187,.5) 87.5%),linear-gradient(150deg, rgba(203,198,187,.5) 12%, transparent 12.5%, transparent 87%, rgba(203,198,187,.5) 87.5%),linear-gradient(30deg, rgba(203,198,187,.5) 12%, transparent 12.5%, transparent 87%, rgba(203,198,187,.5) 87.5%),linear-gradient(150deg, rgba(203,198,187,.5) 12%, transparent 12.5%, transparent 87%, rgba(203,198,187,.5) 87.5%);background-size:80px 140px;background-position:0 0,0 0,40px 70px,40px 70px}.road{position:absolute;background:#fff;border:1px solid #DDD3C5;border-radius:99px}.r1{left:-40px;top:160px;width:780px;height:30px;transform:rotate(-10deg)}.r2{left:250px;top:-60px;width:34px;height:710px;transform:rotate(16deg)}.r3{left:30px;top:360px;width:670px;height:24px;transform:rotate(8deg)}.marker{position:absolute;color:var(--ink);filter:drop-shadow(0 6px 12px rgba(0,0,0,.2));}.marker svg{width:32px;height:32px}.cone{position:absolute;width:110px;height:90px;background:radial-gradient(ellipse at 50% 0%, rgba(193,150,78,.32), rgba(193,150,78,0) 66%);clip-path:polygon(48% 0,100% 100%,0 100%);transform-origin:50% 0}.popup{position:absolute;width:230px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:12px}.popup img{width:100%;height:94px;object-fit:cover;border-radius:10px;margin:8px 0}.map-controls{position:absolute;right:14px;bottom:14px;display:flex;flex-direction:column;gap:6px}.map-controls .btn{width:36px;height:36px;padding:0}
.player{background:#0E0E0E;border-radius:18px;overflow:hidden;color:#fff;box-shadow:var(--shadow);border:1px solid #242424}.player-top{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:#161616}.video{height:520px;background:#101010;position:relative}.video img{width:100%;height:100%;object-fit:cover;opacity:.92}.video .unavailable{position:absolute;inset:0;display:grid;place-items:center;text-align:center;background:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,.75))}.play-big{width:72px;height:72px;border-radius:50%;background:rgba(193,150,78,.92);display:grid;place-items:center;color:#fff}.player-bar{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:#161616}.player-tools{display:flex;gap:14px;align-items:center}.dot{width:8px;height:8px;border-radius:50%;background:var(--success);display:inline-block}.dot.red{background:var(--danger)}.dot.gold{background:var(--gold)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field label{display:block;font-size:12px;font-weight:800;color:#6A655F;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:11px;height:40px;padding:0 12px;font:inherit;background:#fff}.field textarea{height:88px;padding:10px 12px;resize:vertical}.modal{border-radius:18px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);padding:18px}.alert{padding:12px 14px;border-radius:13px;border:1px solid var(--line);font-weight:700}.alert.success{background:var(--success-bg);border-color:#CAEAD3;color:var(--success)}.alert.danger{background:var(--danger-bg);border-color:#F1BCB8;color:var(--danger)}.alert.warn{background:var(--warn-bg);border-color:#F1D49E;color:var(--warn)}.token-box{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#111;color:#F0D699;border-radius:12px;padding:13px;word-break:break-all;font-size:13px}
.login-page{min-height:100vh;display:grid;grid-template-columns:1.1fr 480px;background:#121212;color:#fff}.login-visual{padding:56px;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at 30% 10%,rgba(193,150,78,.23),transparent 34%),#121212}.login-card{align-self:center;width:min(410px,calc(100% - 32px));background:#fff;color:var(--ink);border-radius:22px;padding:34px;box-shadow:0 22px 80px rgba(0,0,0,.25)}.login-card img{width:210px;margin-bottom:24px}.login-card .field{margin-bottom:14px}.login-card .btn{width:100%;height:44px}.login-card .error{margin-top:14px}.mobile-frame{width:390px;border-radius:34px;background:#0b0b0b;padding:10px;box-shadow:0 20px 60px rgba(0,0,0,.22)}.mobile-screen{background:#F8F6F1;border-radius:26px;min-height:740px;overflow:hidden}.mobile-top{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:#F2EFE7;font-weight:800}.mobile-content{padding:16px}.mobile-nav{height:62px;background:#151515;color:#fff;display:flex;justify-content:space-around;align-items:center;border-radius:0 0 26px 26px}.mobile-nav a{display:grid;place-items:center;color:#bbb;font-size:11px;gap:4px}.mobile-nav a.active{color:var(--gold)}.mobile-nav svg{width:20px;height:20px}.mobile-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.mobile-grid .preview{height:108px}.mobile-grid .camera-body{padding:9px}.mobile-grid .camera-title{font-size:12px}.mobile-grid .camera-meta{font-size:10px}.mobile-map{height:520px;border-radius:16px}.mobile-player .video{height:520px}.mobile-player .player-top{height:48px}.mobile-player .player-bar{height:54px}.state-card{display:grid;place-items:center;min-height:220px;text-align:center;color:var(--muted)}.state-card svg{width:42px;height:42px;color:#B7B1A7;margin-bottom:10px}.component-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.color-chip{display:flex;align-items:center;gap:8px}.swatch{width:34px;height:34px;border-radius:9px;border:1px solid var(--line)}.flow{display:flex;align-items:center;gap:12px;overflow:auto;padding-bottom:6px}.flow-step{min-width:140px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;text-align:center}.arrow{color:var(--gold);font-weight:900}.dark-link{color:#fff;text-decoration:underline;text-decoration-color:rgba(193,150,78,.7);text-underline-offset:4px}
@media(max-width:980px){.shell{grid-template-columns:1fr}.sidebar{height:auto;position:relative;border-radius:0 0 18px 18px}.main{padding:18px 14px}.grid.cols-2,.grid.cols-3,.grid.cols-4,.camera-grid,.stat-grid,.split,.form-grid{grid-template-columns:1fr}.topbar{height:auto;gap:10px}.table{display:block;overflow:auto}.login-page{grid-template-columns:1fr}.login-visual{display:none}.login-card{margin:40px auto}.mobile-frame{width:100%}.video{height:330px}}


/* Sesame logo no-distort fix */
.brand img,.brand-logo{height:34px;width:auto;object-fit:contain}.brand-mark-square{width:34px;height:34px;object-fit:contain}

/* v6 logo QA fix: never compose product logo from mark + HTML text. Use the single SVG asset. */
.brand-logo-link{display:flex;align-items:center;gap:0;min-width:0;overflow:visible;}
.brand-logo-link .brand-logo-full{display:block;height:34px;width:auto;max-width:172px;object-fit:contain;object-position:left center;}
.login-card img{width:220px;height:auto;object-fit:contain;}
.login-visual img{width:280px;height:auto;object-fit:contain;}

/* Runtime compatibility for the PHP application markup */
button,
.filters a,
.pager a,
.row-actions a {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
button.primary {
  background: linear-gradient(180deg,#D8A54D,#C1964E);
  color: #fff;
  border-color: #B18740;
}
button.danger {
  color: var(--danger);
  border-color: #E7B3AE;
  background: #fff;
}
.row-actions a.danger {
  color: var(--danger);
  border-color: #E7B3AE;
  background: #fff;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}
input,
select {
  height: 40px;
}
textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"],
input[type="hidden"] {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
}
label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #6A655F;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #F6F3ED;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 6px;
  font-size: 12px;
  color: #4A4640;
}
.workspace {
  min-width: 0;
}
.brand-mark-compat {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.sidebar .locale-switch {
  display: block;
  margin-bottom: 10px;
}
.locale-switch select {
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 34px 0 11px;
  color: #E8E4DC;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 800;
  outline: none;
}
.locale-switch select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193,150,78,.24);
}
.login-card .locale-switch select {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}
.logout-link {
  min-height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #E8E4DC;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 800;
}
.logout-link {
  justify-content: flex-start;
  padding: 0 11px;
}
.logout-link svg {
  width: 18px;
  height: 18px;
}
.nav a svg,
.logout-link svg {
  fill: currentColor;
}
.panel:not(.map-panel) {
  padding: 22px;
  margin-bottom: 16px;
  overflow: hidden;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin-bottom: 0;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.summary-card {
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.04em;
}
.server-grid {
  display: grid;
  gap: 12px;
}
.server-card {
  grid-template-columns: minmax(170px, 1fr) minmax(240px, 2fr) auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.server-card > div span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}
.server-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.server-card dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.server-card dd {
  margin: 2px 0 0;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}
.server-card dt:nth-of-type(1), .server-card dd:nth-of-type(1) { grid-column: 1; }
.server-card dt:nth-of-type(2), .server-card dd:nth-of-type(2) { grid-column: 2; }
.server-card dt:nth-of-type(3), .server-card dd:nth-of-type(3) { grid-column: 3; }
.server-card dt:nth-of-type(4), .server-card dd:nth-of-type(4) { grid-column: 4; }
.server-card dt:nth-of-type(5), .server-card dd:nth-of-type(5) { grid-column: 5; }
.server-card dt { grid-row: 1; }
.server-card dd { grid-row: 2; }
.server-card .server-check-result {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  min-width: 0;
  max-width: 100%;
}
.server-card .server-metric-explain {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid #F1D49E;
  border-radius: 12px;
  background: var(--warn-bg);
  color: #7A4F08;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}
.server-card .inline-form {
  justify-self: end;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.group-admin-grid {
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
}
.admin-grid > .panel {
  min-width: 0;
}
.form {
  display: grid;
  gap: 14px;
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.form-actions a {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.delete-confirm {
  margin-bottom: 20px;
}
.delete-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}
.delete-meta dt {
  color: var(--muted);
  font-weight: 800;
}
.delete-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.check-list {
  display: grid;
  gap: 8px;
}
.assignment-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.assignment-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.assignment-toolbar input {
  height: 36px;
}
.assignment-selected-only {
  min-height: 36px;
  white-space: nowrap;
}
.assignment-selected-only.active {
  color: #8A5C0C;
  background: #F9F0DE;
  border-color: #DEBD78;
}
.assignment-count {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.assignment-list {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FAF9F6;
  scrollbar-width: thin;
}
.assignment-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.assignment-row:hover {
  background: #fff;
}
.assignment-row input:checked + span {
  color: #8A5C0C;
}
.assignment-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.assignment-empty {
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}
.table-search,
.audit-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.table-search input,
.audit-filters input,
.audit-filters select {
  width: min(280px, 100%);
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.table-wrap > table {
  border: 0;
  border-radius: 0;
}
.table-cameras {
  min-width: 820px;
}
.table-cameras th:nth-child(1),
.table-cameras td:nth-child(1) {
  width: 110px;
}
.table-cameras th:nth-child(2),
.table-cameras td:nth-child(2) {
  width: 140px;
}
.table-cameras th:nth-child(3),
.table-cameras td:nth-child(3) {
  width: 130px;
}
.table-cameras th:nth-child(4),
.table-cameras td:nth-child(4) {
  width: 86px;
}
.table-cameras th:nth-child(5),
.table-cameras td:nth-child(5) {
  width: 220px;
}
.table-cameras th:last-child,
.table-cameras td:last-child {
  width: 150px;
}
.table-audit {
  min-width: 920px;
}
.table-audit th:nth-child(1),
.table-audit td:nth-child(1) {
  width: 170px;
}
.table-audit th:nth-child(2),
.table-audit td:nth-child(2) {
  width: 120px;
}
.table-audit th:nth-child(3),
.table-audit td:nth-child(3) {
  width: 130px;
}
.table-audit th:nth-child(4),
.table-audit td:nth-child(4) {
  min-width: 0;
}
th {
  text-align: left;
  font-size: 11px;
  color: #77716A;
  text-transform: uppercase;
  letter-spacing: .055em;
  background: #FAF8F4;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
tr:last-child td {
  border-bottom: 0;
}
.row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: flex-start;
  min-width: 132px;
}
.row-actions a,
.row-actions button,
.inline-form button,
.table-search button,
.audit-filters button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}
.inline-form {
  display: inline-flex;
}
.table-technical {
  width: 210px;
  max-width: 210px;
  min-width: 180px;
}
.local-time {
  white-space: nowrap;
}
.technical-result {
  max-width: 100%;
}
.technical-result summary {
  cursor: pointer;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8A5C0C;
  font-weight: 800;
}
.technical-result pre {
  max-height: 180px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #F6F3ED;
  color: #4A4640;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pager,
.pager-note {
  margin-top: 14px;
}
.pager {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pager a,
.pager-gap {
  min-width: 36px;
  padding: 0 10px;
}
.pager-gap {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 800;
}
.filters a.active,
.pager a.active {
  background: #F9F0DE;
  color: #8A5C0C;
  border-color: #DEBD78;
}
.viewer-filters {
  margin-bottom: 8px;
}
.density-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.density-switch span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}
.density-switch a {
  width: 38px;
  padding: 0;
}
.group-filter {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 640px;
  min-width: min(360px, 100%);
  max-width: min(1120px, 100%);
}
.group-filter select {
  flex: 1 1 220px;
  min-width: 0;
  width: auto;
  font-weight: 800;
}
.camera-search-input {
  flex: 1 1 220px;
  min-width: 180px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}
.camera-search-input::placeholder {
  color: #AAA49A;
}
.group-filter button {
  flex: 0 0 auto;
  min-width: 112px;
  white-space: nowrap;
}
.preview-refresh-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 210px;
}
.preview-refresh-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.preview-refresh-control select {
  flex: 0 0 112px;
  width: 112px;
}
.group-filter-results {
  max-width: 100%;
  max-height: 118px;
  overflow: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.filter-empty {
  color: var(--muted);
  font-weight: 800;
}
.camera-card {
  min-width: 0;
}
.camera-grid {
  --camera-cols: 3;
  grid-template-columns: repeat(var(--camera-cols), minmax(0, 1fr));
  align-items: start;
}
.camera-grid.cols-2 { --camera-cols: 2; }
.camera-grid.cols-3 { --camera-cols: 3; }
.camera-grid.cols-4 { --camera-cols: 4; }
.camera-grid.cols-5 { --camera-cols: 5; }
.camera-grid.cols-6 { --camera-cols: 6; }
.preview {
  display: block;
  height: auto;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #171717;
}
.mobile-grid .preview {
  height: auto;
  aspect-ratio: 16 / 9;
}
.preview.is-loading::before,
.preview.no-preview::before,
.map-popup-preview.is-loading::before,
.map-popup-preview.no-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg,#171717,#35322d);
}
.preview img,
.map-popup-preview img {
  position: relative;
  z-index: 1;
}
.preview-spinner {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.24);
  border-top-color: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: preview-spin .8s linear infinite;
}
.preview.is-loading .preview-spinner,
.map-popup-preview.is-loading .preview-spinner {
  display: block;
}
@keyframes preview-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.preview-state {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: rgba(255,255,255,.78);
  background: rgba(17,17,17,.58);
  font-weight: 800;
}
.preview.no-preview .preview-state,
.preview.stream-unavailable .preview-state,
.map-popup-preview.no-preview .preview-state,
.map-popup-preview.stream-unavailable .preview-state {
  display: grid;
}
.preview.has-preview .preview-state,
.map-popup-preview.has-preview .preview-state {
  display: none;
}
.preview.no-preview .preview-state,
.map-popup-preview.no-preview .preview-state {
  background: transparent;
}
.preview-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: clamp(44px, 18%, 68px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(17,17,17,.56);
  border: 2px solid rgba(255,255,255,.78);
  box-shadow: 0 10px 28px rgba(0,0,0,.34);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease;
}
.preview-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 8%;
  border-top: clamp(10px, 3.8vw, 15px) solid transparent;
  border-bottom: clamp(10px, 3.8vw, 15px) solid transparent;
  border-left: clamp(15px, 5.6vw, 23px) solid currentColor;
}
.preview:hover .preview-play,
.preview:focus-visible .preview-play,
.map-popup-preview:hover .preview-play,
.map-popup-preview:focus-visible .preview-play {
  background: rgba(193,150,78,.92);
  border-color: rgba(255,255,255,.95);
  transform: translate(-50%, -50%) scale(1.04);
}
.preview.is-loading .preview-play,
.map-popup-preview.is-loading .preview-play,
.preview.no-preview .preview-play,
.preview.stream-unavailable .preview-play,
.map-popup-preview.no-preview .preview-play,
.map-popup-preview.stream-unavailable .preview-play {
  opacity: 0;
}
.camera-card > .camera-meta {
  padding: 12px 54px 12px 12px;
}
.camera-card > .camera-meta strong,
.camera-card > .camera-meta span {
  display: block;
}
.camera-card > .camera-meta strong {
  color: var(--ink);
  font-size: 15px;
}
.favorite-form {
  position: absolute;
  right: 10px;
  bottom: 12px;
}
.favorite {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}
.favorite.active {
  color: var(--gold);
  background: #FFF8E8;
  border-color: #E5C991;
}
.map-panel {
  padding: 0;
  overflow: hidden;
}
.map {
  height: calc(100vh - 138px);
  min-height: 520px;
  background: #F2EFE8;
}
.camera-marker-icon {
  overflow: visible;
}
.camera-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 132px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.camera-view-cone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--camera-cone-width, 84px);
  height: var(--camera-cone-length, 72px);
  transform: translate(-50%, -100%) rotate(var(--camera-direction, 0deg));
  transform-origin: 50% 100%;
  clip-path: polygon(50% 100%, 100% 0, 0 0);
  background: linear-gradient(180deg, rgba(193,150,78,.52), rgba(193,150,78,.12) 72%, rgba(193,150,78,0));
  filter: drop-shadow(0 4px 12px rgba(138,92,12,.35));
  pointer-events: none;
  z-index: 1;
}
.camera-marker-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #111;
  background: var(--gold);
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  font-size: 14px;
  line-height: 1;
  z-index: 2;
}
.camera-cluster-icon {
  background: transparent;
  border: 0;
}
.camera-cluster {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(0,0,0,.28), 0 0 0 9px rgba(193,150,78,.22);
  font-weight: 900;
  line-height: 1;
}
.camera-cluster span {
  min-width: 0;
  max-width: 42px;
  overflow: hidden;
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
}
.camera-cluster[data-digits="1"] span,
.camera-cluster[data-digits="2"] span {
  font-size: 18px;
}
.camera-cluster[data-digits="3"] span {
  font-size: 16px;
}
.camera-cluster[data-digits="4"] span {
  font-size: 14px;
}
.camera-cluster[data-digits="5"] span,
.camera-cluster[data-digits="6"] span {
  font-size: 12px;
}
.camera-position-field {
  display: grid;
  gap: 8px;
}
.camera-position-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.camera-position-head strong {
  color: #6A655F;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.camera-position-head .camera-map-clear {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}
.camera-position-map {
  height: 320px;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #F2EFE8;
}
.camera-direction-handle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--gold);
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.camera-map-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #DEBD78;
  border-radius: 12px;
  background: #FFF8E8;
  color: #8A5C0C;
  font-weight: 800;
}
.camera-map-confirm[hidden] {
  display: none;
}
.camera-map-confirm.attention {
  box-shadow: 0 0 0 3px rgba(193,150,78,.18);
}
.camera-map-confirm div {
  display: flex;
  gap: 7px;
}
.camera-map-confirm button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}
.camera-popup .leaflet-popup-content-wrapper {
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.camera-popup .leaflet-popup-content {
  width: 240px !important;
  margin: 10px;
}
.map-popup-card {
  display: grid;
  gap: 7px;
}
.map-popup-card strong,
.map-popup-card span {
  display: block;
}
.map-popup-card strong {
  color: var(--ink);
  font-size: 15px;
}
.map-popup-card span {
  color: var(--muted);
  font-size: 12px;
}
.map-popup-preview {
  position: relative;
  display: block;
  height: 118px;
  overflow: hidden;
  border-radius: 12px;
  background: #171717;
}
.map-popup-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview img[hidden],
.map-popup-preview img[hidden] {
  display: none;
}
.map-popup-preview.no-preview {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.78);
  font-weight: 800;
}
.map-popup-preview-state {
  display: none;
  padding: 12px;
  text-align: center;
}
.map-popup-preview.no-preview .map-popup-preview-state {
  display: grid;
  place-items: center;
}
.map-popup-preview.has-preview .map-popup-preview-state,
.map-popup-preview.has-preview .preview-spinner {
  display: none;
}
.map-popup-preview .preview-play {
  width: 46px;
  display: block;
  background: rgba(17,17,17,.42);
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 8px 20px rgba(0,0,0,.26);
}
.map-popup-preview .preview-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: 0;
  background: transparent;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid currentColor;
  clip-path: none;
  transform: translate(-34%, -50%);
}
.map-popup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.map-popup-actions .favorite-form {
  position: static;
  flex: 0 0 auto;
}
.leaflet-popup-content a {
  color: #8A5C0C;
  font-weight: 800;
}
.audit-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  max-width: 100%;
  min-width: 0;
}
.audit-details dt,
.audit-details span strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.audit-details dd,
.audit-details span {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}
.audit-details dd {
  overflow-wrap: anywhere;
}
.audit-details span {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
  max-width: min(100%, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-details span strong {
  flex: 0 0 auto;
}
.audit-context {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.audit-details-text {
  display: block;
  overflow-wrap: anywhere;
}
.audit-raw {
  flex-basis: 100%;
  min-width: 0;
}
.audit-raw summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.audit-raw pre {
  max-height: 150px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #F6F3ED;
  color: #4A4640;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.audit-action {
  white-space: nowrap;
}
.login-brand {
  display: block;
  margin-bottom: 10px;
}
.login-card {
  justify-self: center;
}
.login-card button.primary {
  width: 100%;
  min-height: 44px;
}
.login-card .locale-switch {
  display: block;
  margin-top: 16px;
}
.login-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.login-features span {
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #D9D3C7;
  font-size: 12px;
  font-weight: 800;
}
body.player-view {
  overflow: hidden;
  background: #000;
}
body.player-view .workspace,
body.player-view .player-page,
body.player-view .player-stage,
body.player-view .player-frame {
  width: 100vw;
  max-width: none;
  height: 100vh;
  margin: 0;
  padding: 0;
}
@supports (height: 100dvh) {
  body.player-view .workspace,
  body.player-view .player-page,
  body.player-view .player-stage,
  body.player-view .player-frame {
    height: 100dvh;
  }
}
.player-stage {
  background: #000;
}
.player-frame {
  display: block;
  border: 0;
}
@media(max-width:980px) {
  .camera-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    gap: 14px;
    padding: 16px;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav a {
    min-width: 0;
  }
  .sidebar-foot {
    display: grid;
    gap: 8px;
  }
  .summary-grid,
  .admin-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  .server-card {
    grid-template-columns: 1fr;
  }
  .server-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .server-card dt,
  .server-card dd {
    grid-column: auto !important;
    grid-row: auto;
  }
  .section-head {
    display: grid;
  }
  .assignment-toolbar {
    grid-template-columns: 1fr;
  }
  .assignment-count {
    justify-self: start;
  }
  .panel:not(.map-panel) {
    padding: 16px;
  }
  .map {
    height: 70vh;
    min-height: 430px;
  }
  .camera-position-map {
    height: 280px;
    min-height: 280px;
  }
  .camera-map-confirm {
    display: grid;
  }
  .camera-map-confirm div {
    justify-content: stretch;
  }
  .camera-map-confirm button {
    flex: 1;
  }
  table {
    display: block;
    overflow-x: auto;
  }
}
@media(max-width:640px) {
  h1 {
    font-size: 28px;
  }
  .main {
    padding: 14px 10px 28px;
  }
  .sidebar {
    padding: 14px 16px 16px;
    gap: 10px;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .brand-logo-link .brand-logo-full {
    height: 30px;
    max-width: 170px;
  }
  .nav-section {
    margin: 4px 2px 0;
  }
  .nav {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav a {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 10px;
  }
  .sidebar .locale-switch {
    margin-bottom: 6px;
    max-width: 100%;
    min-width: 0;
  }
  .sidebar-foot {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .sidebar .locale-switch select,
  .logout-link {
    min-height: 34px;
  }
  .camera-grid {
    grid-template-columns: 1fr;
  }
  .density-switch {
    display: none;
  }
  .login-card {
    padding: 26px;
  }
  .login-card img {
    width: 200px;
  }
}

.agents-admin-grid {
  align-items: start;
}
.agents-toolbar .filters {
  margin-bottom: 0;
}
.agent-create-panel > summary,
.agent-command-panel > summary,
.agent-settings-details > summary,
.json-details > summary {
  cursor: pointer;
  list-style: none;
}
.agent-create-panel > summary::-webkit-details-marker,
.agent-command-panel > summary::-webkit-details-marker,
.agent-settings-details > summary::-webkit-details-marker,
.json-details > summary::-webkit-details-marker {
  display: none;
}
.agent-create-panel > summary,
.agent-command-panel > summary,
.json-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agent-create-panel > summary::after,
.agent-command-panel > summary::after,
.json-details > summary::after,
.agent-settings-details > summary::after {
  content: "▸";
  color: var(--muted);
  font-weight: 900;
}
.agent-create-panel[open] > summary::after,
.agent-command-panel[open] > summary::after,
.json-details[open] > summary::after,
.agent-settings-details[open] > summary::after {
  content: "▾";
}
.agent-create-panel > summary strong,
.agent-command-panel > summary strong,
.json-details > summary strong {
  display: block;
  font-size: 18px;
}
.agent-create-panel > summary small,
.agent-command-panel > summary small,
.json-details > summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.agent-create-panel > .form,
.agent-command-panel > .form {
  margin-top: 16px;
}
.agent-list,
.agent-camera-grid {
  display: grid;
  gap: 12px;
}
.agent-card,
.agent-camera-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.agent-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193,150,78,.14), var(--shadow-sm);
}
.agent-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.agent-card-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 900;
  font-size: 16px;
}
.agent-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}
.agent-meta dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.agent-meta dd {
  margin: 2px 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}
.agent-edit-form,
.agent-password-form,
.agent-command-form {
  display: grid;
  gap: 10px;
}
.agent-settings-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.68);
}
.agent-settings-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 850;
}
.agent-settings-details[open] > summary {
  margin-bottom: 10px;
}
.agent-action-block {
  display: grid;
  gap: 8px;
}
.agent-action-block > strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.agent-actions {
  flex-wrap: wrap;
}
.agent-camera-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.agent-snapshot {
  height: 150px;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
  border: 1px solid var(--line);
}
.agent-snapshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.json-panel {
  min-height: 220px;
  max-height: 520px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: 12px;
  background: #141414;
  color: #F7F0E4;
  font: 12px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace;
  white-space: pre-wrap;
}
@media(max-width:980px) {
  .agent-camera-grid {
    grid-template-columns: 1fr;
  }
}
