:root {
  font-family: "Segoe UI", Arial, sans-serif; font-size: 15px;
  color: #213d32; background: #f5f6f1;
  --ink: #213d32; --muted: #68786e; --line: #dfe5dc;
  --green: #285a40; --soft: #eaf1e7; --brand: #5e9967;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { min-height: 42px; border: 1px solid #ccd7cb; border-radius: 9px; padding: 10px 13px; color: var(--ink); background: #fff; }
input, select, textarea { width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.6; }
button { cursor: pointer; font-weight: 600; }
button:hover { background: #f0f4ee; border-color: #8caa8b; }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid #87b78a; outline-offset: 3px; }
.primary-button { background: var(--green); border-color: var(--green); color: #fff; }
.primary-button:hover { background: #1b4530; color: #fff; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.8px; }
h3 { font-size: 18px; margin-bottom: 0; font-weight: 650; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }
.kicker { color: #6b826f; font-size: 10px; letter-spacing: 1.5px; font-weight: 750; margin-bottom: 7px; }
.subtle, .section-intro, .small-note { color: var(--muted); line-height: 1.6; font-size: 13px; }
.section-intro { margin: 0 0 22px; }
.topbar { height: 78px; padding: 0 30px; display: flex; align-items: center; gap: 22px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 23px; text-decoration: none; color: var(--green); flex-shrink: 0; }
.brand img { width: 225px; height: auto; display: block; }
.product-name { border-left: 1px solid var(--line); padding-left: 23px; font-size: 16px; }
.fleet-health { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-left: auto; color: var(--muted); }
.pulse { width: 7px; height: 7px; background: var(--brand); border-radius: 50%; }
.updated { font-size: 11px; color: var(--muted); }
.quiet-button { border: 0; background: transparent; font-size: 12px; }
.app-shell { display: grid; grid-template-columns: 310px minmax(0,1fr); min-height: calc(100vh - 78px); }
.fleet-panel { padding: 27px 18px 16px; border-right: 1px solid var(--line); background: #fcfdf9; position: sticky; top: 78px; height: calc(100vh - 78px); display: flex; flex-direction: column; min-width: 0; }
.fleet-heading { display: flex; align-items: center; justify-content: space-between; }
.fleet-heading h1 { font-size: 25px; margin: 0; }
.icon-button { width: 34px; height: 34px; min-height: 34px; padding: 0; font-size: 24px; font-weight: 400; background: var(--soft); color: var(--green); border: 0; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); padding: 19px 0; margin: 9px 0 17px; border-bottom: 1px solid var(--line); }
.stats div { border-right: 1px solid var(--line); text-align: center; }
.stats div:last-child { border: 0; }
.stats strong { display: block; font-size: 23px; font-weight: 650; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 11px; color: var(--muted); display: block; margin-top: 5px; }
.search-box { display: flex; align-items: center; gap: 7px; background: white; border: 1px solid #ccd7cb; border-radius: 9px; padding: 0 10px; }
.search-box:focus-within { outline: 2px solid #87b78a; outline-offset: 2px; }
.search-box input { border: 0; outline: 0; padding: 10px 0; font-size: 12px; background: transparent; }
.filter-row { display: flex; gap: 2px; padding: 4px; background: #edf1e9; border-radius: 8px; margin: 12px 0 17px; }
.filter { flex: 1; min-height: 30px; padding: 6px 5px; font-size: 11px; border: 0; color: #52685a; background: transparent; border-radius: 6px; white-space: nowrap; }
.filter.active { background: white; color: #234b32; box-shadow: 0 1px 4px #193e3214; }
.fleet-panel > label { font-size: 11px; color: var(--muted); }
.fleet-panel select { font-size: 12px; }
.drag-hint { font-size: 11px; color: var(--muted); margin: 17px 0 9px; }
.customer-groups { flex: 1; min-height: 50px; overflow: auto; display: grid; align-content: start; gap: 12px; padding-right: 3px; }
.customer-group { min-width: 0; border: 1px solid transparent; border-radius: 9px; }
.customer-group.drop-target { background: var(--soft); border-color: var(--brand); }
.group-heading { border: 0; background: transparent; width: 100%; display: flex; align-items: center; gap: 7px; justify-content: space-between; text-align: left; padding: 8px; min-height: 34px; font-size: 12px; }
.group-heading::before { content: "⌄"; color: #738676; }
.group-heading[aria-expanded="false"]::before { content: "›"; }
.group-heading > span:first-child { flex: 1; overflow-wrap: anywhere; }
.group-count { color: var(--muted); background: #eef1e9; min-width: 21px; border-radius: 5px; font-size: 10px; text-align: center; padding: 3px; }
.group-screens { display: grid; gap: 3px; }
.group-screens.collapsed { display: none; }
.screen-row { display: flex; align-items: center; gap: 10px; min-height: 62px; border: 1px solid transparent; width: 100%; text-align: left; background: transparent; padding: 10px; }
.screen-row.selected { background: #eaf1e5; border-color: #c8dbc0; box-shadow: inset 3px 0 #5e9967; }
.screen-row.dragging { opacity: .5; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: #9ba69d; }
.status-dot.online { background: #4e925c; }
.status-dot.pending { background: #bd852c; }
.status-dot.revoked { background: #b76961; }
.screen-copy { min-width: 0; }
.screen-copy strong, .screen-copy small { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.screen-copy strong { font-size: 12px; font-weight: 650; }
.screen-copy small { color: var(--muted); font-size: 10px; margin-top: 5px; }
.group-empty { padding: 9px; font-size: 10px; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; text-align: center; margin: 0 7px; }
.no-results { color: var(--muted); font-size: 13px; padding: 20px 8px; }
.fleet-pages { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-size: 11px; }
.fleet-pages button { font-size: 11px; padding: 6px 9px; min-height: 32px; }
.detail-panel { padding: 30px 36px 40px; min-width: 0; }
#screen-detail { max-width: 1700px; margin: 0 auto; }
.screen-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.screen-header h2 { font-size: 29px; margin: 9px 0 5px; }
.screen-header .subtle { margin: 0; }
.status-line { display: flex; align-items: center; gap: 11px; }
.status-pill { font-size: 10px; padding: 4px 8px; border-radius: 5px; font-weight: 700; color: #68796b; background: #e8ece6; }
.status-pill.online { background: #e2eedb; color: #39623a; }
.status-pill.pending { background: #f6ecd5; color: #8c6524; }
.status-pill.revoked { background: #f3e0dc; color: #934238; }
.screen-number { font-size: 11px; font-family: Consolas, monospace; color: #758278; }
.header-actions button { font-size: 12px; background: transparent; }
.workspace-tabs { display: flex; gap: 27px; border-bottom: 1px solid var(--line); margin-bottom: 23px; }
.workspace-tabs button { border: 0; background: transparent; border-radius: 0; color: var(--muted); padding: 12px 2px 14px; font-size: 13px; border-bottom: 3px solid transparent; }
.workspace-tabs [aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); font-weight: 750; }
.viewer-card { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.section-title .subtle { margin: 5px 0 0; font-size: 12px; }
.viewer-actions { display: flex; align-items: center; gap: 13px; }
.preview-state { font-size: 11px; color: var(--muted); }
.preview-state.live { color: var(--green); }
.viewer-actions button { font-size: 12px; }
.screen-stage { background: #13231d; border-radius: 9px; height: clamp(240px,calc(100vh - 490px),760px); display: flex; justify-content: center; align-items: center; padding: 8px; overflow: hidden; }
.screen-stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; touch-action: none; cursor: crosshair; }
.preview-empty { color: #bbccbd; text-align: center; padding: 30px; }
.preview-empty > span { display: block; font-size: 45px; font-weight: 300; color: #789581; margin-bottom: 18px; }
.preview-empty h3 { color: #e5eee2; font-size: 19px; font-weight: 500; margin-bottom: 10px; }
.preview-empty p { font-size: 12px; margin: 0; max-width: 370px; line-height: 1.6; }
.frame-note { min-height: 14px; margin: 10px 0; font-size: 10px; color: var(--muted); }
.control-bar { display: grid; grid-template-columns: auto 160px minmax(180px,1fr); gap: 12px; align-items: center; }
.key-group { display: flex; gap: 5px; }
.key-group button, .control-bar select, .text-form button, .text-form input { font-size: 12px; min-height: 38px; padding: 8px 10px; }
.text-form { display: flex; gap: 7px; }
.text-form input { flex: 1; }
.text-form button { white-space: nowrap; }
.control-help { margin-top: 17px; padding-top: 13px; border-top: 1px solid #edf0e9; color: var(--muted); font-size: 11px; line-height: 1.6; }
summary { cursor: pointer; }
.browse-screens { display: none; }
.control-help p { margin: 9px 0 0; max-width: 720px; }
.quick-facts { display: grid; grid-template-columns: repeat(4,1fr); padding: 23px 5px; gap: 18px; }
.quick-facts > div { border-right: 1px solid var(--line); }
.quick-facts > div:last-child { border: 0; }
.quick-facts span { font-size: 10px; color: var(--muted); display: block; margin-bottom: 6px; }
.quick-facts strong { font-size: 12px; font-weight: 650; }
.info-rail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
.info-card, .activity-card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 25px; min-width: 0; }
.details-form { display: grid; gap: 17px; }
.paired-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.details-form button { justify-self: start; }
.facts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px; }
.facts-grid span, .location-summary span { font-size: 11px; color: var(--muted); display: block; margin-bottom: 6px; }
.facts-grid strong, .location-summary strong { display: block; font-size: 13px; overflow-wrap: anywhere; font-weight: 600; line-height: 1.5; }
.span-all { grid-column: 1/-1; }
.tiny-note { color: var(--muted); font-size: 11px; margin: -4px 0 19px; }
.location-summary { display: grid; gap: 18px; }
.info-card iframe { width: 100%; height: 250px; border: 0; border-radius: 9px; margin-top: 20px; }
.map-link { display: inline-block; font-size: 12px; color: var(--green); margin-top: 15px; }
.text-button { border: 0; font-size: 12px; color: var(--green); }
.assignment-card h3 { margin-bottom: 12px; }
.assignment-card form { display: flex; gap: 10px; }
.assignment-card form button { white-space: nowrap; }
.access-settings { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 17px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.access-settings p { margin: 12px 0; }
.danger-button { color: #9a4037; border-color: #dfbfb9; }
.events { display: grid; gap: 0; }
.event-row { display: flex; gap: 14px; align-items: start; padding: 17px 0; border-top: 1px solid var(--line); }
.event-icon { color: #54815b; background: var(--soft); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; flex-shrink: 0; }
.event-row strong, .event-row small { display: block; }
.event-row strong { font-size: 13px; font-weight: 600; }
.event-row small { font-size: 11px; color: var(--muted); margin-top: 6px; }
.approval-card { padding: 22px; border: 1px solid #dfcea5; background: #fcf7e9; border-radius: 12px; margin-bottom: 23px; }
.approval-card p { font-size: 12px; line-height: 1.6; }
.approve-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 15px; align-items: end; }
.empty-state { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-symbol { font-size: 48px; color: #6c9271; background: #e9efdf; width: 95px; height: 95px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 25px; }
.empty-state h2 { font-size: 32px; margin: 9px 0 15px; }
.empty-state > p:not(.kicker) { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 24px; }
.login-page { min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 35px; background: radial-gradient(ellipse at bottom left,#e3ebdd,transparent 65%); }
.login-card { width: min(450px,100%); background: white; border: 1px solid var(--line); border-radius: 20px; padding: 38px; box-shadow: 0 20px 60px #254e3010; }
.login-logo { width: 270px; max-width: 100%; height: auto; margin-bottom: 35px; }
.login-card h1 { font-size: 38px; line-height: 1.1; margin: 15px 0; }
.login-card > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.stack-form { display: grid; gap: 17px; margin: 24px 0 20px; }
#message { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 50; background: #213d32; color: white; padding: 15px 20px; border-radius: 10px; max-width: 90vw; box-shadow: 0 8px 30px #17322025; font-size: 13px; }
@media(min-width:1900px) { .detail-panel { padding-left: 50px; padding-right: 50px; } .screen-stage { height: clamp(440px,54vh,820px); } }
@media(max-width:1250px) { .app-shell { grid-template-columns: 285px minmax(0,1fr); } .detail-panel { padding: 25px; } .control-bar { grid-template-columns: 1fr auto; } .text-form { grid-column: 1/-1; } .info-rail { grid-template-columns: 1fr; } }
@media(max-width:850px) { .topbar { padding: 0 18px; gap: 12px; height: 68px; } .brand img { width: 175px; } .brand { gap: 12px; } .product-name { padding-left: 12px; font-size: 13px; } .updated { display: none; } .app-shell { display: block; } .fleet-panel { position: static; height: auto; padding: 22px; border-right: 0; border-bottom: 1px solid var(--line); } .customer-groups { max-height: 255px; } .stats { margin-bottom: 12px; } .detail-panel { padding: 24px 18px; } .screen-stage { height: 45vh; } .quick-facts { grid-template-columns: repeat(2,1fr); } .screen-header { align-items: start; } .screen-header h2 { font-size: 25px; } .header-actions button { max-width: 155px; } .empty-state { min-height: 45vh; } }
@media(max-width:520px) { .fleet-health { display: none; } .quiet-button { margin-left: auto; } .brand img { width: 155px; } .product-name { display: none; } .screen-header { flex-direction: column; gap: 12px; } .header-actions button { max-width: none; } .section-title { align-items: start; } .viewer-actions { flex-direction: column; align-items: end; gap: 6px; } .viewer-card,.info-card,.activity-card { padding: 16px; } .control-bar { grid-template-columns: 1fr; } .key-group button { flex: 1; } .text-form { grid-column: auto; } .screen-stage { height: 33vh; min-height: 220px; } .workspace-tabs { gap: 20px; } .paired-fields,.approve-form { grid-template-columns: 1fr; } .assignment-card form { flex-direction: column; } .login-card { padding: 27px; } .login-page { padding: 18px; } .empty-state h2 { font-size: 25px; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; } }
@media(max-width:850px) { .screen-selected .fleet-panel { display:none; } .mobile-browsing .detail-panel { display:none; } .browse-screens { display:inline-block; border:0; background:transparent; color:var(--green); padding:0; min-height:34px; margin-bottom:16px; font-size:12px; } }
/* Developer-options content size stays next to the live view. */
.content-size-tools { margin-top:16px; }
.content-size-tools summary { cursor:pointer;font-weight:700;color:var(--green,#285a40); }
.content-size-tools p { max-width:78ch;line-height:1.5; }
.content-size-form { display:flex;align-items:end;gap:12px;flex-wrap:wrap; }
.content-size-form label { flex:1;max-width:260px; }
.content-size-tools .viewer-actions { flex-wrap:wrap; }
@media(min-width:1400px) {
  #panel-control:has(.content-size-tools[open]) { display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start; }
  #panel-control:has(.content-size-tools[open]) .content-size-tools { margin-top:0; }
  #panel-control:has(.content-size-tools[open]) .quick-facts { grid-column:1 / -1; }
  .content-size-tools[open] .section-title { flex-wrap:wrap;gap:12px; }
}
#vnc-viewer{display:block;width:100%;height:clamp(480px,76dvh,900px);border:0;border-radius:12px}
#vnc-card{padding:0;overflow:hidden;grid-column:1 / -1}
#vnc-card[hidden],#legacy-viewer-card[hidden]{display:none}
